Jump to content
Search Community

Overlap Animation

jSwtch test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I am trying to overlap animation with relative positioning. I may just be doing this wrong - or is it not possible to tween an elements properties in parallel? ( I want to use different eases and timings)... almost like a 'while', or TweenMax.'as'

 

I have seen this thread here from 2015... has anything like this been implemented?

https://greensock.com/forums/topic/12573-additive-animation/

 

Are there any latest best practices to adding this to my pen?

See the Pen RBQerJ?editors=0010 by jswtch (@jswtch) on CodePen

Link to comment
Share on other sites

Hi @jSwtch

 

I made all those demos, and what you see in that thread is pretty much the only way to tween stuff in parallel. It's not super complicated. Basically, you tween a generic object with the properties you want, and then in a render method you combine the values and apply them to the actual object you are rendering.

 

There's an old Pixi demo in that thread, but it's probably not the best example to learn from. This demo does a good job showing how to make an additive animation.

 

See the Pen PPmJpL by osublake (@osublake) on CodePen

 

Instead of using an array, I'm using a linked list to store the animations.

https://s3-us-west-2.amazonaws.com/s.cdpn.io/106114/LinkedList2.js

 

 

 

  • Like 6
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...