Menu - Top - Home - Donate to Me


Back to documentation index.


JSON exporter of graphics meshes.

This class is considered a supplementary class to the Public Domain HTML 3D Library and is not considered part of that library.

To use this class, you must include the script "extras/meshjson.js"; the class is not included in the "h3du_min.js" file which makes up the HTML 3D Library. Example:

<script type="text/javascript" src="extras/meshjson.js"></script>


(static) H3DU.MeshJSON.loadJSON(url)

Loads a mesh from JSON format.


Return Value

A promise that, when resolved, exposes an object that implements a property named toShape, which is a method that gets a H3DU.ShapeGroup describing the 3D mesh. (Type: Promise)

(static) H3DU.MeshJSON.toJSON(mesh)

Converts a mesh to JSON format.


Return Value

A JSON string describing the mesh. (Type: string)

Back to documentation index.