CompressedArrayTexture.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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:CompressedTexture] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. Creates an texture 2D array based on data in compressed form, for example
  14. from a [link:https://en.wikipedia.org/wiki/DirectDraw_Surface DDS]
  15. file.<br /><br />
  16. For use with the [page:CompressedTextureLoader CompressedTextureLoader].
  17. </p>
  18. <h2>Constructor</h2>
  19. <h3>
  20. [name]( [param:Array mipmaps], [param:Number width], [param:Number height], [param:Constant format], [param:Constant type] )
  21. </h3>
  22. <p>
  23. [page:Array mipmaps] -- The mipmaps array should contain objects with
  24. data, width and height. The mipmaps should be of the correct format and
  25. type.<br />
  26. [page:Number width] -- The width of the biggest mipmap.<br />
  27. [page:Number height] -- The height of the biggest mipmap.<br />
  28. [page:Number depth] -- The number of layers of the 2D array texture.<br />
  29. [page:Constant format] -- The format used in the mipmaps. See
  30. [page:Textures ST3C Compressed Texture Formats], [page:Textures PVRTC Compressed Texture Formats]
  31. and [page:Textures ETC Compressed Texture Format] for other choices.<br />
  32. [page:Constant type] -- Default is [page:Textures THREE.UnsignedByteType].
  33. See [page:Textures type constants] for other choices.<br />
  34. </p>
  35. <h2>Properties</h2>
  36. See the base [page:CompressedTexture CompressedTexture] class for common
  37. properties.
  38. <h3>[property:number wrapR]</h3>
  39. <p>
  40. This defines how the texture is wrapped in the depth direction.<br />
  41. The default is [page:Textures THREE.ClampToEdgeWrapping], where the edge
  42. is clamped to the outer edge texels. The other two choices are
  43. [page:Textures THREE.RepeatWrapping] and [page:Textures THREE.MirroredRepeatWrapping].
  44. See the [page:Textures texture constants]
  45. page for details.
  46. </p>
  47. <h3>[property:Object image]</h3>
  48. <p>Overridden with a object containing width, height, and depth.</p>
  49. <h3>[property:Set layerUpdates]</h3>
  50. <p>
  51. A set of all layers which need to be updated in the texture. See
  52. [Page:CompressedTextureArray.addLayerUpdate addLayerUpdate].
  53. </p>
  54. <h3>[property:Boolean isCompressedArrayTexture]</h3>
  55. <p>Read-only flag to check if a given object is of type [name].</p>
  56. <h2>Methods</h2>
  57. <h3>[method:addLayerUpdate addLayerUpdate]( layerIndex )</h3>
  58. <p>
  59. Describes that a specific layer of the texture needs to be updated.
  60. Normally when [page:Texture.needsUpdate needsUpdate] is set to true, the
  61. entire compressed texture array is sent to the GPU. Marking specific
  62. layers will only transmit subsets of all mipmaps associated with a
  63. specific depth in the array which is often much more performant.
  64. </p>
  65. <h3>[method:clearLayerUpdates clearLayerUpdates]()</h3>
  66. <p>
  67. Resets the layer updates registry. See
  68. [Page:CompressedTextureArray.addLayerUpdate addLayerUpdate].
  69. </p>
  70. <p>
  71. See the base [page:CompressedTexture CompressedTexture] class for common
  72. methods.
  73. </p>
  74. <h2>Source</h2>
  75. <p>
  76. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  77. </p>
  78. </body>
  79. </html>