createCanvas: Set the dimensions of the sketch canvas

Description Usage Arguments Examples

View source: R/rendering.R

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 July 12, 2018, 8:56 a.m.