Skip to content

Commit

Permalink
demo: Fix the demo (processing-r#190)
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <[email protected]>
  • Loading branch information
gaocegege authored Jul 27, 2017
1 parent abd50a1 commit 3e4e4f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
11 changes: 1 addition & 10 deletions examples/Demo/FiguresTransformation/FiguresTransformation.rpde
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
import(rprocessing.RLangPApplet)

HALF_PI <- pi/2
TWO_PI <- pi * 2
QUARTER_PI <- pi/4
PI <- pi
DIAMETER <- as.integer(3)
RADIUS <- as.integer(2)

# Current time of animation
time <- 0
# Animation duration
Expand Down Expand Up @@ -219,7 +210,7 @@ drawWave <- function(p, dir) {
wx = dir * figureRadius * 0.5 * (sin(va * TWO_PI) * (sin(a) + 1)) - dir
wy = map(a, 0, PI, -figureRadius, figureRadius)
vertex(wx, wy)
a = a + RLangPApplet$radians(2)
a = a + radians(2)
}
endShape()
}
Expand Down
3 changes: 2 additions & 1 deletion src/rprocessing/mode/RLangMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public String[] getExtensions() {
@Override
public File[] getExampleCategoryFolders() {
return new File[] {new File(examplesFolder, "Basics"), new File(examplesFolder, "Libraries"),
new File(examplesFolder, "reference"), new File(examplesFolder, "R Packages")};
new File(examplesFolder, "reference"), new File(examplesFolder, "R Packages"),
new File(examplesFolder, "Demo")};
}

/**
Expand Down

0 comments on commit 3e4e4f7

Please sign in to comment.