sketch: Create a sketch from multiple parts

Description Usage Arguments

Description

p5 sketches are split into five sections:

  1. Code before the setup.

  2. The setup code.

  3. Code between setup and draw.

  4. The draw code.

  5. Code after draw.

The p5 function automatically determines where an illustrating function should be added. You can use sketch along with the pre, setup, between, draw, and post functions in order to explicitly specify where illustrating functions should be added.

Usage

1
2
sketch(pre = NULL, setup = NULL, between = NULL, draw = NULL,
  post = NULL, width = NULL, height = NULL, padding = 0)

Arguments

pre

A pre sketch.

setup

A setup sketch.

between

A between sketch.

draw

A draw sketch.

post

A post sketch.

width

Width of the sketch.

height

Height of the sketch.

padding

Padding of the sketch.


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