GameObjectFactory#bitmapData()

bitmapData(width, height, key, addToCache) → {Phaser.BitmapData}

Create a BitmapData object.

A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

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

The width of the BitmapData in pixels.

height number <optional>
256

The height of the BitmapData in pixels.

key string <optional>
''

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

addToCache boolean <optional>
false

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

Returns

The newly created BitmapData object.

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

Please login to continue.