RenderTexture#RenderTexture

new RenderTexture(game, width, height, key, scaleMode, resolution)

A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and
render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.

Parameters
Name Type Argument Default Description
game Phaser.Game

Current game instance.

width number <optional>
100

The width of the render texture.

height number <optional>
100

The height of the render texture.

key string <optional>
''

The key of the RenderTexture in the Cache, if stored there.

scaleMode number <optional>
Phaser.scaleModes.DEFAULT

One of the Phaser.scaleModes consts.

resolution number <optional>
1

The resolution of the texture being generated.

Source code: gameobjects/RenderTexture.js (Line 21)
doc_phaser
2017-02-14 11:07:27
Comments
Leave a Comment

Please login to continue.