Jump to content
Search Community

tb100

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

1,814 profile views
  • AMP

tb100's Achievements

0

Reputation

  1. After looking into the autoCSS, I've done something similar for autoArrayProps. I've forked your github repository, so you can see the change here: https://github.com/tangobravo/GreenSock-JS/commit/1a0fa5df3d8abeebab20cbcf67aeacd562c78127 I presume there's a build process to enable these changes to be included in the "Max" and minified versions? There's nothing in github that would do that, as far as I can see. Simon
  2. That's awesome Jack, thanks very much. For extra points for syntactic niceness, is it possible to have a plugin that would automatically promote any values specified as arrays into the arrayProps variable? Perhaps similar to how autoCSS works? I'm looking into your implementation of that now... Simon
  3. Hi all, I'm new to GSAP, but it looks very cool and is almost perfect for my application. I have an object with a 3D position "property", but that uses getters and setters, and returns a copy of the array in the getter. object.position([x, y, z]); var zval = object.position()[2]; // getter returns internalpos.slice() My ideal syntax would be something like this: TweenMax.to(object, 1, {position: [x, y, z]}); This doesn't work as arrays will need some special handling to do element-wise manipulation which GSAP doesn't do by default. If the position property was the array itself, then either of these would work: TweenMax.to(object.position, 1, [x, y, z]); TweenMax.to(object.position, 1, {endArray: [x, y, z]}); // Using EndArrayPlugin Unfortunately with the getter returning a copy, there is no way to get a reference to the internal array object, so no way that I can see of using GSAP directly. It would also be nice to be able to list multiple properties in the same tween. So I probably could rustle up a plugin to handle "position", etc, specifically. But I wonder if it would be possible to make that more generic. Perhaps syntax like this could work: TweenMax.to(object, 1, {arrays: {position: [0, 1, 2], rotation:[0, 0, 0]}}); Any thoughts? Is the above going to be possible with a plugin, and could it reuse the existing GSAP magic for detecting raw properties vs getters/setters? Simon
×
×
  • Create New...