import * as THREE from 'three'; import type { App, AppOptions } from '../core/app.js'; import type { StateSource } from '../state/controller.js'; import type { Disposable } from '../types.js'; /** Options for {@link createOrbitScaffold}: `AppOptions` plus an `autoRotate` turntable speed. */ export interface OrbitScaffoldOptions extends Omit, 'state'> { state?: StateSource; /** Turntable speed in radians/second. Default 0 (off). */ autoRotate?: number; } /** Handle returned by {@link createOrbitScaffold}. `dispose()` detaches the state binding, removes the stage, and disposes the app. */ export interface OrbitScaffold extends Disposable { app: App; /** Auto-rotating content root — add viewer content here. */ stage: THREE.Group; /** Frame an object: distance the camera so it fits with `margin` headroom. */ fitTo(object: THREE.Object3D, margin?: number): void; } /** * Product/model-viewer scaffold: `createApp` with the built-in pointer orbit, * an auto-rotating `stage` group for content, and a fit-to-object framing * helper. Put viewer content on `stage` so the turntable spins the model, * not the lights. * * @param options - State source, `autoRotate` speed, and the remaining * `AppOptions`. * @returns An {@link OrbitScaffold} with the app, the `stage` group, and * `fitTo(object, margin)` which distances the camera so the object's bounding * sphere fits with `margin` headroom (default 1.25). * @example * const viewer = createOrbitScaffold({ canvas, autoRotate: 0.4 }) * viewer.stage.add(model) * viewer.fitTo(model) * viewer.app.start() */ export declare function createOrbitScaffold>({ state, autoRotate, ...appOptions }: OrbitScaffoldOptions): OrbitScaffold; //# sourceMappingURL=orbit.d.ts.map