ThreePresenter API Documentation - v0.1.2
    Preparing search index...

    Interface ModelDefinition

    Describes a single 3D model in the scene.

    This is a configuration object. It defines how a model should be loaded and initialized. Once loaded, the actual runtime object is stored in ThreePresenter.models as a THREE.Object3D.

    interface ModelDefinition {
        id: string;
        file: string;
        title?: string;
        position?: [number, number, number];
        rotation?: [number, number, number];
        rotationUnits?: "deg" | "rad";
        scale?: number | [number, number, number];
        visible?: boolean;
        material?: MaterialProperties | Material & { isMaterial?: true };
    }
    Index

    Properties

    id: string

    Unique identifier for the model

    file: string

    Filename of the model (e.g., "model.glb", "mesh.ply")

    title?: string

    Human-friendly title for the model (defaults to filename base)

    position?: [number, number, number]

    Position in 3D space [x, y, z], defaults to [0, 0, 0]

    rotation?: [number, number, number]

    Rotation in radians [x, y, z], defaults to [0, 0, 0]

    rotationUnits?: "deg" | "rad"

    Optional explicit rotation units for this model. If provided, overrides scene-level setting.

    scale?: number | [number, number, number]

    Scale factors [x, y, z], defaults to [1, 1, 1]

    visible?: boolean

    Whether the model is visible, defaults to true

    material?: MaterialProperties | Material & { isMaterial?: true }

    Optional material property overrides or a runtime THREE.Material instance

    • As properties (serializable): use color (hex string), metalness, roughness, flatShading.
    • As runtime material instance: provide a THREE.Material that will be set on the loaded mesh(es).