@masatomakino/threejs-billboard
    Preparing search index...

    Function isSharedStageMaterial

    • Type guard function to check if a material uses SharedStageTexture.

      This utility function helps ensure type safety when working with materials that should contain a SharedStageTexture as their map property.

      Parameters

      • material: Material

        The Three.js material to check

      Returns material is ISharedStageMaterial

      True if the material has a SharedStageTexture map, false otherwise

      if (isSharedStageMaterial(material)) {
      // TypeScript now knows material.map is SharedStageTexture
      material.map.setNeedUpdate();
      const uv = material.map.calculateUV(textureArea);
      }