createCanvas: Set the dimensions of the sketch canvas

Description Usage Arguments Examples

Description

Set the dimensions of the sketch canvas

Usage

1
createCanvas(sketch, w, h, renderer = NULL)

Arguments

sketch

A p5 sketch.

w

The width of the canvas in pixels.

h

The height of the canvas in pixels.

renderer

Either the default renderer ('NULL') or '~WEBGL'.

Examples

1
2
3
4
5
6
7
8
## Not run: 

p5() %>%
  createCanvas(300, 200) %>%
  background("#FAE")


## End(Not run)

ropenscilabs/realtime documentation built on May 29, 2019, 8:50 a.m.