OptionalfileUrlResolver: FileUrlResolverToggle picking mode for annotation placement
PrivateenterEnter picking mode
PrivateexitExit picking mode
PrivateanimateSmoothly animate the camera controls target to a new position
PrivaterenderLoad a new scene description
Scene description object defining models, environment, and settings
If true, keeps current camera position instead of reframing
Load a simple scene with one model:
await presenter.loadScene({
models: [{
id: 'venus',
file: 'venus.glb',
rotation: [-90, 0, 0]
}]
});
Load a complex scene with multiple models and environment settings:
await presenter.loadScene({
rotationUnits: 'deg',
models: [
{
id: 'building',
file: 'building.glb',
title: 'Main Building',
position: [0, 0, 0],
rotation: [0, 45, 0],
scale: 1.5
},
{
id: 'terrain',
file: 'terrain.ply',
position: [0, -5, 0]
}
],
environment: {
showGround: true,
background: '#87CEEB',
headLightOffset: [15, 30]
},
annotations: [
{
id: 'entrance',
label: 'Main Entrance',
type: 'point',
geometry: [10, 2, 5]
}
]
});
PrivateclearClear all models from the scene
PrivateapplyApply transforms from ModelDefinition to a loaded Object3D
PrivateapplyApply environment settings (ground, background, scale indicator)
PrivatesetupSetup orbit controls and viewport gizmo
PrivateloadLoad all models from the scene description
PrivateloadLoad a single model.
This method performs the following steps for each model:
FileUrlResolver.ModelLoader.
models map.The model definition containing file path and properties.
PrivateloadLoad a model file based on its extension
PrivateframeFrame the scene - position models and camera without scaling Models without predefined positions are translated so:
Get current presenter state (for saving/persistence)
Apply transformations to a specific model without saving to scene Useful for live preview while editing
Optionalposition: [number, number, number] | nullOptionalrotation: [number, number, number] | nullOptionalscale: number | [number, number, number] | nullSet visibility of a model by ID
Get visibility of a specific model
PrivategetGet visibility of all models
Get the annotation manager instance for direct access to annotation API
The AnnotationManager instance
Set background color without reloading the scene
Hex color string (e.g., '#404040')
Toggle ground visibility without reloading the scene
Whether the ground should be visible
Set head light offset without reloading the scene
Horizontal angle in degrees
Vertical angle in degrees
Calculate triangle and vertex counts for a loaded model
The ID of the model to analyze
Object with triangle and vertex counts, or null if model not found
PrivateaddPrivateremovePrivateaddPrivateremovePrivateloadMap of loaded runtime 3D objects, keyed by their model ID.
These are the actual THREE.Object3D instances in the scene. Their initial state (visibility, position, etc.) is derived from the ModelDefinition configuration.
OptionalonOptionalonOptionalonOptionalonPrivatefileOptionalonOptionalonOptionalonPrivateannotationPrivatecameraPrivatelightingPrivatemodelPrivateinputPrivaterender
ThreePresenter - Main 3D Scene Presenter Component
Manages the complete 3D viewing experience including model loading, rendering, camera controls, lighting, and user interactions.
Description
This class is responsible for:
Example
See