DataTextureLoader.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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],
  36. [param:Function onProgress], [param:Function onError] )
  37. </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] (optional) — Will be called when load completes.
  42. The argument will be the loaded texture.<br />
  43. [page:Function onProgress] (optional) — Will be called while load
  44. progresses.The argument will be the ProgressEvent instance, which contains
  45. .[page:Boolean lengthComputable], .[page:Integer total] and .[page:Integer
  46. loaded]. If the server does not set the Content-Length header;
  47. .[page:Integer total] will be 0.<br />
  48. [page:Function onError] (optional) — Will be called when load errors.<br />
  49. </p>
  50. <p>
  51. Begin loading from url and pass the loaded texture to onLoad. The method
  52. also returns a new texture object which can directly be used for material
  53. creation.
  54. </p>
  55. <h2>Source</h2>
  56. <p>
  57. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  58. </p>
  59. </body>
  60. </html>