bind_sketches: Combine multiple sketches together

Description Usage Arguments Examples

Description

Combine multiple sketches together

Usage

1
bind_sketches(..., width = NULL, height = NULL, padding = 0)

Arguments

...

A series of p5 sketches.

width

Width of the sketch.

height

Height of the sketch.

padding

Padding of the sketch.

Examples

 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)

seankross/p5 documentation built on May 30, 2019, 8:17 a.m.