Skip to content

Commit

Permalink
Merge branch 'lib_staging' of github.com:hype/HYPE_Processing
Browse files Browse the repository at this point in the history
  • Loading branch information
christophertino committed Apr 14, 2016
2 parents e95076b + 1697b0c commit 23c2873
Show file tree
Hide file tree
Showing 85 changed files with 3,507 additions and 115 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
### build_20150811.0 (August 11, 2015)
### HYPE_Processing v2.0.1 (April 14, 2016)
- New HSprite and HAttractor classes
- updates to HGRoup and HRotate

### HYPE_Processing v2.0.0 (August 11, 2015)
- refactor file/directory structure to meet Processing Library Guidelines.
- Incorporate Ant build support
- Debug against Java 8
Expand Down
Empty file removed Icon
Empty file.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A project maintained by [Joshua Davis](https://github.com/hype/) / [twitter.com/

A collection of classes that performs the heavy lifting for you by writing a minimal amount of code.

More about HYPE here.
[www.hypeframework.org](http://www.hypeframework.org/)

This library is currently under heavy development. You can keep track of the latest changes here in the [CHANGELOG][1].

Expand Down
Binary file modified distribution/HYPE.jar
Binary file not shown.
Binary file modified distribution/HYPE.zip
Binary file not shown.
36 changes: 36 additions & 0 deletions examples/HAttractor/HAttractor_001/HAttractor_001.pde
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();
}
38 changes: 38 additions & 0 deletions examples/HAttractor/HAttractor_002/HAttractor_002.pde
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();
}
37 changes: 37 additions & 0 deletions examples/HAttractor/HAttractor_003/HAttractor_003.pde
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();
}
37 changes: 37 additions & 0 deletions examples/HAttractor/HAttractor_004/HAttractor_004.pde
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();
}
40 changes: 40 additions & 0 deletions examples/HAttractor/HAttractor_005/HAttractor_005.pde
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();
}
44 changes: 44 additions & 0 deletions examples/HAttractor/HAttractor_006/HAttractor_006.pde
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();
}
51 changes: 51 additions & 0 deletions examples/HAttractor/HAttractor_007/HAttractor_007.pde
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();
}
53 changes: 53 additions & 0 deletions examples/HAttractor/HAttractor_008/HAttractor_008.pde
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();
}
1 change: 0 additions & 1 deletion examples/HBox/HBox_002/HBox_002.pde
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ void draw() {

H.drawStage();
}

1 change: 0 additions & 1 deletion examples/HBox/HBox_003/HBox_003.pde
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ void draw() {

H.drawStage();
}

1 change: 0 additions & 1 deletion examples/HCanvas/HCanvas_002/HCanvas_002.pde
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ void draw() {

H.drawStage();
}

1 change: 0 additions & 1 deletion examples/HCanvas/HCanvas_005/HCanvas_005.pde
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@ void setup() {
void draw() {
H.drawStage();
}

Loading

0 comments on commit 23c2873

Please sign in to comment.