Class SketchContext

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

Constructors

Properties

Accessors

Methods

Constructors

Properties

_p5?: __module

The underlying p5.js sketch context object.

Static

Accessors

  • get p5(): __module
  • Returns __module

    The current sketch context.
    If no context has been initialized, the method will return an "empty" sketch context (0x0 canvas).

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

    Static