Phaser API Documentation


Member of: Phaser.Curves.Curve

draw(graphics, [pointsTotal])


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.


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.


The Graphics object to which the curve was drawn.

Since: 3.0.0
Source: src/curves/Curve.js (Line 111)