Loader.html 1.6 KB

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