-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'lib_staging' of github.com:hype/HYPE_Processing
- Loading branch information
Showing
85 changed files
with
3,507 additions
and
115 deletions.
There are no files selected for viewing
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
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
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import hype.*; | ||
import hype.extended.layout.HGridLayout; | ||
import hype.extended.behavior.HAttractor; | ||
|
||
HDrawablePool pool; | ||
HAttractor ha; | ||
|
||
void setup() { | ||
size(640,640); | ||
H.init(this).background(#242424); | ||
|
||
ha = new HAttractor(320, 320, 200) // x, y, radius | ||
.debugMode(true) | ||
; | ||
|
||
pool = new HDrawablePool(576); | ||
pool.autoAddToStage() | ||
.add(new HRect(25).rounding(4)) | ||
.layout(new HGridLayout().startX(21).startY(21).spacing(26,26).cols(24)) | ||
.onCreate( | ||
new HCallback() { | ||
public void run(Object obj) { | ||
HDrawable d = (HDrawable) obj; | ||
d.noStroke().fill(#ECECEC).anchorAt(H.CENTER); | ||
|
||
ha.addTarget(d, 10, 0.1f); // target drawable(s), maxspeed, maxforce | ||
} | ||
} | ||
) | ||
.requestAll() | ||
; | ||
} | ||
|
||
void draw() { | ||
H.drawStage(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import hype.*; | ||
import hype.extended.layout.HGridLayout; | ||
import hype.extended.behavior.HAttractor; | ||
|
||
HDrawablePool pool; | ||
HAttractor ha; | ||
|
||
void setup() { | ||
size(640,640); | ||
H.init(this).background(#242424); | ||
|
||
ha = new HAttractor() | ||
.repelMode() | ||
.addForce(320, 320, 200) | ||
.debugMode(true) | ||
; | ||
|
||
pool = new HDrawablePool(576); | ||
pool.autoAddToStage() | ||
.add(new HRect(25).rounding(4)) | ||
.layout(new HGridLayout().startX(21).startY(21).spacing(26,26).cols(24)) | ||
.onCreate( | ||
new HCallback() { | ||
public void run(Object obj) { | ||
HDrawable d = (HDrawable) obj; | ||
d.noStroke().fill(#ECECEC).anchorAt(H.CENTER); | ||
|
||
ha.addTarget(d, 10, 0.1f); | ||
} | ||
} | ||
) | ||
.requestAll() | ||
; | ||
} | ||
|
||
void draw() { | ||
H.drawStage(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import hype.*; | ||
import hype.extended.layout.HGridLayout; | ||
import hype.extended.behavior.HAttractor; | ||
|
||
HDrawablePool pool; | ||
HAttractor ha; | ||
HAttractor.HAttractionForce hf; | ||
|
||
void setup() { | ||
size(640,640); | ||
H.init(this).background(#242424); | ||
|
||
ha = new HAttractor(320, 320, 200).debugMode(true); | ||
hf = ha.getForce(0); | ||
|
||
pool = new HDrawablePool(576); | ||
pool.autoAddToStage() | ||
.add(new HRect(25).rounding(4)) | ||
.layout(new HGridLayout().startX(21).startY(21).spacing(26,26).cols(24)) | ||
.onCreate( | ||
new HCallback() { | ||
public void run(Object obj) { | ||
HDrawable d = (HDrawable) obj; | ||
d.noStroke().fill(#ECECEC).anchorAt(H.CENTER); | ||
|
||
ha.addTarget(d, 10, 0.1f); | ||
} | ||
} | ||
) | ||
.requestAll() | ||
; | ||
} | ||
|
||
void draw() { | ||
hf.loc(mouseX, mouseY); | ||
H.drawStage(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import hype.*; | ||
import hype.extended.layout.HGridLayout; | ||
import hype.extended.behavior.HAttractor; | ||
|
||
HDrawablePool pool; | ||
HAttractor ha; | ||
|
||
void setup() { | ||
size(640,640); | ||
H.init(this).background(#242424); | ||
|
||
ha = new HAttractor().debugMode(true); | ||
ha.addForce(320, 180, 150); | ||
ha.addForce(160, 460, 150); | ||
ha.addForce(480, 460, 150); | ||
|
||
pool = new HDrawablePool(576); | ||
pool.autoAddToStage() | ||
.add(new HRect(25).rounding(4)) | ||
.layout(new HGridLayout().startX(21).startY(21).spacing(26,26).cols(24)) | ||
.onCreate( | ||
new HCallback() { | ||
public void run(Object obj) { | ||
HDrawable d = (HDrawable) obj; | ||
d.noStroke().fill(#ECECEC).anchorAt(H.CENTER); | ||
|
||
ha.addTarget(d, 10, 0.1f); | ||
} | ||
} | ||
) | ||
.requestAll() | ||
; | ||
} | ||
|
||
void draw() { | ||
H.drawStage(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import hype.*; | ||
import hype.extended.layout.HGridLayout; | ||
import hype.extended.behavior.HAttractor; | ||
|
||
HDrawablePool pool; | ||
HAttractor ha; | ||
|
||
void setup() { | ||
size(640,640); | ||
H.init(this).background(#242424); | ||
|
||
ha = new HAttractor().debugMode(true); | ||
|
||
ha.repelMode(); | ||
ha.addForce(160, 320, 200); | ||
|
||
ha.attractMode(); | ||
ha.addForce(480, 320, 200); | ||
|
||
pool = new HDrawablePool(576); | ||
pool.autoAddToStage() | ||
.add(new HRect(25).rounding(4)) | ||
.layout(new HGridLayout().startX(21).startY(21).spacing(26,26).cols(24)) | ||
.onCreate( | ||
new HCallback() { | ||
public void run(Object obj) { | ||
HDrawable d = (HDrawable) obj; | ||
d.noStroke().fill(#ECECEC).anchorAt(H.CENTER); | ||
|
||
ha.addTarget(d, 10, 0.1f); | ||
} | ||
} | ||
) | ||
.requestAll() | ||
; | ||
} | ||
|
||
void draw() { | ||
H.drawStage(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import hype.*; | ||
import hype.extended.layout.HGridLayout; | ||
import hype.extended.behavior.HAttractor; | ||
|
||
HDrawablePool pool; | ||
HAttractor ha; | ||
|
||
float r = 0; | ||
|
||
void setup() { | ||
size(640, 640, P3D); | ||
H.init(this).background(#242424).use3D(true); | ||
|
||
ha = new HAttractor().repelMode().debugMode(true); | ||
ha.addForce(320, 320, 100, 250); // x, y, z, radius | ||
|
||
pool = new HDrawablePool(576); | ||
pool.autoAddToStage() | ||
.add(new HBox().depth(10).width(10).height(10)) | ||
.layout(new HGridLayout().startX(26).startY(26).startZ(0).spacing(26, 26, 26).cols(24).rows(24)) | ||
.onCreate( | ||
new HCallback() { | ||
public void run(Object obj) { | ||
HDrawable d = (HDrawable) obj; | ||
d.noStroke().fill(#ECECEC).anchorAt(H.CENTER); | ||
|
||
ha.addTarget(d, 20, 0.5f); | ||
} | ||
} | ||
) | ||
.requestAll() | ||
; | ||
} | ||
|
||
void draw() { | ||
lights(); | ||
|
||
translate( width/2, height/2); | ||
rotateY( radians(r) ); | ||
translate(-width/2, -height/2); | ||
r+=0.4; | ||
|
||
H.drawStage(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import hype.*; | ||
import hype.extended.layout.HGridLayout; | ||
import hype.extended.behavior.HAttractor; | ||
|
||
HDrawablePool pool; | ||
HAttractor ha; | ||
HAttractor.HAttractionForce hf; | ||
|
||
float r = 0; | ||
float a = 0; | ||
|
||
void setup() { | ||
size(640, 640, P3D); | ||
H.init(this).background(#242424).use3D(true); | ||
|
||
ha = new HAttractor(320, 320, 100, 260).debugMode(true); | ||
hf = ha.getForce(0); | ||
|
||
pool = new HDrawablePool(576); | ||
pool.autoAddToStage() | ||
.add(new HBox().depth(10).width(10).height(10)) | ||
.layout(new HGridLayout().startX(26).startY(26).startZ(0).spacing(26, 26, 26).cols(24).rows(24)) | ||
.onCreate( | ||
new HCallback() { | ||
public void run(Object obj) { | ||
HDrawable d = (HDrawable) obj; | ||
d.noStroke().fill(#ECECEC).anchorAt(H.CENTER); | ||
|
||
ha.addTarget(d, 20, 0.5f); | ||
} | ||
} | ||
) | ||
.requestAll() | ||
; | ||
} | ||
|
||
void draw() { | ||
lights(); | ||
|
||
float x = 320 + cos(radians(a)) * 200; | ||
float y = 320 + sin(radians(a)) * 200; | ||
a += 1.0f/1.4; | ||
hf.loc(x, y, 100); | ||
|
||
translate( width/2, height/2); | ||
rotateY( radians(r) ); | ||
translate(-width/2, -height/2); | ||
r+=0.4; | ||
|
||
H.drawStage(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import hype.*; | ||
import hype.extended.layout.HGridLayout; | ||
import hype.extended.behavior.HAttractor; | ||
|
||
HDrawablePool pool; | ||
HAttractor ha; | ||
|
||
float r = 0; | ||
|
||
void setup() { | ||
size(640, 640, P3D); | ||
H.init(this).background(#242424).use3D(true); | ||
|
||
ha = new HAttractor().repelMode().debugMode(true); | ||
|
||
ha.addForce(94, 94, -225, 200); | ||
ha.addForce(540, 94, -225, 200); | ||
ha.addForce(94, 540, -225, 200); | ||
ha.addForce(540, 540, -225, 200); | ||
|
||
ha.addForce(94, 94, 225, 200); | ||
ha.addForce(540, 94, 225, 200); | ||
ha.addForce(94, 540, 225, 200); | ||
ha.addForce(540, 540, 225, 200); | ||
|
||
pool = new HDrawablePool(3375); | ||
pool.autoAddToStage() | ||
.add(new HBox().depth(5).width(5).height(5)) | ||
.layout(new HGridLayout().startX(95).startY(95).startZ(-225).spacing(30, 30, 30).cols(15).rows(15)) | ||
.onCreate( | ||
new HCallback() { | ||
public void run(Object obj) { | ||
HDrawable d = (HDrawable) obj; | ||
d.noStroke().fill(#ECECEC).anchorAt(H.CENTER); | ||
|
||
ha.addTarget(d, 20, 0.5f); | ||
} | ||
} | ||
) | ||
.requestAll() | ||
; | ||
} | ||
|
||
void draw() { | ||
lights(); | ||
|
||
translate( width/2, height/2); | ||
rotateY( radians(r) ); | ||
translate(-width/2, -height/2); | ||
r+=0.4; | ||
|
||
H.drawStage(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,3 @@ void draw() { | |
|
||
H.drawStage(); | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,3 @@ void draw() { | |
|
||
H.drawStage(); | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,4 +53,3 @@ void draw() { | |
|
||
H.drawStage(); | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,4 +49,3 @@ void setup() { | |
void draw() { | ||
H.drawStage(); | ||
} | ||
|
Oops, something went wrong.