Created
August 20, 2019 11:24
-
-
Save ydaniv/95e535efa7e339c3af72e41e76fb014c to your computer and use it in GitHub Desktop.
Introducing Kampos examples :: ticker full
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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