Jump to content
Search Community

motionBlur on Starling movieclips

tomKnox test
Moderator Tag

Recommended Posts

Hi greensockers, I also posted this on the starling forum, as i am not sure, where to begin.

 

First of all, i am not sure this is the best way:

 

Scenario:
I have several thousand movieclips on stage (the movieclip exist in the library and has its own class with basic properties)

These are added to the fla (i don't work in flash Builder (for this project) through com.emibap.textureAtlas.DynamicAtlas
This allows me to add movieclips from the library as starling movieclips.

joy!

 

However, I'd love to build this game idea purely around greensock's tweening classes.
Hittest work via onUpdate, and each event that causes of effects any other parameter is so damn easy to code + fast, pausable, reversable
No single enterframe is used in this game idea. Some of the motion would benefit with some motionBlur.

 

I get this error: motionBlur tweens only work for DisplayObjects.

I tried to cast the hero_mc as a displayObject (which works perfectly fine), until I add the motionBlur part in the greensock tween.

 

Does anyone have a clue or workaround?

 

relevant code snippet:

 

var mc: SheetMC = new SheetMC();
 
var atlas: TextureAtlas = DynamicAtlas.fromMovieClipContainer(mc, .5, 0, true, true);
 
var hero_mc :MovieClip = new MovieClip(atlas.getTextures("hero_mc"), 60);
addChild(hero_mc) ;
Starling.juggler.add(hero_mc);
 
var mytest:DisplayObject = hero_mc as starling.display.DisplayObject;
 
mytest.x = 1024 * .5;
 
mytest.y = 768 * .5;
 
TweenMax.from(mytest, 0.48, {
    y: 868,
    onUpdate:hitTest,
    ease: Back.easeOut,
        motionBlur: {
            strength: 0.9,
            quality: 2
}
 
    });
Link to comment
Share on other sites

Yup, motionBlur tweens only work for DisplayObjects. There is no work-around. Lots of code in MotionBlur plugin is specific to native AS3 code including the display list and BitmapData.

 

Glad to hear though that you have so much success with other aspects of the platform.

Link to comment
Share on other sites

Thanks Carl. As I was afraid for. A slight "crap" echoes in a Homer Simpsons' style.

I was experimenting with transferring it to a bitmap but still. it seems greensock strips the "to tween object" to its bare essence.

I did find some filters for Starling, also a motionBlur, but it doesn't really bring out the effect what greensock does.

Maybe. I am not sure if its even remotely possible but i guess it would be awesome to enable this in the future? 

About the greensock platform, its awesome how much you can accomplish with onUpdate and onComplete in terms of everything, esp now with trying to push a game idea. I am not afraid of enterframes, however In this case i thought it was much more processor friendly to "enterframe" only when its needed. ofc this is possible with regular on enterframes but hey, something you just like to experiment and crash your IDE ten times before there is a result ;)

In my humble opinion from what i saw/learned is that greensock hand in hand with starling and its way of dealing with things would be totally well... greensock! :)

greetings


 

Link to comment
Share on other sites

Thanks for the feedback and suggestions, tom. We have heard from several other users who want even more Starling integration. I can certainly see why. The challenging thing for us is figuring out how to maximize the effectiveness of our time in terms of serving the largest portion of our audience in the best way. Unfortunately, Starling users represent a very small portion of the audience today, and even though we're dedicated to building and maintaining these tools full-time, there's just so many exciting features we're looking to add that we have to prioritize the ones that will make the biggest difference. Starling integration isn't something we're pursuing strongly right now, but that may change if there's enough demand at some point.

 

Of course the platform is very much compatible with Starling, and we hear regularly from folks who say nothing else compares to GreenSock for animating their Starling stuff. Yes, you may need to use an onUpdate for some Starling-specific things, or build your own plugin for specialized things, but the vast majority of Starling properties can already be animated with GSAP. 

 

Thanks again for the feedback. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...