Phaser.Curves.CubicBezier
fromJSON
<static> fromJSON(data)
Description:
Generates a curve from a JSON object.
Parameters:
name | type | optional | description |
---|---|---|---|
data | No | The JSON object containing this curve data. |
Returns: Phaser.Curves.CubicBezier - The curve generated from the JSON object.
Source: src/curves/CubicBezierCurve.js#L199
Since: 3.0.0
Phaser.Curves.Ellipse
fromJSON
<static> fromJSON(data)
Description:
Creates a curve from the provided Ellipse Curve Configuration object.
Parameters:
name | type | optional | description |
---|---|---|---|
data | No | The JSON object containing this curve data. |
Returns: Phaser.Curves.Ellipse - The ellipse curve constructed from the configuration object.
Source: src/curves/EllipseCurve.js#L603
Since: 3.0.0
Phaser.Curves.Line
fromJSON
<static> fromJSON(data)
Description:
Configures this line from a JSON representation.
Parameters:
name | type | optional | description |
---|---|---|---|
data | No | The JSON object containing this curve data. |
Returns: Phaser.Curves.Line - A new LineCurve object.
Source: src/curves/LineCurve.js#L280
Since: 3.0.0
Phaser.Curves.QuadraticBezier
fromJSON
<static> fromJSON(data)
Description:
Creates a curve from a JSON object, e. g. created by toJSON
.
Parameters:
name | type | optional | description |
---|---|---|---|
data | No | The JSON object containing this curve data. |
Returns: Phaser.Curves.QuadraticBezier - The created curve instance.
Source: src/curves/QuadraticBezierCurve.js#L190
Since: 3.2.0
Phaser.Curves.Spline
fromJSON
<static> fromJSON(data)
Description:
Imports a JSON object containing this curve data.
Parameters:
name | type | optional | description |
---|---|---|---|
data | No | The JSON object containing this curve data. |
Returns: Phaser.Curves.Spline - The spline curve created.
Source: src/curves/SplineCurve.js#L204
Since: 3.0.0