UNPKG

@allincart-ag/dive

Version:

Allincart Spatial Framework

59 lines (58 loc) 1.71 kB
import { OrbitControllerSettings } from '../plugins/orbitcontroller/index.ts'; import { DIVEEngine, EngineSettings } from '../engine/Engine.ts'; declare global { interface Window { DIVE: { /** * All instances of DIVE */ instances: DIVE[]; /** * Get the first instance of DIVE */ get instance(): DIVE | undefined; }; } } export type DIVESettings = EngineSettings & { /** Settings for modules */ useLocalDRACOLoader?: boolean; } & Partial<OrbitControllerSettings>; export declare const DIVEDefaultSettings: DIVESettings; /** * #### DIVE * is the main class of the DIVE framework. * * An instance of this class delivers a complete 3D environment with a perspective camera, orbit controls, a toolbox, and a communication system. * ```ts * import { DIVE } from "@shopware-ag/dive"; * * const myWrapper = document.getElementById('myWrapper'); * * const dive = new DIVE(); * * myWrapper.appendChild(dive.Canvas); * * dive.Communication.subscribe('GET_ALL_SCENE_DATA', () => { * // do something * })); * * dive.Communication.performAction('GET_ALL_SCENE_DATA', {}); * ``` * @module */ export declare class DIVE { static QuickView(uri: string, settings?: Partial<DIVESettings & { lightIntensity?: number; }>): Promise<DIVE>; private _instanceId; private _settings; get engine(): DIVEEngine; private _engine; private orbitController; private axisCamera; get canvas(): HTMLCanvasElement; setCanvas(canvas: HTMLCanvasElement): void; constructor(settings?: Partial<DIVESettings>); dispose(): Promise<void>; }