new PIXI.RenderTexture(baseRenderTexture, frame)
| Name | Type | Description |
|---|---|---|
baseRenderTexture |
PIXI.BaseRenderTexture |
The renderer used for this RenderTexture |
frame |
PIXI.Rectangle |
optional
The rectangle frame of the texture to show |
Extends
Members
-
_framePIXI.Rectangle
-
This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,
irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases) -
baseTexturePIXI.BaseTexture
-
The base texture that this texture uses.
-
framePIXI.Rectangle
-
The frame specifies the region of the base texture that this texture uses.
-
heightnumber
-
The height of the Texture in pixels.
-
noFrameboolean
-
Does this Texture have any frame data assigned to it?
-
origPIXI.Rectangle
-
This is the area of original texture, before it was put in atlas
-
requiresUpdateboolean
-
This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)
-
rotatenumber
-
Indicates whether the texture is rotated inside the atlas
set to 2 to compensate for texture packer rotation
set to 6 to compensate for spine packer rotation
can be used to rotate or mirror sprites
See PIXI.GroupD8 for explanation -
transformObject
-
Extra field for extra plugins. May contain clamp settings and some matrices
-
trimPIXI.Rectangle
-
This is the trimmed area of original texture, before it was put in atlas
-
validboolean
-
This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.
-
widthnumber
-
The width of the Texture in pixels.
Methods
-
staticPIXI.RenderTexture.create(width, height, scaleMode, resolution){PIXI.RenderTexture}
-
A short hand way of creating a render texture.
Name Type Default Description widthnumber 100 optional The width of the render texture
heightnumber 100 optional The height of the render texture
scaleModenumber PIXI.settings.SCALE_MODE optional See PIXI.SCALE_MODES for possible values
resolutionnumber 1 optional The resolution / device pixel ratio of the texture being generated
Returns:
Type Description PIXI.RenderTexture The new render texture -
inherited protected_updateUvs()
-
Updates the internal WebGL UV cache.
-
Creates a new texture object that acts the same as this one.
Returns:
Type Description PIXI.Texture The new texture -
inherited destroy(destroyBase)
-
Destroys this texture
Name Type Default Description destroyBaseboolean false optional Whether to destroy the base texture as well
-
resize(width, height, doNotResizeBaseTexture)
-
Resizes the RenderTexture.
Name Type Description widthnumber The width to resize to.
heightnumber The height to resize to.
doNotResizeBaseTextureboolean Should the baseTexture.width and height values be resized as well?
-
inherited setFrame(frame)
-
Name Type Description framePIXI.Rectangle The frame to set.
- Deprecated
- since version 3.0.0
- See:
-
inherited update()
-
Updates this texture on the gpu.
Events
-
Fired when the texture is updated. This happens if the frame or the baseTexture is updated.