getTextureChannelMask

  • getTextureChannelMask(texture: Texture): number
  • Returns bitmask of all 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. See listTextureChannels for an array alternative.

    Example:

    const mask = getTextureChannelMask(texture);
    if (mask & 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.