ImageUtils.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  6. <script src="../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <div class="desc">A Helper class to ease the loading of images of different types.</div>
  12. <h2>Properties</h2>
  13. <h3>.[page:string crossOrigin]</h3>
  14. <div>
  15. The crossOrigin string to implement CORS for loading the image from a different domain that allows CORS.
  16. </div>
  17. <h2>Methods</h2>
  18. <h3>.generateDataTexture([page:Number width], [page:Number height], [page:Number color]) [page:DataTexture]</h3>
  19. <div>
  20. width -- The width of the texture. <br />
  21. height -- The width of the texture. <br />
  22. color -- The hexadecimal value of the color.
  23. </div>
  24. <div>
  25. Generates a texture of a single color. It is a DataTexture with format, RGBFormat.
  26. </div>
  27. <h3>.parseDDS([page:String buffer], [page:boolean loadMipmaps]) [page:CompressedTexture]</h3>
  28. <div>
  29. buffer -- A string containing the data of the dds. <br />
  30. loadMipmaps -- A boolean to indicate if you need to load the mipmaps. Default is True.
  31. </div>
  32. <div>
  33. Parses a DDS Image from the string into a CompressedTexture.
  34. </div>
  35. <h3>.loadCompressedTexture([page:todo url], [page:todo mapping], [page:todo onLoad], [page:todo onError]) [page:todo]</h3>
  36. <div>
  37. url -- todo <br />
  38. mapping -- todo <br />
  39. onLoad -- todo <br />
  40. onError -- todo
  41. </div>
  42. <div>
  43. todo
  44. </div>
  45. <h3>.loadTexture([page:String url], [page:UVMapping mapping], [page:Function onLoad], [page:Function onError]) [page:todo]</h3>
  46. <div>
  47. url -- the url of the texture<br />
  48. mapping -- Can be an instance of [page:UVMapping Three.UVMapping], [page:CubeReflectionMapping THREE.CubeReflectionMapping], [page:SphericalReflectionMapping THREE.SphericalReflectionMapping] or [page:SphericalRefractionMapping THREE.SphericalRefractionMapping]. Describes how the image is applied to the object.<br />Use undefined instead of null as a default value. See mapping property of [page:Texture texture] for more details.
  49. onLoad -- callback function<br />
  50. onError -- callback function
  51. </div>
  52. <div>
  53. todo
  54. </div>
  55. <h3>.getNormalMap([page:todo image], [page:todo depth]) [page:todo]</h3>
  56. <div>
  57. image -- todo <br />
  58. depth -- todo
  59. </div>
  60. <div>
  61. todo
  62. </div>
  63. <h3>.loadCompressedTextureCube([page:todo array], [page:todo mapping], [page:todo onLoad], [page:todo onError]) [page:todo]</h3>
  64. <div>
  65. array -- todo <br />
  66. mapping -- todo <br />
  67. onLoad -- todo <br />
  68. onError -- todo
  69. </div>
  70. <div>
  71. todo
  72. </div>
  73. <h3>.loadTextureCube([page:todo array], [page:todo mapping], [page:todo onLoad], [page:todo onError]) [page:todo]</h3>
  74. <div>
  75. array -- todo <br />
  76. mapping -- todo <br />
  77. onLoad -- todo <br />
  78. onError -- todo
  79. </div>
  80. <div>
  81. todo
  82. </div>
  83. <h2>Source</h2>
  84. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  85. </body>
  86. </html>