UNPKG

@vrspace/babylonjs

Version:

vrspace.org babylonjs client

69 lines (68 loc) 2.12 kB
/** * Plane manipulation UI: adds handles around a plane, and installs pointer drag observable to the scene. * Top and bottom handles are used to move the plane around, with 6DOF. * Left and right handles resize the plane. * If this.canMinimize is set, also adds a top-right box that disables plane's parent and all of it's children, * except ones specified in dontMinimize. * Material and parent are taken from the plane. * While initially intended to be used for manipulation of a plane, this can be used to manipulate any mesh. */ export class ManipulationHandles { /** * Create the control. * @param plane mesh to manipulate * @param width mesh width, determines how wide are handles * @param height mesh height, how far up and down are handles * @param scene babylon scene */ constructor(plane: any, width: any, height: any, scene: any); plane: any; material: any; width: any; height: any; group: any; scene: any; segments: number; canMinimize: boolean; canClose: boolean; onClose: any; minimized: boolean; dontMinimize: any[]; sizeCallback: any; positionCallback: any; selectedMaterial: any; alertMaterial: any; /** minimization button TODO rename */ box: any; closeButton: any; /** Callback on area minimized/maximized, passed a minimized/hidden flag */ onMinMax: any; /** * Creates manipulation handles. * Left and right handle resize, and top and bottom move it, optional box disables/reenables everything. */ show(): void; leftHandle: any; rightHandle: any; topHandle: any; bottomHandle: any; handles: any[]; resizeHandler: any; behavior: any; selectedHandle: any; point: any; createBehavior(): any; /** * Minimize or maximize (hide or show all children of this.group) * @param flag boolean indicating whether to hide or show children */ hide(flag: any): void; /** * XR pointer support */ isSelectableMesh(mesh: any): any; /** * Clean up */ dispose(): void; }