Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export ThreeJS Geometry to JSON

Tags:

three.js

xml3d

I need to export Three Geometry to JSON so I can used with xml3D.

I am trying to find the THREE.GeometryExporter() but I can't. Has it been completely deprecated? It is mentioned here

Once I have the Three JSON I should be able to use this converter to obtain the xml3D JSON.

Has anyone tried this before?

like image 754
PolGuixe Avatar asked Jun 16 '26 02:06

PolGuixe


1 Answers

You should try the toJSON() method :

var json = geometry.toJSON();

This method is available for geometries, materials, lights, mesh ...

like image 56
jeum Avatar answered Jun 21 '26 13:06

jeum



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!