import { AbstractEngine, AbstractMesh, AssetContainer, DirectionalLight, FreeCamera, HemisphericLight, Light, Mesh, PhysicsAggregate, PhysicsShapeType, PointLight, RectAreaLight, Scene, SpotLight, Vector3 } from '@babylonjs/core'; import { HavokPhysicsWithBindings } from '@babylonjs/havok'; import { GameCanvas } from "../interfaces/game.d.ts"; import { Disposable } from "../interfaces/lifecycle.d.ts"; import { LoggingUtility } from "../utils/logger.d.ts"; export declare class SceneEngine implements Disposable { private _canvas; private _engine; private _havok; private _log; constructor(canvas: GameCanvas, engine: AbstractEngine, havok: HavokPhysicsWithBindings, logger: LoggingUtility); /** * Creates a new scene with physics enabled */ createScene(): Scene; enablePhysics(scene: Scene, gravityVector?: Vector3, floatingOriginWorldRadius?: number): void; /** * Creates a free camera at the specified position, targeting the origin. Attaches controls to the provided * canvas, or falls back to the engine's default canvas. * @param name * @param position * @param scene * @param canvas - Overrides the default canvas for input controls */ createFreeCamera(name: string, position: Vector3, scene: Scene, canvas?: GameCanvas): FreeCamera; /** * Creates a hemispheric light (ambient lighting) * @param name * @param direction * @param scene * @param intensity - Default: 0.7 */ createHemisphericLight(name: string, direction: Vector3, scene: Scene, intensity?: number): HemisphericLight; /** * Creates a directional light (sun-like lighting) * @param name * @param direction * @param scene * @param intensity - Default: 1.0 */ createDirectionalLight(name: string, direction: Vector3, scene: Scene, intensity?: number): DirectionalLight; /** * Creates a point light (bulb-like lighting) * @param name * @param position * @param scene * @param intensity - Default: 1.0 */ createPointLight(name: string, position: Vector3, scene: Scene, intensity?: number): PointLight; /** * Creates a spotlight (flashlight-like lighting) * @param name * @param position * @param direction * @param angle - Cone angle in radians * @param exponent - Controls light falloff from center to edge of cone * @param scene * @param intensity - Default: 1.0 */ createSpotLight(name: string, position: Vector3, direction: Vector3, angle: number, exponent: number, scene: Scene, intensity?: number): SpotLight; /** * Creates a rectangular area light (emits from a flat rectangle in the -Z direction) * @param name * @param position * @param width * @param height * @param scene * @param intensity - Default: 1.0 */ createRectAreaLight(name: string, position: Vector3, width: number, height: number, scene: Scene, intensity?: number): RectAreaLight; /** * Creates a sphere mesh. Defaults: diameter 1, 32 segments. * @param name * @param options * @param scene */ createSphere(name: string, options: { diameter?: number; segments?: number; } | undefined, scene: Scene): Mesh; /** * Creates a box mesh. Default size: 1. * @param name * @param options * @param scene */ createBox(name: string, options: { size?: number; width?: number; height?: number; depth?: number; } | undefined, scene: Scene): Mesh; /** * Creates a ground mesh. Defaults: 6x6 with 2 subdivisions. * @param name * @param options * @param scene */ createGround(name: string, options: { width?: number; height?: number; subdivisions?: number; } | undefined, scene: Scene): Mesh; /** * Creates a cylinder mesh. Defaults: height 2, diameter 1 (top and bottom). * @param name * @param options * @param scene */ createCylinder(name: string, options: { height?: number; diameterTop?: number; diameterBottom?: number; } | undefined, scene: Scene): Mesh; /** * Adds physics to a mesh. Defaults: mass 1, restitution 0.75, friction 0.5. * @param mesh * @param shapeType * @param physicsProps * @param scene */ addPhysics(mesh: Mesh, shapeType: PhysicsShapeType, physicsProps: { mass?: number; restitution?: number; friction?: number; } | undefined, scene: Scene): PhysicsAggregate; /** * Loads a 3D model/asset into an AssetContainer without adding it to the scene automatically. * @param sceneFilename * @param scene */ loadModel(sceneFilename: string, scene: Scene): Promise; /** * Imports meshes from a file directly into the scene. * @param meshNames - Specific meshes to import; empty array imports all * @param sceneFilename * @param scene */ importMeshes(meshNames: string[], sceneFilename: string, scene: Scene): Promise<{ meshes: AbstractMesh[]; particleSystems: unknown[]; skeletons: unknown[]; animationGroups: unknown[]; transformNodes: unknown[]; geometries: unknown[]; lights: Light[]; }>; /** * Tears down the scene engine and cleans up any resources */ $teardown(): Promise; }