Class: GenerateTextureSystem

PIXI.GenerateTextureSystem

System that manages the generation of textures from the renderer.

Implements

Methods

generateTexture (displayObject, options) PIXI.RenderTexture

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.

Name Type Attributes Description
displayObject PIXI.IRenderableObject

The displayObject the object will be generated from.

options IGenerateTextureOptions <optional>

Generate texture options.

options.region PIXI.Rectangle

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

options.resolution number <optional>

If not given, the renderer's resolution is used.

options.multisample PIXI.MSAA_QUALITY <optional>

If not given, the renderer's multisample is used.

Returns:
Type Description
PIXI.RenderTexture a shiny new texture of the display object passed in