Skip to content

Commit be3483d

Browse files
authored
Merge pull request #40 from brightredchilli/ying/update-pseudocode
Ying/update pseudocode
2 parents cc6d69b + 058f0e7 commit be3483d

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
// code goes here!
22

33
//if you want to show a parameter's value, which highlights when it changes you need to enclose it's name in double square brackets.
4-
// for a parameter named myParam you shoudl put [[myParam]] in the pseudo code below.
4+
// for a parameter named myParam you shoudl put [[myParam]] in the pseudo code below.
5+
6+
7+
void draw() {
8+
textWidth = getTextBoundingBox().width;
9+
zoom = screenWidth * [[widthScale]] / textWidth;
10+
setBackgroundColor(ColorFromHSV(mod(getElapsedTime(), 255), 200, 255));
11+
points = getTextPointsWithSpacing([[drawEvery]]);
12+
13+
pushMatrix();
14+
scaleScreen(zoom);
15+
16+
for (point in points) {
17+
drawImage([[imageScale]]);
18+
}
19+
20+
popMatrix();
21+
}

src/zzScenes/zzSushiScene/zzSushiScene.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ void zzSushiScene::setup(){
77
// if your original code use an ofxPanel instance dont use it here, instead
88
// add your parameters to the "parameters" instance as follows.
99
// param was declared in zzSushiScene.h
10-
parameters.add(imageScale.set("image scale", 0.0075, 0.005, 0.02));
11-
parameters.add(widthScale.set("width scale", 0.8, 0.5, 8));
12-
parameters.add(drawEvery.set("spacing", 4, 2, 20));
10+
parameters.add(imageScale.set("imageScale", 0.0075, 0.005, 0.02));
11+
parameters.add(widthScale.set("widthScale", 0.8, 0.5, 8));
12+
parameters.add(drawEvery.set("drawEvery", 4, 2, 20));
1313

1414
setAuthor("Put Your Name Here");
1515
setOriginalArtist("Put the original Artist's name here");
16+
loadCode("zzScenes/zzSushiScene/exampleCode.cpp", false);
1617

17-
loadCode("scenes/zzSushiScene/exampleCode.cpp", false);
1818
center.set(dimensions.getCenter());
1919

2020

0 commit comments

Comments
 (0)