@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
| Property | Type | Description | Defined in |
|---|---|---|---|
type | MaterialTypeValue | Underlying material class. | components/Material.ts:13 |
color | string | Base color as #rrggbb hex string. | components/Material.ts:15 |
roughness | number | PBR roughness in [0, 1]. | components/Material.ts:17 |
metalness | number | PBR metalness in [0, 1]. | components/Material.ts:19 |
normalScale | number | Multiplier applied to the normal map (uniform on both axes). | components/Material.ts:21 |
opacity | number | Surface opacity in [0, 1]. Combine with transparent to enable alpha. | components/Material.ts:23 |
emissive | string | Emissive color as #rrggbb hex string. | components/Material.ts:25 |
emissiveIntensity | number | Emissive intensity multiplier. | components/Material.ts:27 |
side | number | Three.js Side enum value (FrontSide, BackSide, or DoubleSide). | components/Material.ts:29 |
blending | number | Three.js Blending enum value. | components/Material.ts:31 |
depthTest | boolean | Whether depth testing is enabled. | components/Material.ts:33 |
depthWrite | boolean | Whether depth writes are enabled. | components/Material.ts:35 |
wireframe | boolean | Render as wireframe. | components/Material.ts:37 |
transparent | boolean | Enable transparency (must be true for opacity < 1 to render correctly). | components/Material.ts:39 |
textureMap? | string | Color/diffuse texture URL. | components/Material.ts:41 |
alphaTextureMap? | string | Alpha (transparency) texture URL. | components/Material.ts:43 |
normalMap? | string | Tangent-space normal map URL. | components/Material.ts:45 |
roughnessMap? | string | Roughness map URL (red channel). | components/Material.ts:47 |
metalnessMap? | string | Metalness map URL (red channel). | components/Material.ts:49 |
aoMap? | string | Ambient occlusion map URL. | components/Material.ts:51 |
emissiveMap? | string | Emissive color map URL. | components/Material.ts:53 |
bumpMap? | string | Bump map URL (height-based shading approximation). | components/Material.ts:55 |
displacementMap? | string | Displacement map URL (geometric vertex offset). | components/Material.ts:57 |
lightMap? | string | Pre-baked light map URL. | components/Material.ts:59 |
envMap? | string | Environment reflection map URL. | components/Material.ts:61 |
textureFiltering | TextureFilteringValue | Texture sampling mode applied to the color map. | components/Material.ts:63 |
useMipmaps | boolean | Whether mipmaps are generated for texture maps. | components/Material.ts:65 |

