Skip to content

Commit

Permalink
Merge pull request #169 from hype/lib_staging
Browse files Browse the repository at this point in the history
Updating master branch to latest version
  • Loading branch information
tracerstar committed Dec 28, 2021
2 parents b5ba44d + a9aa0d4 commit 7db5bc1
Show file tree
Hide file tree
Showing 612 changed files with 26,198 additions and 4,760 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
### HYPE_Processing v2.1.0 (UNRELEASED)
- New HParticles behavior
- New HSphereLayout class
- New HScreenshot class
- New HGroupColorPool class
- Updated HTween class
- Updated HPixelColorist class
- Updated HConstants (new colors)
- Updated HShape class
- Updated HPath class
- Updated HVertex class

### HYPE_Processing v2.0.2 (May 12, 2016)
- Fixes infinite recursion bug in HMath

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void setup() {
H.init(this).background(#242424);

ha = new HAttractor(320, 320, 200) // x, y, radius
.debugMode(true)
.debugMode(false)
;

pool = new HDrawablePool(576);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 42 additions & 0 deletions HYPE/examples/HBox/HBox_009/HBox_009.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import hype.*;
import hype.extended.behavior.HOscillator;

HDrawablePool pool;
int boxSize = 500;

void setup() {
size(640,640,P3D);
H.init(this).background(#242424).use3D(true);

pool = new HDrawablePool(1);
pool.autoAddToStage()
.add(new HBox().texture("tex.png"))
.onCreate(
new HCallback() {
public void run(Object obj) {
int i = pool.currentIndex();

HBox d = (HBox) obj;
d.depth(boxSize).width(boxSize).height(boxSize).strokeWeight(2).stroke(0,225).fill(255,225).x(width/2).y(height/2).z(-500);

new HOscillator().target(d).property(H.ROTATIONX).range(-360, 360).speed(0.1).freq(1).currentStep(i);
new HOscillator().target(d).property(H.ROTATIONY).range(-360, 360).speed(0.2).freq(1).currentStep(i);
new HOscillator().target(d).property(H.ROTATIONZ).range(-360, 360).speed(0.3).freq(1).currentStep(i);
}
}
)
.requestAll()
;
}

void draw() {
/*
Be wary when using these hints, they are there to help with z depth clipping issues.
They can have performance issues when there's a lot of overlapping objects on screen.
*/
hint(DISABLE_DEPTH_TEST);
hint(ENABLE_DEPTH_SORT);

lights();
H.drawStage();
}
Binary file added HYPE/examples/HBox/HBox_009/data/tex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions HYPE/examples/HBox/HBox_010/HBox_010.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import hype.*;
import hype.extended.behavior.HOscillator;

HDrawablePool pool;
int boxSize = 500;

void setup() {
size(640,640,P3D);
H.init(this).background(#242424).use3D(true);

HBox b = new HBox();
b.textureFront("tex1.png");
b.textureBack("tex2.png");
b.textureTop("tex3.png");
b.textureBottom("tex4.png");
b.textureLeft("tex5.png");
b.textureRight("tex6.png");

pool = new HDrawablePool(1);
pool.autoAddToStage()
.add(b)
.onCreate(
new HCallback() {
public void run(Object obj) {
int i = pool.currentIndex();

HBox d = (HBox) obj;
d.depth(boxSize).width(boxSize).height(boxSize).strokeWeight(2).stroke(0,225).fill(255,225).x(width/2).y(height/2).z(-500);

new HOscillator().target(d).property(H.ROTATIONX).range(-360, 360).speed(0.1).freq(1).currentStep(i);
new HOscillator().target(d).property(H.ROTATIONY).range(-360, 360).speed(0.2).freq(1).currentStep(i);
new HOscillator().target(d).property(H.ROTATIONZ).range(-360, 360).speed(0.3).freq(1).currentStep(i);
}
}
)
.requestAll()
;
}

void draw() {
/*
Be wary when using these hints, they are there to help with z depth clipping issues.
They can have performance issues when there's a lot of overlapping objects on screen.
*/
hint(DISABLE_DEPTH_TEST);
hint(ENABLE_DEPTH_SORT);

lights();
H.drawStage();
}
Binary file added HYPE/examples/HBox/HBox_010/data/tex1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_010/data/tex2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_010/data/tex3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_010/data/tex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_010/data/tex5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_010/data/tex6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions HYPE/examples/HBox/HBox_011/HBox_011.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import hype.*;
import hype.extended.behavior.HOscillator;

HDrawablePool pool;
int boxSize = 500;

void setup() {
size(640,640,P3D);
H.init(this).background(#242424).use3D(true);

HBox b = new HBox();
b.texture("tex.png");
b.textureFront("tex1.png"); // "texture" sets all 6 faces, calling a single specfic face... overrides that face
b.textureBack("tex2.png");

// textures "tex1" and "tex2" by https://www.instagram.com/matthewcurry/

pool = new HDrawablePool(1);
pool.autoAddToStage()
.add(b)
.onCreate(
new HCallback() {
public void run(Object obj) {
int i = pool.currentIndex();

HBox d = (HBox) obj;
d.depth(boxSize).width(boxSize).height(boxSize).strokeWeight(2).stroke(0,225).fill(255,225).x(width/2).y(height/2).z(-500);

new HOscillator().target(d).property(H.ROTATIONX).range(-360, 360).speed(0.1).freq(1).currentStep(i);
new HOscillator().target(d).property(H.ROTATIONY).range(-360, 360).speed(0.2).freq(1).currentStep(i);
new HOscillator().target(d).property(H.ROTATIONZ).range(-360, 360).speed(0.3).freq(1).currentStep(i);
}
}
)
.requestAll()
;
}

void draw() {
/*
Be wary when using these hints, they are there to help with z depth clipping issues.
They can have performance issues when there's a lot of overlapping objects on screen.
*/
hint(DISABLE_DEPTH_TEST);
hint(ENABLE_DEPTH_SORT);

lights();
H.drawStage();
}
Binary file added HYPE/examples/HBox/HBox_011/data/tex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_011/data/tex1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_011/data/tex2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions HYPE/examples/HBox/HBox_012/HBox_012.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import hype.*;
import hype.extended.behavior.HOscillator;

HDrawablePool pool;
int boxSize = 500;

void setup() {
size(640,640,P3D);
H.init(this).background(#242424).use3D(true);

HBox b = new HBox();
b.textureFront("tex1.png");
b.textureBack("tex2.png");
b.textureTop("tex3.png");
b.textureBottom("tex4.png");
b.textureLeft("tex5.png");
b.textureRight("tex6.png");

pool = new HDrawablePool(25);
pool.autoAddToStage()
.add(b)
.onCreate(
new HCallback() {
public void run(Object obj) {
int i = pool.currentIndex();

HBox d = (HBox) obj;
d.depth(boxSize).width(boxSize).height(boxSize).strokeWeight(2).stroke(0,225).fill(255,225).x(width/2).y(height/2).z(-500);

new HOscillator().target(d).property(H.ROTATIONX).range(-360, 360).speed(0.1).freq(1).currentStep(i);
new HOscillator().target(d).property(H.ROTATIONY).range(-360, 360).speed(0.2).freq(1).currentStep(i);
new HOscillator().target(d).property(H.ROTATIONZ).range(-360, 360).speed(0.3).freq(1).currentStep(i);
new HOscillator().target(d).property(H.SCALE).range(0.5, 1.0).speed(1).freq(2).currentStep(i);
}
}
)
.requestAll()
;
}

void draw() {
lights();
H.drawStage();
}
Binary file added HYPE/examples/HBox/HBox_012/data/tex1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_012/data/tex2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_012/data/tex3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_012/data/tex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_012/data/tex5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_012/data/tex6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions HYPE/examples/HBox/HBox_013/HBox_013.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import hype.*;
import hype.extended.behavior.HOscillator;
import hype.extended.colorist.HPixelColorist;

HDrawablePool pool;
int boxSize = 500;

HImage clrSRC;
HPixelColorist clrHPC;

void setup() {
size(640,640,P3D);
H.init(this).background(#242424).use3D(true);

H.add( clrSRC = new HImage("color.png") );
clrHPC = new HPixelColorist(clrSRC);

HBox b = new HBox();
b.textureFront("tex1.png");
b.textureBack("tex2.png");
b.textureTop("tex3.png");
b.textureBottom("tex4.png");
b.textureLeft("tex5.png");
b.textureRight("tex6.png");

pool = new HDrawablePool(50);
pool.autoAddToStage()
.add(b)
.onCreate(
new HCallback() {
public void run(Object obj) {
int i = pool.currentIndex();

HRect marker;
H.add( marker = new HRect(2,10) );
marker.noStroke().fill(#CCCCCC).loc(0,15);
new HOscillator().target(marker).property(H.X).range(0, clrSRC.width()).speed(1).freq(1).currentStep(i*2);

HBox d = (HBox) obj;
d.depth(boxSize).width(boxSize).height(boxSize).strokeWeight(2).stroke(0,225).fill(255,225).x(width/2).y(height/2).z(-500);
d.extras( new HBundle().obj("m", marker) );

new HOscillator().target(d).property(H.ROTATIONX).range(-360, 360).speed(0.1).freq(1).currentStep(i);
new HOscillator().target(d).property(H.ROTATIONY).range(-360, 360).speed(0.2).freq(1).currentStep(i);
new HOscillator().target(d).property(H.ROTATIONZ).range(-360, 360).speed(0.3).freq(1).currentStep(i);
}
}
)
.requestAll()
;
}

void draw() {
lights();
H.drawStage();

for (HDrawable d : pool) {
HBundle obj = d.extras();
HRect marker = (HRect) obj.obj("m");

int tempPos = (int)constrain(marker.x(), 0, clrSRC.width()-1);
color tempColor = clrHPC.getColor(tempPos,0);
d.fill(tempColor);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_013/data/tex1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_013/data/tex2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_013/data/tex3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_013/data/tex4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_013/data/tex5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_013/data/tex6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions HYPE/examples/HBox/HBox_014/HBox_014.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import hype.*;
import hype.extended.behavior.HOscillator;
import hype.extended.colorist.HPixelColorist;
import hype.extended.layout.HGridLayout;

int gridX = 5;
int gridY = 5;
int gridZ = 5;
int gridMax = gridX * gridY * gridZ;

HDrawablePool pool;
int boxSize = 200;

HImage clrSRC;
HPixelColorist clrHPC;

void setup() {
size(640,640,P3D);
H.init(this).background(#242424).use3D(true);

H.add( clrSRC = new HImage("color.png") ).visibility(false);
clrHPC = new HPixelColorist(clrSRC);

pool = new HDrawablePool(gridMax);
pool.autoAddToStage()
.add(new HBox().texture("tex.png"))
.layout (new HGridLayout().startX(-400).startY(-400).startZ(-400).spacing(400, 400, 400).rows(gridX).cols(gridY))
.onCreate(
new HCallback() {
public void run(Object obj) {
int i = pool.currentIndex();

HRect marker;
H.add( marker = new HRect(2,10) );
marker.noStroke().fill(#CCCCCC).loc(0,15).visibility(false);
new HOscillator().target(marker).property(H.X).range(0, clrSRC.width()).speed(1).freq(1).currentStep(i*2);

HBox d = (HBox) obj;
d.depth(boxSize).width(boxSize).height(boxSize).strokeWeight(2).stroke(0,225).fill(255,225);
d.extras( new HBundle().obj("m", marker) );

new HOscillator().target(d).property(H.ROTATIONX).range(-360, 360).speed(0.1).freq(1).currentStep(i*0.25);
new HOscillator().target(d).property(H.ROTATIONY).range(-360, 360).speed(0.2).freq(1).currentStep(i*0.25);
new HOscillator().target(d).property(H.ROTATIONZ).range(-360, 360).speed(0.3).freq(1).currentStep(i*0.25);
}
}
)
.requestAll()
;
}

void draw() {
lights();

pushMatrix();
translate(width/2, height/2, -200);
rotateY( radians(frameCount) );
H.drawStage();
popMatrix();

for (HDrawable d : pool) {
HBundle obj = d.extras();
HRect marker = (HRect) obj.obj("m");

int tempPos = (int)constrain(marker.x(), 0, clrSRC.width()-1);
color tempColor = clrHPC.getColor(tempPos,0);
d.fill(tempColor);
}
}
Binary file added HYPE/examples/HBox/HBox_014/data/color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_014/data/tex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added HYPE/examples/HBox/HBox_014/data/tex1.png
Binary file added HYPE/examples/HBox/HBox_014/data/tex2.png
Binary file added HYPE/examples/HBox/HBox_014/data/tex3.png
Binary file added HYPE/examples/HBox/HBox_014/data/tex4.png
Binary file added HYPE/examples/HBox/HBox_014/data/tex5.png
Binary file added HYPE/examples/HBox/HBox_014/data/tex6.png
Loading

0 comments on commit 7db5bc1

Please sign in to comment.