import type * as THREEJS from "three"; import type { Base } from "./base-inputs"; import type { OrbitCameraController, ThreeJSCamera } from "./threejs-camera-inputs"; /** * Result object returned by initThreeJS helper function. */ export interface InitThreeJSResult { /** The ThreeJS scene */ scene: THREEJS.Scene; /** The WebGL renderer */ renderer: THREEJS.WebGLRenderer; /** The hemispheric light */ hemisphereLight: THREEJS.HemisphereLight; /** The directional light (for shadows) */ directionalLight: THREEJS.DirectionalLight; /** The ground mesh (if enabled) */ ground: THREEJS.Mesh | null; /** The orbit camera controller (if enabled) */ orbitCamera: OrbitCameraController | null; /** Start the animation loop with the orbit camera */ startAnimationLoop: (onRender?: (deltaTime: number) => void) => void; /** Cleanup function to remove resize listener and dispose resources */ dispose: () => void; } /** * Parameters for the Three.js scene: background, environment, fog and lighting setup, and the * scene-level options that affect everything drawn into it. */ export declare namespace ThreeJSScene { /** * Feeds the `initThreeJS` helper that sets up a whole scene in one call: the canvas, * background, ground, lights, shadows and the orbit camera, sized from `sceneSize`. */ class InitThreeJSDto { constructor(canvasId?: string, sceneSize?: number, backgroundColor?: string, enableShadows?: boolean, enableGround?: boolean, groundCenter?: Base.Point3, groundScaleFactor?: number, groundColor?: string, groundOpacity?: number, hemisphereLightSkyColor?: string, hemisphereLightGroundColor?: string, hemisphereLightIntensity?: number, directionalLightColor?: string, directionalLightIntensity?: number, shadowMapSize?: number); /** * The ID of the canvas element to render to. If not provided, a new canvas will be created and appended to document.body. * @default undefined * @optional true */ canvasId?: string | undefined; /** * The size of the scene in world units. This determines ground size, light positions, and shadow bounds. * @default 20 * @minimum 0 * @exclusiveMinimum true * @maximum Infinity * @step 10 */ sceneSize?: number | undefined; /** * Background color of the scene in hex format. * @default "#1a1c1f" */ backgroundColor?: string | undefined; /** * Enable shadow mapping for realistic shadows. * @default true */ enableShadows?: boolean | undefined; /** * Enable the ground plane. * @default true */ enableGround?: boolean | undefined; /** * Center position of the ground plane [x, y, z]. * @default [0, 0, 0] */ groundCenter?: Base.Point3 | undefined; /** * Scale factor for the ground size relative to scene size. Values greater than 1 make the ground larger than the scene size. * @default 2 * @minimum 0.5 * @maximum Infinity * @step 0.5 */ groundScaleFactor?: number | undefined; /** * Color of the ground plane in hex format. * @default "#333333" */ groundColor?: string | undefined; /** * Opacity of the ground plane (0 = fully transparent, 1 = fully opaque). * @default 1 * @minimum 0 * @maximum 1 * @step 0.1 */ groundOpacity?: number | undefined; /** * Sky color for the hemisphere light (illumination from above). * @default "#ffffff" */ hemisphereLightSkyColor?: string | undefined; /** * Ground color for the hemisphere light (illumination from below). * @default "#444444" */ hemisphereLightGroundColor?: string | undefined; /** * Brightness of the soft light from above and below, 1 being full strength * @default 1 * @minimum 0 * @maximum Infinity * @step 0.1 */ hemisphereLightIntensity?: number | undefined; /** * Color of the directional light (sun light). * @default "#ffffff" */ directionalLightColor?: string | undefined; /** * Brightness of the sun-like light that casts the shadows, 1 being full strength * @default 1.5 * @minimum 0 * @maximum Infinity * @step 0.1 */ directionalLightIntensity?: number | undefined; /** * Size of the shadow map in pixels (higher = sharper shadows but more GPU intensive). * @default 2048 * @minimum 256 * @maximum 8192 * @step 256 */ shadowMapSize?: number | undefined; /** * Enable automatic creation of an orbit camera controller. * @default true */ enableOrbitCamera?: boolean | undefined; /** * Settings for the orbit camera, the same as `three.camera.orbitCamera.create` takes; left * out, defaults sized from `sceneSize` are used * @optional true */ orbitCameraOptions?: ThreeJSCamera.OrbitCameraDto | undefined; } }