Class P5Context

The P5Context provides static access to the p5.js sketch context. This context allows access to all methods and variables of the p5.js library.

Constructors

Accessors

Methods

Constructors

Accessors

  • get p5(): __module
  • The current sketch context.
    If no context has been initialized, the method will return an "empty" sketch context (0x0 canvas; no loop).

    Returns __module

Methods

  • Initializes the sketch context to allow other accessors to have accurate canvas, environment, and runtime information.

    Parameters

    • p5: __module

      The sketch context of the running p5.js script.

    Returns void