Submit Browse Random
Anonymous Login RSS

SuperCollider Code

All (764) Code (64) Doc (175) Help (16) Quark (509) SCDoc ↗ Forum ↗ Google ↗
  1. 131-obstacle_rocks Quark

    ... 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 ...

  2. LineView Quark

    ... .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 ...

  3. UBasicEditView Quark

    ... 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; ...

  4. ChordtrisEngine Quark

    ... 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. UEventView Quark

    ... 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 ...

  6. UEventView Quark

    ... 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 ...

  7. cloth Doc

    ... 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. ...

  8. cloth Quark

    ... 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. ...

  9. NearestN Doc

    ... 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 ...

  10. XixiPrey Quark

    ... 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, ...

prev 21 22 23 24 25 26 27 28 29 30 next

SuperCollider home doc forum wiki git legacy help book

contact | by vividsnow