|
@@ -10,7 +10,10 @@
|
|
|
<body>
|
|
|
<h1>[name]</h1>
|
|
|
|
|
|
- <div class="desc">A loader for loading a [page:Material] in JSON format.</div>
|
|
|
+ <div class="desc">
|
|
|
+ A loader for loading a [page:Material] in JSON format.
|
|
|
+ This uses the [page:FileLoader] internally for loading files.
|
|
|
+ </div>
|
|
|
|
|
|
<h2>Example</h2>
|
|
|
|
|
@@ -43,12 +46,20 @@
|
|
|
|
|
|
<h3>[name]( [page:LoadingManager manager] )</h3>
|
|
|
<div>
|
|
|
- [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
|
|
|
+ [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
|
|
|
+ Creates a new [name].
|
|
|
</div>
|
|
|
+
|
|
|
+ <h2>Properties</h2>
|
|
|
+
|
|
|
+ <h3>[property:LoadingManager manager]</h3>
|
|
|
<div>
|
|
|
- Creates a new [name].
|
|
|
+ The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
|
|
|
</div>
|
|
|
|
|
|
+ <h3>[property:Object textures]</h3>
|
|
|
+ <div>Object holding any textures used by the material. See [page.setTextures].</div>
|
|
|
+
|
|
|
|
|
|
<h2>Methods</h2>
|
|
|
|
|
@@ -57,20 +68,25 @@
|
|
|
[page:String url] — required<br />
|
|
|
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Material].<br />
|
|
|
[page:Function onProgress] — Will be called while load progresses. The argument will be the progress event.<br />
|
|
|
- [page:Function onError] — Will be called when load errors.<br />
|
|
|
- </div>
|
|
|
- <div>
|
|
|
+ [page:Function onError] — Will be called when load errors.<br /><br />
|
|
|
+
|
|
|
Begin loading from url and return the [page:Material] object that will contain the data.
|
|
|
</div>
|
|
|
|
|
|
<h3>[method:Material parse]( [page:Object json] )</h3>
|
|
|
<div>
|
|
|
- [page:Object json] — The json object containing the parameters of the Material.
|
|
|
+ [page:Object json] — The json object containing the parameters of the Material.<br /><br />
|
|
|
+
|
|
|
+ Parse a <em>JSON</em> structure and create a new [page:Material] of the type [page:String json.type] with parameters defined in the json object.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:null setTextures]( [page:Object textures] )</h3>
|
|
|
<div>
|
|
|
- Parse a <em>JSON</em> structure and create a new [page:Material] of the type [page:String json.type] with parameters defined in the json object.
|
|
|
+ [page:Object textures] — object containing any textures used by the material.
|
|
|
</div>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<h2>Source</h2>
|
|
|
|
|
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|