listTextureChannels

  • listTextureChannels(texture: Texture): TextureChannel[]
  • Returns a list of TextureChannels used by the given texture. Determination is based only on the role of the textures, e.g. a texture used for the occlusionTexture will have (at least) a red channel in use. See getTextureChannelMask for bitmask alternative.

    Example:

    const channels = listTextureChannels(texture);
    if (channels.includes(TextureChannel.R)) {
      console.log('texture red channel used');
    }
    
Function symbol, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.