I have a problem with JSON format.
I am going to generate a 2D building plan in JSON format automatically. Then this JSON file is loaded to Three.JS for visualization.
Currently, I can easily create various geometry type in JSON format based on:
https://github.com/mrdoob/three.js/wiki/JSON-Model-format-3.1
However, I need to know more about this data format.
- Firstly, how can I add text to the model?
- Secondly, I could not find line as a geometry in this format. Is there?
- Thirdly, is there any document that I can refer to it for more explanation regarding this
format? - Lastly, how can I add additional information about geometries
inside the JSON format? for example when I create a polygon in JSON
format, I want to add additional information regarding that polygon
such as area, owner,…
THREE.TextGeometryand merging that with the other geometryOne option for achieving what you want could be to add custom entries to the JSON, e.g.
"lines": [], "customFaceProperties": []and then parse them yourself once the stock Loader has parsed everything it understands.Also, since it seems you might be creating something that has different things in it, you might want to take a peek at the scene loading capabilities: example, SceneLoader.js