
Ciberman
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Store
FAQ
Showcase
Product
Blog
ScrollTrigger Demos
Downloads
Posts posted by Ciberman
-
-
Hello. I am trying to use GSAP with node.js WITHOUT polluting the global scope.
I am ussing nw.js (so, I have available the window object)First I do:
npm install gsap --save
Then in my Tween.js:
var gs = window.GreenSockGlobals = {}; require('gsap'); console.log(gs); // logs empty object console.log(window.GreenSockGlobals); // logs empty object console.log(window); // logs the window object, with ALL the GSAP stuff in it console.log(window.TweenLite); // logs tweenlite object
I don't want to have all the GSAP stuff in the global scope. I want to have it in a specified object.
Thanks.
[node.js] using GSAP WITHOUT polluting the global scope.
in GSAP
Posted
I have done it. I have commented inside TweenMax.js the line:
and replaced by:
Image: