Jump to content


  • Posts

  • Joined

  • Last visited

About SntsDev

Profile Information

  • Gender

SntsDev's Achievements

  • Week One Done
  • One Month Later
  • One Year In

Recent Badges



  1. SntsDev

    Global onUpdate

    Thanks @GreenSock for that clarification. I understand that there is a default of 120 seconds where GSAP continues to work before going to sleep if it can, and I know that I can change that in the config. Perhaps that is a solution for my problem, changing that amount of time. However, I expected this to be simpler because in your internals you already know if it will be able to sleep soon (you know the duration, delays and repeats of scheduled animations). As you said, If I add an onUpdate callback function to every animation, that might be a bunch of calls.
  2. SntsDev

    Global onUpdate

    You're correct @ZachSaucier. @GreenSock, your answer is not what I'm looking for. That listener just says that it's ticking. It's equivalent to adding a callback to the ticker. Zach described it perfectly: to know when GSAP's timeline is actively updating ANY animation.
  3. SntsDev

    Global onUpdate

    Thanks @ZachSaucier. Exactly, I prefer to not depend on the developer of a particular task. I want to set up something that doesn’t depend on remembering to do it. Apart that, from the maintainability point of view, if needed, we would need to change things in many places or define a global function, and, if not needed anymore, make that function to do nothing and leave dead code here and there.
  4. SntsDev

    Global onUpdate

    When adding a listener to the ticker, it fires from start to infinite. Even when it's NOT doing animations. The parameters of the function called say nothing about effective work. I'm interested on having some kind of `onUpdate` global event. To know exactly when GSAP is working on ANY instance. I'm trying to save rendering frames in WebGL from the CPU. Among other things, this is needed. To add that to every animation would be a lot of work and depend on the developer. Is it possible to have a global event of effective animation work?
  5. Thanks Blake!, I ended up doing something very similar, although I called it a "hack". I think that Greensock´s comment goes to the point. I'm going to develop a plug-in for Three.js objects and I'll post it here.
  6. Hello there! I'm using TimelineMax to make a sequence for 3D objects using Three.js. So far so good, when working with numerical properties of objects. But I'd like to set true/false properties and use the state of the timeline. I know I can do my own functions (onComplete, onStart,...) but that requires me to keep control of the state while the timeline is playing, which is similar to create my own timeline function. The idea is to be able to scrub the playhead. So I used .set, both in TimelineMax or TweenMax to no luck. For instance: tm = new TimelineMax({align: start}); tm.add( new TweenMax(camera.position, 10, {x:100, y:100, z:100}), 1); //Works well tm.set(target, { visible: false }, 4); //Doesn't work tm.add( TweenMax.set(target, { visible: false, immediateRender: false, delay: 4}, 0); //Neither tm.add( TweenMax.set(target, { visible: false, immediateRender: false}, 4); //Neither Any ideas? Thanks