nice work!
On Thu, Jan 20, 2011 at 1:06 PM, fuzzy spoon <[email protected]> wrote: > Hi guys! > > I love mootools and what it does for javascript, a long time browser user. > A while ago i started a 2D game where i chose v8 engine as my scripting > engine choice , so naturally mootools makes an appearance. The video links i > posted below show mootools running in a game engine being used for cool > particle effects. > Other than the semantics and cool features, i was easily able to extend the > Fx and stuff onto game objects, > so i figured i would post this to the group to show that mootools can be > used anywhere javascript can be used. > To the mootools developers - keep it up - amazing work :) > Thanks to keeto for explaining the logic behind the fx, too. (get his > mootools book, its awesome http://projswithmootools.com/) > The video is a simple top down shooter, but contains all of the > Fx.transitions - on easeIn mode. > Here is the function that spawns a projectile, to see how mootools is put to > use - > projectile : function() { > > //Create some geometry for the projectile > var p = this.sprite.pos.add( > this.sprite.pos.directionTo(this.crosshair.pos).normalised().mul(-20) ); > var psprite = new sprite( this.sprite.texture , p ); > psprite.alpha = 0.01; psprite.depth = this.sprite.depth; > psprite.srcrect = rect(32,128,32,32); psprite.size = vec2(32,32); > > //Fade in (custom fade, theres no css in normal JS) > psprite.fade(1, 300); > > var target = this.crosshair.pos.add( > this.sprite.pos.directionTo(this.crosshair.pos).normalised().mul(-1200) ); > > //here is where the mootools magic happens :) obviously its set using > a variable > // so i can change at runtime, but changed to illustrate > //For example : this.bulletType = Fx.Transitions.Elastic.easeIn; > psprite.moveto( target, 4000, Fx.Transitions.Elastic.easeIn); > > //add to the list > this.projectiles.push(psprite); > > } > > > Hope this motivates you guys, and puts a +1 on anyone who thinks mootools is > just a browser thing - > So with less spam, Mootools in a c++ / js context using laboratory2D " > > http://vimeo.com/18988407 > http://www.youtube.com/watch?v=w16l-bXkSLw > > And because youtube and vimeo crunch the videos like mad : > (attached image) http://img21.imageshack.us/img21/838/screenshot192y.png > > > > >
