CompressedTextureLoader.html 2.1 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. [page:Loader] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. Abstract base class for block based textures loader (dds, pvr, ...).
  15. This uses the [page:FileLoader] internally for loading files.
  16. </p>
  17. <h2>Examples</h2>
  18. <p>
  19. See the [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/DDSLoader.js DDSLoader]
  20. and [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/PVRLoader.js PVRLoader]
  21. for examples of derived classes.
  22. </p>
  23. <h2>Constructor</h2>
  24. <h3>[name]( [param:LoadingManager manager] )</h3>
  25. <p>
  26. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use.
  27. Default is [page:LoadingManager THREE.DefaultLoadingManager].<br /><br />
  28. Creates a new [name].
  29. </p>
  30. <h2>Properties</h2>
  31. <p>See the base [page:Loader] class for common properties.</p>
  32. <h2>Methods</h2>
  33. <p>See the base [page:Loader] class for common methods.</p>
  34. <h3>[method:CompressedTexture load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
  35. <p>
  36. [page:String url] — the path or URL to the file. This can also be a
  37. [link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
  38. [page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.<br />
  39. [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 />
  40. [page:Function onError] — Will be called when load errors.<br />
  41. </p>
  42. <p>
  43. Begin loading from url and pass the loaded texture to onLoad.
  44. </p>
  45. <h2>Source</h2>
  46. <p>
  47. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  48. </p>
  49. </body>
  50. </html>