@batpb/genart - v2.0.0-rc.3-alpha.2
    Preparing search index...

    Class GraphicsContext

    Graphics context for handling a p5.Graphics instance.

    2.0.0

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get MIN_RESOLUTION(): number

      Returns number

      The minimum resolution for a context.

      2.0.0

    • get aspectRatio(): AspectRatio

      Returns AspectRatio

      The AspectRatio of the context.

      2.0.0

    • set aspectRatio(aspectRatio: AspectRatio): void
      Protected

      Set the AspectRatio of the context.

      Parameters

      Returns void

    • get center(): Vector

      Returns Vector

      The center of the context.

      2.0.0

    • get defaultStrokeWeight(): number

      The default stroke weight for the context. Equivalent to a stroke of 1 in a 500x500 sketch.

      Returns number

      The default stroke weight for the context.

      2.0.0

    • get GRAPHICS(): Graphics

      Returns Graphics

      The p5.Graphics instance backing this context.

      2.0.0

    • get height(): number

      Returns number

      The height of the context.

      2.0.0

    • get IS_WEBGL(): boolean

      Is the context in WebGL mode?

      Returns boolean

      true if the context is in WebGL mode, false otherwise.

      2.0.0

    • get matchContainerRatio(): boolean

      Should the aspect ratio of the context match the aspect ratio of its container?

      Returns boolean

      Whether the aspect ratio should match the container aspect ratio.

      2.0.0

    • set matchContainerRatio(matchContainerRatio: boolean): void

      Should the aspect ratio of the context match the aspect ratio of its container?

      Parameters

      • matchContainerRatio: boolean

        {boolean} - The new value for the matchContainerRatio property.

      Returns void

      2.0.0

    • get NAME(): string

      Returns string

      The name of the context.

      2.0.0

    • get RENDER_TYPE(): RenderType

      Returns RenderType

      The RenderType of the context.

      2.0.0

    • get resolution(): number

      Returns number

      The resolution of the context.

      2.0.0

    • set resolution(resolution: number): void
      Protected

      Set the resolution of the context.

      Parameters

      • resolution: number

        {number} - The new resolution of the context.

      Returns void

    • get width(): number

      Returns number

      The width of the context.

      2.0.0

    Methods

    • Resize the context.

      Returns void

      2.0.0

    • Update the resolution of the context.

      Parameters

      • resolution: number

        {number} - The new resolution of the context.

      Returns void

      2.0.0