DataTextureLoader.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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
  15. creates a new [page:DataTexture].
  16. </p>
  17. <h2>Examples</h2>
  18. <p>
  19. See the
  20. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/RGBELoader.js RGBELoader]
  21. for an example of a derived class.
  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:DataTexture 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 contains
  44. .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer
  45. loaded]. If the server does not set the Content-Length header;
  46. .[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>