three-cad-viewer
    Preparing search index...

    Interface MaterialXMaterial

    Material definition from threejs-materials (Three.js MeshPhysicalMaterial-compatible).

    This format is produced by the threejs-materials Python library, which catalogs PBR materials from ambientCG, GPUOpen, PolyHaven, and PhysicallyBased. values contains scalar properties (e.g., color as linear RGB array, roughness as float). textures contains texture references (inline data URIs or file paths) keyed by property name.

    Detected by the presence of the values key. Extra keys from threejs-materials (id, name, source, url, license) pass through harmlessly and are not part of this interface.

    interface MaterialXMaterial {
        textureRepeat?: [number, number];
        textureRotation?: number;
        textures: Record<string, string>;
        values: Record<string, unknown>;
    }
    Index

    Properties

    textureRepeat?: [number, number]

    Optional texture tiling [u, v], default [1, 1]. Applied to all textures.

    textureRotation?: number

    Optional texture rotation in radians, counterclockwise. Pivot is the texture center (0.5, 0.5). Applied to all textures.

    textures: Record<string, string>

    Texture map references keyed by property name (e.g., color, normal).

    values: Record<string, unknown>

    Scalar PBR property values (e.g., color, metalness, roughness).