Jump to content
Search Community

FlashDev2007

Members
  • Posts

    11
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

FlashDev2007's Achievements

0

Reputation

  1. Ah yes of course, this does indeed give me the TweenLite instance I needed. OK now on to the Espruino guys to sort out part 2. Thank you for helping me OSUblake.
  2. Thanks again, I see the check for module.exports but I am not sure how I can use this as a module with the Espruino. I'm using TweenLite from https://github.com/greensock/GreenSock-JS/blob/master/src/uncompressed/TweenLite.js I require the TweenLite module in the terminal using node here is what I get: > var gsap = require('./gsap.js'); > gsap [Function] version: '1.10.1', API: 2, activate: [Function] } How do I access functions of TweenLite from this gsap var? I cannot seem to get my Espruino to recognise the module, once I get it working in node I will post on the Espruino forums for help getting it working in their environment. Thanks for your time here.
  3. Thanks for the reply, I had already looked at the post you mentioned prior to posting my own topic. I cannot use TweenMax because of the limited memory on the Espruino. I think I could get away with just TweenLite, but the way you described using TweenMax don't seem to apply to TweenLite. Any ideas how to use TweenLite as a module?
  4. I have been using GSAP products for many years. Recently I started to play around with a JS interpreted board called the Espruino. As this little board doesn't have a native browser, it doesn't have access to a window object or a DOM. I have a series of LED lights attached to this board and I can set any RGB colour value to any of the lights, I thought ah yes I could do some crazy animations using one of the GSAP libraries. I tried to add the library to my code but unfortunately there were too many obstacles, firstly the linting on the device is rather strict and it complained about lots of missing semi-colons at the end of functions. So I thought yeah I could spend time adding these and get around this, but then TweenMax for example expects window to be passed in to the library. So what I am asking is, are there any plans to have a version which doesn't incorporate any DOM related code and is purely a value driven animation library? I suspect in the future there will be many other devices that can run JS that don't have a window based DOM, but may benefit from interpolation and animation of values to drive the connected devices.
  5. Well you certainly don't hang about Jack. The TEMPLATE_Plugin.js was exactly what I needed to create the middle man between my position object in Three.js and the Tween which controls them. I followed your docs and also the comments in the template file without any problems. If I can do it, anyone can.. Thanks Neil
  6. Well I guess there is plenty of information in the USAGE section of TweenPlugin. Like a lot of your users I am coming from primarily a flash background. I have looked at the RoundPropsPlugin.js (docs say look at ScalePlugin but this isn't in the src) and there are things going on that I don't understand and I can't relate them to your notes. eg: you mention calling super in point 1, surely this is the flash version not js? In the RoundPropsPlugin it starts out with: _gsDefine("plugins.RoundPropsPlugin", ["plugins.TweenPlugin"], function(TweenPlugin) I am assuming i would need to add my plugin name in place of any RoundPropPlugin name in this file. I think what I would like, and possibly others, is some kind of js plugin template, which shows us the basics. I know I'm asking a lot here, but most people coming from flash to js will love your library as much as the AS version, but may struggle understanding how to write plugins for it. Thanks Neil
  7. I was using a loop as you had suggested, but I am now inspired to create a plugin. Although I have read the docs on TweenPlugin, would you offer a few pointers to get me started regarding adding a bespoke property? I can see me wanting to create plugins in the future. Many thanks Neil
  8. Ok well I know I can tween one object in my array like so: // tween y prop of ball.position object TweenMax.to(balls[0].position, 1, {y: 50}); I am trying to tween all of my objects in an array like so. // try to tween all balls y prop of position object - DOESN'T WORK TweenMax.to(balls, 1, {position:{y: 50}}); The reason I thought this would work is because it is similar to css syntax on the site: //tweens multiple objects simultaneously TweenLite.to([e1, e2, e3], 1, {css:{autoAlpha:0}}); What is the syntax for this, I don't want to store "ball.position" in the array, just the ball. Thanks Neil
  9. Hello Jack, I am using a simple TweenMax for tweening something which i need to reverse later on. The problem i get is if the tween is at the start and i call reverse it does not complete, and it its at end and i call play() it does not fire complete. I suspect some folks say this is what you would expect, but my build relies on these events. I have a work around as follows, but I suspect you have some property that handles this that I can't find override public function forward():void { if(_tween.currentProgress == 1) { transitionCompleteHandler(); } else { _tween.play(); } } override public function reverse():void { if(_tween.currentProgress == 0) { transitionReverseCompleteHandler(); } else { _tween.reverse(); } } Thanks for all your help you give the community. Neil
  10. That's perfect and working great, now to have a go at appendMultiple. Jack you are a star. Thank you very much. Neil
  11. Hello Jack, Firstly I have watched the video on using TimelineMax so I understand how it works, but I cannot get my head around how to stop my tweens from running before I add them. What I am trying to do is create the TimelineMax in a class of its own and I have methods to add tweens to it in that class. The tweens are created in other views and they call this class to add them. The problem is, when I create a tween in a view, it just sets of tweening. I tried to pause it before the timeline gets it but then it don't play at all. I also set paused:true in the timeline constructor. Is it possible to create the tweens elsewhere in my application, add them when I want and then set the whole thing off later using timeline.play(); ? Hope you can help me with this one. Many thanks and great work. Neil
×
×
  • Create New...