Class: RenderTexture

Phaser. RenderTexture

Phaser.RenderTexture

new RenderTexture(game, key, width, height)

A RenderTexture is a special texture that allows any displayObject to be rendered to it.

Parameters:
Name Type Description
game Phaser.Game

Current game instance.

key string

Asset key for the render texture.

width number

the width of the render texture.

height number

the height of the render texture.

Source:

Members

frame

Properties:
Name Type Description
frame PIXI.Rectangle

The frame for this texture.

Source:

game

Properties:
Name Type Description
game Phaser.Game

A reference to the currently running game.

Source:

height

Properties:
Name Type Description
height number

the height.

Source:

indetityMatrix

Properties:
Name Type Description
indetityMatrix PIXI.mat3

Matrix object.

Source:

name

Properties:
Name Type Description
name string

the name of the object.

Source:

type

Properties:
Name Type Description
type number

Base Phaser object type.

Source:

width

Properties:
Name Type Description
width number

the width.

Source:

Methods

render(displayObject, position, clear, renderHidden)

This function will draw the display object to the texture. If the display object is a Group or has children it will draw all children as well.

Parameters:
Name Type Argument Default Description
displayObject DisplayObject

The display object to render this texture on.

position Phaser.Point <optional>

Where to draw the display object.

clear boolean <optional>
false

If true the texture will be cleared before the displayObject is drawn.

renderHidden boolean <optional>
false

If true displayObjects that have their visible property set to false will still be rendered.

Source:

renderXY(displayObject, x, y, clear, renderHidden)

This function will draw the display object to the texture at the given x/y coordinates. If the display object is a Group or has children it will draw all children as well.

Parameters:
Name Type Argument Default Description
displayObject DisplayObject

The display object to render this texture on.

x number

The x coordinate to draw the display object at.

y number

The y coordinate to draw the display object at.

clear boolean <optional>
false

If true the texture will be cleared before the displayObject is drawn.

renderHidden boolean <optional>
false

If true displayObjects that have their visible property set to false will still be rendered.

Source:

resize()

Resizes the RenderTexture.

Source:
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Wed Feb 12 2014 15:23:45 GMT-0000 (GMT) using the DocStrap template.