Jump to content
Search Community

GabeM

Members
  • Posts

    3
  • Joined

  • Last visited

GabeM's Achievements

1

Reputation

  1. GabeM

    Three.js properties

    @OSUblake Thank you very much for your assistance. The results aren't exactly what I expected, but this is a big step in the right direction (no pun intended)
  2. GabeM

    Three.js properties

    Is it possible to use this when creating a BezierPlugin tween that utilizes "autoRotate"? As far as I know, threejs does not support "rotationX", etc. My goal is to move a model of a fish along a path and have him face forward as he moves. TweenMax.to(myObject3d.position, 4, { bezier: { type: 'soft', values: [ { x: 0, y: 0, z: 0 }, { x: 100, y: 100, z: 100 } ], autoRotate: [ ['x', 'y', 'rotationZ', 0, false], ['z', 'x', 'rotationY', 0, false], ['z', 'y', 'rotationX', 0, false] ] }, ease: Power1.easeInOut });
  3. Greetings everyone! Thank you for taking the time to read my question. I am using TweenLite and TimelineLite to create an animation timeline that simulates a user navigating a set of "sections". When the user clicks a button, I create a tween that animates a percent value over the course of 0.3 seconds. On "update" of this tween, the "progress" of my timeline is set using TimelineLite.progress(x). My issue is that if one of the sections is tweened for another reason to a different position on screen, when the timeline is progressed, the section immediately snaps back to where the timeline wants it, based on the original creation. What I would like is that the position of the section would tween from it's new, updated position, to the endpoint defined in the timeline. Is this possible? Here is some pseudo-code that should help illustrate my question. var percentObj = { current: 0 }; var myTimeline = new TimelineLite(); // ---------- // Set starting positions myTimeline.add( TweenLite.set($('#section1'), { 'css': { 'y': 0 } }), TweenLite.set($('#section2'), { 'css': { 'y': 1000 } }), TweenLite.set($('#section3'), { 'css': { 'y': 1000 } }) ); // ---------- // Now that starting values are set, // pause the timeline myTimeline.pause(); // ---------- // Create future animations that // will be triggered by the user // Animate to section2 myTimeline.add( TweenLite.to($('#section2', 1, { 'css': { 'y': 0 }, 'ease': 'Power1.easeInOut' }) ); // Animate to section3 myTimeline.add( TweenLite.to($('#section3', 1, { 'css': { 'y': 0 }, 'ease': 'Power1.easeInOut' }) ); // ==================== function buttonClick() { TweenLite.to(percentObj, 0.3, { 'current': 0.5, 'onUpdate': updateProgress } } function updateProgress() { myTimeline.progress(percentObj.current); }
×
×
  • Create New...