-
... .6)); }.dup(~n); //--loop ~win.draw{ if(~world.gravity[0]>1, { ~win.background= Color.red(1, 0.5); }, { ~win.background= Color.blue(~world.gravity[1], 0.5); }); ~world.objects.do{|o, i| if(i!=0, { o.addForceWander2D; o.addForceSeek(~world.o ...
-
... |polarity = \uni, orientation = \horizontal, helpersNumber, helperSubdivisions, color = nil, center = true, helperRatio = 1, subRatio = 1| var nHelpers = ((helpersNumber - 1) * (helperSubdivisions + 1)) + 1; var caseSize; if(polarity == \bi ...
-
... ist(arguments).copyToEnd(2)++")"; Pen.use{ Pen.translate(pos.x, pos.y); Pen.fillColor= Color.white; //box background colour Pen.fillRect(rect); Pen.strokeColor= Color.black; //box border colour Pen.strokeRect(rect); Pen.fillColor= Color.bla ...
-
... ); window.view.decorator = FlowLayout( window.view.bounds ); window.background_(Color.fromHexString("#282828")); window.onClose = { this.clear; }; } setCmdPeriodActions { cmdPeriodActionAdded.not.if({ CmdPeriod.add({ AppClock.sched(0.1, { t ...
-
... nt.new("Helvetica-Bold",fontSize); } } CXLabel : CXAbstractLabel { classvar <>bgcolor; *new { arg layout,string,width,height,minWidth=15,font; var new; new = super.new(layout,string,width,height,minWidth,font); new.background_(Color(0.98431 ...
-
+ Color { alphaCopy_ { |alpha=1.0| if( alpha == 1.0 ) { ^this; } { ^this.copy.alpha_(alpha * this.alpha); }; } } + Gradient { fill { |rect| if( direction == \h ) { ^Pen.fillAxialGradient( rect.left@rect.center.y, rect.right@rect.center.y, c ...
-
... t.new("Helvetica-Bold", fontSize); } } CXLabel : CXAbstractLabel { classvar <>bgcolor; *new { arg layout, string, width, height, minWidth=15, font; var new; new = super.new(layout, string, width, height, minWidth, font); new.background_(Col ...
-
... modIndexKnob, modIndexNumber, modIndexLabel, volumeSlider, defaultFont, defaultColor, defaultAlpha, defaultStringColor, carrSpec, modSpec, devSpec, indexSpec, synth; defaultFont = Font("Verdana", 16, bold: true); defaultColor = Color ...
-
... ], 1.5, 10); //world,loc,vel,acc,mass,size }.dup(n); //--loop w.draw{ Pen.strokeColor= Color.green; Pen.strokeOval(Rect.aboutRedObject2D(att)); Pen.strokeColor= Color.white; world.objects.do{|o| if(o!=att, { o.addForce(o.gravityForce(att)); ...
-
... ], 1.5, 10); //world,loc,vel,acc,mass,size }.dup(n); //--loop w.draw{ Pen.strokeColor= Color.green; Pen.strokeOval(Rect.aboutRedObject2D(att)); Pen.strokeColor= Color.white; world.objects.do{|o| if(o!=att, { o.addForce(o.gravityForce(att)); ...