Skip to content

Instantly share code, notes, and snippets.

@GabiThume
Created June 9, 2013 16:57
Show Gist options
  • Select an option

  • Save GabiThume/5744278 to your computer and use it in GitHub Desktop.

Select an option

Save GabiThume/5744278 to your computer and use it in GitHub Desktop.
<script src="http://processingjs.org/js/processing.min.js"></script>
<canvas id="processing-canvas"> </canvas>
<script type="text/processing" data-processing-target="processing-canvas">
/* @pjs preload="static/images/moon.jpg"; */
PImage img;
void setup() {
size(800, 800, P2D);
background(0);
smooth();
img = loadImage("static/images/moon.jpg");
}
void draw() {
tint(255, 126);
image(img, 400, 400, width/2, height/2);
stroke(random(255));
ellipse(random(width), random(height), 1, 1);
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment