{"size": 774, "ext": "js", "max_stars_repo_path": "app/src/examples/downsample.js", "max_stars_repo_name": "adamelmore/GammaCV", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/src/examples/downsample.js", "max_issues_repo_name": "adamelmore/GammaCV", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/src/examples/downsample.js", "max_forks_repo_name": "adamelmore/GammaCV", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.4545454545, "max_line_length": 89, "alphanum_fraction": 0.5297157623}
import * as gm from '../../../lib';

export default {
  op: (input, params) => gm.downsample(
    input,
    params.DOWNSAMPLE.coeficient,
    params.DOWNSAMPLE.type || 'mean', // crutch until we have no select prop feature #46
  ),
  tick(frame, {
    canvas, operation, output, session,
  }) {
    gm.clearCanvas(canvas);
    session.runOp(operation, frame, output);
    gm.canvasFromTensor(canvas, output);
  },
  params: {
    DOWNSAMPLE: {
      coeficient: {
        name: 'Coeficient', type: 'constant', min: 1, max: 20, step: 0.25, default: 1.75,
      },
      type: {
        name: 'Type',
        type: 'constant',
        values: [{
          name: 'Maximum', value: 'max',
        }, {
          name: 'Mean', value: 'mean',
        }],
      },
    },
  },
};
