/** * Callback used by {@link StandardMaterial#onUpdateShader}. */ export type UpdateShaderCallback = (options: StandardMaterialOptions) => StandardMaterialOptions; /** * @callback UpdateShaderCallback * Callback used by {@link StandardMaterial#onUpdateShader}. * @param {StandardMaterialOptions} options - An object with shader generator settings (based on current * material and scene properties), that you can change and then return. Properties of the object passed * into this function are documented in {@link StandardMaterial}. Also contains a member named litOptions * which holds some of the options only used by the lit shader backend {@link LitShaderOptions}. * @returns {StandardMaterialOptions} Returned settings will be used by the shader. */ /** * A standard material is the main, general purpose material that is most often used for rendering. * It can approximate a wide variety of surface types and can simulate dynamic reflected light. * Most maps can use 3 types of input values in any combination: constant ({@link Color} or number), * mesh vertex colors and a {@link Texture}. All enabled inputs are multiplied together. A texture * samples one of the mesh's UV sets, selected by the map's UV channel property (0 to 7), and is * ignored when the mesh does not provide that set. UV sets 6 and 7 share their vertex attribute * locations with the default hardware instancing format, so an instanced mesh sampling them needs a * custom instancing vertex format, see {@link MeshInstance#setInstancing}. * * A property assignment only reaches the GPU once {@link Material#update} is called: a `diffuse` * or `emissive` change made after the material's first frame is not applied until * `material.update()` runs. The debug build reports unapplied changes to the properties stored in * the material uniform buffer, such as `diffuse`. * * Properties come in families that share a naming pattern. A family such as `diffuse` has a * constant (`diffuse`), a texture (`diffuseMap`) with its `diffuseMapUv`, `diffuseMapTiling`, * `diffuseMapOffset`, `diffuseMapRotation` and `diffuseMapChannel`, and a vertex color switch * (`diffuseVertexColor`). The main families are `diffuse`; `specular`, or `metalness` when * `useMetalness` is set; `gloss`; `normalMap` with `bumpiness`; `emissive`; `opacity` together * with {@link Material#blendType}; `ao`; `lightMap`; and the advanced layers `clearCoat`, `sheen`, * `iridescence` and `refraction`. Lighting can be turned off entirely with `useLighting`. * * To go beyond the properties, replace individual shader chunks with * {@link Material#getShaderChunks}. When the surface is not a lit material at all, use * {@link ShaderMaterial} instead. * * @example * const material = new StandardMaterial(); * material.diffuse.set(0.8, 0.2, 0.2); * material.diffuseMap = brickAsset.resource; * material.useMetalness = true; * material.metalness = 0.1; * material.gloss = 0.6; * material.update(); * entity.render.material = material; * @property {Texture|null} diffuseMap The main (primary) diffuse map of the material (default is * null). * @property {number} diffuseMapUv Main (primary) diffuse map UV channel. Valid values are 0 to 7. * @property {Vec2} diffuseMapTiling Controls the 2D tiling of the main (primary) diffuse map. * @property {Vec2} diffuseMapOffset Controls the 2D offset of the main (primary) diffuse map. Each * component is between 0 and 1. * @property {number} diffuseMapRotation Controls the 2D rotation (in degrees) of the main * (primary) diffuse map. * @property {string} diffuseMapChannel Color channels of the main (primary) diffuse map to use. * Can be "r", "g", "b", "a", "rgb" or any swizzled combination. * @property {boolean} diffuseVertexColor Multiply diffuse by the mesh vertex colors. * @property {string} diffuseVertexColorChannel Vertex color channels to use for diffuse. Can be * "r", "g", "b", "a", "rgb" or any swizzled combination. * @property {Texture|null} diffuseDetailMap The detail (secondary) diffuse map of the material * (default is null). Will only be used if main (primary) diffuse map is non-null. * @property {number} diffuseDetailMapUv Detail (secondary) diffuse map UV channel. Valid values are 0 to 7. * @property {Vec2} diffuseDetailMapTiling Controls the 2D tiling of the detail (secondary) diffuse * map. * @property {Vec2} diffuseDetailMapOffset Controls the 2D offset of the detail (secondary) diffuse * map. Each component is between 0 and 1. * @property {number} diffuseDetailMapRotation Controls the 2D rotation (in degrees) of the detail * (secondary) diffuse map. * @property {string} diffuseDetailMapChannel Color channels of the detail (secondary) diffuse map * to use. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. * @property {string} diffuseDetailMode Determines how the main (primary) and detail (secondary) * diffuse maps are blended together. Can be: * * - {@link DETAILMODE_MUL}: Multiply together the primary and secondary colors. * - {@link DETAILMODE_ADD}: Add together the primary and secondary colors. * - {@link DETAILMODE_SCREEN}: Softer version of {@link DETAILMODE_ADD}. * - {@link DETAILMODE_OVERLAY}: Multiplies or screens the colors, depending on the primary color. * - {@link DETAILMODE_MIN}: Select whichever of the primary and secondary colors is darker, * component-wise. * - {@link DETAILMODE_MAX}: Select whichever of the primary and secondary colors is lighter, * component-wise. * * Defaults to {@link DETAILMODE_MUL}. * @property {Texture|null} specularMap The specular map of the material (default is null). * @property {number} specularMapUv Specular map UV channel. Valid values are 0 to 7. * @property {Vec2} specularMapTiling Controls the 2D tiling of the specular map. * @property {Vec2} specularMapOffset Controls the 2D offset of the specular map. Each component is * between 0 and 1. * @property {number} specularMapRotation Controls the 2D rotation (in degrees) of the specular map. * @property {string} specularMapChannel Color channels of the specular map to use. Can be "r", "g", * "b", "a", "rgb" or any swizzled combination. * @property {boolean} specularVertexColor Multiply specular by the mesh vertex colors. * @property {string} specularVertexColorChannel Vertex color channels to use for specular. Can be * "r", "g", "b", "a", "rgb" or any swizzled combination. * @property {boolean} specularityFactorTint Force inclusion of the constant `specularityFactor` * when compositing with `specularityFactorMap` and/or specularity factor vertex colors. Defaults * to `false`. Setting this to `true` is rarely needed - the constant is automatically applied * whenever `specularityFactor` differs from 1. Provided as an explicit override. * @property {Texture|null} specularityFactorMap The factor of specularity as a texture (default is * null). * @property {number} specularityFactorMapUv Specularity factor map UV channel. Valid values are 0 to 7. * @property {Vec2} specularityFactorMapTiling Controls the 2D tiling of the specularity factor map. * @property {Vec2} specularityFactorMapOffset Controls the 2D offset of the specularity factor map. Each component is * between 0 and 1. * @property {number} specularityFactorMapRotation Controls the 2D rotation (in degrees) of the specularity factor map. * @property {string} specularityFactorMapChannel The channel used by the specularity factor texture to sample from (default is 'a'). * @property {boolean} specularityFactorVertexColor Use mesh vertex colors for specularity factor. If specularityFactorMap or * are specularityFactorTint are set, they'll be multiplied by vertex colors. * @property {string} specularityFactorVertexColorChannel Vertex color channels to use for specularity factor. Can be * "r", "g", "b", "a", "rgb" or any swizzled combination. * @property {boolean} enableGGXSpecular Enables GGX specular. Also enables * {@link anisotropyIntensity} parameter to set material anisotropy. * @property {Texture|null} anisotropyMap The anisotropy map of the material (default is null). * @property {number} anisotropyMapUv Anisotropy map UV channel. Valid values are 0 to 7. * @property {Vec2} anisotropyMapTiling Controls the 2D tiling of the anisotropy map. * @property {Vec2} anisotropyMapOffset Controls the 2D offset of the anisotropy map. Each * component is between 0 and 1. * @property {number} anisotropyMapRotation Controls the 2D rotation (in degrees) of the anisotropy map. * @property {Texture|null} clearCoatMap Monochrome clearcoat intensity map (default is null). If * specified, will be multiplied by normalized 'clearCoat' value and/or vertex colors. * @property {number} clearCoatMapUv Clearcoat intensity map UV channel. Valid values are 0 to 7. * @property {Vec2} clearCoatMapTiling Controls the 2D tiling of the clearcoat intensity map. * @property {Vec2} clearCoatMapOffset Controls the 2D offset of the clearcoat intensity map. Each * component is between 0 and 1. * @property {number} clearCoatMapRotation Controls the 2D rotation (in degrees) of the clearcoat * intensity map. * @property {string} clearCoatMapChannel Color channel of the clearcoat intensity map to use. Can * be "r", "g", "b" or "a". * @property {boolean} clearCoatVertexColor Use mesh vertex colors for clearcoat intensity. If * clearCoatMap is set, it'll be multiplied by vertex colors. * @property {string} clearCoatVertexColorChannel Vertex color channel to use for clearcoat * intensity. Can be "r", "g", "b" or "a". * @property {boolean} clearCoatGlossInvert Invert the clearcoat gloss component (default is false). * Enabling this flag results in material treating the clear coat gloss members as roughness. * @property {Texture|null} clearCoatGlossMap Monochrome clearcoat glossiness map (default is * null). If specified, will be multiplied by normalized 'clearCoatGloss' value and/or vertex * colors. * @property {number} clearCoatGlossMapUv Clearcoat gloss map UV channel. Valid values are 0 to 7. * @property {Vec2} clearCoatGlossMapTiling Controls the 2D tiling of the clearcoat gloss map. * @property {Vec2} clearCoatGlossMapOffset Controls the 2D offset of the clearcoat gloss map. * Each component is between 0 and 1. * @property {number} clearCoatGlossMapRotation Controls the 2D rotation (in degrees) of the clear * coat gloss map. * @property {string} clearCoatGlossMapChannel Color channel of the clearcoat gloss map to use. * Can be "r", "g", "b" or "a". * @property {boolean} clearCoatGlossVertexColor Use mesh vertex colors for clearcoat glossiness. * If clearCoatGlossMap is set, it'll be multiplied by vertex colors. * @property {string} clearCoatGlossVertexColorChannel Vertex color channel to use for clearcoat * glossiness. Can be "r", "g", "b" or "a". * @property {Texture|null} clearCoatNormalMap The clearcoat normal map of the material (default is * null). The texture must contains normalized, tangent space normals. * @property {number} clearCoatNormalMapUv Clearcoat normal map UV channel. Valid values are 0 to 7. * @property {Vec2} clearCoatNormalMapTiling Controls the 2D tiling of the main clearcoat normal * map. * @property {Vec2} clearCoatNormalMapOffset Controls the 2D offset of the main clearcoat normal * map. Each component is between 0 and 1. * @property {number} clearCoatNormalMapRotation Controls the 2D rotation (in degrees) of the main * clearcoat map. * @property {boolean} useIridescence Enable thin-film iridescence. * @property {Texture|null} iridescenceMap The per-pixel iridescence intensity. Only used when * useIridescence is enabled. * @property {number} iridescenceMapUv Iridescence map UV channel. Valid values are 0 to 7. * @property {Vec2} iridescenceMapTiling Controls the 2D tiling of the iridescence map. * @property {Vec2} iridescenceMapOffset Controls the 2D offset of the iridescence map. Each component is * between 0 and 1. * @property {number} iridescenceMapRotation Controls the 2D rotation (in degrees) of the iridescence * map. * @property {string} iridescenceMapChannel Color channels of the iridescence map to use. Can be "r", * "g", "b" or "a". * @property {Texture|null} iridescenceThicknessMap The per-pixel iridescence thickness. Defines a * gradient weight between iridescenceThicknessMin and iridescenceThicknessMax. Only used when * useIridescence is enabled. * @property {number} iridescenceThicknessMapUv Iridescence thickness map UV channel. Valid values are 0 to 7. * @property {Vec2} iridescenceThicknessMapTiling Controls the 2D tiling of the iridescence * thickness map. * @property {Vec2} iridescenceThicknessMapOffset Controls the 2D offset of the iridescence * thickness map. Each component is between 0 and 1. * @property {number} iridescenceThicknessMapRotation Controls the 2D rotation (in degrees) * of the iridescence thickness map. * @property {string} iridescenceThicknessMapChannel Color channels of the iridescence thickness * map to use. Can be "r", "g", "b" or "a". * @property {boolean} useMetalness Use metalness properties instead of specular. When enabled, * diffuse colors also affect specular instead of the dedicated specular map. This can be used as * alternative to specular color to save space. With metalness == 0, the pixel is assumed to be * dielectric, and diffuse color is used as normal. With metalness == 1, the pixel is fully * metallic, and diffuse color is used as specular color instead. * @property {boolean} useMetalnessSpecularColor When metalness is enabled, use the * specular map to apply color tint to specular reflections. * @property {Texture|null} metalnessMap Monochrome metalness map (default is null). * @property {number} metalnessMapUv Metalness map UV channel. Valid values are 0 to 7. * @property {Vec2} metalnessMapTiling Controls the 2D tiling of the metalness map. * @property {Vec2} metalnessMapOffset Controls the 2D offset of the metalness map. Each component * is between 0 and 1. * @property {number} metalnessMapRotation Controls the 2D rotation (in degrees) of the metalness * map. * @property {string} metalnessMapChannel Color channel of the metalness map to use. Can be "r", * "g", "b" or "a". * @property {boolean} metalnessVertexColor Use mesh vertex colors for metalness. If metalnessMap * is set, it'll be multiplied by vertex colors. * @property {string} metalnessVertexColorChannel Vertex color channel to use for metalness. Can be * "r", "g", "b" or "a". * @property {Texture|null} glossMap Gloss map (default is null). If specified, will be multiplied * by normalized gloss value and/or vertex colors. * @property {boolean} glossInvert Invert the gloss component (default is false). Enabling this * flag results in material treating the gloss members as roughness. * @property {number} glossMapUv Gloss map UV channel. Valid values are 0 to 7. * @property {string} glossMapChannel Color channel of the gloss map to use. Can be "r", "g", "b" * or "a". * @property {Vec2} glossMapTiling Controls the 2D tiling of the gloss map. * @property {Vec2} glossMapOffset Controls the 2D offset of the gloss map. Each component is * between 0 and 1. * @property {number} glossMapRotation Controls the 2D rotation (in degrees) of the gloss map. * @property {boolean} glossVertexColor Use mesh vertex colors for glossiness. If glossMap is set, * it'll be multiplied by vertex colors. * @property {string} glossVertexColorChannel Vertex color channel to use for glossiness. Can be * "r", "g", "b" or "a". * @property {Texture|null} refractionMap The map of the refraction visibility. * @property {number} refractionMapUv Refraction map UV channel. Valid values are 0 to 7. * @property {Vec2} refractionMapTiling Controls the 2D tiling of the refraction map. * @property {Vec2} refractionMapOffset Controls the 2D offset of the refraction map. Each component * is between 0 and 1. * @property {number} refractionMapRotation Controls the 2D rotation (in degrees) of the * refraction map. * @property {string} refractionMapChannel Color channels of the refraction map to use. Can be "r", * "g", "b", "a", "rgb" or any swizzled combination. * @property {boolean} refractionVertexColor Use mesh vertex colors for refraction. If * refraction map is set, it will be multiplied by vertex colors. * @property {string} refractionVertexColorChannel Vertex color channel to use for refraction. * Can be "r", "g", "b" or "a". * @property {boolean} useDynamicRefraction Enables higher quality refractions using the grab pass * instead of pre-computed cube maps for refractions. * @property {Texture|null} thicknessMap The per-pixel thickness of the medium, only used when * useDynamicRefraction is enabled. * @property {number} thicknessMapUv Thickness map UV channel. Valid values are 0 to 7. * @property {Vec2} thicknessMapTiling Controls the 2D tiling of the thickness map. * @property {Vec2} thicknessMapOffset Controls the 2D offset of the thickness map. Each component is * between 0 and 1. * @property {number} thicknessMapRotation Controls the 2D rotation (in degrees) of the thickness * map. * @property {string} thicknessMapChannel Color channels of the thickness map to use. Can be "r", * "g", "b" or "a". * @property {boolean} thicknessVertexColor Use mesh vertex colors for thickness. If * thickness map is set, it will be multiplied by vertex colors. * @property {string} thicknessVertexColorChannel Vertex color channel to use for thickness. Can * be "r", "g", "b" or "a". * @property {Texture|null} emissiveMap The emissive map of the material (default is null). Can be * HDR. When the emissive map is applied, the emissive color is multiplied by the texel color in the * map. Since the emissive color is black by default, the emissive map won't be visible unless the * emissive color is changed. * @property {number} emissiveMapUv Emissive map UV channel. Valid values are 0 to 7. * @property {Vec2} emissiveMapTiling Controls the 2D tiling of the emissive map. * @property {Vec2} emissiveMapOffset Controls the 2D offset of the emissive map. Each component is * between 0 and 1. * @property {number} emissiveMapRotation Controls the 2D rotation (in degrees) of the emissive * map. * @property {string} emissiveMapChannel Color channels of the emissive map to use. Can be "r", * "g", "b", "a", "rgb" or any swizzled combination. * @property {boolean} emissiveVertexColor Use mesh vertex colors for emission. If emissiveMap or * emissive are set, they'll be multiplied by vertex colors. * @property {string} emissiveVertexColorChannel Vertex color channels to use for emission. Can be * "r", "g", "b", "a", "rgb" or any swizzled combination. * @property {boolean} useSheen Toggle sheen specular effect on/off. * @property {Texture|null} sheenMap The sheen microstructure color map of the material (default is * null). * @property {number} sheenMapUv Sheen map UV channel. Valid values are 0 to 7. * @property {Vec2} sheenMapTiling Controls the 2D tiling of the sheen map. * @property {Vec2} sheenMapOffset Controls the 2D offset of the sheen map. Each component is * between 0 and 1. * @property {number} sheenMapRotation Controls the 2D rotation (in degrees) of the sheen * map. * @property {string} sheenMapChannel Color channels of the sheen map to use. Can be "r", * "g", "b", "a", "rgb" or any swizzled combination. * @property {boolean} sheenVertexColor Use mesh vertex colors for sheen. If sheen map or * sheen tint are set, they'll be multiplied by vertex colors. * @property {string} sheenVertexColorChannel Vertex color channels to use for sheen. Can be "r", * "g", "b", "a", "rgb" or any swizzled combination. * @property {boolean} sheenGlossInvert Invert the sheen gloss component (default is false). * Enabling this flag results in material treating the sheen gloss members as roughness. * @property {Texture|null} sheenGlossMap The sheen glossiness microstructure color map of the * material (default is null). * @property {number} sheenGlossMapUv Sheen glossiness map UV channel. Valid values are 0 to 7. * @property {Vec2} sheenGlossMapTiling Controls the 2D tiling of the sheen glossiness map. * @property {Vec2} sheenGlossMapOffset Controls the 2D offset of the sheen glossiness map. * Each component is between 0 and 1. * @property {number} sheenGlossMapRotation Controls the 2D rotation (in degrees) of the sheen * glossiness map. * @property {string} sheenGlossMapChannel Color channels of the sheen glossiness map to use. * Can be "r", "g", "b", "a", "rgb" or any swizzled combination. * @property {boolean} sheenGlossVertexColor Use mesh vertex colors for sheen glossiness. * If sheen glossiness map or sheen glossiness tint are set, they'll be multiplied by vertex colors. * @property {string} sheenGlossVertexColorChannel Vertex color channels to use for sheen glossiness. * Can be "r", "g", "b" or "a". * @property {Texture|null} opacityMap The opacity map of the material (default is null). * @property {number} opacityMapUv Opacity map UV channel. Valid values are 0 to 7. * @property {string} opacityMapChannel Color channel of the opacity map to use. Can be "r", "g", * "b" or "a". * @property {Vec2} opacityMapTiling Controls the 2D tiling of the opacity map. * @property {Vec2} opacityMapOffset Controls the 2D offset of the opacity map. Each component is * between 0 and 1. * @property {number} opacityMapRotation Controls the 2D rotation (in degrees) of the opacity map. * @property {boolean} opacityVertexColor Use mesh vertex colors for opacity. If opacityMap is set, * it'll be multiplied by vertex colors. * @property {string} opacityVertexColorChannel Vertex color channels to use for opacity. Can be * "r", "g", "b" or "a". * @property {boolean} opacityFadesSpecular Used to specify whether specular and reflections are * faded out using {@link opacity}. Default is true. When set to false use {@link alphaFade} to * fade out materials. * @property {string} opacityDither Used to specify whether opacity is dithered, which allows * transparency without alpha blending. Can be: * * - {@link DITHER_NONE}: Opacity dithering is disabled. * - {@link DITHER_BAYER2}: Opacity is dithered using a Bayer 2 matrix. * - {@link DITHER_BAYER4}: Opacity is dithered using a Bayer 4 matrix. * - {@link DITHER_BAYER8}: Opacity is dithered using a Bayer 8 matrix. * - {@link DITHER_BAYER16}: Opacity is dithered using a Bayer 16 matrix. * - {@link DITHER_BLUENOISE}: Opacity is dithered using a blue noise. * - {@link DITHER_IGNNOISE}: Opacity is dithered using an interleaved gradient noise. * * Defaults to {@link DITHER_NONE}. * @property {string} opacityShadowDither Used to specify whether shadow opacity is dithered, which * allows shadow transparency without alpha blending. Can be: * * - {@link DITHER_NONE}: Opacity dithering is disabled. * - {@link DITHER_BAYER2}: Opacity is dithered using a Bayer 2 matrix. * - {@link DITHER_BAYER4}: Opacity is dithered using a Bayer 4 matrix. * - {@link DITHER_BAYER8}: Opacity is dithered using a Bayer 8 matrix. * - {@link DITHER_BAYER16}: Opacity is dithered using a Bayer 16 matrix. * - {@link DITHER_BLUENOISE}: Opacity is dithered using a blue noise. * - {@link DITHER_IGNNOISE}: Opacity is dithered using an interleaved gradient noise. * * Defaults to {@link DITHER_NONE}. * @property {Texture|null} normalMap The main (primary) normal map of the material (default is * null). The texture must contains normalized, tangent space normals. * @property {number} normalMapUv Main (primary) normal map UV channel. Valid values are 0 to 7. * @property {Vec2} normalMapTiling Controls the 2D tiling of the main (primary) normal map. * @property {Vec2} normalMapOffset Controls the 2D offset of the main (primary) normal map. Each * component is between 0 and 1. * @property {number} normalMapRotation Controls the 2D rotation (in degrees) of the main (primary) * normal map. * @property {Texture|null} normalDetailMap The detail (secondary) normal map of the material * (default is null). Will only be used if main (primary) normal map is non-null. * @property {number} normalDetailMapUv Detail (secondary) normal map UV channel. Valid values are 0 to 7. * @property {Vec2} normalDetailMapTiling Controls the 2D tiling of the detail (secondary) normal * map. * @property {Vec2} normalDetailMapOffset Controls the 2D offset of the detail (secondary) normal * map. Each component is between 0 and 1. * @property {number} normalDetailMapRotation Controls the 2D rotation (in degrees) of the detail * (secondary) normal map. * @property {Texture|null} heightMap The height map of the material (default is null). Used for a * view-dependent parallax effect. The texture must represent the height of the surface where * darker pixels are lower and lighter pixels are higher, with {@link heightMapBase} selecting the * value that sits at the level of the original geometry. It is recommended to use it together with * a normal map. Note that the parallax offset is applied to all other maps of the material, so the * height map should use the same tiling and offset as those maps. * @property {number} heightMapUv Height map UV channel. Valid values are 0 to 7. * @property {string} heightMapChannel Color channel of the height map to use. Can be "r", "g", "b" * or "a". * @property {Vec2} heightMapTiling Controls the 2D tiling of the height map. * @property {Vec2} heightMapOffset Controls the 2D offset of the height map. Each component is * between 0 and 1. * @property {number} heightMapRotation Controls the 2D rotation (in degrees) of the height map. * @property {string} parallaxMode Selects how the height map is used to offset the UV of the other * maps of the material. Can be: * * - {@link PARALLAX_OFFSET}: A single tap of the height map, which pivots the surface around the * {@link heightMapBase} level of the map. * - {@link PARALLAX_OCCLUSION}: The view ray is marched through the height field, which spans * {@link heightMapFactor} of depth with the geometry sitting at the {@link heightMapBase} level. * This represents deeper displacement without smearing, at the cost of multiple taps per pixel. * Note that the silhouette of the mesh is not affected, and the depth buffer still sees the flat * surface. * * Defaults to {@link PARALLAX_OFFSET}. * @property {Texture|null} envAtlas The prefiltered environment lighting atlas (default is null). * This setting overrides cubeMap and sphereMap and will replace the scene lighting environment. * @property {Texture|null} cubeMap The cubic environment map of the material (default is null). * This setting overrides sphereMap and will replace the scene lighting environment. * @property {Texture|null} sphereMap The spherical environment map of the material (default is * null). This will replace the scene lighting environment. * @property {number} cubeMapProjection The type of projection applied to the cubeMap property: * - {@link CUBEPROJ_NONE}: The cube map is treated as if it is infinitely far away. * - {@link CUBEPROJ_BOX}: Box-projection based on a world space axis-aligned bounding box. * Defaults to {@link CUBEPROJ_NONE}. * @property {Texture|null} lightMap A custom lightmap of the material (default is null). Lightmaps * are textures that contain pre-rendered lighting. Can be HDR. When a mesh instance rendered with * this material has a lightmap of its own, baked by the {@link Lightmapper}, that lightmap is used * instead of this one. * @property {number} lightMapUv Lightmap UV channel. Valid values are 0 to 7. * @property {string} lightMapChannel Color channels of the lightmap to use. Can be "r", "g", "b", * "a", "rgb" or any swizzled combination. * @property {Vec2} lightMapTiling Controls the 2D tiling of the lightmap. * @property {Vec2} lightMapOffset Controls the 2D offset of the lightmap. Each component is * between 0 and 1. * @property {number} lightMapRotation Controls the 2D rotation (in degrees) of the lightmap. * @property {boolean} lightVertexColor Use baked vertex lighting. If lightMap is set, it'll be * multiplied by vertex colors. * @property {string} lightVertexColorChannel Vertex color channels to use for baked lighting. Can * be "r", "g", "b", "a", "rgb" or any swizzled combination. * @property {Texture|null} aoMap The main (primary) baked ambient occlusion (AO) map (default is * null). Modulates ambient color. * @property {number} aoMapUv Main (primary) AO map UV channel. Valid values are 0 to 7. * @property {string} aoMapChannel Color channel of the main (primary) AO map to use. Can be "r", "g", "b" or "a". * @property {Vec2} aoMapTiling Controls the 2D tiling of the main (primary) AO map. * @property {Vec2} aoMapOffset Controls the 2D offset of the main (primary) AO map. Each component is between 0 * and 1. * @property {number} aoMapRotation Controls the 2D rotation (in degrees) of the main (primary) AO map. * @property {boolean} aoVertexColor Use mesh vertex colors for AO. If aoMap is set, it'll be * multiplied by vertex colors. * @property {string} aoVertexColorChannel Vertex color channels to use for AO. Can be "r", "g", * "b" or "a". * @property {Texture|null} aoDetailMap The detail (secondary) baked ambient occlusion (AO) map of * the material (default is null). Will only be used if main (primary) ao map is non-null. * @property {number} aoDetailMapUv Detail (secondary) AO map UV channel. Valid values are 0 to 7. * @property {Vec2} aoDetailMapTiling Controls the 2D tiling of the detail (secondary) AO map. * @property {Vec2} aoDetailMapOffset Controls the 2D offset of the detail (secondary) AO map. Each * component is between 0 and 1. * @property {number} aoDetailMapRotation Controls the 2D rotation (in degrees) of the detail * (secondary) AO map. * @property {string} aoDetailMapChannel Color channels of the detail (secondary) AO map to use. * Can be "r", "g", "b" or "a" (default is "g"). * @property {string} aoDetailMode Determines how the main (primary) and detail (secondary) * AO maps are blended together. Can be: * * - {@link DETAILMODE_MUL}: Multiply together the primary and secondary colors. * - {@link DETAILMODE_ADD}: Add together the primary and secondary colors. * - {@link DETAILMODE_SCREEN}: Softer version of {@link DETAILMODE_ADD}. * - {@link DETAILMODE_OVERLAY}: Multiplies or screens the colors, depending on the primary color. * - {@link DETAILMODE_MIN}: Select whichever of the primary and secondary colors is darker, * component-wise. * - {@link DETAILMODE_MAX}: Select whichever of the primary and secondary colors is lighter, * component-wise. * * Defaults to {@link DETAILMODE_MUL}. * @property {number} occludeSpecular Uses ambient occlusion to darken specular/reflection. It's a * hack, because real specular occlusion is view-dependent. However, it can be better than nothing. * * - {@link SPECOCC_NONE}: No specular occlusion * - {@link SPECOCC_AO}: Use AO directly to occlude specular. * - {@link SPECOCC_GLOSSDEPENDENT}: Modify AO based on material glossiness/view angle to occlude * specular. * * @property {boolean} occludeDirect Tells if AO should darken directional lighting. Defaults to * false. * @property {number} fresnelModel Defines the formula used for Fresnel effect. * As a side-effect, enabling any Fresnel model changes the way diffuse and reflection components * are combined. When Fresnel is off, legacy non energy-conserving combining is used. When it is * on, combining behavior is energy-conserving. * * - {@link FRESNEL_NONE}: No Fresnel. * - {@link FRESNEL_SCHLICK}: Schlick's approximation of Fresnel (recommended). Parameterized by * specular color. * * @property {boolean} useFog Apply fogging (as configured in scene settings) * @property {boolean} useLighting Apply lighting * @property {boolean} useSkybox Apply scene skybox as prefiltered environment map * @property {boolean} useTonemap Apply tonemapping (as configured via * {@link CameraComponent#toneMapping}). Defaults to true. * @property {boolean} pixelSnap Align vertices to pixel coordinates when rendering. Useful for * pixel perfect 2D graphics. * @property {boolean} twoSidedLighting Calculate proper normals (and therefore lighting) on * backfaces. * @property {boolean} shadowCatcher When enabled, the material will output accumulated directional * shadow value in linear space as the color. * @property {boolean} vertexColorGamma When set to true, the vertex shader converts vertex colors * from gamma to linear space to ensure correct interpolation in the fragment shader. This flag is * provided for backwards compatibility, allowing users to mark their materials to handle vertex * colors in gamma space. Defaults to false, which indicates that vertex colors are stored in * linear space. * * @category Graphics */ export class StandardMaterial extends Material { static TEXTURE_PARAMETERS: any[]; static CUBEMAP_PARAMETERS: any[]; userAttributes: Map; /** * Whether the specular color was black at the last update. * * @type {boolean} * @private */ private _specularIsBlack; /** * Which of the assigned maps share a texture, as of the last update. * * @type {string} * @private */ private _textureSharing; /** * The texture assignment version the texture sharing was last checked for. * * @type {number} * @private */ private _sharingCheckedVersion; /** * Texture transform grouping state. * * @type {StandardMaterialMapTransforms} * @private */ private _mapTransforms; /** * A custom function that will be called after all shader generator properties are collected * and before shader code is generated. This function will receive an object with shader * generator settings (based on current material and scene properties), that you can change and * then return. Returned value will be used instead. This is mostly useful when rendering the * same set of objects, but with different shader variations based on the same material. For * example, you may wish to render a depth or normal pass using textures assigned to the * material, a reflection pass with simpler shaders and so on. These properties are split into * two sections, generic standard material options and lit options. Properties of the standard * material options are {@link StandardMaterialOptions} and the options for the lit options are * {@link LitShaderOptions}. * * @type {UpdateShaderCallback|undefined} */ onUpdateShader: UpdateShaderCallback | undefined; _assetReferences: {}; _activeParams: Set; shaderOptBuilder: StandardMaterialOptionsBuilder; reset(): void; /** The anisotropy map of the material (default is null). */ set anisotropyMap(arg: Texture|null); get anisotropyMap(): Texture|null; /** Controls the 2D offset of the anisotropy map. Each component is between 0 and 1. */ set anisotropyMapOffset(arg: Vec2); get anisotropyMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the anisotropy map. */ set anisotropyMapRotation(arg: number); get anisotropyMapRotation(): number; /** Controls the 2D tiling of the anisotropy map. */ set anisotropyMapTiling(arg: Vec2); get anisotropyMapTiling(): Vec2; /** Anisotropy map UV channel. Valid values are 0 to 7. */ set anisotropyMapUv(arg: number); get anisotropyMapUv(): number; /** The main (primary) baked ambient occlusion (AO) map (default is null). Modulates ambient color. */ set aoMap(arg: Texture|null); get aoMap(): Texture|null; /** Color channel of the main (primary) AO map to use. Can be "r", "g", "b" or "a". */ set aoMapChannel(arg: string); get aoMapChannel(): string; /** Controls the 2D offset of the main (primary) AO map. Each component is between 0 and 1. */ set aoMapOffset(arg: Vec2); get aoMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the main (primary) AO map. */ set aoMapRotation(arg: number); get aoMapRotation(): number; /** Controls the 2D tiling of the main (primary) AO map. */ set aoMapTiling(arg: Vec2); get aoMapTiling(): Vec2; /** Main (primary) AO map UV channel. Valid values are 0 to 7. */ set aoMapUv(arg: number); get aoMapUv(): number; /** The detail (secondary) baked ambient occlusion (AO) map of the material (default is null). Will only be used if main (primary) ao map is non-null. */ set aoDetailMap(arg: Texture|null); get aoDetailMap(): Texture|null; /** Color channels of the detail (secondary) AO map to use. Can be "r", "g", "b" or "a" (default is "g"). */ set aoDetailMapChannel(arg: string); get aoDetailMapChannel(): string; /** Controls the 2D offset of the detail (secondary) AO map. Each component is between 0 and 1. */ set aoDetailMapOffset(arg: Vec2); get aoDetailMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the detail (secondary) AO map. */ set aoDetailMapRotation(arg: number); get aoDetailMapRotation(): number; /** Controls the 2D tiling of the detail (secondary) AO map. */ set aoDetailMapTiling(arg: Vec2); get aoDetailMapTiling(): Vec2; /** Detail (secondary) AO map UV channel. Valid values are 0 to 7. */ set aoDetailMapUv(arg: number); get aoDetailMapUv(): number; /** Determines how the main (primary) and detail (secondary) AO maps are blended together. Can be: - {@link DETAILMODE_MUL}: Multiply together the primary and secondary colors. - {@link DETAILMODE_ADD}: Add together the primary and secondary colors. - {@link DETAILMODE_SCREEN}: Softer version of {@link DETAILMODE_ADD}. - {@link DETAILMODE_OVERLAY}: Multiplies or screens the colors, depending on the primary color. - {@link DETAILMODE_MIN}: Select whichever of the primary and secondary colors is darker, component-wise. - {@link DETAILMODE_MAX}: Select whichever of the primary and secondary colors is lighter, component-wise. Defaults to {@link DETAILMODE_MUL}. */ set aoDetailMode(arg: string); get aoDetailMode(): string; /** Use mesh vertex colors for AO. If aoMap is set, it'll be multiplied by vertex colors. */ set aoVertexColor(arg: boolean); get aoVertexColor(): boolean; /** Vertex color channels to use for AO. Can be "r", "g", "b" or "a". */ set aoVertexColorChannel(arg: string); get aoVertexColorChannel(): string; /** Invert the clearcoat gloss component (default is false). Enabling this flag results in material treating the clear coat gloss members as roughness. */ set clearCoatGlossInvert(arg: boolean); get clearCoatGlossInvert(): boolean; /** Monochrome clearcoat glossiness map (default is null). If specified, will be multiplied by normalized 'clearCoatGloss' value and/or vertex colors. */ set clearCoatGlossMap(arg: Texture|null); get clearCoatGlossMap(): Texture|null; /** Color channel of the clearcoat gloss map to use. Can be "r", "g", "b" or "a". */ set clearCoatGlossMapChannel(arg: string); get clearCoatGlossMapChannel(): string; /** Controls the 2D offset of the clearcoat gloss map. Each component is between 0 and 1. */ set clearCoatGlossMapOffset(arg: Vec2); get clearCoatGlossMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the clear coat gloss map. */ set clearCoatGlossMapRotation(arg: number); get clearCoatGlossMapRotation(): number; /** Controls the 2D tiling of the clearcoat gloss map. */ set clearCoatGlossMapTiling(arg: Vec2); get clearCoatGlossMapTiling(): Vec2; /** Clearcoat gloss map UV channel. Valid values are 0 to 7. */ set clearCoatGlossMapUv(arg: number); get clearCoatGlossMapUv(): number; /** Use mesh vertex colors for clearcoat glossiness. If clearCoatGlossMap is set, it'll be multiplied by vertex colors. */ set clearCoatGlossVertexColor(arg: boolean); get clearCoatGlossVertexColor(): boolean; /** Vertex color channel to use for clearcoat glossiness. Can be "r", "g", "b" or "a". */ set clearCoatGlossVertexColorChannel(arg: string); get clearCoatGlossVertexColorChannel(): string; /** Monochrome clearcoat intensity map (default is null). If specified, will be multiplied by normalized 'clearCoat' value and/or vertex colors. */ set clearCoatMap(arg: Texture|null); get clearCoatMap(): Texture|null; /** Color channel of the clearcoat intensity map to use. Can be "r", "g", "b" or "a". */ set clearCoatMapChannel(arg: string); get clearCoatMapChannel(): string; /** Controls the 2D offset of the clearcoat intensity map. Each component is between 0 and 1. */ set clearCoatMapOffset(arg: Vec2); get clearCoatMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the clearcoat intensity map. */ set clearCoatMapRotation(arg: number); get clearCoatMapRotation(): number; /** Controls the 2D tiling of the clearcoat intensity map. */ set clearCoatMapTiling(arg: Vec2); get clearCoatMapTiling(): Vec2; /** Clearcoat intensity map UV channel. Valid values are 0 to 7. */ set clearCoatMapUv(arg: number); get clearCoatMapUv(): number; /** The clearcoat normal map of the material (default is null). The texture must contains normalized, tangent space normals. */ set clearCoatNormalMap(arg: Texture|null); get clearCoatNormalMap(): Texture|null; /** Controls the 2D offset of the main clearcoat normal map. Each component is between 0 and 1. */ set clearCoatNormalMapOffset(arg: Vec2); get clearCoatNormalMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the main clearcoat map. */ set clearCoatNormalMapRotation(arg: number); get clearCoatNormalMapRotation(): number; /** Controls the 2D tiling of the main clearcoat normal map. */ set clearCoatNormalMapTiling(arg: Vec2); get clearCoatNormalMapTiling(): Vec2; /** Clearcoat normal map UV channel. Valid values are 0 to 7. */ set clearCoatNormalMapUv(arg: number); get clearCoatNormalMapUv(): number; /** Use mesh vertex colors for clearcoat intensity. If clearCoatMap is set, it'll be multiplied by vertex colors. */ set clearCoatVertexColor(arg: boolean); get clearCoatVertexColor(): boolean; /** Vertex color channel to use for clearcoat intensity. Can be "r", "g", "b" or "a". */ set clearCoatVertexColorChannel(arg: string); get clearCoatVertexColorChannel(): string; /** The cubic environment map of the material (default is null). This setting overrides sphereMap and will replace the scene lighting environment. */ set cubeMap(arg: Texture|null); get cubeMap(): Texture|null; /** The type of projection applied to the cubeMap property: - {@link CUBEPROJ_NONE}: The cube map is treated as if it is infinitely far away. - {@link CUBEPROJ_BOX}: Box-projection based on a world space axis-aligned bounding box. Defaults to {@link CUBEPROJ_NONE}. */ set cubeMapProjection(arg: number); get cubeMapProjection(): number; /** The detail (secondary) diffuse map of the material (default is null). Will only be used if main (primary) diffuse map is non-null. */ set diffuseDetailMap(arg: Texture|null); get diffuseDetailMap(): Texture|null; /** Color channels of the detail (secondary) diffuse map to use. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set diffuseDetailMapChannel(arg: string); get diffuseDetailMapChannel(): string; /** Controls the 2D offset of the detail (secondary) diffuse map. Each component is between 0 and 1. */ set diffuseDetailMapOffset(arg: Vec2); get diffuseDetailMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the detail (secondary) diffuse map. */ set diffuseDetailMapRotation(arg: number); get diffuseDetailMapRotation(): number; /** Controls the 2D tiling of the detail (secondary) diffuse map. */ set diffuseDetailMapTiling(arg: Vec2); get diffuseDetailMapTiling(): Vec2; /** Detail (secondary) diffuse map UV channel. Valid values are 0 to 7. */ set diffuseDetailMapUv(arg: number); get diffuseDetailMapUv(): number; /** Determines how the main (primary) and detail (secondary) diffuse maps are blended together. Can be: - {@link DETAILMODE_MUL}: Multiply together the primary and secondary colors. - {@link DETAILMODE_ADD}: Add together the primary and secondary colors. - {@link DETAILMODE_SCREEN}: Softer version of {@link DETAILMODE_ADD}. - {@link DETAILMODE_OVERLAY}: Multiplies or screens the colors, depending on the primary color. - {@link DETAILMODE_MIN}: Select whichever of the primary and secondary colors is darker, component-wise. - {@link DETAILMODE_MAX}: Select whichever of the primary and secondary colors is lighter, component-wise. Defaults to {@link DETAILMODE_MUL}. */ set diffuseDetailMode(arg: string); get diffuseDetailMode(): string; /** The main (primary) diffuse map of the material (default is null). */ set diffuseMap(arg: Texture|null); get diffuseMap(): Texture|null; /** Color channels of the main (primary) diffuse map to use. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set diffuseMapChannel(arg: string); get diffuseMapChannel(): string; /** Controls the 2D offset of the main (primary) diffuse map. Each component is between 0 and 1. */ set diffuseMapOffset(arg: Vec2); get diffuseMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the main (primary) diffuse map. */ set diffuseMapRotation(arg: number); get diffuseMapRotation(): number; /** Controls the 2D tiling of the main (primary) diffuse map. */ set diffuseMapTiling(arg: Vec2); get diffuseMapTiling(): Vec2; /** Main (primary) diffuse map UV channel. Valid values are 0 to 7. */ set diffuseMapUv(arg: number); get diffuseMapUv(): number; /** Multiply diffuse by the mesh vertex colors. */ set diffuseVertexColor(arg: boolean); get diffuseVertexColor(): boolean; /** Vertex color channels to use for diffuse. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set diffuseVertexColorChannel(arg: string); get diffuseVertexColorChannel(): string; /** The emissive map of the material (default is null). Can be HDR. When the emissive map is applied, the emissive color is multiplied by the texel color in the map. Since the emissive color is black by default, the emissive map won't be visible unless the emissive color is changed. */ set emissiveMap(arg: Texture|null); get emissiveMap(): Texture|null; /** Color channels of the emissive map to use. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set emissiveMapChannel(arg: string); get emissiveMapChannel(): string; /** Controls the 2D offset of the emissive map. Each component is between 0 and 1. */ set emissiveMapOffset(arg: Vec2); get emissiveMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the emissive map. */ set emissiveMapRotation(arg: number); get emissiveMapRotation(): number; /** Controls the 2D tiling of the emissive map. */ set emissiveMapTiling(arg: Vec2); get emissiveMapTiling(): Vec2; /** Emissive map UV channel. Valid values are 0 to 7. */ set emissiveMapUv(arg: number); get emissiveMapUv(): number; /** Use mesh vertex colors for emission. If emissiveMap or emissive are set, they'll be multiplied by vertex colors. */ set emissiveVertexColor(arg: boolean); get emissiveVertexColor(): boolean; /** Vertex color channels to use for emission. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set emissiveVertexColorChannel(arg: string); get emissiveVertexColorChannel(): string; /** Enables GGX specular. Also enables {@link anisotropyIntensity} parameter to set material anisotropy. */ set enableGGXSpecular(arg: boolean); get enableGGXSpecular(): boolean; /** The prefiltered environment lighting atlas (default is null). This setting overrides cubeMap and sphereMap and will replace the scene lighting environment. */ set envAtlas(arg: Texture|null); get envAtlas(): Texture|null; /** Defines the formula used for Fresnel effect. As a side-effect, enabling any Fresnel model changes the way diffuse and reflection components are combined. When Fresnel is off, legacy non energy-conserving combining is used. When it is on, combining behavior is energy-conserving. - {@link FRESNEL_NONE}: No Fresnel. - {@link FRESNEL_SCHLICK}: Schlick's approximation of Fresnel (recommended). Parameterized by specular color. */ set fresnelModel(arg: number); get fresnelModel(): number; /** Invert the gloss component (default is false). Enabling this flag results in material treating the gloss members as roughness. */ set glossInvert(arg: boolean); get glossInvert(): boolean; /** Gloss map (default is null). If specified, will be multiplied by normalized gloss value and/or vertex colors. */ set glossMap(arg: Texture|null); get glossMap(): Texture|null; /** Color channel of the gloss map to use. Can be "r", "g", "b" or "a". */ set glossMapChannel(arg: string); get glossMapChannel(): string; /** Controls the 2D offset of the gloss map. Each component is between 0 and 1. */ set glossMapOffset(arg: Vec2); get glossMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the gloss map. */ set glossMapRotation(arg: number); get glossMapRotation(): number; /** Controls the 2D tiling of the gloss map. */ set glossMapTiling(arg: Vec2); get glossMapTiling(): Vec2; /** Gloss map UV channel. Valid values are 0 to 7. */ set glossMapUv(arg: number); get glossMapUv(): number; /** Use mesh vertex colors for glossiness. If glossMap is set, it'll be multiplied by vertex colors. */ set glossVertexColor(arg: boolean); get glossVertexColor(): boolean; /** Vertex color channel to use for glossiness. Can be "r", "g", "b" or "a". */ set glossVertexColorChannel(arg: string); get glossVertexColorChannel(): string; /** The height map of the material (default is null). Used for a view-dependent parallax effect. The texture must represent the height of the surface where darker pixels are lower and lighter pixels are higher, with {@link heightMapBase} selecting the value that sits at the level of the original geometry. It is recommended to use it together with a normal map. Note that the parallax offset is applied to all other maps of the material, so the height map should use the same tiling and offset as those maps. */ set heightMap(arg: Texture|null); get heightMap(): Texture|null; /** Color channel of the height map to use. Can be "r", "g", "b" or "a". */ set heightMapChannel(arg: string); get heightMapChannel(): string; /** Controls the 2D offset of the height map. Each component is between 0 and 1. */ set heightMapOffset(arg: Vec2); get heightMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the height map. */ set heightMapRotation(arg: number); get heightMapRotation(): number; /** Controls the 2D tiling of the height map. */ set heightMapTiling(arg: Vec2); get heightMapTiling(): Vec2; /** Height map UV channel. Valid values are 0 to 7. */ set heightMapUv(arg: number); get heightMapUv(): number; /** A custom lightmap of the material (default is null). Lightmaps are textures that contain pre-rendered lighting. Can be HDR. When a mesh instance rendered with this material has a lightmap of its own, baked by the {@link Lightmapper}, that lightmap is used instead of this one. */ set lightMap(arg: Texture|null); get lightMap(): Texture|null; /** Color channels of the lightmap to use. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set lightMapChannel(arg: string); get lightMapChannel(): string; /** Controls the 2D offset of the lightmap. Each component is between 0 and 1. */ set lightMapOffset(arg: Vec2); get lightMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the lightmap. */ set lightMapRotation(arg: number); get lightMapRotation(): number; /** Controls the 2D tiling of the lightmap. */ set lightMapTiling(arg: Vec2); get lightMapTiling(): Vec2; /** Lightmap UV channel. Valid values are 0 to 7. */ set lightMapUv(arg: number); get lightMapUv(): number; /** Use baked vertex lighting. If lightMap is set, it'll be multiplied by vertex colors. */ set lightVertexColor(arg: boolean); get lightVertexColor(): boolean; /** Vertex color channels to use for baked lighting. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set lightVertexColorChannel(arg: string); get lightVertexColorChannel(): string; /** Monochrome metalness map (default is null). */ set metalnessMap(arg: Texture|null); get metalnessMap(): Texture|null; /** Color channel of the metalness map to use. Can be "r", "g", "b" or "a". */ set metalnessMapChannel(arg: string); get metalnessMapChannel(): string; /** Controls the 2D offset of the metalness map. Each component is between 0 and 1. */ set metalnessMapOffset(arg: Vec2); get metalnessMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the metalness map. */ set metalnessMapRotation(arg: number); get metalnessMapRotation(): number; /** Controls the 2D tiling of the metalness map. */ set metalnessMapTiling(arg: Vec2); get metalnessMapTiling(): Vec2; /** Metalness map UV channel. Valid values are 0 to 7. */ set metalnessMapUv(arg: number); get metalnessMapUv(): number; /** Use mesh vertex colors for metalness. If metalnessMap is set, it'll be multiplied by vertex colors. */ set metalnessVertexColor(arg: boolean); get metalnessVertexColor(): boolean; /** Vertex color channel to use for metalness. Can be "r", "g", "b" or "a". */ set metalnessVertexColorChannel(arg: string); get metalnessVertexColorChannel(): string; /** The detail (secondary) normal map of the material (default is null). Will only be used if main (primary) normal map is non-null. */ set normalDetailMap(arg: Texture|null); get normalDetailMap(): Texture|null; /** Controls the 2D offset of the detail (secondary) normal map. Each component is between 0 and 1. */ set normalDetailMapOffset(arg: Vec2); get normalDetailMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the detail (secondary) normal map. */ set normalDetailMapRotation(arg: number); get normalDetailMapRotation(): number; /** Controls the 2D tiling of the detail (secondary) normal map. */ set normalDetailMapTiling(arg: Vec2); get normalDetailMapTiling(): Vec2; /** Detail (secondary) normal map UV channel. Valid values are 0 to 7. */ set normalDetailMapUv(arg: number); get normalDetailMapUv(): number; /** The main (primary) normal map of the material (default is null). The texture must contains normalized, tangent space normals. */ set normalMap(arg: Texture|null); get normalMap(): Texture|null; /** Controls the 2D offset of the main (primary) normal map. Each component is between 0 and 1. */ set normalMapOffset(arg: Vec2); get normalMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the main (primary) normal map. */ set normalMapRotation(arg: number); get normalMapRotation(): number; /** Controls the 2D tiling of the main (primary) normal map. */ set normalMapTiling(arg: Vec2); get normalMapTiling(): Vec2; /** Main (primary) normal map UV channel. Valid values are 0 to 7. */ set normalMapUv(arg: number); get normalMapUv(): number; /** Tells if AO should darken directional lighting. Defaults to false. */ set occludeDirect(arg: boolean); get occludeDirect(): boolean; /** Uses ambient occlusion to darken specular/reflection. It's a hack, because real specular occlusion is view-dependent. However, it can be better than nothing. - {@link SPECOCC_NONE}: No specular occlusion - {@link SPECOCC_AO}: Use AO directly to occlude specular. - {@link SPECOCC_GLOSSDEPENDENT}: Modify AO based on material glossiness/view angle to occlude specular. */ set occludeSpecular(arg: number); get occludeSpecular(): number; /** Used to specify whether opacity is dithered, which allows transparency without alpha blending. Can be: - {@link DITHER_NONE}: Opacity dithering is disabled. - {@link DITHER_BAYER2}: Opacity is dithered using a Bayer 2 matrix. - {@link DITHER_BAYER4}: Opacity is dithered using a Bayer 4 matrix. - {@link DITHER_BAYER8}: Opacity is dithered using a Bayer 8 matrix. - {@link DITHER_BAYER16}: Opacity is dithered using a Bayer 16 matrix. - {@link DITHER_BLUENOISE}: Opacity is dithered using a blue noise. - {@link DITHER_IGNNOISE}: Opacity is dithered using an interleaved gradient noise. Defaults to {@link DITHER_NONE}. */ set opacityDither(arg: string); get opacityDither(): string; /** Used to specify whether shadow opacity is dithered, which allows shadow transparency without alpha blending. Can be: - {@link DITHER_NONE}: Opacity dithering is disabled. - {@link DITHER_BAYER2}: Opacity is dithered using a Bayer 2 matrix. - {@link DITHER_BAYER4}: Opacity is dithered using a Bayer 4 matrix. - {@link DITHER_BAYER8}: Opacity is dithered using a Bayer 8 matrix. - {@link DITHER_BAYER16}: Opacity is dithered using a Bayer 16 matrix. - {@link DITHER_BLUENOISE}: Opacity is dithered using a blue noise. - {@link DITHER_IGNNOISE}: Opacity is dithered using an interleaved gradient noise. Defaults to {@link DITHER_NONE}. */ set opacityShadowDither(arg: string); get opacityShadowDither(): string; /** Used to specify whether specular and reflections are faded out using {@link opacity}. Default is true. When set to false use {@link alphaFade} to fade out materials. */ set opacityFadesSpecular(arg: boolean); get opacityFadesSpecular(): boolean; /** The opacity map of the material (default is null). */ set opacityMap(arg: Texture|null); get opacityMap(): Texture|null; /** Color channel of the opacity map to use. Can be "r", "g", "b" or "a". */ set opacityMapChannel(arg: string); get opacityMapChannel(): string; /** Controls the 2D offset of the opacity map. Each component is between 0 and 1. */ set opacityMapOffset(arg: Vec2); get opacityMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the opacity map. */ set opacityMapRotation(arg: number); get opacityMapRotation(): number; /** Controls the 2D tiling of the opacity map. */ set opacityMapTiling(arg: Vec2); get opacityMapTiling(): Vec2; /** Opacity map UV channel. Valid values are 0 to 7. */ set opacityMapUv(arg: number); get opacityMapUv(): number; /** Use mesh vertex colors for opacity. If opacityMap is set, it'll be multiplied by vertex colors. */ set opacityVertexColor(arg: boolean); get opacityVertexColor(): boolean; /** Vertex color channels to use for opacity. Can be "r", "g", "b" or "a". */ set opacityVertexColorChannel(arg: string); get opacityVertexColorChannel(): string; /** Align vertices to pixel coordinates when rendering. Useful for pixel perfect 2D graphics. */ set pixelSnap(arg: boolean); get pixelSnap(): boolean; /** When enabled, the material will output accumulated directional shadow value in linear space as the color. */ set shadowCatcher(arg: boolean); get shadowCatcher(): boolean; /** The specular map of the material (default is null). */ set specularMap(arg: Texture|null); get specularMap(): Texture|null; /** Color channels of the specular map to use. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set specularMapChannel(arg: string); get specularMapChannel(): string; /** Controls the 2D offset of the specular map. Each component is between 0 and 1. */ set specularMapOffset(arg: Vec2); get specularMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the specular map. */ set specularMapRotation(arg: number); get specularMapRotation(): number; /** Controls the 2D tiling of the specular map. */ set specularMapTiling(arg: Vec2); get specularMapTiling(): Vec2; /** Specular map UV channel. Valid values are 0 to 7. */ set specularMapUv(arg: number); get specularMapUv(): number; /** Multiply specular by the mesh vertex colors. */ set specularVertexColor(arg: boolean); get specularVertexColor(): boolean; /** Vertex color channels to use for specular. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set specularVertexColorChannel(arg: string); get specularVertexColorChannel(): string; /** The factor of specularity as a texture (default is null). */ set specularityFactorMap(arg: Texture|null); get specularityFactorMap(): Texture|null; /** The channel used by the specularity factor texture to sample from (default is 'a'). */ set specularityFactorMapChannel(arg: string); get specularityFactorMapChannel(): string; /** Controls the 2D offset of the specularity factor map. Each component is between 0 and 1. */ set specularityFactorMapOffset(arg: Vec2); get specularityFactorMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the specularity factor map. */ set specularityFactorMapRotation(arg: number); get specularityFactorMapRotation(): number; /** Controls the 2D tiling of the specularity factor map. */ set specularityFactorMapTiling(arg: Vec2); get specularityFactorMapTiling(): Vec2; /** Specularity factor map UV channel. Valid values are 0 to 7. */ set specularityFactorMapUv(arg: number); get specularityFactorMapUv(): number; /** Toggle sheen specular effect on/off. */ set useSheen(arg: boolean); get useSheen(): boolean; /** The sheen microstructure color map of the material (default is null). */ set sheenMap(arg: Texture|null); get sheenMap(): Texture|null; /** Color channels of the sheen map to use. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set sheenMapChannel(arg: string); get sheenMapChannel(): string; /** Controls the 2D offset of the sheen map. Each component is between 0 and 1. */ set sheenMapOffset(arg: Vec2); get sheenMapOffset(): Vec2; /** Controls the 2D rotation (in degrees) of the sheen map. */ set sheenMapRotation(arg: number); get sheenMapRotation(): number; /** Controls the 2D tiling of the sheen map. */ set sheenMapTiling(arg: Vec2); get sheenMapTiling(): Vec2; /** Sheen map UV channel. Valid values are 0 to 7. */ set sheenMapUv(arg: number); get sheenMapUv(): number; /** Use mesh vertex colors for sheen. If sheen map or sheen tint are set, they'll be multiplied by vertex colors. */ set sheenVertexColor(arg: boolean); get sheenVertexColor(): boolean; /** Vertex color channels to use for sheen. Can be "r", "g", "b", "a", "rgb" or any swizzled combination. */ set sheenVertexColorChannel(arg: string); get sheenVertexColorChannel(): string; /** The spherical environment map of the material (default is null). This will replace the scene lighting environment. */ set sphereMap(arg: Texture|null); get sphereMap(): Texture|null; /** Calculate proper normals (and therefore lighting) on backfaces. */ set twoSidedLighting(arg: boolean); get twoSidedLighting(): boolean; /** Apply fogging (as configured in scene settings) */ set useFog(arg: boolean); get useFog(): boolean; /** Apply tonemapping (as configured via {@link CameraComponent#toneMapping}). Defaults to true. */ set useTonemap(arg: boolean); get useTonemap(): boolean; /** Apply lighting */ set useLighting(arg: boolean); get useLighting(): boolean; /** Use metalness properties instead of specular. When enabled, diffuse colors also affect specular instead of the dedicated specular map. This can be used as alternative to specular color to save space. With metalness == 0, the pixel is assumed to be dielectric, and diffuse color is used as normal. With metalness == 1, the pixel is fully metallic, and diffuse color is used as specular color instead. */ set useMetalness(arg: boolean); get useMetalness(): boolean; /** When metalness is enabled, use the specular map to apply color tint to specular reflections. */ set useMetalnessSpecularColor(arg: boolean); get useMetalnessSpecularColor(): boolean; /** Apply scene skybox as prefiltered environment map */ set useSkybox(arg: boolean); get useSkybox(): boolean; /** * The map property which claims the sampler of each assigned map, so that the shader samples * the slots of the material's bind group under the names that group declares them with. * * @ignore */ get textureIdentifiers(): Map; /** @ignore */ getUniformBufferProperty(name: any): MaterialProperty; /** * Adds the names of the map properties changed without a subsequent update, for the debug * warning about unapplied changes. * * @param {string[]} names - The names to add to. * @private */ private _collectUnappliedChanges; /** * Sets the diffuse color of the material, specified in sRGB color space. This color value is * 3-component (RGB), where each component is between 0 and 1. Defines basic surface color (aka * albedo). * * @type {Color} */ set diffuse(value: Color); /** * Gets the diffuse color of the material. * * @type {Color} */ get diffuse(): Color; /** * Sets the emissive color of the material, specified in sRGB color space. This color value is * 3-component (RGB), where each component is between 0 and 1. The emission is this color * multiplied by {@link StandardMaterial#emissiveIntensity}, and by the emissive map when one is * set. * * @type {Color} */ set emissive(value: Color); /** * Gets the emissive color of the material. * * @type {Color} */ get emissive(): Color; /** * Sets the emissive color multiplier. Defaults to 1. * * @type {number} */ set emissiveIntensity(value: number); /** * Gets the emissive color multiplier. * * @type {number} */ get emissiveIntensity(): number; _emissiveIntensity: any; /** * The ambient color of the material, specified in sRGB color space. This color value is * 3-component (RGB), where each component is between 0 and 1. * * @type {Color} */ set ambient(value: Color); /** * Gets the ambient color of the material. * * @type {Color} */ get ambient(): Color; /** * The specular color of the material, specified in sRGB color space. This color value is * 3-component (RGB), where each component is between 0 and 1. Defines surface * reflection/specular color. Affects specular intensity and tint. * * @type {Color} */ set specular(value: Color); /** * Gets the specular color of the material. * * @type {Color} */ get specular(): Color; /** * The specular color of the sheen (fabric) microfiber structure, specified in sRGB color space. * This color value is 3-component (RGB), where each component is between 0 and 1. * * @type {Color} */ set sheen(value: Color); /** * Gets the sheen color of the material. * * @type {Color} */ get sheen(): Color; /** * The attenuation color for refractive materials, specified in sRGB color space. Only used when * useDynamicRefraction is enabled. * * @type {Color} */ set attenuation(value: Color); /** * Gets the attenuation color of the material. * * @type {Color} */ get attenuation(): Color; /** * The factor of specular intensity, used to weight the fresnel and specularity. Default is 1.0. * * @type {number} */ set specularityFactor(value: number); /** * Gets the specularity factor of the material. * * @type {number} */ get specularityFactor(): number; _specularityFactor: any; /** * The glossiness of the sheen (fabric) microfiber structure. This color value is a single value * between 0 and 1. * * @type {number} */ set sheenGloss(value: number); /** * Gets the sheen glossiness of the material. * * @type {number} */ get sheenGloss(): number; _sheenGloss: any; /** * Defines the glossiness of the material from 0 (rough) to 1 (shiny). Materials imported from * glTF enable {@link StandardMaterial#glossInvert}, which reverses this: on those materials * gloss holds roughness, so 0 is shiny and 1 is rough. * * @type {number} */ set gloss(value: number); /** * Gets the glossiness of the material. * * @type {number} */ get gloss(): number; _gloss: any; /** * Ambient occlusion intensity. Defaults to 1. * * @type {number} */ set aoIntensity(value: number); /** * Gets the ambient occlusion intensity of the material. * * @type {number} */ get aoIntensity(): number; _aoIntensity: any; /** * The height map value that sits at the level of the original geometry, in the 0 to 1 range * (default is 0.5). Relief above the base appears to stand out of the surface and relief below * it appears to sink in. Set it to 1 to treat the map as pure depth carved below the geometry, * or to 0 to treat it as pure elevation above it. Both parallax modes honor it. * * @type {number} */ set heightMapBase(value: number); /** * Gets the height map base level of the material. * * @type {number} */ get heightMapBase(): number; _heightMapBase: any; /** * The maximum number of height map taps taken along the view ray when {@link parallaxMode} is * {@link PARALLAX_OCCLUSION} (default is 16). Fewer taps are taken as the view direction * approaches the surface normal, where the ray barely moves. Has no effect in {@link * PARALLAX_OFFSET} mode. * * @type {number} */ set parallaxSamples(value: number); /** * Gets the maximum number of height map taps of parallax occlusion mapping of the material. * * @type {number} */ get parallaxSamples(): number; _parallaxSamples: any; /** * The maximum number of height map taps taken towards each directional light to shadow the * relief against itself, or 0 to disable it (default is 0). The shadow is soft: the march * accumulates how far the height field stands above the light ray and weights it by distance, * so more taps buy a smoother penumbra rather than an earlier exit. Applies only to directional * lights, and only when {@link parallaxMode} is {@link PARALLAX_OCCLUSION}. * * @type {number} */ set parallaxShadowSamples(value: number); /** * Gets the maximum number of height map taps of the parallax self shadowing of the material. * * @type {number} */ get parallaxShadowSamples(): number; _parallaxShadowSamples: any; /** * The opacity of the material. This value can be between 0 and 1, where 0 is fully transparent * and 1 is fully opaque. If you want the material to be semi-transparent you also need to set * the {@link Material#blendType} to {@link BLEND_NORMAL}, {@link BLEND_ADDITIVE} or any other * mode. Also note that for most semi-transparent objects you want {@link Material#depthWrite} * to be false, otherwise they can fully occlude objects behind them. * * @type {number} */ set opacity(value: number); /** * Gets the opacity of the material. * * @type {number} */ get opacity(): number; _opacity: any; /** * Used to fade out materials when {@link opacityFadesSpecular} is set to false. * * @type {number} */ set alphaFade(value: number); /** * Gets the alpha fade of the material. * * @type {number} */ get alphaFade(): number; _alphaFade: any; /** * The bumpiness of the material. This value scales the assigned main (primary) normal map. It * should be normally between 0 (no bump mapping) and 1 (full bump mapping), but can be set to * e.g. 2 to give even more pronounced bump effect. * * @type {number} */ set bumpiness(value: number); /** * Gets the bumpiness of the material. * * @type {number} */ get bumpiness(): number; _bumpiness: any; /** * The bumpiness of the material. This value scales the assigned detail (secondary) normal map. * It should be normally between 0 (no bump mapping) and 1 (full bump mapping), but can be set * to e.g. 2 to give even more pronounced bump effect. * * @type {number} */ set normalDetailMapBumpiness(value: number); /** * Gets the detail normal map bumpiness of the material. * * @type {number} */ get normalDetailMapBumpiness(): number; _normalDetailMapBumpiness: any; /** * Environment map intensity. * * @type {number} */ set reflectivity(value: number); /** * Gets the environment map intensity of the material. * * @type {number} */ get reflectivity(): number; _reflectivity: any; /** * Controls visibility of specular occlusion. * * @type {number} */ set occludeSpecularIntensity(value: number); /** * Gets the specular occlusion intensity of the material. * * @type {number} */ get occludeSpecularIntensity(): number; _occludeSpecularIntensity: any; /** * Defines the visibility of refraction. Material can refract the same cube map as used for * reflections. * * @type {number} */ set refraction(value: number); /** * Gets the refraction of the material. * * @type {number} */ get refraction(): number; _refraction: any; /** * Defines the index of refraction, i.e. The amount of distortion. The value is calculated as * (outerIor / surfaceIor), where inputs are measured indices of refraction, the one around the * object and the one of its own surface. In most situations outer medium is air, so outerIor * will be approximately 1. Then you only need to do (1.0 / surfaceIor). * * @type {number} */ set refractionIndex(value: number); /** * Gets the index of refraction of the material. * * @type {number} */ get refractionIndex(): number; _refractionIndex: any; /** * The strength of the angular separation of colors (chromatic aberration) transmitting through * a volume. Defaults to 0, which is equivalent to no dispersion. * * @type {number} */ set dispersion(value: number); /** * Gets the dispersion of the material. * * @type {number} */ get dispersion(): number; _dispersion: any; /** * The thickness of the medium, only used when useDynamicRefraction is enabled. The unit is in * base units, and scales with the size of the object. * * @type {number} */ set thickness(value: number); /** * Gets the thickness of the medium of the material. * * @type {number} */ get thickness(): number; _thickness: any; /** * Defines how much the surface is metallic. From 0 (dielectric) to 1 (metal). * * @type {number} */ set metalness(value: number); /** * Gets the metalness of the material. * * @type {number} */ get metalness(): number; _metalness: any; /** * Defines amount of anisotropy. Requires {@link enableGGXSpecular} is set to true. - When * anisotropyIntensity == 0, specular is isotropic. - Specular anisotropy increases as * anisotropyIntensity value increases to maximum of 1. * * @type {number} */ set anisotropyIntensity(value: number); /** * Gets the anisotropy intensity of the material. * * @type {number} */ get anisotropyIntensity(): number; _anisotropyIntensity: any; /** * Defines intensity of clearcoat layer from 0 to 1. Clearcoat layer is disabled when clearCoat * == 0. Default value is 0 (disabled). * * @type {number} */ set clearCoat(value: number); /** * Gets the clearcoat intensity of the material. * * @type {number} */ get clearCoat(): number; _clearCoat: any; /** * Defines the clearcoat glossiness of the clearcoat layer from 0 (rough) to 1 (mirror). * * @type {number} */ set clearCoatGloss(value: number); /** * Gets the clearcoat glossiness of the material. * * @type {number} */ get clearCoatGloss(): number; _clearCoatGloss: any; /** * The bumpiness of the clearcoat layer. This value scales the assigned main clearcoat normal * map. It should be normally between 0 (no bump mapping) and 1 (full bump mapping), but can be * set to e.g. 2 to give even more pronounced bump effect. * * @type {number} */ set clearCoatBumpiness(value: number); /** * Gets the clearcoat bumpiness of the material. * * @type {number} */ get clearCoatBumpiness(): number; _clearCoatBumpiness: any; /** * Defines the intensity of the iridescence layer from 0 to 1. Only used when useIridescence is * enabled, and the layer is disabled when iridescence == 0. If an iridescenceMap is specified, * it is multiplied by this value. Default value is 0 (disabled). * * @type {number} */ set iridescence(value: number); /** * Gets the iridescence intensity of the material. * * @type {number} */ get iridescence(): number; _iridescence: any; /** * The index of refraction of the iridescent thin-film. Affects the color phase shift as * described here: * https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_iridescence * * @type {number} */ set iridescenceRefractionIndex(value: number); /** * Gets the index of refraction of the iridescent thin-film of the material. * * @type {number} */ get iridescenceRefractionIndex(): number; _iridescenceRefractionIndex: any; /** * The minimum thickness for the iridescence layer. Only used when an iridescence thickness map * is used. The unit is in nm. * * @type {number} */ set iridescenceThicknessMin(value: number); /** * Gets the minimum iridescence thickness of the material. * * @type {number} */ get iridescenceThicknessMin(): number; _iridescenceThicknessMin: any; /** * The maximum thickness for the iridescence layer. Used as the 'base' thickness when no * iridescence thickness map is defined. The unit is in nm. * * @type {number} */ set iridescenceThicknessMax(value: number); /** * Gets the maximum iridescence thickness of the material. * * @type {number} */ get iridescenceThicknessMax(): number; _iridescenceThicknessMax: any; /** * Defines the rotation (in degrees) of anisotropy. * * @type {number} */ set anisotropyRotation(value: number); /** * Gets the anisotropy rotation of the material. * * @type {number} */ get anisotropyRotation(): number; _anisotropyRotation: any; /** * The distance defining the absorption rate of light within the medium. Only used when * useDynamicRefraction is enabled. * * @type {number} */ set attenuationDistance(value: number); /** * Gets the attenuation distance of the material. * * @type {number} */ get attenuationDistance(): number; _attenuationDistance: any; /** * Height map multiplier (default is 1). Affects the strength of the parallax effect. A value of * 1 displaces the texture by up to 5% of a UV tile, so useful values are typically in the 0 to * 2 range. * * @type {number} */ set heightMapFactor(value: number); /** * Gets the height map factor of the material. * * @type {number} */ get heightMapFactor(): number; _heightMapFactor: any; /** * The alpha value used by the opacity dither path, in the range [0, 1]. Independent of {@link * opacity}, which keeps driving alpha blending. Lets a material be alpha-blended and dithered * at the same time with different strengths — useful for fading objects out via dither while * preserving their alpha-blended look (e.g. fading glass as the camera approaches). Has no * effect unless {@link opacityDither} (or {@link opacityShadowDither}) is set to a dither mode. * Set to `1.0` to disable dither at runtime without changing the dither mode, or `0.0` to fully * discard via dither. For backwards compatibility, a material that has never had this property * assigned uses {@link opacity} as the dither alpha, matching the historical behavior where the * dither pass shares the blend alpha. * * @type {number} */ set alphaDither(value: number); /** * Gets the dither alpha of the material. * * @type {number} */ get alphaDither(): number; _alphaDither: any; /** * Sets the world space axis-aligned bounding box defining the box-projection used for the * cubeMap property, or null for no box. Only used when cubeMapProjection is set to * {@link CUBEPROJ_BOX}. The box is copied into the material. * * @type {BoundingBox|null} */ set cubeMapProjectionBox(value: BoundingBox | null); /** * Gets the world space axis-aligned bounding box of the box-projection, or null. A change of * its center or half extents is applied by {@link StandardMaterial#update}. * * @type {BoundingBox|null} */ get cubeMapProjectionBox(): BoundingBox | null; _cubeMapProjectionBox: BoundingBox; /** * Copy a `StandardMaterial`. * * @param {StandardMaterial} source - The material to copy from. * @returns {StandardMaterial} The destination material. */ copy(source: StandardMaterial): StandardMaterial; /** * Returns the transform group assigned to a texture map. * * @param {string} name - Texture map base name. * @returns {number} The transform group, or zero when no transform is needed. * @private */ private _getMapTransformId; /** * Sets a vertex shader attribute on a material. * * @param {string} name - The name of the parameter to set. * @param {string} semantic - Semantic to map the vertex data. Must match with the semantic set * on vertex stream of the mesh. * @example * mesh.setVertexStream(SEMANTIC_ATTR15, offset, 3); * material.setAttribute('offset', SEMANTIC_ATTR15); */ setAttribute(name: string, semantic: string): void; _setParameter(name: any, value: any): void; /** * Replaces the set of parameters published by the previous update with the parameters published * since, deleting the ones that were dropped. * * @private */ private _processParameters; _updateMap(p: any): void; /** @ignore */ getShaderVariant(params: any): import("../../index.js").Shader; /** * Sets the shininess in the range 0 to 100, mapping to {@link StandardMaterial#gloss} in the * range 0 to 1. * * @type {number} * @ignore * @deprecated Use {@link StandardMaterial#gloss} instead. */ set shininess(value: number); /** * Gets the shininess. * * @type {number} * @ignore * @deprecated Use {@link StandardMaterial#gloss} instead. */ get shininess(): number; /** * Sets whether tonemapping is applied. Note: no deprecation warning is logged, to keep * existing code working without warnings. * * @type {boolean} * @ignore * @deprecated Use {@link StandardMaterial#useTonemap} instead. */ set useGammaTonemap(value: boolean); /** * Gets whether tonemapping is applied. * * @type {boolean} * @ignore * @deprecated Use {@link StandardMaterial#useTonemap} instead. */ get useGammaTonemap(): boolean; /** * Sets the anisotropy as a signed intensity, mapping to {@link StandardMaterial#anisotropyIntensity} * and {@link StandardMaterial#anisotropyRotation}. * * @type {number} * @ignore * @deprecated Use {@link StandardMaterial#anisotropyIntensity} and * {@link StandardMaterial#anisotropyRotation} instead. */ set anisotropy(value: number); /** * Gets the anisotropy as a signed intensity. * * @type {number} * @ignore * @deprecated Use {@link StandardMaterial#anisotropyIntensity} and * {@link StandardMaterial#anisotropyRotation} instead. */ get anisotropy(): number; } import type { StandardMaterialOptions } from './standard-material-options.js'; import { Material } from './material.js'; import { StandardMaterialOptionsBuilder } from './standard-material-options-builder.js'; import { MaterialProperty } from './material-property.js'; import { Color } from '../../core/math/color.js'; import type { BoundingBox } from '../../core/shape/bounding-box.js'; import { Vec2 } from '../../core/math/vec2.js'; import { Texture } from '../../platform/graphics/texture.js';