-
This might have also worked:
var gsap = require('TweenLite');
' as I can't seem to call any functions on it.'
Remember that you might be able to use those functions if you edit that file using the
exports
keyword statement to expose them.http://www.espruino.com/Writing+Modules
EDIT -Yikes!! Just peeked as source and it will be challenging . . .
re 'Didn't use node_modules anywhere'
Do you recall how you learned about 'node_modules' or used it (see #1) for this post?
Just trying to provide those that work on the edits of the IDE more information. In my case it was an error that popped up, despite never using, or creating, or even having any knowledge of that folder word. I'm sure they would be curious how a separate unique user had the same occur on their system, doing nothing more than attempting to access a module.
I just renamed the 'TweenLite.min.js' to 'gsap' so I could do:
Didn't use node_modules anywhere. It works fine regardless of where my sandbox folder is in the two cases mentioned previously.
I think you're right about not being able to use this on Espruino though as I can't seem to call any functions on it.
I was hoping to use it with the WS2811 lights, I used to do all my anims manually with setInterval but I've extensive knowledge of this library from doing frontend dev over the years and had an idea to Tween values using this as it's so powerful, maybe it will work out or maybe it won't...
PS. It can be used on nodejs so maybe there's a way to get it to play with Espruino.