JSON path. How to generate new Paths?

phaserGif

Hi guys. I followed this guide here: Phaser - Examples - Path From Json

There was a waves.json file with a curve that I used in this example. I want to know how to generate other kinds of JSON curves, for different kind of paths. I used the JSON file provided with the example that I quoted, but I don’t know how to generate other JSON files.

Is it possible to position the JSON paths? For example, changing its x,y coordinates or change its angle, ecc…

You don’t have to use JSON files. You can configure the paths directly in your code.

You have to learn a bit about each path type. Most have control points and some other values. Look at the Curves examples and Curves API docs.

2 Likes

Thanks. I solved the issue.