CompressedTextureLoader.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Loader] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. Abstract base class for block based textures loader (dds, pvr, ...). This
  14. uses the [page:FileLoader] internally for loading files.
  15. </p>
  16. <h2>Examples</h2>
  17. <p>
  18. See the
  19. [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]
  27. for the loader to use. 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>
  35. [method:CompressedTexture load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )
  36. </h3>
  37. <p>
  38. [page:String url] — the path or URL to the file. This can also be a
  39. [link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
  40. [page:Function onLoad] (optional) — Will be called when load completes.
  41. The argument will be the loaded texture.<br />
  42. [page:Function onProgress] (optional) — Will be called while load
  43. progresses. The argument will be the ProgressEvent instance, which
  44. contains .[page:Boolean lengthComputable], .[page:Integer total] and
  45. .[page:Integer loaded]. If the server does not set the Content-Length
  46. header; .[page:Integer total] will be 0.<br />
  47. [page:Function onError] (optional) — Will be called when load errors.<br />
  48. </p>
  49. <p>
  50. Begin loading from url and pass the loaded texture to onLoad. The method
  51. also returns a new texture object which can directly be used for material
  52. creation.
  53. </p>
  54. <h2>Source</h2>
  55. <p>
  56. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  57. </p>
  58. </body>
  59. </html>