Class Renderer<T>Abstract

Abstract rendering type. Used by pixelmanipulator.PixelManipulator to enable rendering to various targets.

Type Parameters

  • T

Hierarchy (view full)

Constructors

Properties

defaultRenderAs: T

The pixelmanipulator.ElementData.renderAs value for the default element

renderInfo: T[] = []

Ordered by ID, the pixelmanipulator.ElementData.renderAs info for each element.

Methods

  • Returns number

    the height of the canvas

  • Returns number

    the width of the canvas

  • Intentionally overridable, called when an element is modified.

    Parameters

    Returns T

    The value passed upstream to be stored as the actual renderAs info, allowing for sanitation in this function, or one overriding it.

  • Renders a pixel on a given location on the next call to Renderer.update

    Parameters

    • location: Location

      Where to render the pixel.

    • id: number

      the pixel to render.

    Returns void

  • Reset the render target.

    Returns void

  • Parameters

    • value: number

      The new height of the canvas

    Returns void

  • Parameters

    • value: number

      The new width of the canvas

    Returns void