-
... t*0.5)-(arrowSize*0.5),arrowSize,arrowSize).right_(button.bounds.right-17); var penwidth = 2.max(drawRect.height*0.08); Pen.color= arrowColor; Pen.width=1; Pen.moveTo(drawRect.left@drawRect.top); Pen.lineTo(drawRect.center.x@drawRect.bottom ...
-
... accel, vel and loc world.contain(o); //keep object within the world //--render Pen.fillColor= Color.grey(1-(o.mass/12), 0.5); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... .mouse; }); //o.addForce(world.gravity); o.update; world.contain(o); //--render Pen.fillColor= Color.grey(1-(i/n), 0.5); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... accel, vel and loc world.contain(o); //keep object within the world //--render Pen.fillColor= Color.grey(1-(o.mass/12), 0.5); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... .mouse; }); //o.addForce(world.gravity); o.update; world.contain(o); //--render Pen.fillColor= Color.grey(1-(i/n), 0.5); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... thin a world with gravity force and also collision detection //color and size depends on object's mass //sound - collision velocity mapped to amplitude, mass to dur and freq ( s.waitForBoot{ var width= 300, height= 300, w, wgrav, world, n= ...
-
... thin a world with gravity force and also collision detection //color and size depends on object's mass //sound - collision velocity mapped to amplitude, mass to dur and freq ( s.waitForBoot{ var width= 300, height= 300, w, wgrav, world, n= ...
-
... dForce(world.gravity); o.addForce(wind); o.update; world.contain(o); //--render Pen.strokeColor= Color.grey(o.mass/4); Pen.strokeRect(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... dForce(world.gravity); o.addForce(wind); o.update; world.contain(o); //--render Pen.strokeColor= Color.grey(o.mass/4); Pen.strokeRect(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... 2D[0, sys.wave.wrapAt(i)]; o.addForce(world.gravity); }; sys.update; //--render Pen.fillColor= Color.grey(1, 0.4); sys.do{|o, i| Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )