Last active
August 29, 2015 14:20
-
-
Save 3846masa/b46a0eb51ee57354285e to your computer and use it in GitHub Desktop.
Multi Window for Processing 3.0 b7 (UnLicense)
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
class SecondApplet extends PApplet { | |
PApplet parent; | |
SecondApplet(PApplet _parent) { | |
super(); | |
// set parent | |
this.parent = _parent; | |
// init window | |
PSurface surface = super.initSurface(java.awt.Color.GRAY, -1, false, false); | |
surface.placeWindow(new int[]{0, 0}); | |
} | |
void setup() { | |
this.size(300, 300); | |
} | |
void draw() { | |
background(frameCount % 255); | |
fill(0); | |
ellipse(width/2, height/2, width/2, height/2); | |
} | |
} |
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
SecondApplet second; | |
void setup() { | |
size(400, 400); | |
second = new SecondApplet(this); | |
} | |
void draw() { | |
background(frameCount % 255); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment