Description Usage Arguments Examples
Combine multiple sketches together
1 |
... |
A series of p5 sketches. |
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:
library(dplyr)
stripes <- data_frame(
x = rep(0, 7),
y = cumsum(c(0, rep(30, 6))),
w = rep(190*2, 7),
h = rep(15, 7)
)
stripes_ <- stripes %>%
p5() %>%
createCanvas(190*2, 200) %>%
fill("#B22234") %>%
noStroke() %>%
rect()
stars_ <- p5() %>%
fill("#3C3B6E") %>%
noStroke() %>%
rect(0, 0, 152, 105)
bind_sketches(stripes_, stars_)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.