Skip to content

Instantly share code, notes, and snippets.

@yearofthewhopper
Last active July 11, 2020 08:05
Show Gist options
  • Save yearofthewhopper/01ba0a771500669953ca4693fc711d2c to your computer and use it in GitHub Desktop.
Save yearofthewhopper/01ba0a771500669953ca4693fc711d2c to your computer and use it in GitHub Desktop.
const Scene = require('Scene')
const Animation = require('Animation')
Scene.root.findFirst('emitter0').then(obj => {
const alphaSampler = Animation.samplers.HSVA([
Animation.samplers.constant(1),
Animation.samplers.constant(1),
Animation.samplers.constant(1),
Animation.samplers.easeInQuad(1, 0)
]);
const sizeSampler = Animation.samplers.easeInQuad(0, 600);
obj.hsvaColorModulationModifier = alphaSampler;
obj.sizeModifier = sizeSampler;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment