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

The Graphics instance onto which this curve will be drawn.

pointsTotal number <optional> 32

The resolution of the curve. The higher the value the smoother it will render, at the cost of rendering performance.

Returns:
Description:

The Graphics object to which the curve was drawn.

Inherited from: Phaser.Curves.Curve#draw
Examples:
Since: 3.0.0
Source: src/curves/Curve.js (Line 111)