Copy link to clipboard
Copied
For smoother html canvas playback, I used to replace this published code:
fnStartAnimation = function() {
stage.addChild(exportRoot);
createjs.Ticker.setFPS(lib.properties.fps);
createjs.Ticker.addEventListener("tick", stage);
}
with this code:
fnStartAnimation = function() {
stage.addChild(exportRoot);
createjs.Ticker.timingMode = createjs.Ticker.RAF_SYNCHED;
createjs.Ticker.setFPS(lib.properties.fps);
createjs.Ticker.addEventListener("tick", stage);
}
But with this new update the code looks like this:
fnStartAnimation = function() {
stage.addChild(exportRoot);
createjs.Ticker.framerate = lib.properties.fps;
createjs.Ticker.addEventListener("tick", stage);
}
What's the correct way to add this line of code back into it without screwing anything up?
createjs.Ticker.timingMode = createjs.Ticker.RAF_SYNCHED;
Hi.
The timingMode from the Ticker class is a static property which means its associated to the class itself not to an instance of the class.
So it doesn't matter from where you change it.
With that being sad, you can add the code to the first frame of the main timeline, for example, and everything should work as expected.
Copy link to clipboard
Copied
Hi.
The timingMode from the Ticker class is a static property which means its associated to the class itself not to an instance of the class.
So it doesn't matter from where you change it.
With that being sad, you can add the code to the first frame of the main timeline, for example, and everything should work as expected.
Copy link to clipboard
Copied
Thanks JC. I appreciate it!
Copy link to clipboard
Copied
You're welcome!