This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************** | |
MSAFluidDemo.pde | |
Demo of the MSAFluid library (www.memo.tv/msafluid_for_processing) | |
Move mouse to add dye and forces to the fluid. | |
Click mouse to turn off fluid rendering seeing only particles and their paths. | |
Demonstrates feeding input into the fluid and reading data back (to update the particles). | |
Also demonstrates using Vertex Arrays for particle rendering. | |
/*********************************************************************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_library('hype') | |
def setup(): | |
size(640, 640) | |
H.init(this).background(36) | |
smooth() | |
rect1 = HRect(100) | |
rect1.rounding(10) # set corner rounding | |
rect1.fill(255, 102, 0) # set fill color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_library('HYPE') | |
field = None | |
def setup(): | |
size(640, 640) | |
H.init(this).background(0xFF202020) | |
smooth() | |
colors = HColorPool([0xFFFFFFFF, 0xFFF7F7F7, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
soBase = (HOscillator(). | |
speed(1). | |
range(-5, 5). | |
freq(4). | |
property(H.ROTATION)) | |
rects = [HRect(rectDiameter) | |
.fill(141, 73, 63, choice([64, 196])) | |
.noStroke() | |
.loc(x, y) | |
.anchorAt(H.CENTER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Circle(object): | |
HalfWidth = 0 | |
def __init__(self, x, y, speed=random(10), phase=random(TAU)): | |
self.x = x | |
self.y = y | |
self.speed = speed | |
self.phase = phase | |
self.holdX = self.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float x = 0; | |
float y = 0; | |
float speed = 0.9; | |
void setup(){ | |
} | |
void draw(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hype.core.util.*; | |
import hype.extended.drawable.*; | |
void setup() { | |
size(640,640); | |
H.init(this); | |
HRect rect1 = new HRect(100); | |
rect1.fill(#FF6600) // set fill color | |
.stroke(#000000, 150) // set stroke color and alpha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AudioContext = require('web-audio-api').AudioContext | |
Gibber = require('gibber.audio.lib/build/gibber.audio.lib.js') | |
// I want something truly random which can give a uniform distribution of integers | |
Random = require('random-js') | |
random = Random(Random.engines.browserCrypto) | |
// random.integer(30, 41) | |
Gibber.init() | |
Clock.bpm = 96 // 2500ms/whole, 625ms/quarter, 19.53ms/128th |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On Mon, Dec 1, 2014 at 9:55 AM, Ben <ben.alkov@gmail.com> wrote: | |
> Question: how hard would it be to integrate gibber.audio.lib running under | |
> node with Sublime 3? | |
LOL, I was already looking into this. Right now, I'm dead in the water. | |
The best thing I know of is SublimeREPL, but with ST3 under Win7 x64, I'm | |
getting OSError: [WinError 6] The handle is invalid every time I try to send | |
anything to Node. I've Googled around a bit, but I haven't found anything like | |
a solution yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import array | |
def setup(): | |
global vertexes | |
vertexes = array.array('f', (0,) * 12) | |
def draw(): | |
# drawing stuff here | |
def updateGeometry(): |
OlderNewer