[name]
A loader for loading an .babylon resource.
Constructor
[name]([page:LoadingManager manager])
manager — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
Creates a new [name].
Properties
Methods
.load( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )
url — required
onLoad — Will be called when load completes. The argument will be the loaded [page:Object3D object].
onProgress — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.
onError — Will be called when load errors.
Begin loading from url and call onLoad with the parsed response content.
.parse([page:Object json])
text — The JSON structure to parse.
Parse a JSON structure and returns an [page:Object3D object] or a [page:Scene scene].
Found objects are converted to [page:Mesh meshs] with a [page:BufferGeometry BufferGeometry] and a default [page:MeshPhongMaterial MeshPhongMaterial].
Lights are parsed accordingly.
Example
webgl_loader_babylon
Source
[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/OBJLoader.js examples/js/loaders/BabylonLoader.js]