UNPKG

@vrspace/babylonjs

Version:

vrspace.org babylonjs client

65 lines (64 loc) 2.11 kB
/** * An area somewhere in space, like a screen, displaying a texture. */ export class ImageArea extends BaseArea { /** * Creates the area with default values. * By default, it's sized and positioned to be attached to the camera, and includes manipulation handles */ constructor(scene: any, name?: string); width: number; height: number; autoResize: boolean; visible: boolean; noiseTexture: any; callback: any; pointerIsDown: boolean; /** Show the area, optionally also creates manipulation handles */ show(): void; ratio: number; clickHandler: any; /** * Internally used while replacing the texture * @private */ private texturesDispose; /** * Internally used after texture is set, sets emissiveColor and visibility */ fullyVisible(): void; /** * Load the texture from the url */ loadUrl(url: any): void; /** * Load texture from the data buffer, e.g. blob */ loadData(data: any, name?: string): void; /** Load video texture from the url, and by default also creates and plays the spatial sound. */ loadVideo(url: any, playSound?: boolean): void; sound: any; /** * Load a MediaStream, and resize the plane */ loadStream(mediaStream: any): void; /** Internally used to resize the plane once video/image resolution is known */ resizeArea(width: any, height: any): void; /** * Creates manipulation handles. Left and right handle resize, and top and bottom move it. */ createHandles(): void; attachVolumeControl(): void; /** Called on pointer event, passed texture coordinates. Executes callback */ click(x: any, y: any): Promise<void>; /** Called on pointer event */ pointerUp(): void; /** Called on pointer event, passed texture coordinates */ pointerDrag(x: any, y: any): void; /** * Set click event handler here * @param callback executed on pointer click, passed Control argument */ onClick(callback: any): void; } import { BaseArea } from './base-area.js';