import { DIVEClock } from './clock/Clock.ts'; import { DIVEView } from './view/View.ts'; import { DIVEScene, DIVESceneSettings } from './scene/Scene.ts'; import { DIVEPerspectiveCameraSettings } from '../components/camera/perspective/PerspectiveCameraComponent.ts'; import { DIVERendererSettings } from './renderer/Renderer.ts'; declare global { interface Window { DIVE: { /** * All instances of DIVE */ instances: DIVE[]; /** * Get the first instance of DIVE */ get instance(): DIVE | undefined; /** * Maximum amount of DIVE instances that can be created. This is checked on initialization of a new instance. * * You can change this value to allow more instances, but be aware that this can lead to performance issues and crashes. */ instanceLimit: number; }; } } export type DIVESettings = { /** * Whether the engine should start automatically after initialization. * * @default true */ autoStart: boolean; /** * Whether to display coordinate axes in the scene. * * @default false */ displayAxes: boolean; } & DIVESceneSettings & DIVEPerspectiveCameraSettings & DIVERendererSettings; export declare const DIVEDefaultSettings: Required; /** * #### DIVE * is the main class of the DIVE framework. * * An instance of this class delivers a complete 3D environment with a perspective camera and orbit controls. * ```ts * import { DIVE } from "@shopware-ag/dive"; * * const myWrapper = document.getElementById('myWrapper'); * * const dive = new DIVE(); * * myWrapper.appendChild(dive.canvas); * ``` * * Driving a scene from data is the job of the state plugin, which wraps a * DIVE instance rather than being part of it: * ```ts * import { State } from "@shopware-ag/dive/state"; * * const state = new State(dive, orbitController); * await state.performAction('SET_STATE', sceneData); * ``` * @module */ export declare class DIVE { private _instanceId; private _settings; private _disposed; private _views; private _mainView; private _scene; private _clock; private _orientationDisplay; constructor(settings?: Partial); get views(): DIVEView[]; get mainView(): DIVEView; get canvas(): HTMLCanvasElement; get scene(): DIVEScene; get clock(): DIVEClock; /** * Settles once everything requested so far has loaded or failed, such as * the images the constructor asked the scene for. * * Never rejects and starts nothing. A request made later is not covered, * reading this again covers it. */ get loaded(): Promise; /** Whether nothing requested is still loading. */ get isLoaded(): boolean; startAsync(): Promise; stop(): void; disposeAsync(): Promise; }