Jump to content
Search Community

Possibilites of interaction and possibly physics plugin

elfling 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

Hi All,

 

Long time lurker, first time poster.

 

Have a project that is simple on the surface, but trying to see if GSAP plugins would be able to do the following, a bit like particle.js

 

The task requires squares to be static at first, but then if they are swipped at, mouse over, they begin to bounce around the container. Until they eventually return to their starting point, but they can be interacted with during their bouncing.

 

Libraries to look more in depth at would be greatly appreciated.

 

Thanks,

 

Link to comment
Share on other sites

You can use the physics plugins like Physics2D and PhysicsProps to create tweens based on friction, acceleration, and gravity

 

https://greensock.com/Physics2DPlugin

https://greensock.com/PhysicsPropsPlugin

 

However, if you want to throw an object and have it bounce off of walls and other balls and have its acceleration slowly decay over time, you probably want to look for a physics engine and not a tweening engine. 

 

http://heikobehrens.net/misc/box2d.js/examples/

  • Like 3
Link to comment
Share on other sites

Thanks Carl. For this then it might be better to use matter.js then.  Was toying around with it, but was hoping I could start to get into GSAP. 

 

Im sure I’ll be back soon with regards to swiping down animations. But plenty of examples for that stuff :)

  • Like 1
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...