Loader.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. <div class="desc">Base class for implementing loaders.</div>
  13. <h2>Constructor</h2>
  14. <h3>[name]()</h3>
  15. <div>
  16. Creates a new [name]. This should be called as base class.
  17. </div>
  18. <h2>Properties</h2>
  19. <h3>[property:Function onLoadStart]</h3>
  20. <div>Will be called when load starts.</div>
  21. <div>The default is a function with empty body.</div>
  22. <h3>[property:Function onLoadProgress]</h3>
  23. <div>Will be called while load progresses.</div>
  24. <div>The default is a function with empty body.</div>
  25. <h3>[property:Function onLoadComplete]</h3>
  26. <div>Will be called when load completes.</div>
  27. <div>The default is a function with empty body.</div>
  28. <h3>[property:string crossOrigin]</h3>
  29. <div>
  30. The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
  31. </div>
  32. <h2>Methods</h2>
  33. <h3>[method:Material createMaterial]( [page:object m], [page:string texturePath] )</h3>
  34. <div>
  35. [page:Object m] — The parameters to create the material. <br />
  36. [page:String texturePath] — The base path of the textures.
  37. </div>
  38. <div>
  39. Creates the Material based on the parameters m.
  40. </div>
  41. <h3>[method:Array initMaterials]( [page:Array materials], [page:string texturePath] )</h3>
  42. <div>
  43. [page:Array materials] — an array of parameters to create materials. <br />
  44. [page:String texturePath] — The base path of the textures.
  45. </div>
  46. <div>
  47. 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.
  48. </div>
  49. <h3>[method:String extractUrlBase]( [page:string url] )</h3>
  50. <div>
  51. [page:String url] — The url to extract the base url from.
  52. </div>
  53. <div>
  54. Extract the base from the URL.
  55. </div>
  56. <h2>Source</h2>
  57. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  58. </body>
  59. </html>