adamco
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by adamco
-
-
Hi, thanks, a codepen wont replicate this issue because as I said, it is running in a node.js script, but the code is:
var gsap = require('gsap'); TweenMax.ticker.fps(24); TweenMax.lagSmoothing(0); var timeline = new TimelineMax({ //repeat: -1 onStart: () => { console.log('timeline started'); } }); timeline.add(() => { console.log ('test');}, 10 ); timeline.add(() => { console.log ('test');}, 20 ); timeline.add(() => { console.log ('test');}, 30 ); timeline.add(() => { console.log ('test');}, 40 );
It runs fine until the CPU gets under stress and then TweenMax seems to run into that issue where it is looking for a visibilityState on a _doc that doesnt exist.
-
i am using TimelineMax in node and occasionally getting this:
I am assuming this is because there is no doc with a visibilityState....
Anyone have any ideas how I could fix this? Ideally without having to modify the gsap source
_doc.visibilityState on node.js
in GSAP
Posted
Thanks - I notice the change you made from:
to
I suspect that will fix it. Nice work!
Since I was only using TimelineMax I ended up changing it so that I only required the TimelineMax module
So that way there is no TweenMax initialized which I think was an easier fix in my case.
..
By the way, first time poster, but long-time user of GreenSock (used to use AS version). I was delighted to discover it actually worked in node.js and was able to use it for orchestrating timelines of events on the server. Brilliant stuff!