CompressedTextureLoader.html 2.4 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">
  13. Abstract base class for block based textures loader (dds, pvr, ...).
  14. This uses the [page:FileLoader] internally for loading files.
  15. </p>
  16. <h2>Examples</h2>
  17. <p>
  18. See the [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/DDSLoader.js DDSLoader]
  19. and [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PVRLoader.js PVRLoader]
  20. for examples of derived classes.
  21. </p>
  22. <h2>Constructor</h2>
  23. <h3>[name]( [param:LoadingManager manager] )</h3>
  24. <p>
  25. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use.
  26. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
  27. Creates a new [name].
  28. </p>
  29. <h2>Properties</h2>
  30. <h3>[property:LoadingManager manager]</h3>
  31. <p>
  32. The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
  33. </p>
  34. <h3>[property:String path]</h3>
  35. <p>The base path from which files will be loaded. See [page:.setPath]. Default is *undefined*.</p>
  36. <h2>Methods</h2>
  37. <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
  38. <p>
  39. [page:String url] — the path or URL to the file. This can also be a
  40. [link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
  41. [page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.<br />
  42. [page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
  43. [page:Function onError] — Will be called when load errors.<br />
  44. </p>
  45. <p>
  46. Begin loading from url and pass the loaded texture to onLoad.
  47. </p>
  48. <h3>[method:FileLoader setPath]( [param:String path] )</h3>
  49. <p>
  50. Set the base path or URL from which to load files. This can be useful if
  51. you are loading many textures from the same directory.
  52. </p>
  53. <h2>Source</h2>
  54. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  55. </body>
  56. </html>