Skip to content

Instantly share code, notes, and snippets.

@ydaniv
Created August 20, 2019 11:24
Show Gist options
  • Save ydaniv/95e535efa7e339c3af72e41e76fb014c to your computer and use it in GitHub Desktop.
Save ydaniv/95e535efa7e339c3af72e41e76fb014c to your computer and use it in GitHub Desktop.
Introducing Kampos examples :: ticker full
import {Kampos, effects, Ticker} from 'kampos';
const target1 = document.querySelector('#canvas1');
const media1 = document.querySelector('#video1');
const target2 = document.querySelector('#canvas2');
const media2 = document.querySelector('#video2');
const hueSaturation = effects.hueSaturation();
const brightnessContrast = effects.brightnessContrast();
const ticker = new Ticker();
const kampos1 = new Kampos({target1, effects: [hueSaturation], ticker});
const kampos2 = new Kampos({target2, effects: [brightnessContrast], ticker});
hueSaturation.hue = 90;
brightnessContrast.contrast = 2.0;
kampos1.setSource(media1);
kampos2.setSource(media2);
ticker.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment