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

    Interface SceneDescription

    Complete scene description - what models exist and their properties Stored as scene.json alongside the model files

    Basic scene with a single model:

    {
    "models": [
    {
    "id": "statue",
    "file": "venus.glb",
    "title": "Venus de Milo",
    "rotation": [-90, 0, 0]
    }
    ]
    }

    Complete scene with multiple models, environment, and annotations:

    {
    "projectId": "my-project",
    "rotationUnits": "deg",
    "models": [
    {
    "id": "main-model",
    "file": "building.glb",
    "title": "Main Building",
    "position": [0, 0, 0],
    "rotation": [0, 45, 0],
    "scale": 1.5,
    "visible": true,
    "material": {
    "color": "#ffffff",
    "metalness": 0.2,
    "roughness": 0.8
    }
    },
    {
    "id": "context",
    "file": "terrain.ply",
    "title": "Terrain",
    "position": [0, -5, 0],
    "visible": true
    }
    ],
    "environment": {
    "showGround": true,
    "background": "#87CEEB",
    "headLightOffset": [15, 30]
    },
    "enableControls": true,
    "annotations": [
    {
    "id": "entrance",
    "label": "Main Entrance",
    "type": "point",
    "geometry": [10, 2, 5]
    },
    {
    "id": "path",
    "label": "Walking Path",
    "type": "line",
    "geometry": [[0, 0, 0], [10, 0, 5], [20, 0, 10]]
    }
    ]
    }
    interface SceneDescription {
        projectId?: string;
        models: ModelDefinition[];
        environment?: EnvironmentSettings;
        enableControls?: boolean;
        rotationUnits?: "deg" | "rad";
        annotations?: Annotation[];
    }
    Index

    Properties

    projectId?: string

    Project ID for resolving file URLs

    models: ModelDefinition[]

    List of 3D models in the scene

    environment?: EnvironmentSettings

    Environment and rendering settings

    enableControls?: boolean

    Whether trackball/orbit controls are enabled

    rotationUnits?: "deg" | "rad"

    Optional scene-level default for rotation units (overridden by model.rotationUnits)

    annotations?: Annotation[]

    Array of annotations in the scene