Jump to content
Search Community

blindbeat

Members
  • Posts

    1
  • Joined

  • Last visited

blindbeat's Achievements

  1. Hello. I have my website page split into 5 panels, each panel has the character animated, and every panel has a timeline with scrub: true which animates the character (works with sprite sheet and moves the character around the screen). Problem is, my character moves dynamically. I want to do something like timeline.fromTo( '#char-comet', { ...calcPositionDifference( '#char-gravitation-satellites', '#char-comet', ), }, { x: 0, y: -100, duration: 3, delay: 0.5, } ); calc position difference just calculates the difference between getBoundingClientRect() for two models. Problem is that timeline values, "from" values exactly, are calculated when animation is created (on page load). I want them to be calculated when the exact tween is fired (so when the timeline on panel 3 starts in this case), So 'from' values would be when the previous character sprite is right now to prevent 'tearing' It's very hard to calculate it in advance because character moves are adaptive.
×
×
  • Create New...