-
... Rock(world, RedVector2D[width.rand, height].rand)}.dup(rocks); //--loop w.draw{ Pen.width= 1; world.objects.do{|o, i| //iterate all objects in this world o.addForce(o.world.gravity); //add gravity world.objects.copyToEnd(i+1).do{|oo| o.coll ...
-
... .25).alpha_(0.5); this.canFocus_( false ); } draw { var realMargin = 0, bounds; Pen.color_( color ); Pen.width_( width ); //realMargin = margin * width; bounds = this.drawBounds; switch ( orientation, \h, { Pen.line( (bounds.left + realMarg ...
-
... KeyDown( vw, char, ModKey( mod ), unicode, keycode ); }; view.drawFunc = { |vw| Pen.use({ Pen.color = Color.white.alpha_(0.4); Pen.width = vw.pixelScale.asArray.mean; Pen.line( -200 @ 0, 200 @ 0 ); Pen.line( 0 @ -200, 0 @ 200 ); Pen.stroke; ...
-
... is refresehed chordtris.nextBrickView.drawFunc = { var chordNameX, chordNameY; Pen.color_(Color.white); Pen.stringAtPoint("Next", Point(60, 10)); previewMatrix.draw(squareSize, squareSize); // draw the chord name on the brick if(nextBrick. ...
-
... 5; /* radius = radius.min( rectToDraw.width*0.5 ).min( rectToDraw.height*0.5 ); Pen.moveTo(rectToDraw.rightTop - Point(rectToDraw.width*0.5,0)); Pen.arcTo(rectToDraw.rightTop,rectToDraw.rightBottom,radius); Pen.lineTo(rectToDraw.rightBottom ...
-
... 5; /* radius = radius.min( rectToDraw.width*0.5 ).min( rectToDraw.height*0.5 ); Pen.moveTo(rectToDraw.rightTop - Point(rectToDraw.width*0.5,0)); Pen.arcTo(rectToDraw.rightTop,rectToDraw.rightBottom,radius); Pen.lineTo(rectToDraw.rightBottom ...
-
... on.set(mx, my, 0); particles[0][gridSize-1].velocity.clear; px= mx; py= my; }); Pen.color= Color.black; gridSize.do{|i| Pen.moveTo(Point(particles[i][0].position.x, particles[i][0].position.y)); gridSize.do{|j| //particles[i][j].position.x. ...
-
... on.set(mx, my, 0); particles[0][gridSize-1].velocity.clear; px= mx; py= my; }); Pen.color= Color.black; gridSize.do{|i| Pen.moveTo(Point(particles[i][0].position.x, particles[i][0].position.y)); gridSize.do{|j| //particles[i][j].position.x. ...
-
... s: // Find/make a dataset of points: x = 15.collect{[1.0.rand, 1.0.rand]}; // Append the index onto the end, for later reference x = x.collect{|data, i| data ++ i }; // Use the KDTree quark and the .makeBufferData method to put the data in ...
-
... move, friction; var posNegX, posNegY; var xAway, yAway; var ateFunc; // what happens when predator eats from the prey var myBuffer, myBufNum, myBufferName, poolnum, biteFlag; var poolnum, bufferindex, myVol; var <>selected, sampleNameField, ...