Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How would I use Greensock Animation Library with Twine?

edited December 2014 in Help! with 1.x
I've been toying around with spritesheet-based animations in Twine, and I found out about this javascript library called Greensock, and I'm wondering how to use it in Twine. I heard about Userlib.js from this post, but I'm not really sure how to make one of those files. How do I make a userlib.js file so that I can use this with Sugarcube?

Comments

  • Easiest way:
    [list type=decimal]
    Download the GreenSock Animation Platform (GSAP).
    Copy the TweenMax.min.js file (greensock-js.zip:greensock-js/src/minified/TweenMax.min.js) to SugarCube's target directory and rename it to userlib.js (i.e. {TWINE_INSTALL}/targets/sugarcube/userlib.js).
    Profit!


    Slightly more involved way:
    [list type=decimal]
    Download the GreenSock Animation Platform (GSAP).
    Create a new plain-text file in SugarCube's target directory named userlib.js (i.e. {TWINE_INSTALL}/targets/sugarcube/userlib.js).
    Decide which GSAP modules and plug-ins you wish to use and copy-paste the contents of the corresponding files (suggest using the minified versions) into the userlib.js file you created.  It's possible that, at least, some modules will require a specific ordering, so use whatever order is suggested by the GSAP docs.
    Profit!

  • Thank you! I'll go do that.
Sign In or Register to comment.