-
... 44.0, 200.0, 32.0, 4.0) ) .value_( 0.5038806200027466 ); */ w.drawHook = { GUI .pen.width_(5).line( 10@10, 390@390 ).stroke }; w.refresh; w.asCode; // includes drawHook functions. But only if they use GUI.pen /* w = GUI.window.new("test-asC ...
-
//Simple_Pendulum //Originally created by Jeffrey Traer Bernstein http://murderandcreate.com/physics/ ( var width= 400, height= 400; var win= Window("Simple Pendulum", Rect(100, 100, width, height), false); var usr= UserView(win, Rect(0, 0, ...
-
... t }; } asSVGTransform { ^SVGTransform( this ); } // direct drawing functions: asPenFunction { ^SVGPath( this ).asPenLinesFunc; } fillPath { this.asPenFunction.value; GUI.pen.fill; } strokePath { this.asPenFunction.value; GUI.pen.stroke; } c ...
-
//gui example with userview / pen graphics ( var width= 640, height= 320; var numChan= 4; var chanHeight= height/numChan; var win, usr, frameCount= 0; win= Window("gui example userview", Rect(100, 100, width, height)).front; usr= UserView(w ...
-
... t(166, 2.0, 160, 20.0)); // call this somewhere in skipjack, or when changes happen q.inph.updateGui = { q.ndefs.do { |ndef, i| // compare names of current q.ndefs with gui labels var but = g.inphGui.attachButtons[i]; var key = ndef.key; va ...
-
... var outbus, inbus, selected; // temp vars var myVol; // var ateFunc; // what happens when predator eats from the prey // var myBuffer, myBufNum, myBufferName, poolnum, biteFlag; // var poolnum, bufferindex, myVol; // var <>selected, sampleN ...
-
... addForce(obj.gravityForce(rep).neg); obj.update; world.contain(obj); //--render Pen.strokeColor= Color.green; Pen.strokeRect(Rect.aboutRedObject2D(rep)); Pen.strokeColor= Color.white; Pen.strokeRect(Rect.aboutRedObject2D(obj)); }; w.play; C ...
-
... ddForce(obj.viscosityForce(vv)); }); obj.update; world.contain(obj); //--render Pen.fillColor= Color.yellow; Pen.fillRect(visc); Pen.strokeColor= Color.white; Pen.strokeRect(Rect.aboutRedObject2D(obj)); }; w.play; CmdPeriod.doOnce({w.close} ...
-
... 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, ...
-
... nstead, and thus doesn't scale anything. ( // resize the window and see what happens w = Window ( "ScaledUserView" ).front; b = ScaledUserView ( w, w.view.bounds.insetBy( 10 , 10 ), Rect ( 0 , 0 , 1 , 1 ) ); b.drawFunc = { Pen .line( 0.1 @ ...