Created
January 25, 2019 11:09
-
-
Save simsaens/4fbf1eadb1793007c4317d504e537347 to your computer and use it in GitHub Desktop.
Render one frame in setup
This file contains hidden or 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
function setup() | |
background(0) | |
-- Render once into an image the size of the screen | |
img = image(WIDTH,HEIGHT) | |
setContext(img) | |
stroke(255) | |
strokeWidth(5) | |
fill(227, 106, 106, 255) | |
ellipse(WIDTH/2, HEIGHT/2, 500) | |
setContext() | |
end | |
function draw() | |
-- Just draw the image we rendered into in setup() | |
spriteMode(CORNER) | |
sprite(img, 0, 0) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment