-
... avity); sys.update; //--render sys.do{|o| //iterate all particles in the system Pen.fillColor= Color.grey((o.age/50), 1); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... . args ) this creates a new object of a specific type, and adds the arguments depending on that type : the type is a symbol with the name of a type. If the first letter is a capital, the segment is absolute, otherwise it is relative to the ...
-
... w.skin.labelWidth ? 80; userView.drawFunc = { |vw| var rect, points, lastPoint; Pen.width = 1; Pen.fillColor = unit.guiColor; Pen.strokeColor = Color.black.alpha_(0.5); rect = vw.bounds.moveTo(0,0).insetBy(0.5,0.5); //Pen.roundedRect( vw.bo ...
-
... s = \SphericalDesign.asClass; // support for SphericalDesign without explicit dependency userView = UserView(this, this.bounds.origin_(0@0)) .resize_(5) .frameRate_(frameRate) .drawFunc_(this.drawFunc) ; // origin, x, y, z axisPnts = [[0,0, ...
-
//multiple objects within a world with gravity force //color and size depends on object's mass ( var width= 300, height= 300, w, wgrav, world, n= 80; //--world w= RedWindow("vector test", Rect(128, 64, width, height)).front; wgrav= RedVecto ...
-
... VG files. Some objects are still read and even saved as SVGUnknown objects. The Pen class methods in sc look a lot like the instructions found in SVG files, so almost all vector elements can be drawn in SCWindows using the dedicated plot me ...
-
... rad); //func= cos(theta); func= sin(cnt*rad.cos+(5*theta)); y= y+dy; //--render Pen.strokeColor= Color.grey(func+1); Pen.strokeRect(Rect(i, j, 1, 1)); }; x= x+dx; } }; w.play; CmdPeriod.doOnce({w.close}); )
-
... { solo = false; mute = true; dbJack.value = -300; dbJack.changed; } draw { arg pen, bounds, style; pen.color = style['fontColor']; pen.font = style['font']; if(mute, { ^pen.stringCenteredIn("muted", bounds); }); pen.stringCenteredIn(db.rou ...
-
... Phenome(x).asSynthDef2.play(s, [\amp, 0])}; 0.5.wait; //--loop w.draw{ 4.do{|i| Pen.fillColor= Color.red(0.5, i+1/4); Pen.fillOval(Rect.aboutRedVector2D(w.mouse, 4-i/3*25)); }; world.objects.do{|o, i| var amp= 0; o.addForceWander2D; if(i==0 ...
-
... w().fixedHeight_(10).drawFunc_({ |v| var y = (v.bounds.height / 2).round + 0.5; Pen.strokeColor = Color.grey(0.5, 0.2); Pen.width = 1; Pen.line(2@y, (v.bounds.width - 2)@y); Pen.stroke(); }) } ).spacing_(1).margins_(0) ).canFocus_(true); co ...