Loader.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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">所有加载器的基类</p>
  13. <h2>构造方法</h2>
  14. <h3>[name]()</h3>
  15. <p>
  16. 当创建一个新的 [name], 将调用此基类。
  17. </p>
  18. <h2>属性</h2>
  19. <h3>[property:Function onLoadStart]</h3>
  20. <p>当加载开始时,将被调用。</p>
  21. <p>默认实现是一个空函数体。</p>
  22. <h3>[property:Function onLoadProgress]</h3>
  23. <p>当进入加载流程中,将被调用。</p>
  24. <p>默认实现是一个空函数体。</p>
  25. <h3>[property:Function onLoadComplete]</h3>
  26. <p>当加载完成时,将被调用。</p>
  27. <p>默认实现是一个空函数体。</p>
  28. <h3>[property:string crossOrigin]</h3>
  29. <p>
  30. 跨域字符串,用于实现跨域,以便从允许CORS从其他域加载url。默认为"anonymous"。
  31. </p>
  32. <h2>Handlers</h2>
  33. <p>
  34. *[name].Handlers* is a special object normally used by other loaders like [page:GLTFLoader] or [page:MTLLoader]. It provides an
  35. API that allows the definition of special mappings: What loaders should be used in order to load specific files. A typical use case
  36. is to overwrite the default loader for textures.<br /><br />
  37. Note: It's only possible to use *[name].Handlers* if the respective loader support the usage.
  38. </p>
  39. <h3>[method:null add]( [param:Object regex], [param:Loader loader] )</h3>
  40. <p>
  41. [page:Object regex] — A regular expression.<br />
  42. [page:Loader loader] — The loader.
  43. <p>
  44. Registers a loader with the given regular expression.
  45. </p>
  46. <h3>[method:null get]( [param:String file] )</h3>
  47. <p>
  48. [page:String file] — The file path.
  49. <p>
  50. Can be used to retrieve the registered loader for the given file path.
  51. </p>
  52. <h2>Source</h2>
  53. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  54. </body>
  55. </html>