Skip to content

Instantly share code, notes, and snippets.

@gaocegege
Last active May 20, 2017 02:38
Show Gist options
  • Save gaocegege/aca96749d0dc70be3fbe915c4d7eac8a to your computer and use it in GitHub Desktop.
Save gaocegege/aca96749d0dc70be3fbe915c4d7eac8a to your computer and use it in GitHub Desktop.
Examples for Processing.R
yPos <- 0
draw <- function() {
processing$background(as.integer(204))
yPos <- yPos - 1
if (yPos < 0) {
yPos <- height
}
processing$line(0, yPos, width, yPos)
}
yPos <- 0
settings <- function() {
stdout$print("Set width and height.")
processing$size(500, 500)
}
draw <- function() {
processing$background(as.integer(204))
yPos <- yPos - 1
if (yPos < 0) {
yPos <- height
}
processing$line(0, yPos, width, yPos)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment