Skip to content

Instantly share code, notes, and snippets.

@shinyaoguri
Last active April 8, 2018 05:55
Show Gist options
  • Save shinyaoguri/01b7bec255ed9d874d4f02acc5045a07 to your computer and use it in GitHub Desktop.
Save shinyaoguri/01b7bec255ed9d874d4f02acc5045a07 to your computer and use it in GitHub Desktop.
sample script using processing + syphon
import codeanticode.syphon.*;
PGraphics canvas;
SyphonServer server;
PImage img;
void setup() {
size(1600,900, P3D);
canvas = createGraphics(1600, 900, P3D);
server = new SyphonServer(this, "Processing Syphon");
}
void draw(){
canvas.beginDraw();
canvas.background(100);
canvas.stroke(255);
canvas.line(50, 50, mouseX, mouseY);
canvas.endDraw();
image(canvas, 0, 0);
server.sendImage(canvas);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment