Capítulo 221 de 859

Chapter 221: Data3DTexture

Core Idea

Creates a three-dimensional texture from raw data, with parameters to divide it into width, height, and depth.

Key Concepts

  • flipY : boolean: If set to true, the texture is flipped along the vertical axis when uploaded to the GPU.
  • generateMipmaps : boolean: Whether to generate mipmaps (if possible) for a texture.
  • image : Object: The image definition of a data texture.
  • isData3DTexture : boolean (readonly): This flag can be used for type testing.
  • magFilter : NearestFilter | NearestMipmapNearestFilter | NearestMipmapLinearFilter | LinearFilter | LinearMipmapNearestFilter | LinearMipmapLinearFilter: How the texture is sampled when a texel covers more than one pixel.
  • minFilter : NearestFilter | NearestMipmapNearestFilter | NearestMipmapLinearFilter | LinearFilter | LinearMipmapNearestFilter | LinearMipmapLinearFilter: How the texture is sampled when a texel covers less than one pixel.
  • unpackAlignment : boolean: Specifies the alignment requirements for the start of each pixel row in memory.
  • wrapR : RepeatWrapping | ClampToEdgeWrapping | MirroredRepeatWrapping: This defines how the texture is wrapped in the depth and corresponds to W in UVW mapping.

Reference Tables

Constructor

Signature
new Data3DTexture( data : TypedArray, width : number, height : number, depth : number )

Properties

PropertyDescription
.flipY : booleanIf set to true, the texture is flipped along the vertical axis when uploaded to the GPU.
.generateMipmaps : booleanWhether to generate mipmaps (if possible) for a texture.
.image : ObjectThe image definition of a data texture.
.isData3DTexture : boolean (readonly)This flag can be used for type testing.
`.magFilter : NearestFilterNearestMipmapNearestFilter
`.minFilter : NearestFilterNearestMipmapNearestFilter
.unpackAlignment : booleanSpecifies the alignment requirements for the start of each pixel row in memory.
`.wrapR : RepeatWrappingClampToEdgeWrapping

Key Takeaways

  1. Data3DTexture extends: EventDispatcher → Texture
  2. Most relevant properties: flipY, generateMipmaps, image, isData3DTexture.

Connects To