Jump to content
GreenSock

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

macguffin

BusinessGreen
  • Posts

    42
  • Joined

  • Last visited

Everything posted by macguffin

  1. just asked what this is for as I agree it might be a bad idea to rely on it if it's actually meant for something else. Also if it did set a default resolution you wouldn't need to make any changes globally to your stuff. https://github.com/pixijs/pixi.js/issues/4392
  2. yeah think you're right I must have been still picking up my adapted pixiPlugin file with this line in it: Sorry for all the confusion if (v.resolution) { filter.resolution = v.resolution; } else { filter.resolution = PIXI.settings.FILTER_RESOLUTION; }
  3. My mistake I was using the old depreciated version PIXI.settings.FILTER_RESOLUTION = 2 I think if you just add this to your code it will set the default resolution of all filters. It looked to be working when I did a quick test
  4. don't think it's been released yet. Take it from Jack's link, second post.
  5. Hi just having a look another approach might be to incorporate PIXI.settings.FILTER_RESOLUTION; into the PixiPlugin PIXI.settings the plugin currently does this: if (v.resolution) { filter.resolution = v.resolution; } @GreenSock if it also did something like this then if the resolution wasn't set manually it could pick up the global resolution for the filter if (v.resolution) { filter.resolution =v.resolution; } else { filter.resolution = PIXI.settings.FILTER_RESOLUTION } Thanks
  6. Actually scratch that. That’s going to be the setting for the atlas resolution isn’t it.
  7. Just wondering if you can change the resolution globally in pixi. Think you you might be able to do something like this PIXI.settings.RESOLUTION = 2; I’m not at my computer for a bit but will test when I get back as it might be a simpler solution to tackle it at source.
  8. Hi tried onStart but it didn’t work as I think it was setting the resolution before the filter had been created.
  9. Works very well thank you
  10. macguffin

    PIXI plugin tip

    Hi it might be worth mentioning resolution in your docs with regards to the pixi plugin as the pixi default settings often makes images look blurred: http://pixijs.download/release/docs/PIXI.filters.ColorMatrixFilter.html If you find that your images are blurry when adding a filter, a colour effect for example, it might help to change the filter's resolution. Not sure if you can do this directly with the plug-in but a quick hack like this might help. (Jack can the plugin change resolution?) TweenMax.to(PIXI_IMAGE, 0.25, { pixi: {brightness: 0.5}, onComplete: (): void => { PIXI_IMAGE.filters[0].resolution = 2; } }; The above example if for a single filter on an image. As you can see in the screenshot the first bell has its resolution set to 2 whilst the second is using the default of 1 Cheers
  11. AWESOME!!!! Have used Chris Gannon's scrub timeline in the past but this is just in another league. Gonna be so useful I've got a game to debug and am gonna use this which will be fun. Cheers
  12. So you can imagine, it's Saturday night and there's another deadline looming on Monday. I'm just about to settle in to what I reckon is about 2 hours of work animating "a magical trail randomly jumping around the screen". I got some ideas so just need to crack on. Before I do I just check the "ease-visualizer" and low and behold I find "rough", which I'd forgotten about. Give it a go and that's kinda what I needed, 20 mins later I have finished the job. This keeps happening Jack you have thought of everything and now I don't have any work to do so can enjoy my Saturday evening. So inconsiderate, I mean there's nothing good on TV!! Realised I bought TweenMax 8 years ago, people thought I was mad spending that much money on a tween engine (for Flash). I've used TweenMax in every project I've worked on since buying it and can't imaging developing without it. So just a quick thanks and I'm off to get a beer.
  13. Hi, it might be because you need a user action to initiate audio on iOS safari. Your user needs to play any audio via a direct request for the audio to play. https://developer.apple.com/library/content/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html To see if this is the case add an onClick somewhere to play the sound. Once you have heard the audio see if it works with the drag event. If this is your issue you can play a blank audio with your user click at some point before you need to do the "drag and drop". The user doesn't need to directly request the actual audio you want to play just an audio file. this might not be your issue but it's a good thing to rule out. Cheers
  14. Hi just to follow up from the exportRoot stuff TL:DR No issues, but with great power comes great responsibility! -------------------------------------------------------------------------------------- So I think what I was seeing the other day was caused if I paused a few times in a row without un-pausing. If you do that some of the boxes jump about and don't start up again. Press pause, unpause x5, pause x2, unpause (Also did all these with pixi just to test it wasn't pixi related) If I add a flag so the pause code doesn't fire unless it's un-paused this never happens. Press pause, unpause x5, pause x2, unpause All is well. In my next game I'll try exportRoot again and if I get any errors I'll get back to you but as it stands it was probably my bug messing your code. Also If I do it with timescales it is more likely to mess up - expect the is_paused flag need to be onComplete Press pause, unpause x5, pause x2, unpause If I do it with timescales without the pause flag crashes the browser. Press pause, unpause x5, pause x2, unpause Cheers
  15. PS just dropped your snippet into my game and it works perfectly!!!!! You're a bloody Genius!
  16. Jack thanks very much for taking the time to explain this stuff and that snippet will be really useful. I will have a play with my stuff and your latest code with regards to the exportRoot. Let me double check I can break it and if I can I'll try and put something together that demos this. If I can break it reliably I'll start a new thread to discuss it. Cheers
  17. ok further update (remembered why I didn't use this method) The TweenMax.getAllTweens() does work but TimelineMax animations return to the start rather than just stopping whereas the TweenMax animations stop and start fine. Setting the globalTimescale stops everything and resumes it from the last position. Is this expected? Anyway around it? Thanks
  18. Even better use pixijs - webGl with a canvas fallback. https://github.com/pixijs/pixi-particles https://pixijs.github.io/pixi-particles/examples/fountain.html This would be the easiest way to get a fountain effect
  19. FYI I've updated the pen with another way of solving the problem, manual_pause/manual_unpause I'm setting the timescale of all the tweens to 0 using TweenMax.getAllTweens() Does TweenMax.getAllTweens() capture everything including delayedCalls? If it does it might be the easiest way pause everything current but still allow for new animation.
  20. Updated tweenmax to your latest in the pen. It works better but still craps out after a while. Were the null tweens coming from me or you, if they are from me I apologise ? Thanks again
  21. ok back again. The pause stuff it right at the end of the js code, everything else is just setup stuff. So I totally agree that exportroot would be the ideal solution. However when I make an "export root" timeline create more tweens then do it again and again I run into a maximum call stack exceeded. I never really though this was unreasonable as I'm making more and more timelines. So in this pen the bouncing things represent my game. If I pause using export root (export_pause and export_unpause buttons) and unpause then during the game more tweens are created it will break. After 10 or so pauses the error occurs or the timelines stop being make correctly, or some things stop moving. So what I normal do is set the TweenMax.globalTimeScale(0); (pause and unpause buttons). that way I know the error will never occur. But what I want to do is have a separate version of TweenMax that can run an animation during the pause (like flashing a close info button) or be able to specify that my tween are on xGlobalTime and the animation during the pause is on yGlobalTime. Hope I'm making some sense let me know if you're more confused than before I started. Cheers
  22. I've always found that export root works a few times but then errors. I use spine2d to make/layout my games and convert that into TweenMax timelines. This means that I can have a lot of timlines sitting dormant. I can call export root once and it will work but the next time I need to pause I may have new tweens so I call export root again and it will freeze. I guess it's caught in some sort of recursive loop trying to add tweens to a timeline that have already been added. Let me see if I can set up a codepen to try and help explain what I'm doing
  23. "Why in Gods's name would you want 2 instances running you fool" is your first response I'm sure, however..... So I have a game and when the instructions come up I pause everything. I've tried all sorts of ways of pausing including export root and running through the global array list. However the most solid way I've found is to TweenMax.globalTimeScale(0); as this stops everything nicely, timelines, callbacks, events etc. So great now I've paused everything but what if I need to use some tweens on the instruction page, kinda shot myself in the foot there haven't I. So back to the original question can I have an independent second instance of TweenMax? Could I use window.GreenSockGlobals = {}; to achieve this? As always thanks in advance for any thoughts or suggestions.
  24. Hi just saw your topic. When I want to pause all and shut everything down I often do this: TweenMax.globalTimeScale(0); Setting the globalTimeScale to (0) will stop the animation and any callback/events. The problem with TweenLite.ticker.fps(0); is that even though the timelines are paused they do seem to complete even though you can't see it happening. When you un-pause your animation will then jump to the end of the timeline. Cheers
  25. Whoo I typed my example so slowly I got 3 replies OSUblake that's a really good idea and yes I'm using Pixi Particles. I was thinking about storing the reference on the timeline but your solution might mean I can avoid this var pe_tl = new TimelineMax({repeat: -1}); pe_tl.lasttime=0; pe_tl.eventCallback("onUpdate", (_x) => { console.log('update_time', pe_tl._totalTime-pe_tl.lasttime) pe_tl.lasttime= pe_tl._totalTime; });
×