Class Renderer<T>Abstract

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

Type Parameters

  • T

Hierarchy

Constructors

Properties

_height: number = 1
_width: number = 1
defaultRenderAs: T

The renderAs value for the default element

renderInfo: T[] = []

Ordered by ID, the renderAs info for each element.

Methods

  • Returns

    the height of the canvas

    Returns number

  • Returns

    the width of the canvas

    Returns number

  • Intentionally overridable, called when an element is modified.

    Returns

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

    Parameters

    • id: number

      The id of the element to modify.

    • newRenderAs: T

      The new renderAs info.

    Returns T

  • Renders a pixel on a given location on the next call to 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

Generated using TypeDoc