Skip to content

Instantly share code, notes, and snippets.

@kadirmalak
Created August 31, 2017 12:21
Show Gist options
  • Save kadirmalak/7a89bdb27a18d3c7b63cef8d0c28dfe4 to your computer and use it in GitHub Desktop.
Save kadirmalak/7a89bdb27a18d3c7b63cef8d0c28dfe4 to your computer and use it in GitHub Desktop.
Using Processing with Scala
package processingscala
import processing.core.{PApplet, PConstants}
object Main extends PApplet {
def main(args:Array[String]) = {
PApplet.main("processingscala.Main")
}
}
class Main extends PApplet {
override def setup() = {
background(255, 255, 255)
}
override def settings() = {
size(640, 480, PConstants.P3D)
}
override def draw() = {
if (mousePressed) fill(0)
else fill(255)
ellipse(mouseX, mouseY, 80, 80)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment