A higher level wrapper for buffers designed to make management of 3d solid objects easier.
(static) fromJSON(data, nameopt, optionsopt)
Utility to load meshes from JSON files in the format as exported from the Unity exporter.
Parses the J3D JSON mesh data format and creates an instance SQR.Buffer out of it.
This is the best way to work with 3d models, since SQR doesn't have native support for OBJ files or Collada (though it's perfectly possible to create an OBJ or Collada importer if you need to).
||Object | string||the mesh data or an object containing a named list of meshes (which is how meshes get exported from unity by default - the names are the uuids of the object)|
||the name of the mesh in the list. If data is a list of meshes and name is omitted, the function will pick the first mesh on the list. If data is the mesh data itself, this argument will be ignored.|
||advanced options for mesh construction|