I was attempting to use GSAP with Node.js, but I encountered some difficulties i could not manage to solve on my own. I am using the GSAP supplied by NPM (https://www.npmjs.com/package/gsap). I have read the other questions asked on this forum and tried their suggestions (http://greensock.com/forums/topic/7422-using-tweenlite-timelinelite-server-side-with-nodejs/), however, GSAP still throws an error saying that "document" is not defined. Help would be much appreciated
After looking at the TweenMax file, it might be easier to just add this to the end of the file.
module.exports = _gsScope;
That way everything will be global like it is in a browser.
require("gsap");
console.log("SAME: ", global === GreenSockGlobals); // true
TweenMax.to(foo, 1, { x: 100, ease: Power3.easeOut});
var tl = new TimelineMax();