UNPKG

@vrspace/babylonjs

Version:

vrspace.org babylonjs client

48 lines (47 loc) 1.66 kB
/** Default progress indicator: rotating vrspace.org logo, 30 cm ahead, 5 cm below camera. Always bounds to active camera, to ensure same look and function on PC, mobile and VR devices. */ export class LoadProgressIndicator { /** Initializes VRSpaceUI, loading logo geometry so it can be reused. Installs active camera listener on the scene. @param scene @param camera current camera to bind to */ constructor(scene: any, camera: any); scene: any; camera: any; mesh: any; totalItems: number; currentItem: number; zeroRotation: any; angle: number; /** Debug log flag */ debug: boolean; /** Whether progress of individual items should be tracked. Default true rotates the logo only when an item loads. False results in continous rotation. */ trackItems: boolean; _init(): void; attachToCamera(): void; /** Add an item to be tracked. First item added shows the indicator and starts the animation. @param item an item to track */ add(item: any): void; /** Remove an item, e.g. loaded file. Last item removed stops the animation and hides the indicator. @param item to remove */ remove(item: any): void; /** Stops tracking individual items and runs contionous animation */ animate(): void; animation: () => void; /** Call on load progress event. @param evt progress event, https://doc.babylonjs.com/typedoc/interfaces/BABYLON.ISceneLoaderProgressEvent @param item related item, not used, subclasses may use it */ progress(evt: any, item: any): void; _update(): void; log(something: any): void; }