Post Processing
setGrain
setGrain(params: object, [callback: Function])
Set grain post effect to the scene. Available options:
isEnabled: boolean
: state of the effect.intensity: number
: intensity of the grain.isAnimated: boolean
: mode of the grain.
js
api.setGrain(options, function () {
console.log('Grain is enabled!');
});
setChromaticAberration
setChromaticAberration(params: object, [callback: Function])
Set chromatic aberration post effect to the scene. Available options:
isEnabled: boolean
: state of the effect.aberrationAmount: number
radialIntensity: number
direction: { x: number, y: number }
js
api.setChromaticAberration(options, function () {
console.log('Chromatic aberration is enabled!');
});
setBloom
setBloom(params: object, [callback: Function])
Set bloom post effect to the scene. Available options:
isEnabled: boolean
: state of the effect.threshold: number
weight: number
kernel: number
scale: number
js
api.setBloom(options, function () {
console.log('Bloom is enabled!');
});
setColorize
setColorize(params: object, [callback: Function])
Set colorize post effect to the scene. Available options:
isEnabled: boolean
: state of the effect.hue: number
saturation: number
lightness: number
js
api.setColorize(options, function () {
console.log('Colorize is enabled!');
});