DataTextureLoader.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 to load generic binary textures formats (rgbe, hdr, ...).
  14. This uses the [page:FileLoader] internally for loading files, and creates a new
  15. [page:DataTexture].
  16. </p>
  17. <h2>Examples</h2>
  18. <p>
  19. See the [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/RGBELoader.js RGBELoader]
  20. for an example of a derived class.
  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. <p>See the base [page:Loader] class for common properties.</p>
  31. <h2>Methods</h2>
  32. <p>See the base [page:Loader] class for common methods.</p>
  33. <h3>[method:DataTexture load]( [param:String url], [param:Function onLoad], [param:Function onProgress], [param:Function onError] )</h3>
  34. <p>
  35. [page:String url] — the path or URL to the file. This can also be a
  36. [link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
  37. [page:Function onLoad] — Will be called when load completes. The argument will be the loaded texture.<br />
  38. [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 />
  39. [page:Function onError] — Will be called when load errors.<br />
  40. </p>
  41. <p>
  42. Begin loading from url and pass the loaded texture to onLoad.
  43. </p>
  44. <h2>Source</h2>
  45. <p>
  46. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  47. </p>
  48. </body>
  49. </html>