Jump to content
GreenSock

shaderbytes

gsap now enforcing dom element targets in some functions? , eg using MotionPathPlugin

Moderator Tag

Recommended Posts

Docs say

 

An Array of objects defining other properties (doesn't need to be "x" and "y"). This will basically smooth out the velocity changes as it hits each value 

 

Great , except it seems to now be enforcing expecting the target to be a dom element , error

 

Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'

 

I use greensock on javascript objects in other libraries , eg in babylonjs. If I want to animate any property on any object within that library it normally works. 

 

I know this plugin has some features that would require the target to be a dom element ( its trying to call "parseTransform" on the object )  but now the issue is your entire path animation system is tied to this restriction? 

 

Surely your animation code should be target agnostic and just animate the values and set those values on the object , expecting the developer to have set a target that would use the values in some manner. ( or they just will do nothing , at least no errors due to calling functions that dont exist ) 

 

 

 

 

Link to comment
Share on other sites

Very sorry about the confusion there, @shaderbytes! That was indeed a regression in 3.11.5 and it has been fixed in 3.12.0 which was just released a few minutes ago :)

 

Upgrade and you should be all set. 

  • 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.
×