Description Usage Arguments Examples
Create a blank p5 sketch.
1 |
data |
A |
width |
Width of the sketch. |
height |
Height of the sketch. |
padding |
Padding of the sketch. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run:
p5() %>%
rect(10, 10, 40, 50)
p5() %>%
createCanvas(400, 300) %>%
background("#F0F8FF")
library(dplyr)
stripes <- data_frame(
x = rep(0, 7),
y = cumsum(c(0, rep(30, 6))),
w = rep(300, 7),
h = rep(15, 7)
)
stripes %>%
p5() %>%
createCanvas(300, 200) %>%
fill("#FF0000") %>%
noStroke() %>%
rect()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.