Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Ciberman

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Ciberman

  1. 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. 

×