Class GenerateTextureSystem

System that manages the generation of textures from the renderer.

PIXI

Implements

Constructors

Properties

Methods

Constructors

Properties

renderer: IRenderer<ICanvas>

Methods

  • Generic destroy methods to be overridden by the subclass

    Returns void

  • A Useful function that returns a texture of the display object that can then be used to create sprites This can be quite useful if your displayObject is complicated and needs to be reused multiple times.

    Parameters

    • displayObject: IRenderableObject

      The displayObject the object will be generated from.

    • Optionaloptions: IGenerateTextureOptions

      Generate texture options.

      • OptionalalphaMode?: ALPHA_MODES
      • OptionalanisotropicLevel?: number
      • Optionalformat?: FORMATS
      • Optionalheight?: number
      • Optionalmipmap?: MIPMAP_MODES
      • Optionalmultisample?: MSAA_QUALITY

        The number of samples of the frame buffer. The default is the renderer's multisample.

      • OptionalpixiIdPrefix?: string
      • Optionalregion?: Rectangle

        The region of the displayObject, that shall be rendered, if no region is specified, defaults to the local bounds of the displayObject.

      • Optionalresolution?: number

        The resolution / device pixel ratio of the texture being generated. The default is the renderer's resolution.

      • OptionalresourceOptions?: any
      • OptionalscaleMode?: SCALE_MODES
      • Optionaltarget?: TARGETS
      • Optionaltype?: TYPES
      • Optionalwidth?: number
      • OptionalwrapMode?: WRAP_MODES

    Returns RenderTexture

    a shiny new texture of the display object passed in