Small World Engine API Reference - v0.78.00
    Preparing search index...

    Class StandardMaterial

    A physically based rendering (PBR) material using the Metallic-Roughness workflow.

    Hierarchy (View Summary)

    Index
    _renderManifest: RenderManifest | undefined = undefined

    Cached render manifest to avoid frequent allocations.

    alphaMap: Texture | undefined

    The alpha mask texture map.

    alphaTest: number

    Alpha cutoff threshold.

    ao: number

    Ambient occlusion factor (0 to 1).

    aoMap: Texture | undefined

    Ambient occlusion texture map.

    attenuationColor: Color

    Volumetric attenuation color.

    attenuationDistance: number

    Volumetric attenuation distance.

    clearcoat: number

    Clearcoat layer factor (0 to 1).

    clearcoatMap: Texture | undefined

    Clearcoat factor texture map.

    clearcoatNormalMap: Texture | undefined

    Clearcoat normal map texture.

    clearcoatRoughness: number

    Clearcoat layer roughness (0 to 1).

    clearcoatRoughnessMap: Texture | undefined

    Clearcoat roughness texture map.

    color: Color = ...

    The base color of the material.

    cullMode: CullMode = CullMode.DEFAULT

    The culling mode for this material. Defaults to BACK.

    depthTest: boolean = true

    Whether the material performs depth testing. Defaults to true.

    depthWrite: boolean = true

    Whether the material writes to the depth buffer. Defaults to true.

    diffuseMap: Texture | undefined

    The diffuse texture map.

    emissiveColor: Color

    The emissive color.

    emissiveIntensity: number

    The intensity of the emissive glow.

    emissiveMap: Texture | undefined

    The emissive map texture.

    envMap: CubeTexture | undefined

    The environment map for reflections.

    ior: number

    Index of refraction.

    metallic: number

    Metallic factor (0 to 1).

    metallicMap: Texture | undefined

    The metallic map texture.

    normalMap: Texture | undefined

    The normal map texture.

    normalScale: Vector2D

    Scale factor for the normal map to control strength and flip X/Y.

    reflectionFresnelBlend: number

    How much of the planar reflection depends on view angle (0 = constant, 1 = pure Fresnel).

    reflectionMap: Texture | undefined

    The planar reflection map.

    reflectivity: number

    The intensity of the planar reflection.

    roughness: number

    Roughness factor (0 to 1).

    roughnessMap: Texture | undefined

    The roughness map texture.

    sheenColor: Color

    Sheen color for cloth/velvet microfibers.

    sheenColorMap: Texture | undefined

    Sheen color texture map.

    sheenRoughness: number

    Sheen roughness factor (0 to 1).

    sheenRoughnessMap: Texture | undefined

    Sheen roughness texture map.

    thickness: number

    Volumetric thickness.

    thicknessMap: Texture | undefined

    Thickness texture map.

    time: number

    Time parameter for shader animations.

    transmission: number

    Specular transmission factor (0 to 1).

    transmissionMap: Texture | undefined

    Transmission factor texture map.

    transparent: boolean = false

    Whether the material is transparent. Defaults to false.

    type: string

    The type of the material.

    uuid: string = ...

    The unique identifier of the material.

    inspector: Record<string, InspectorField> = ...

    Own fields on top of AbstractMaterial.inspector -- see collectInspectorSchema().

    • Helper to synchronize texture offset and repeat from a given texture.

      Parameters

      • tex:
            | { offset: { x: number; y: number }; repeat: { x: number; y: number } }
            | undefined

      Returns void