Last active
April 8, 2018 05:55
-
-
Save shinyaoguri/01b7bec255ed9d874d4f02acc5045a07 to your computer and use it in GitHub Desktop.
sample script using processing + syphon
This file contains hidden or 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 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