Loader.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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:string crossOrigin]</h3>
  20. <p>
  21. 跨域字符串,用于实现跨域,以便从允许CORS从其他域加载url。默认为"anonymous"。
  22. </p>
  23. <h2>Handlers</h2>
  24. <p>
  25. *[name].Handlers* is a special object normally used by other loaders like [page:GLTFLoader] or [page:MTLLoader]. It provides an
  26. API that allows the definition of special mappings: What loaders should be used in order to load specific files. A typical use case
  27. is to overwrite the default loader for textures.<br /><br />
  28. Note: It's only possible to use *[name].Handlers* if the respective loader support the usage.
  29. </p>
  30. <h3>[method:null add]( [param:Object regex], [param:Loader loader] )</h3>
  31. <p>
  32. [page:Object regex] — A regular expression.<br />
  33. [page:Loader loader] — The loader.
  34. <p>
  35. Registers a loader with the given regular expression.
  36. </p>
  37. <h3>[method:null get]( [param:String file] )</h3>
  38. <p>
  39. [page:String file] — The file path.
  40. <p>
  41. Can be used to retrieve the registered loader for the given file path.
  42. </p>
  43. <h2>Source</h2>
  44. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  45. </body>
  46. </html>