Phaser API Documentation

  Version: 
draw(graphics, [pointsTotal])

Description:

Draws this curve on the given Graphics object.

The curve is drawn using Graphics.strokePoints so will be drawn at whatever the present Graphics stroke color is. The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.

Parameters:

name type arguments Default description
graphics Phaser.GameObjects.Graphics

Graphics object to draw onto.

pointsTotal number <optional> 32

Number of points to be used for drawing the curve. Higher numbers result in smoother curve but require more processing.

Returns:
Description:

Graphics object that was drawn to.

Since: 3.2.0