Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added doLoop() to replace loop() from Processing API as loop in CS is…
… a reserved keyword. .. and added an example to show it.
- Loading branch information
Showing
9 changed files
with
75 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#Build Number for ANT. Do not edit! | ||
#Mon May 20 13:35:49 CEST 2013 | ||
build.number=262 | ||
#Fri May 24 23:04:54 CEST 2013 | ||
build.number=268 |
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.
24 changes: 24 additions & 0 deletions
24
resources/examples/Language/LoopNoLoopDoLoop/LoopNoLoopDoLoop.pde
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,24 @@ | ||
### | ||
This example quickly shows you the use of loop, the CoffeeScript control structure and | ||
noLoop() and doLoop() which control playback. Note that "loop()" from Processing API is | ||
"doLoop()" here in CoffeeScript mode as "loop" is a reserved keyword! | ||
### | ||
|
||
setup: -> | ||
size 200, 200 | ||
noLoop() | ||
|
||
draw: -> | ||
background( frameCount % 255 ) | ||
|
||
[x, y] = [20, 20] | ||
loop | ||
fill x | ||
rect x, y, 20, 20 | ||
x += 10 | ||
y += 14 | ||
break unless y < (height-28) | ||
|
||
keyPressed: -> | ||
doLoop() | ||
|
2 changes: 2 additions & 0 deletions
2
resources/examples/Language/LoopNoLoopDoLoop/sketch.properties
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,2 @@ | ||
coffee.editor.tabs.size=4 | ||
mode=de.bezier.mode.coffeescript.CoffeeScriptMode |
Large diffs are not rendered by default.
Oops, something went wrong.
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