BitmapData#textureLine()

textureLine(line, image, repeat) → {Phaser.BitmapData}

Takes the given Line object and image and renders it to this BitmapData as a repeating texture line.

Parameters
Name Type Argument Default Description
line Phaser.Line

A Phaser.Line object that will be used to plot the start and end of the line.

image string | Image

The key of an image in the Phaser.Cache to use as the texture for this line, or an actual Image.

repeat string <optional>
'repeat-x'

The pattern repeat mode to use when drawing the line. Either repeat, repeat-x or no-repeat.

Returns

This BitmapData object for method chaining.

Source code: gameobjects/BitmapData.js (Line 1954)
doc_phaser
2017-02-14 10:37:18
Comments
Leave a Comment

Please login to continue.