GameObjectFactory#renderTexture()

renderTexture(width, height, key, addToCache) → {Phaser.RenderTexture}

A dynamic initially blank canvas to which images can be drawn.

Parameters
Name Type Argument Default Description
width number <optional>
100

the width of the RenderTexture.

height number <optional>
100

the height of the RenderTexture.

key string <optional>
''

Asset key for the RenderTexture when stored in the Cache (see addToCache parameter).

addToCache boolean <optional>
false

Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key)

Returns

The newly created RenderTexture object.

Source code: gameobjects/GameObjectFactory.js (Line 484)
doc_phaser
2017-02-14 10:48:45
Comments
Leave a Comment

Please login to continue.