import * as THREE from 'three'; import type { App, AppOptions } from '../core/app.js'; import type { IsoCameraOptions } from '../camera/iso-camera.js'; import type { InfiniteGround, InfiniteGroundOptions } from '../geometry/infinite-ground.js'; import type { StateSource } from '../state/controller.js'; import type { Disposable } from '../types.js'; /** Options for {@link createIsoScaffold}: `AppOptions` minus camera/orbit/state, plus the iso camera settings and pan/zoom/ground wiring. */ export interface IsoScaffoldOptions extends Omit, 'camera' | 'orbit' | 'state'>, IsoCameraOptions { /** Plain object, store, or controller — external controllers stay bound. */ state?: StateSource; /** Drag panning in the ground plane. Default true. */ pan?: boolean; /** viewSize clamp for pinch/wheel zoom. Default [6, 80]; false disables zoom. */ zoom?: readonly [number, number] | false; /** Recentering tiled terrain following the pan focus. Off by default. */ ground?: InfiniteGroundOptions; } /** Handle returned by {@link createIsoScaffold}. `dispose()` detaches gestures and the state binding, removes and disposes the ground, then disposes the app. */ export interface IsoScaffold extends Disposable { app: App; camera: THREE.OrthographicCamera; /** The pan focus in the ground plane — tiles recenter around it. */ focus: THREE.Vector3; ground: InfiniteGround | null; } /** * Isometric-scene scaffold in one call: `createApp` with an orthographic iso * camera, drag-to-pan in the ground plane, pinch/wheel zoom via frustum * resize (not dolly), and an optional recentering infinite ground. * * @param options - State source, iso camera flavor, pan/zoom/ground settings, * and the remaining `AppOptions`. * @returns An {@link IsoScaffold} exposing the app, camera, pan `focus`, and * ground handle. * @remarks Pan and zoom are event-driven; the ground recenter costs only the * tiles that crossed a cell boundary per frame. Zoom clamps `viewSize` to the * `zoom` range. * @example * const iso = createIsoScaffold({ canvas, state: store, ground: { tile: 8 } }) * iso.app.start() */ export declare function createIsoScaffold>({ state, viewSize, flavor, near, far, pan, zoom, ground: groundOptions, ...appOptions }: IsoScaffoldOptions): IsoScaffold; //# sourceMappingURL=iso.d.ts.map