Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / MaterialValueState

Type Alias: MaterialValueState

ts
type MaterialValueState = {
  type: MaterialTypeValue;
  color: string;
  roughness: number;
  metalness: number;
  normalScale: number;
  opacity: number;
  emissive: string;
  emissiveIntensity: number;
  side: number;
  blending: number;
  depthTest: boolean;
  depthWrite: boolean;
  wireframe: boolean;
  transparent: boolean;
  textureMap?: string;
  alphaTextureMap?: string;
  normalMap?: string;
  roughnessMap?: string;
  metalnessMap?: string;
  aoMap?: string;
  emissiveMap?: string;
  bumpMap?: string;
  displacementMap?: string;
  lightMap?: string;
  envMap?: string;
  textureFiltering: TextureFilteringValue;
  useMipmaps: boolean;
};

Defined in: components/Material.ts:11

Authoring state for a single slot in MaterialComponent.values. Mirrors the live three.js material so it can be re-applied when the project loads.

Properties

PropertyTypeDescriptionDefined in
typeMaterialTypeValueUnderlying material class.components/Material.ts:13
colorstringBase color as #rrggbb hex string.components/Material.ts:15
roughnessnumberPBR roughness in [0, 1].components/Material.ts:17
metalnessnumberPBR metalness in [0, 1].components/Material.ts:19
normalScalenumberMultiplier applied to the normal map (uniform on both axes).components/Material.ts:21
opacitynumberSurface opacity in [0, 1]. Combine with transparent to enable alpha.components/Material.ts:23
emissivestringEmissive color as #rrggbb hex string.components/Material.ts:25
emissiveIntensitynumberEmissive intensity multiplier.components/Material.ts:27
sidenumberThree.js Side enum value (FrontSide, BackSide, or DoubleSide).components/Material.ts:29
blendingnumberThree.js Blending enum value.components/Material.ts:31
depthTestbooleanWhether depth testing is enabled.components/Material.ts:33
depthWritebooleanWhether depth writes are enabled.components/Material.ts:35
wireframebooleanRender as wireframe.components/Material.ts:37
transparentbooleanEnable transparency (must be true for opacity < 1 to render correctly).components/Material.ts:39
textureMap?stringColor/diffuse texture URL.components/Material.ts:41
alphaTextureMap?stringAlpha (transparency) texture URL.components/Material.ts:43
normalMap?stringTangent-space normal map URL.components/Material.ts:45
roughnessMap?stringRoughness map URL (red channel).components/Material.ts:47
metalnessMap?stringMetalness map URL (red channel).components/Material.ts:49
aoMap?stringAmbient occlusion map URL.components/Material.ts:51
emissiveMap?stringEmissive color map URL.components/Material.ts:53
bumpMap?stringBump map URL (height-based shading approximation).components/Material.ts:55
displacementMap?stringDisplacement map URL (geometric vertex offset).components/Material.ts:57
lightMap?stringPre-baked light map URL.components/Material.ts:59
envMap?stringEnvironment reflection map URL.components/Material.ts:61
textureFilteringTextureFilteringValueTexture sampling mode applied to the color map.components/Material.ts:63
useMipmapsbooleanWhether mipmaps are generated for texture maps.components/Material.ts:65