Loader.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <p class="desc">Base class for implementing loaders.</p>
  13. <h2>Constructor</h2>
  14. <h3>[name]()</h3>
  15. <p>
  16. Creates a new [name]. This should be called as base class.
  17. </p>
  18. <h2>Properties</h2>
  19. <h3>[property:Function onLoadStart]</h3>
  20. <p>Will be called when load starts.</p>
  21. <p>The default is a function with empty body.</p>
  22. <h3>[property:Function onLoadProgress]</h3>
  23. <p>Will be called while load progresses.</p>
  24. <p>The default is a function with empty body.</p>
  25. <h3>[property:Function onLoadComplete]</h3>
  26. <p>Will be called when load completes.</p>
  27. <p>The default is a function with empty body.</p>
  28. <h3>[property:string crossOrigin]</h3>
  29. <p>
  30. The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
  31. Default is *"anonymous"*.
  32. </p>
  33. <h2>Methods</h2>
  34. <h3>[method:Material createMaterial]( [param:object m], [param:string texturePath] )</h3>
  35. <p>
  36. [page:Object m] — The parameters to create the material. <br />
  37. [page:String texturePath] — The base path of the textures.
  38. </p>
  39. <p>
  40. Creates the Material based on the parameters m.
  41. </p>
  42. <h3>[method:Array initMaterials]( [param:Array materials], [param:string texturePath] )</h3>
  43. <p>
  44. [page:Array materials] — an array of parameters to create materials. <br />
  45. [page:String texturePath] — The base path of the textures.
  46. </p>
  47. <p>
  48. 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.
  49. </p>
  50. <h2>Source</h2>
  51. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  52. </body>
  53. </html>