import { EngineOptions, NullEngineOptions, WebGPUEngineOptions } from '@babylonjs/core'; import { LogLevel } from "./logger.d.ts"; import { BindingDefinition } from "./binding.d.ts"; export type GameCanvas = HTMLCanvasElement | OffscreenCanvas | null; /** Specifies which rendering engine to force using */ export type EngineType = 'webgl' | 'webgpu' | 'auto'; export interface BabylonEngineOptions { antialias?: boolean; adaptToDeviceRatio?: boolean; options?: EngineOptions; } export type RenderEngineOptions = (BabylonEngineOptions | NullEngineOptions | WebGPUEngineOptions) & { /** Force a specific engine type, overriding automatic detection */ engine?: EngineType; }; /** * SAGE Engine options for configuring the game engine */ export interface SageOptions { /** Render engine options for BabylonJS */ renderOptions?: RenderEngineOptions; /** Input bindings to be registered at startup */ bindings?: BindingDefinition[]; /** Logging level for the engine */ logLevel?: LogLevel; /** Audio channel names. If provided, SAGE initializes AudioV2 with one bus per channel. */ audioChannels?: string[]; /** * Enable Large World Rendering for scenes with coordinates far from origin. * Uses float64 CPU matrices and floating origin to prevent GPU precision loss. * Also enables multi-region Havok physics when physics are active. */ largeWorldRendering?: boolean; /** * Debug console configuration. * - `true` or omitted: enabled with default namespace 'sage' * - `{ namespace: 'myGame' }`: enabled with custom namespace * - `false`: disabled (production builds) */ debug?: false | { namespace?: string; }; }