import type * as BABYLON from "@babylonjs/core"; import type { Base } from "./base-inputs"; import type { BabylonCamera } from "./babylon-camera-inputs"; /** * Result object returned by initBabylonJS helper function. */ export interface InitBabylonJSResult { /** The BabylonJS scene */ scene: BABYLON.Scene; /** The BabylonJS engine */ engine: BABYLON.Engine; /** The hemispheric light */ hemisphericLight: BABYLON.HemisphericLight; /** The directional light (for shadows) */ directionalLight: BABYLON.DirectionalLight; /** The ground mesh (if enabled) */ ground: BABYLON.Mesh | null; /** The arc rotate camera (if enabled) */ arcRotateCamera: BABYLON.ArcRotateCamera | null; /** Start the render loop */ startRenderLoop: (onRender?: () => void) => void; /** Cleanup function to remove resize listener and dispose resources */ dispose: () => void; } /** * Higher-level scene setup parameters: the composed configurations that build a working scene - * camera, lights, environment and ground - in one call rather than piece by piece. */ export declare namespace BabylonJSScene { /** * Feeds the `initBabylonJS` helper that sets up a whole scene in one call: the canvas, * background, ground, lights, shadows and the default orbiting camera, sized from `sceneSize`. */ class InitBabylonJSDto { 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 arc rotate camera. * @default true */ enableArcRotateCamera?: boolean | undefined; /** * Settings for the orbiting camera, the same as `babylon.camera.arcRotate.create` takes; * left out, defaults sized from `sceneSize` are used * @optional true */ arcRotateCameraOptions?: BabylonCamera.ArcRotateCameraDto | undefined; } }