12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- <h1>[name]</h1>
- <p class="desc">Base class for implementing loaders.</p>
- <h2>Constructor</h2>
- <h3>[name]()</h3>
- <p>
- Creates a new [name]. This should be called as base class.
- </p>
- <h2>Properties</h2>
- <h3>[property:Function onLoadStart]</h3>
- <p>Will be called when load starts.</p>
- <p>The default is a function with empty body.</p>
- <h3>[property:Function onLoadProgress]</h3>
- <p>Will be called while load progresses.</p>
- <p>The default is a function with empty body.</p>
- <h3>[property:Function onLoadComplete]</h3>
- <p>Will be called when load completes.</p>
- <p>The default is a function with empty body.</p>
- <h3>[property:string crossOrigin]</h3>
- <p>
- The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
- Default is *"anonymous"*.
- </p>
- <h2>Methods</h2>
- <h3>[method:Material createMaterial]( [param:object m], [param:string texturePath] )</h3>
- <p>
- [page:Object m] — The parameters to create the material. <br />
- [page:String texturePath] — The base path of the textures.
- </p>
- <p>
- Creates the Material based on the parameters m.
- </p>
- <h3>[method:Array initMaterials]( [param:Array materials], [param:string texturePath] )</h3>
- <p>
- [page:Array materials] — an array of parameters to create materials. <br />
- [page:String texturePath] — The base path of the textures.
- </p>
- <p>
- Creates an array of [page:Material] based on the array of parameters m. The index of the parameters decide the correct index of the materials.
- </p>
- <h2>Handlers</h2>
- <p>
- *[name].Handlers* is a special object normally used by other loaders like [page:GLTFLoader] or [page:MTLLoader]. It provides an
- API that allows the definition of special mappings: What loaders should be used in order to load specific files. A typical use case
- is to overwrite the default loader for textures.<br /><br />
- Note: It's only possible to use *[name].Handlers* if the respective loader support the usage.
- </p>
- <h3>[method:null add]( [param:Object regex], [param:Loader loader] )</h3>
- <p>
- [page:Object regex] — A regular expression.<br />
- [page:Loader loader] — The loader.
- <p>
- Registers a loader with the given regular expression.
- </p>
- <h3>[method:null get]( [param:String file] )</h3>
- <p>
- [page:String file] — The file path.
- <p>
- Can be used to retrieve the registered loader for the given file path.
- </p>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|