declare module "babylonjs-gui/index" { export * from "babylonjs-gui/2D/index"; export * from "babylonjs-gui/3D/index"; } declare module "babylonjs-gui/3D/vector3WithInfo" { import { Vector3 } from "babylonjs/Maths/math.vector"; /** * Class used to transport Vector3 information for pointer events */ export class Vector3WithInfo extends Vector3 { /** defines the current mouse button index */ buttonIndex: number; /** * Creates a new Vector3WithInfo * @param source defines the vector3 data to transport * @param buttonIndex defines the current mouse button index */ constructor(source: Vector3, /** defines the current mouse button index */ buttonIndex?: number); } } declare module "babylonjs-gui/3D/index" { export * from "babylonjs-gui/3D/controls/index"; export * from "babylonjs-gui/3D/materials/index"; export * from "babylonjs-gui/3D/gizmos/index"; export * from "babylonjs-gui/3D/gui3DManager"; export * from "babylonjs-gui/3D/vector3WithInfo"; } declare module "babylonjs-gui/3D/gui3DManager" { import { Nullable } from "babylonjs/types"; import { Observable } from "babylonjs/Misc/observable"; import { Vector3 } from "babylonjs/Maths/math.vector"; import { Material } from "babylonjs/Materials/material"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { UtilityLayerRenderer } from "babylonjs/Rendering/utilityLayerRenderer"; import { IDisposable, Scene } from "babylonjs/scene"; import { Container3D } from "babylonjs-gui/3D/controls/container3D"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; /** * Class used to manage 3D user interface * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui3D */ export class GUI3DManager implements IDisposable { private _scene; private _sceneDisposeObserver; private _utilityLayer; private _rootContainer; private _pointerObserver; private _pointerOutObserver; private _customControlScaling; /** @internal */ _lastPickedControl: Control3D; /** @internal */ _lastControlOver: { [pointerId: number]: Control3D; }; /** @internal */ _lastControlDown: { [pointerId: number]: Control3D; }; protected static MRTK_REALISTIC_SCALING: number; /** * Observable raised when the point picked by the pointer events changed */ onPickedPointChangedObservable: Observable>; /** * Observable raised when a picking happens */ onPickingObservable: Observable>; /** @internal */ _sharedMaterials: { [key: string]: Material; }; /** @internal */ _touchSharedMaterials: { [key: string]: Material; }; /** Gets the hosting scene */ get scene(): Scene; /** Gets associated utility layer */ get utilityLayer(): Nullable; /** Gets the scaling for all UI elements owned by this manager */ get controlScaling(): number; /** Sets the scaling adjustment for all UI elements owned by this manager */ set controlScaling(newScale: number); /** Gets if controls attached to this manager are realistically sized, based on the fact that 1 unit length is 1 meter */ get useRealisticScaling(): boolean; /** Sets if controls attached to this manager are realistically sized, based on the fact that 1 unit length is 1 meter */ set useRealisticScaling(newValue: boolean); /** * Creates a new GUI3DManager * @param scene */ constructor(scene?: Scene); private _handlePointerOut; private _doPicking; /** * Gets the root container */ get rootContainer(): Container3D; /** * Gets a boolean indicating if the given control is in the root child list * @param control defines the control to check * @returns true if the control is in the root child list */ containsControl(control: Control3D): boolean; /** * Adds a control to the root child list * @param control defines the control to add * @returns the current manager */ addControl(control: Control3D): GUI3DManager; /** * Removes a control from the root child list * @param control defines the control to remove * @returns the current container */ removeControl(control: Control3D): GUI3DManager; /** * Releases all associated resources */ dispose(): void; } } declare module "babylonjs-gui/3D/materials/index" { export * from "babylonjs-gui/3D/materials/fluent/index"; export * from "babylonjs-gui/3D/materials/fluentButton/index"; export * from "babylonjs-gui/3D/materials/fluentBackplate/index"; export * from "babylonjs-gui/3D/materials/handle/index"; export * from "babylonjs-gui/3D/materials/mrdl/index"; } declare module "babylonjs-gui/3D/materials/fluentMaterial" { /** * This is here for backwards compatibility with 4.2 */ export { FluentMaterial } from "babylonjs-gui/3D/materials/fluent/fluentMaterial"; } declare module "babylonjs-gui/3D/materials/mrdl/mrdlSliderThumbMaterial" { import { Nullable } from "babylonjs/types"; import { Matrix } from "babylonjs/Maths/math.vector"; import { Vector2, Vector3, Vector4 } from "babylonjs/Maths/math.vector"; import { IAnimatable } from "babylonjs/Animations/animatable.interface"; import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture"; import { Texture } from "babylonjs/Materials/Textures/texture"; import { PushMaterial } from "babylonjs/Materials/pushMaterial"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { SubMesh } from "babylonjs/Meshes/subMesh"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; import { Color4 } from "babylonjs/Maths/math.color"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex"; /** * Class used to render Slider Thumb material with MRDL */ export class MRDLSliderThumbMaterial extends PushMaterial { /** * URL pointing to the texture used to define the coloring for the Iridescent Map effect. */ static BLUE_GRADIENT_TEXTURE_URL: string; private _blueGradientTexture; private _decalTexture; private _reflectionMapTexture; private _indirectEnvTexture; /** * Gets or sets the corner Radius on the slider thumb. */ radius: number; /** * Gets or sets the Bevel Front on the slider thumb. */ bevelFront: number; /** * Gets or sets the Bevel Front Stretch on the slider thumb. */ bevelFrontStretch: number; /** * Gets or sets the Bevel Back on the slider thumb. */ bevelBack: number; /** * Gets or sets the Bevel Back Stretch on the slider thumb. */ bevelBackStretch: number; /** * Gets or sets the top left Radii Multiplier. */ radiusTopLeft: number; /** * Gets or sets the top left Radii Multiplier. */ radiusTopRight: number; /** * Gets or sets the top left Radii Multiplier. */ radiusBottomLeft: number; /** * Gets or sets the top left Radii Multiplier. */ radiusBottomRight: number; /** * Gets or sets whether Bulge is enabled. * Default is false. */ bulgeEnabled: boolean; /** * Gets or sets the Bulge Height. */ bulgeHeight: number; /** * Gets or sets the Bulge Radius. */ bulgeRadius: number; /** * Gets or sets the Sun Intensity. */ sunIntensity: number; /** * Gets or sets the Sun Theta. */ sunTheta: number; /** * Gets or sets the Sun Phi. */ sunPhi: number; /** * Gets or sets the Indirect Diffuse. */ indirectDiffuse: number; /** * Gets or sets the base albedo. */ albedo: Color4; /** * Gets or sets the Specular value. */ specular: number; /** * Gets or sets the Shininess value. */ shininess: number; /** * Gets or sets the Sharpness value. */ sharpness: number; /** * Gets or sets the Subsurface value. */ subsurface: number; /** * Gets or sets the left gradient color. */ leftGradientColor: Color4; /** * Gets or sets the right gradient color. */ rightGradientColor: Color4; /** * Gets or sets the reflection value. */ reflection: number; /** * Gets or sets the front reflect value. */ frontReflect: number; /** * Gets or sets the edge reflect value. */ edgeReflect: number; /** * Gets or sets the power value. */ power: number; /** * Gets or sets the sky color. */ skyColor: Color4; /** * Gets or sets the horizon color. */ horizonColor: Color4; /** * Gets or sets the ground color. */ groundColor: Color4; /** * Gets or sets the horizon power value. */ horizonPower: number; /** * Gets or sets the finger occlusion width value. */ width: number; /** * Gets or sets the finger occlusion fuzz value. */ fuzz: number; /** * Gets or sets the minimum finger occlusion fuzz value. */ minFuzz: number; /** * Gets or sets the finger occlusion clip fade value. */ clipFade: number; /** * Gets or sets the hue shift value. */ hueShift: number; /** * Gets or sets the saturation shift value. */ saturationShift: number; /** * Gets or sets the value shift. */ valueShift: number; /** * Gets or sets the position of the hover glow effect. */ blobPosition: Vector3; /** * Gets or sets the intensity of the hover glow effect. */ blobIntensity: number; /** * Gets or sets the near size of the hover glow effect. */ blobNearSize: number; /** * Gets or sets the far size of the hover glow effect. */ blobFarSize: number; /** * Gets or sets the distance considered "near" to the mesh, which controls the size of the hover glow effect (see blobNearSize). */ blobNearDistance: number; /** * Gets or sets the distance considered "far" from the mesh, which controls the size of the hover glow effect (see blobFarSize). */ blobFarDistance: number; /** * Gets or sets the length of the hover glow effect fade. */ blobFadeLength: number; /** * Gets or sets the progress of the hover glow effect selection animation corresponding to the left pointer (0.0 - 1.0). */ blobPulse: number; /** * Gets or sets the opacity of the hover glow effect corresponding to the left pointer (0.0 - 1.0). Default is 0. */ blobFade: number; /** * Gets or sets the position of the hover glow effect. */ blobPosition2: Vector3; /** * Gets or sets the size of the hover glow effect when the right pointer is considered "near" to the mesh (see blobNearDistance). */ blobNearSize2: number; /** * Gets or sets the progress of the hover glow effect selection animation corresponding to the right pointer (0.0 - 1.0). */ blobPulse2: number; /** * Gets or sets the opacity of the hover glow effect corresponding to the right pointer (0.0 - 1.0). Default is 1. */ blobFade2: number; /** * Gets or sets the texture of the hover glow effect. */ blobTexture: Texture; /** * Gets or sets the finger position for left index. */ leftIndexPosition: Vector3; /** * Gets or sets the finger position for right index. */ rightIndexPosition: Vector3; /** * Gets or sets the finger position for left index middle position. */ leftIndexMiddlePosition: Vector3; /** * Gets or sets the finger position for right index middle position. */ rightIndexMiddlePosition: Vector3; /** * Gets or sets the Decal Scale for XY. */ decalScaleXY: Vector2; /** * Gets or sets decalFrontOnly * Default is true */ decalFrontOnly: boolean; /** * Gets or sets the Rim Light intensity. */ rimIntensity: number; /** * Gets or sets the Rim Light hue shift value. */ rimHueShift: number; /** * Gets or sets the Rim Light saturation shift value. */ rimSaturationShift: number; /** * Gets or sets the Rim Light value shift. */ rimValueShift: number; /** * Gets or sets the intensity of the iridescence effect. */ iridescenceIntensity: number; /** * @internal */ useGlobalLeftIndex: number; /** * @internal */ useGlobalRightIndex: number; /** * @internal */ globalLeftIndexTipProximity: number; /** * @internal */ globalRightIndexTipProximity: number; /** * @internal */ globalLeftIndexTipPosition: Vector4; /** * @internal */ globaRightIndexTipPosition: Vector4; /** * @internal */ globalLeftThumbTipPosition: Vector4; /** * @internal */ globalRightThumbTipPosition: Vector4; /** * @internal */ globalLeftIndexMiddlePosition: Vector4; /** * @internal */ globalRightIndexMiddlePosition: Vector4; constructor(name: string, scene?: Scene); needAlphaBlending(): boolean; needAlphaTesting(): boolean; getAlphaTestTexture(): Nullable; isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh): boolean; bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void; /** * Get the list of animatables in the material. * @returns the list of animatables object used in the material */ getAnimatables(): IAnimatable[]; dispose(forceDisposeEffect?: boolean): void; clone(name: string): MRDLSliderThumbMaterial; serialize(): any; getClassName(): string; static Parse(source: any, scene: Scene, rootUrl: string): MRDLSliderThumbMaterial; } } declare module "babylonjs-gui/3D/materials/mrdl/mrdlSliderBarMaterial" { import { Nullable } from "babylonjs/types"; import { Matrix } from "babylonjs/Maths/math.vector"; import { Vector2, Vector3, Vector4 } from "babylonjs/Maths/math.vector"; import { IAnimatable } from "babylonjs/Animations/animatable.interface"; import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture"; import { Texture } from "babylonjs/Materials/Textures/texture"; import { PushMaterial } from "babylonjs/Materials/pushMaterial"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { SubMesh } from "babylonjs/Meshes/subMesh"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; import { Color4 } from "babylonjs/Maths/math.color"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlSliderBar.fragment"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlSliderBar.vertex"; /** * Class used to render Slider Bar material with MRDL */ export class MRDLSliderBarMaterial extends PushMaterial { /** * URL pointing to the texture used to define the coloring for the Iridescent Map effect. */ static BLUE_GRADIENT_TEXTURE_URL: string; private _blueGradientTexture; private _decalTexture; private _reflectionMapTexture; private _indirectEnvTexture; /** * Gets or sets the corner Radius on the slider bar. */ radius: number; /** * Gets or sets the Bevel Front on the slider bar. */ bevelFront: number; /** * Gets or sets the Bevel Front Stretch on the slider bar. */ bevelFrontStretch: number; /** * Gets or sets the Bevel Back on the slider bar. */ bevelBack: number; /** * Gets or sets the Bevel Back Stretch on the slider bar. */ bevelBackStretch: number; /** * Gets or sets the top left Radii Multiplier. */ radiusTopLeft: number; /** * Gets or sets the top left Radii Multiplier. */ radiusTopRight: number; /** * Gets or sets the top left Radii Multiplier. */ radiusBottomLeft: number; /** * Gets or sets the top left Radii Multiplier. */ radiusBottomRight: number; /** * Gets or sets whether Bulge is enabled. * Default is false. */ bulgeEnabled: boolean; /** * Gets or sets the Bulge Height. */ bulgeHeight: number; /** * Gets or sets the Bulge Radius. */ bulgeRadius: number; /** * Gets or sets the Sun Intensity. */ sunIntensity: number; /** * Gets or sets the Sun Theta. */ sunTheta: number; /** * Gets or sets the Sun Phi. */ sunPhi: number; /** * Gets or sets the Indirect Diffuse. */ indirectDiffuse: number; /** * Gets or sets the base albedo. */ albedo: Color4; /** * Gets or sets the Specular value. */ specular: number; /** * Gets or sets the Shininess value. */ shininess: number; /** * Gets or sets the Sharpness value. */ sharpness: number; /** * Gets or sets the Subsurface value. */ subsurface: number; /** * Gets or sets the left gradient color. */ leftGradientColor: Color4; /** * Gets or sets the right gradient color. */ rightGradientColor: Color4; /** * Gets or sets the reflection value. */ reflection: number; /** * Gets or sets the front reflect value. */ frontReflect: number; /** * Gets or sets the edge reflect value. */ edgeReflect: number; /** * Gets or sets the power value. */ power: number; /** * Gets or sets the sky color. */ skyColor: Color4; /** * Gets or sets the horizon color. */ horizonColor: Color4; /** * Gets or sets the ground color. */ groundColor: Color4; /** * Gets or sets the horizon power value. */ horizonPower: number; /** * Gets or sets the finger occlusion width value. */ width: number; /** * Gets or sets the finger occlusion fuzz value. */ fuzz: number; /** * Gets or sets the minimum finger occlusion fuzz value. */ minFuzz: number; /** * Gets or sets the finger occlusion clip fade value. */ clipFade: number; /** * Gets or sets the hue shift value. */ hueShift: number; /** * Gets or sets the saturation shift value. */ saturationShift: number; /** * Gets or sets the value shift. */ valueShift: number; /** * Gets or sets the position of the hover glow effect. */ blobPosition: Vector3; /** * Gets or sets the intensity of the hover glow effect. */ blobIntensity: number; /** * Gets or sets the near size of the hover glow effect. */ blobNearSize: number; /** * Gets or sets the far size of the hover glow effect. */ blobFarSize: number; /** * Gets or sets the distance considered "near" to the mesh, which controls the size of the hover glow effect (see blobNearSize). */ blobNearDistance: number; /** * Gets or sets the distance considered "far" from the mesh, which controls the size of the hover glow effect (see blobFarSize). */ blobFarDistance: number; /** * Gets or sets the length of the hover glow effect fade. */ blobFadeLength: number; /** * Gets or sets the progress of the hover glow effect selection animation corresponding to the left pointer (0.0 - 1.0). */ blobPulse: number; /** * Gets or sets the opacity of the hover glow effect corresponding to the left pointer (0.0 - 1.0). Default is 0. */ blobFade: number; /** * Gets or sets the position of the hover glow effect. */ blobPosition2: Vector3; /** * Gets or sets the size of the hover glow effect when the right pointer is considered "near" to the mesh (see blobNearDistance). */ blobNearSize2: number; /** * Gets or sets the progress of the hover glow effect selection animation corresponding to the right pointer (0.0 - 1.0). */ blobPulse2: number; /** * Gets or sets the opacity of the hover glow effect corresponding to the right pointer (0.0 - 1.0). Default is 1. */ blobFade2: number; /** * Gets or sets the texture of the hover glow effect. */ blobTexture: Texture; /** * Gets or sets the finger position for left index. */ leftIndexPosition: Vector3; /** * Gets or sets the finger position for right index. */ rightIndexPosition: Vector3; /** * Gets or sets the finger position for left index middle position. */ leftIndexMiddlePosition: Vector3; /** * Gets or sets the finger position for right index middle position. */ rightIndexMiddlePosition: Vector3; /** * Gets or sets the Decal Scle for XY. */ decalScaleXY: Vector2; /** * Gets or sets decalFrontOnly * Default is true */ decalFrontOnly: boolean; /** * Gets or sets the Rim Light intensity. */ rimIntensity: number; /** * Gets or sets the Rim Light hue shift value. */ rimHueShift: number; /** * Gets or sets the Rim Light saturation shift value. */ rimSaturationShift: number; /** * Gets or sets the Rim Light value shift. */ rimValueShift: number; /** * Gets or sets the intensity of the iridescence effect. */ iridescenceIntensity: number; /** * @internal */ useGlobalLeftIndex: number; /** * @internal */ useGlobalRightIndex: number; /** * @internal */ globalLeftIndexTipProximity: number; /** * @internal */ globalRightIndexTipProximity: number; /** * @internal */ globalLeftIndexTipPosition: Vector4; /** * @internal */ globaRightIndexTipPosition: Vector4; /** * @internal */ globalLeftThumbTipPosition: Vector4; /** * @internal */ globalRightThumbTipPosition: Vector4; /** * @internal */ globalLeftIndexMiddlePosition: Vector4; /** * @internal */ globalRightIndexMiddlePosition: Vector4; constructor(name: string, scene?: Scene); needAlphaBlending(): boolean; needAlphaTesting(): boolean; getAlphaTestTexture(): Nullable; isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh): boolean; bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void; /** * Get the list of animatables in the material. * @returns the list of animatables object used in the material */ getAnimatables(): IAnimatable[]; dispose(forceDisposeEffect?: boolean): void; clone(name: string): MRDLSliderBarMaterial; serialize(): any; getClassName(): string; static Parse(source: any, scene: Scene, rootUrl: string): MRDLSliderBarMaterial; } } declare module "babylonjs-gui/3D/materials/mrdl/mrdlInnerquadMaterial" { import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture"; import { IAnimatable } from "babylonjs/Animations/animatable.interface"; import { Matrix } from "babylonjs/Maths/math.vector"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Nullable } from "babylonjs/types"; import { Scene } from "babylonjs/scene"; import { SubMesh } from "babylonjs/Meshes/subMesh"; import { Color4 } from "babylonjs/Maths/math.color"; import { PushMaterial } from "babylonjs/Materials/pushMaterial"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlInnerquad.fragment"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlInnerquad.vertex"; export class MRDLInnerquadMaterial extends PushMaterial { /** * Gets or sets the color of the innerquad. */ color: Color4; /** * Gets or sets the corner radius on the innerquad. If this value is changed, update the lineWidth to match. */ radius: number; /** * Gets or sets whether the radius of the innerquad should be fixed. */ fixedRadius: boolean; /** @hidden */ _filterWidth: number; /** * Gets or sets the glow fraction of the innerquad. */ glowFraction: number; /** * Gets or sets the maximum glow intensity of the innerquad. */ glowMax: number; /** * Gets or sets the glow falloff effect of the innerquad. */ glowFalloff: number; constructor(name: string, scene: Scene); needAlphaBlending(): boolean; needAlphaTesting(): boolean; getAlphaTestTexture(): Nullable; isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh): boolean; bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void; /** * Get the list of animatables in the material. * @returns the list of animatables object used in the material */ getAnimatables(): IAnimatable[]; dispose(forceDisposeEffect?: boolean): void; clone(name: string): MRDLInnerquadMaterial; serialize(): unknown; getClassName(): string; static Parse(source: any, scene: Scene, rootUrl: string): MRDLInnerquadMaterial; } } declare module "babylonjs-gui/3D/materials/mrdl/mrdlFrontplateMaterial" { import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture"; import { IAnimatable } from "babylonjs/Animations/animatable.interface"; import { Matrix } from "babylonjs/Maths/math.vector"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Nullable } from "babylonjs/types"; import { Scene } from "babylonjs/scene"; import { SubMesh } from "babylonjs/Meshes/subMesh"; import { Color4 } from "babylonjs/Maths/math.color"; import { PushMaterial } from "babylonjs/Materials/pushMaterial"; import { Vector3 } from "babylonjs/Maths/math.vector"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlFrontplate.fragment"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlFrontplate.vertex"; export class MRDLFrontplateMaterial extends PushMaterial { /** * Gets or sets the corner radius on the frontplate. If this value is changed, update the lineWidth to match. */ radius: number; /** * Gets or sets the line width of the frontplate. */ lineWidth: number; /** * Gets or sets whether the scale is relative to the frontplate height. */ relativeToHeight: boolean; /** @hidden */ _filterWidth: number; /** * Gets or sets the edge color of the frontplate. */ edgeColor: Color4; /** * Gets or sets whether to enable blob effects on the frontplate. */ blobEnable: boolean; /** * Gets or sets the blob position on the frontplate. */ blobPosition: Vector3; /** * Gets or sets the blob intensity of the frontplate. */ blobIntensity: number; /** * Gets or sets the blob near size of the frontplate. */ blobNearSize: number; /** * Gets or sets the blob far size of the frontplate. */ blobFarSize: number; /** * Gets or sets the blob near distance of the frontplate. */ blobNearDistance: number; /** * Gets or sets the blob far distance of the frontplate. */ blobFarDistance: number; /** * Gets or sets the blob fade length of the frontplate. */ blobFadeLength: number; /** * Gets or sets the blob inner fade of the frontplate. */ blobInnerFade: number; /** * Gets or sets the blob pulse of the frontplate. */ blobPulse: number; /** * Gets or sets the blob fade effect on the frontplate. */ blobFade: number; /** * Gets or sets the maximum size of the blob pulse on the frontplate. */ blobPulseMaxSize: number; /** * Gets or sets whether to enable extra blob effects of the frontplate. */ blobEnable2: boolean; /** * Gets or sets blob2 position of the frontplate. */ blobPosition2: Vector3; /** * Gets or sets the blob2 near size of the frontplate. */ blobNearSize2: number; /** * Gets or sets the blob2 inner fade of the frontplate. */ blobInnerFade2: number; /** * Gets or sets the blob2 pulse of the frontplate. */ blobPulse2: number; /** * Gets or sets the blob2 fade effect on the frontplate. */ blobFade2: number; /** * Gets or sets the gaze intensity of the frontplate. */ gazeIntensity: number; /** * Gets or sets the gaze focus of the frontplate. */ gazeFocus: number; /** * Gets or sets the selection fuzz of the frontplate. */ selectionFuzz: number; /** * Gets or sets the fade intensity of the frontplate. */ selected: number; /** * Gets or sets the selection fade intensity of the frontplate. */ selectionFade: number; /** * Gets or sets the selection fade size of the frontplate. */ selectionFadeSize: number; /** * Gets or sets the selected distance of the frontplate. */ selectedDistance: number; /** * Gets or sets the selected fade length of the frontplate. */ selectedFadeLength: number; /** * Gets or sets the proximity maximum intensity of the frontplate. */ proximityMaxIntensity: number; /** * Gets or sets the proximity far distance of the frontplate. */ proximityFarDistance: number; /** * Gets or sets the proximity near radius of the frontplate. */ proximityNearRadius: number; /** * Gets or sets the proximity anisotropy of the frontplate. */ proximityAnisotropy: number; /** * Gets or sets whether to use global left index on the frontplate. */ useGlobalLeftIndex: boolean; /** * Gets or sets whether to use global right index of the frontplate. */ useGlobalRightIndex: boolean; /** * URL pointing to the texture used to define the coloring for the BLOB. */ static BLOB_TEXTURE_URL: string; /** * Gets or sets the opacity of the frontplate (0.0 - 1.0). */ fadeOut: number; private _blobTexture; constructor(name: string, scene: Scene); needAlphaBlending(): boolean; needAlphaTesting(): boolean; getAlphaTestTexture(): Nullable; isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh): boolean; bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void; /** * Get the list of animatables in the material. * @returns the list of animatables object used in the material */ getAnimatables(): IAnimatable[]; dispose(forceDisposeEffect?: boolean): void; clone(name: string): MRDLFrontplateMaterial; serialize(): unknown; getClassName(): string; static Parse(source: any, scene: Scene, rootUrl: string): MRDLFrontplateMaterial; } } declare module "babylonjs-gui/3D/materials/mrdl/mrdlBackplateMaterial" { import { Nullable } from "babylonjs/types"; import { Matrix } from "babylonjs/Maths/math.vector"; import { Vector4 } from "babylonjs/Maths/math.vector"; import { IAnimatable } from "babylonjs/Animations/animatable.interface"; import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture"; import { PushMaterial } from "babylonjs/Materials/pushMaterial"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { SubMesh } from "babylonjs/Meshes/subMesh"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; import { Color4 } from "babylonjs/Maths/math.color"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlBackplate.fragment"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlBackplate.vertex"; /** * Class used to render backplate material with MRDL */ export class MRDLBackplateMaterial extends PushMaterial { /** * URL pointing to the texture used to define the coloring for the Iridescent Map effect. */ static IRIDESCENT_MAP_TEXTURE_URL: string; private _iridescentMapTexture; /** * Gets or sets the corner radius on the backplate. If this value is changed, update the lineWidth to match. */ radius: number; /** * Gets or sets the line width of the backplate. */ lineWidth: number; /** * Gets or sets whether to use absolute sizes when calculating effects on the backplate. * Since desktop and VR/AR have different relative sizes, it's usually best to keep this false. */ absoluteSizes: boolean; /** @internal */ _filterWidth: number; /** * Gets or sets the base color of the backplate. */ baseColor: Color4; /** * Gets or sets the line color of the backplate. */ lineColor: Color4; /** * Gets or sets the top left Radii Multiplier. */ radiusTopLeft: number; /** * Gets or sets the top left Radii Multiplier. */ radiusTopRight: number; /** * Gets or sets the top left Radii Multiplier. */ radiusBottomLeft: number; /** * Gets or sets the top left Radii Multiplier. */ radiusBottomRight: number; /** @internal */ _rate: number; /** * Gets or sets the color of the highlights on the backplate line. */ highlightColor: Color4; /** * Gets or sets the width of the highlights on the backplate line. */ highlightWidth: number; /** @internal */ _highlightTransform: Vector4; /** @internal */ _highlight: number; /** * Gets or sets the intensity of the iridescence effect. */ iridescenceIntensity: number; /** * Gets or sets the intensity of the iridescence effect on the backplate edges. */ iridescenceEdgeIntensity: number; /** * Gets or sets the Tint of the iridescence effect on the backplate. */ iridescenceTint: Color4; /** @internal */ _angle: number; /** * Gets or sets the opacity of the backplate (0.0 - 1.0). */ fadeOut: number; /** @internal */ _reflected: boolean; /** @internal */ _frequency: number; /** @internal */ _verticalOffset: number; /** * Gets or sets the gradient color effect on the backplate. */ gradientColor: Color4; /** * Gets or sets the top left gradient color effect on the backplate. */ topLeftGradientColor: Color4; /** * Gets or sets the top right gradient color effect on the backplate. */ topRightGradientColor: Color4; /** * Gets or sets the bottom left gradient color effect on the backplate. */ bottomLeftGradientColor: Color4; /** * Gets or sets the bottom right gradient color effect on the backplate. */ bottomRightGradientColor: Color4; /** * Gets or sets the edge width of the backplate. */ edgeWidth: number; /** * Gets or sets the edge width of the backplate. */ edgePower: number; /** * Gets or sets the edge width of the backplate. */ edgeLineGradientBlend: number; constructor(name: string, scene?: Scene); needAlphaBlending(): boolean; needAlphaTesting(): boolean; getAlphaTestTexture(): Nullable; isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh): boolean; bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void; /** * Get the list of animatables in the material. * @returns the list of animatables object used in the material */ getAnimatables(): IAnimatable[]; dispose(forceDisposeEffect?: boolean): void; clone(name: string): MRDLBackplateMaterial; serialize(): any; getClassName(): string; static Parse(source: any, scene: Scene, rootUrl: string): MRDLBackplateMaterial; } } declare module "babylonjs-gui/3D/materials/mrdl/mrdlBackglowMaterial" { import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture"; import { IAnimatable } from "babylonjs/Animations/animatable.interface"; import { Matrix } from "babylonjs/Maths/math.vector"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Nullable } from "babylonjs/types"; import { Scene } from "babylonjs/scene"; import { SubMesh } from "babylonjs/Meshes/subMesh"; import { Color4 } from "babylonjs/Maths/math.color"; import { PushMaterial } from "babylonjs/Materials/pushMaterial"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlBackglow.fragment"; import "babylonjs-gui/3D/materials/mrdl/shaders/mrdlBackglow.vertex"; export class MRDLBackglowMaterial extends PushMaterial { /** * Gets or sets the bevel radius on the backglow. If this value is changed, update the lineWidth to match. */ bevelRadius: number; /** * Gets or sets the line width of the backglow. */ lineWidth: number; /** * Gets or sets whether to use absolute sizes when calculating effects on the backglow. * Since desktop and VR/AR have different relative sizes, it's usually best to keep this false. */ absoluteSizes: boolean; /** * Gets or sets the tuning motion of the backglow. */ tuningMotion: number; /** * Gets or sets the motion of the backglow. */ motion: number; /** * Gets or sets the maximum intensity of the backglow. */ maxIntensity: number; /** * Gets or sets the fade-in exponent of the intensity of the backglow. */ intensityFadeInExponent: number; /** * Gets or sets the start of the outer fuzz effect on the backglow. */ outerFuzzStart: number; /** * Gets or sets the end of the outer fuzz effect on the backglow. */ outerFuzzEnd: number; /** * Gets or sets the color of the backglow. */ color: Color4; /** * Gets or sets the inner color of the backglow. */ innerColor: Color4; /** * Gets or sets the blend exponent of the backglow. */ blendExponent: number; /** * Gets or sets the falloff of the backglow. */ falloff: number; /** * Gets or sets the bias of the backglow. */ bias: number; constructor(name: string, scene: Scene); needAlphaBlending(): boolean; needAlphaTesting(): boolean; getAlphaTestTexture(): Nullable; isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh): boolean; bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void; /** * Get the list of animatables in the material. * @returns the list of animatables object used in the material */ getAnimatables(): IAnimatable[]; dispose(forceDisposeEffect?: boolean): void; clone(name: string): MRDLBackglowMaterial; serialize(): unknown; getClassName(): string; static Parse(source: any, scene: Scene, rootUrl: string): MRDLBackglowMaterial; } } declare module "babylonjs-gui/3D/materials/mrdl/index" { export * from "babylonjs-gui/3D/materials/mrdl/mrdlSliderBarMaterial"; export * from "babylonjs-gui/3D/materials/mrdl/mrdlSliderThumbMaterial"; export * from "babylonjs-gui/3D/materials/mrdl/mrdlBackplateMaterial"; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex" { /** @internal */ export const mrdlSliderThumbVertexShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment" { /** @internal */ export const mrdlSliderThumbPixelShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlSliderBar.vertex" { /** @internal */ export const mrdlSliderBarVertexShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlSliderBar.fragment" { /** @internal */ export const mrdlSliderBarPixelShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlInnerquad.vertex" { /** @internal */ export const mrdlInnerquadVertexShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlInnerquad.fragment" { /** @internal */ export const mrdlInnerquadPixelShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlFrontplate.vertex" { /** @internal */ export const mrdlFrontplateVertexShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlFrontplate.fragment" { /** @internal */ export const mrdlFrontplatePixelShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlBackplate.vertex" { /** @internal */ export const mrdlBackplateVertexShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlBackplate.fragment" { /** @internal */ export const mrdlBackplatePixelShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlBackglow.vertex" { /** @internal */ export const mrdlBackglowVertexShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/mrdl/shaders/mrdlBackglow.fragment" { /** @internal */ export const mrdlBackglowPixelShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/handle/index" { export * from "babylonjs-gui/3D/materials/handle/handleMaterial"; } declare module "babylonjs-gui/3D/materials/handle/handleMaterial" { import { ShaderMaterial } from "babylonjs/Materials/shaderMaterial"; import { Scene } from "babylonjs/scene"; import { Color3 } from "babylonjs/Maths/math.color"; import { Vector3 } from "babylonjs/Maths/math.vector"; import "babylonjs-gui/3D/materials/handle/shaders/handle.vertex"; import "babylonjs-gui/3D/materials/handle/shaders/handle.fragment"; /** * Class used to render gizmo handles with fluent design */ export class HandleMaterial extends ShaderMaterial { private _hover; private _drag; private _onBeforeRender; private _color; private _scale; private _targetColor; private _targetScale; private _lastTick; /** * Is the material indicating hovering state */ get hover(): boolean; set hover(b: boolean); /** * Is the material indicating drag state */ get drag(): boolean; set drag(b: boolean); /** * Length of animation */ animationLength: number; /** * Color of the handle when hovered */ hoverColor: Color3; /** * Color of the handle when idle */ baseColor: Color3; /** * Scale of the handle when hovered */ hoverScale: number; /** * Scale of the handle when idle */ baseScale: number; /** * Scale of the handle when dragged */ dragScale: number; /** * @internal */ _positionOffset: Vector3; /** * Creates a handle material * @param name Name of the material * @param scene Scene */ constructor(name: string, scene: Scene); private _updateInterpolationTarget; /** * Disposes the handle material */ dispose(): void; } } declare module "babylonjs-gui/3D/materials/handle/shaders/handle.vertex" { /** @internal */ export const handleVertexShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/handle/shaders/handle.fragment" { /** @internal */ export const handlePixelShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/fluentButton/index" { export * from "babylonjs-gui/3D/materials/fluentButton/fluentButtonMaterial"; } declare module "babylonjs-gui/3D/materials/fluentButton/fluentButtonMaterial" { import { Nullable } from "babylonjs/types"; import { Matrix } from "babylonjs/Maths/math.vector"; import { Vector3 } from "babylonjs/Maths/math.vector"; import { IAnimatable } from "babylonjs/Animations/animatable.interface"; import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture"; import { PushMaterial } from "babylonjs/Materials/pushMaterial"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { SubMesh } from "babylonjs/Meshes/subMesh"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; import { Color4 } from "babylonjs/Maths/math.color"; import "babylonjs-gui/3D/materials/fluentButton/shaders/fluentButton.fragment"; import "babylonjs-gui/3D/materials/fluentButton/shaders/fluentButton.vertex"; /** * Class used to render square buttons with fluent design * @since 5.0.0 */ export class FluentButtonMaterial extends PushMaterial { /** * URL pointing to the texture used to define the coloring for the fluent blob effect. */ static BLOB_TEXTURE_URL: string; /** * Gets or sets the width of the glowing edge, relative to the scale of the button. * (Default is 4% of the height). */ edgeWidth: number; /** * Gets or sets the color of the glowing edge. */ edgeColor: Color4; /** * Gets or sets the maximum intensity of the proximity light. */ proximityMaxIntensity: number; /** * Gets or sets the maximum distance for the proximity light (Default is 16mm). */ proximityFarDistance: number; /** * Gets or sets the radius of the proximity light when near to the surface. */ proximityNearRadius: number; /** * Gets or sets the anisotropy of the proximity light. */ proximityAnisotropy: number; /** * Gets or sets the amount of fuzzing in the selection focus. */ selectionFuzz: number; /** * Gets or sets an override value to display the button as selected. */ selected: number; /** * Gets or sets a value to manually fade the blob size. */ selectionFade: number; /** * Gets or sets a value to manually shrink the blob size as it fades (see selectionFade). */ selectionFadeSize: number; /** * Gets or sets the distance from the button the cursor should be for the button * to appear selected (Default is 8cm). */ selectedDistance: number; /** * Gets or sets the fall-off distance for the selection fade (Default is 8cm). */ selectedFadeLength: number; /** * Gets or sets the intensity of the luminous blob (Ranges 0-1, default is 0.5). */ blobIntensity: number; /** * The size of the blob when the pointer is at the blobFarDistance (Default is 5cm). */ blobFarSize: number; /** * The distance at which the pointer is considered near. See [left|right]BlobNearSize. (Default is 0cm). */ blobNearDistance: number; /** * The distance at which the pointer is considered far. See [left|right]BlobFarSize. (Default is 8cm). */ blobFarDistance: number; /** * The distance over which the blob intensity fades from full to none (Default is 8cm). */ blobFadeLength: number; /** * Gets or sets whether the blob corresponding to the left index finger is enabled. */ leftBlobEnable: boolean; /** * Gets or sets the size of the left blob when the left pointer is considered near. See blobNearDistance. (Default is 2.5cm). */ leftBlobNearSize: number; /** * Gets or sets the progress of the pulse animation on the left blob (Ranges 0-1). */ leftBlobPulse: number; /** * Gets or sets the fade factor on the left blob. */ leftBlobFade: number; /** * Gets or sets the inner fade on the left blob; */ leftBlobInnerFade: number; /** * Gets or sets whether the blob corresponding to the right index finger is enabled. */ rightBlobEnable: boolean; /** * Gets or sets the size of the right blob when the right pointer is considered near. See blobNearDistance. (Default is 2.5cm). */ rightBlobNearSize: number; /** * Gets or sets the progress of the pulse animation on the right blob (Ranges 0-1). */ rightBlobPulse: number; /** * Gets or sets the fade factor on the right blob. */ rightBlobFade: number; /** * Gets or sets the inner fade on the right blob; */ rightBlobInnerFade: number; /** * Gets or sets the direction of the active face before the world transform is applied. * This should almost always be set to -z. */ activeFaceDir: Vector3; /** * Gets or sets the button's up direction before the world transform is applied. * This should almost always be set to +y. */ activeFaceUp: Vector3; /** * Gets or sets whether the edge fade effect is enabled. */ enableFade: boolean; /** * Gets or sets a value corresponding to the width of the edge fade effect (Default 1.5). */ fadeWidth: number; /** * Gets or sets whether the active face is smoothly interpolated. */ smoothActiveFace: boolean; /** * Gets or sets whether the frame of the fluent button model is visible. * This is usually only enabled for debugging purposes. */ showFrame: boolean; /** * Gets or sets whether the blob color texture is used for the proximity * light effect. This is usually only disabled for debugging purposes. */ useBlobTexture: boolean; /** * Gets or sets the world-space position of the tip of the left index finger. */ globalLeftIndexTipPosition: Vector3; /** * Gets or sets the world-space position of the tip of the right index finger. */ globalRightIndexTipPosition: Vector3; private _blobTexture; constructor(name: string, scene?: Scene); needAlphaBlending(): boolean; needAlphaTesting(): boolean; getAlphaTestTexture(): Nullable; isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh): boolean; bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void; /** * Get the list of animatables in the material. * @returns the list of animatables object used in the material */ getAnimatables(): IAnimatable[]; dispose(forceDisposeEffect?: boolean): void; clone(name: string): FluentButtonMaterial; serialize(): any; getClassName(): string; static Parse(source: any, scene: Scene, rootUrl: string): FluentButtonMaterial; } } declare module "babylonjs-gui/3D/materials/fluentButton/shaders/fluentButton.vertex" { /** @internal */ export const fluentButtonVertexShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/fluentButton/shaders/fluentButton.fragment" { /** @internal */ export const fluentButtonPixelShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/fluentBackplate/index" { export * from "babylonjs-gui/3D/materials/fluentBackplate/fluentBackplateMaterial"; } declare module "babylonjs-gui/3D/materials/fluentBackplate/fluentBackplateMaterial" { import { Nullable } from "babylonjs/types"; import { Matrix } from "babylonjs/Maths/math.vector"; import { Vector3, Vector4 } from "babylonjs/Maths/math.vector"; import { IAnimatable } from "babylonjs/Animations/animatable.interface"; import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture"; import { PushMaterial } from "babylonjs/Materials/pushMaterial"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { SubMesh } from "babylonjs/Meshes/subMesh"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; import { Color4 } from "babylonjs/Maths/math.color"; import "babylonjs-gui/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment"; import "babylonjs-gui/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex"; /** * Class used to render square buttons with fluent design */ export class FluentBackplateMaterial extends PushMaterial { /** * URL pointing to the texture used to define the coloring for the fluent blob effect. */ static BLOB_TEXTURE_URL: string; /** * URL pointing to the texture used to define iridescent map. */ static IM_TEXTURE_URL: string; private _blobTexture; private _iridescentMap; /** * Gets or sets the corner radius on the backplate. Best to keep this value between 0.01 and 0.5. Default is 0.03. */ radius: number; /** * Gets or sets the line width of the backplate. */ lineWidth: number; /** * Gets or sets whether to use absolute sizes when calculating effects on the backplate. * Since desktop and VR/AR have different relative sizes, it's usually best to keep this false. */ absoluteSizes: boolean; /** @internal */ _filterWidth: number; /** * Gets or sets the base color of the backplate. */ baseColor: Color4; /** * Gets or sets the line color of the backplate. */ lineColor: Color4; /** * Gets or sets the intensity of the fluent hover glow effect. */ blobIntensity: number; /** * Gets or sets the far size of the fluent hover glow effect. */ blobFarSize: number; /** * Gets or sets the distance considered "near" to the backplate, which controls the size of the fluent hover glow effect (see blobNearSize). */ blobNearDistance: number; /** * Gets or sets the distance considered "far" from the backplate, which controls the size of the fluent hover glow effect (see blobFarSize). */ blobFarDistance: number; /** * Gets or sets the length of the fluent hover glow effect fade. */ blobFadeLength: number; /** * Gets or sets the size of the fluent hover glow effect when the left pointer is considered "near" to the backplate (see blobNearDistance). */ blobNearSize: number; /** * Gets or sets the progress of the fluent hover glow effect selection animation corresponding to the left pointer (0.0 - 1.0). */ blobPulse: number; /** * Gets or sets the opacity of the fluent hover glow effect corresponding to the left pointer (0.0 - 1.0). Default is 0. */ blobFade: number; /** * Gets or sets the size of the fluent hover glow effect when the right pointer is considered "near" to the backplate (see blobNearDistance). */ blobNearSize2: number; /** * Gets or sets the progress of the fluent hover glow effect selection animation corresponding to the right pointer (0.0 - 1.0). */ blobPulse2: number; /** * Gets or sets the opacity of the fluent hover glow effect corresponding to the right pointer (0.0 - 1.0). Default is 0. */ blobFade2: number; /** @internal */ _rate: number; /** * Gets or sets the color of the highlights on the backplate line. */ highlightColor: Color4; /** * Gets or sets the width of the highlights on the backplate line. */ highlightWidth: number; /** @internal */ _highlightTransform: Vector4; /** @internal */ _highlight: number; /** * Gets or sets the intensity of the iridescence effect. */ iridescenceIntensity: number; /** * Gets or sets the intensity of the iridescence effect on the backplate edges. */ iridescenceEdgeIntensity: number; /** @internal */ _angle: number; /** * Gets or sets the opacity of the backplate (0.0 - 1.0). */ fadeOut: number; /** @internal */ _reflected: boolean; /** @internal */ _frequency: number; /** @internal */ _verticalOffset: number; /** * Gets or sets the world-space position of the tip of the left index finger. */ globalLeftIndexTipPosition: Vector3; private _globalLeftIndexTipPosition4; /** * Gets or sets the world-space position of the tip of the right index finger. */ globalRightIndexTipPosition: Vector3; private _globalRightIndexTipPosition4; constructor(name: string, scene?: Scene); needAlphaBlending(): boolean; needAlphaTesting(): boolean; getAlphaTestTexture(): Nullable; isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh): boolean; bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void; /** * Get the list of animatables in the material. * @returns the list of animatables object used in the material */ getAnimatables(): IAnimatable[]; dispose(forceDisposeEffect?: boolean): void; clone(name: string): FluentBackplateMaterial; serialize(): any; getClassName(): string; static Parse(source: any, scene: Scene, rootUrl: string): FluentBackplateMaterial; } } declare module "babylonjs-gui/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex" { /** @internal */ export const fluentBackplateVertexShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment" { /** @internal */ export const fluentBackplatePixelShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/fluent/index" { export * from "babylonjs-gui/3D/materials/fluent/fluentMaterial"; } declare module "babylonjs-gui/3D/materials/fluent/fluentMaterial" { import { Nullable } from "babylonjs/types"; import { Matrix } from "babylonjs/Maths/math.vector"; import { Vector3 } from "babylonjs/Maths/math.vector"; import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture"; import { MaterialDefines } from "babylonjs/Materials/materialDefines"; import { PushMaterial } from "babylonjs/Materials/pushMaterial"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { SubMesh } from "babylonjs/Meshes/subMesh"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; import { Color3, Color4 } from "babylonjs/Maths/math.color"; import "babylonjs-gui/3D/materials/fluent/shaders/fluent.vertex"; import "babylonjs-gui/3D/materials/fluent/shaders/fluent.fragment"; /** @internal */ export class FluentMaterialDefines extends MaterialDefines { INNERGLOW: boolean; BORDER: boolean; HOVERLIGHT: boolean; TEXTURE: boolean; constructor(); } /** * Class used to render controls with fluent design */ export class FluentMaterial extends PushMaterial { /** * Gets or sets inner glow intensity. A value of 0 means no glow (default is 0.5) */ innerGlowColorIntensity: number; /** * Gets or sets the inner glow color (white by default) */ innerGlowColor: Color3; /** * Gets or sets the albedo color (Default is Color3(0.3, 0.35, 0.4)) */ albedoColor: Color3; /** * Gets or sets a boolean indicating if borders must be rendered (default is false) */ renderBorders: boolean; /** * Gets or sets border width (default is 0.5) */ borderWidth: number; /** * Gets or sets a value indicating the smoothing value applied to border edges (0.02 by default) */ edgeSmoothingValue: number; /** * Gets or sets the minimum value that can be applied to border width (default is 0.1) */ borderMinValue: number; /** * Gets or sets a boolean indicating if hover light must be rendered (default is false) */ renderHoverLight: boolean; /** * Gets or sets the radius used to render the hover light (default is 0.01) */ hoverRadius: number; /** * Gets or sets the color used to render the hover light (default is Color4(0.3, 0.3, 0.3, 1.0)) */ hoverColor: Color4; /** * Gets or sets the hover light position in world space (default is Vector3.Zero()) */ hoverPosition: Vector3; private _albedoTexture; /** Gets or sets the texture to use for albedo color */ albedoTexture: Nullable; /** * Creates a new Fluent material * @param name defines the name of the material * @param scene defines the hosting scene */ constructor(name: string, scene?: Scene); needAlphaBlending(): boolean; needAlphaTesting(): boolean; getAlphaTestTexture(): Nullable; isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh): boolean; bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void; getActiveTextures(): BaseTexture[]; hasTexture(texture: BaseTexture): boolean; dispose(forceDisposeEffect?: boolean): void; clone(name: string): FluentMaterial; serialize(): any; getClassName(): string; static Parse(source: any, scene: Scene, rootUrl: string): FluentMaterial; } } declare module "babylonjs-gui/3D/materials/fluent/shaders/fluent.vertex" { /** @internal */ export const fluentVertexShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/materials/fluent/shaders/fluent.fragment" { /** @internal */ export const fluentPixelShader: { name: string; shader: string; }; } declare module "babylonjs-gui/3D/gizmos/slateGizmo" { import { Gizmo } from "babylonjs/Gizmos/gizmo"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { UtilityLayerRenderer } from "babylonjs/Rendering/utilityLayerRenderer"; import { Nullable } from "babylonjs/types"; import { HolographicSlate } from "babylonjs-gui/3D/controls/holographicSlate"; /** * Gizmo to resize 2D slates */ export class SlateGizmo extends Gizmo { private _boundingDimensions; private _pickedPointObserver; private _renderObserver; private _tmpQuaternion; private _tmpVector; private _corners; private _sides; private _handlesParent; private _handleHovered; private _handleDragged; private _boundingBoxGizmo; /** * Value we use to offset handles from mesh */ private _margin; private _handleSize; private _attachedSlate; private _existingSlateScale; /** * If set, the handles will increase in size based on the distance away from the camera to have a consistent screen size (Default: true) */ fixedScreenSize: boolean; /** * The distance away from the object which the draggable meshes should appear world sized when fixedScreenSize is set to true (default: 10) */ fixedScreenSizeDistanceFactor: number; /** * The slate attached to this gizmo */ set attachedSlate(control: Nullable); get attachedSlate(): Nullable; constructor(utilityLayer?: UtilityLayerRenderer); private _createNode; private _keepAspectRatio; private _clampDimensions; private _moveHandle; private _assignDragBehaviorCorners; private _assignDragBehaviorSides; protected _attachedNodeChanged(value: Nullable): void; /** * Updates the bounding box information for the gizmo */ updateBoundingBox(): void; private _updateHandlesPosition; private _updateHandlesScaling; protected _update(): void; dispose(): void; } } declare module "babylonjs-gui/3D/gizmos/index" { export * from "babylonjs-gui/3D/gizmos/slateGizmo"; export * from "babylonjs-gui/3D/gizmos/gizmoHandle"; } declare module "babylonjs-gui/3D/gizmos/gizmoHandle" { import { Scene } from "babylonjs/scene"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Vector3 } from "babylonjs/Maths/math.vector"; import { HandleMaterial } from "babylonjs-gui/3D/materials/handle/handleMaterial"; import { SlateGizmo } from "babylonjs-gui/3D/gizmos/slateGizmo"; import { BaseSixDofDragBehavior } from "babylonjs/Behaviors/Meshes/baseSixDofDragBehavior"; /** * State of the handle regarding user interaction */ export enum HandleState { /** * Handle is idle */ IDLE = 0, /** * Handle is hovered */ HOVER = 1, /** * Handle is dragged */ DRAG = 2 } /** * Base class for SlateGizmo handles */ export abstract class GizmoHandle { protected _scene: Scene; protected _state: HandleState; protected _materials: HandleMaterial[]; private _dragStartObserver; private _draggingObserver; private _dragEndObserver; /** * @internal */ _dragBehavior: BaseSixDofDragBehavior; /** * The current state of the handle */ get state(): HandleState; private _gizmo; /** * Returns the gizmo carrying this handle */ get gizmo(): SlateGizmo; /** * Sets hover state */ set hover(value: boolean); /** * Sets drag state */ set drag(value: boolean); /** * Node of this handle */ node: TransformNode; /** * Creates a handle for a SlateGizmo * @param gizmo associated SlateGizmo * @param scene scene */ constructor(gizmo: SlateGizmo, scene: Scene); protected _createMaterial(positionOffset?: Vector3): HandleMaterial; private _updateMaterial; /** * Binds callbacks from dragging interaction * @param dragStartFn Function to call on drag start * @param dragFn Function to call on drag * @param dragEndFn Function to call on drag end */ setDragBehavior(dragStartFn: (event: { position: Vector3; }) => void, dragFn: (event: { position: Vector3; }) => void, dragEndFn: () => void): void; /** * Creates the meshes and parent node of the handle * Should be overridden by child classes * @returns created node */ abstract createNode(): TransformNode; /** * Disposes the handle */ dispose(): void; } /** * Side handle class that rotates the slate */ export class SideHandle extends GizmoHandle { /** * Creates the meshes and parent node of the handle * @returns created node */ createNode(): TransformNode; } /** * Corner handle that resizes the slate */ export class CornerHandle extends GizmoHandle { /** * Creates the meshes and parent node of the handle * @returns created node */ createNode(): TransformNode; } } declare module "babylonjs-gui/3D/controls/volumeBasedPanel" { import { Vector3 } from "babylonjs/Maths/math.vector"; import { int } from "babylonjs/types"; import { Container3D } from "babylonjs-gui/3D/controls/container3D"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; /** * Abstract class used to create a container panel deployed on the surface of a volume */ export abstract class VolumeBasedPanel extends Container3D { private _columns; private _rows; private _rowThenColum; private _orientation; protected _cellWidth: number; protected _cellHeight: number; /** * Gets or sets the distance between elements */ margin: number; /** * Gets or sets the orientation to apply to all controls (BABYLON.Container3D.FaceOriginReversedOrientation by default) * | Value | Type | Description | * | ----- | ----------------------------------- | ----------- | * | 0 | UNSET_ORIENTATION | Control rotation will remain unchanged | * | 1 | FACEORIGIN_ORIENTATION | Control will rotate to make it look at sphere central axis | * | 2 | FACEORIGINREVERSED_ORIENTATION | Control will rotate to make it look back at sphere central axis | * | 3 | FACEFORWARD_ORIENTATION | Control will rotate to look at z axis (0, 0, 1) | * | 4 | FACEFORWARDREVERSED_ORIENTATION | Control will rotate to look at negative z axis (0, 0, -1) | */ get orientation(): number; set orientation(value: number); /** * Gets or sets the number of columns requested (10 by default). * The panel will automatically compute the number of rows based on number of child controls. */ get columns(): int; set columns(value: int); /** * Gets or sets a the number of rows requested. * The panel will automatically compute the number of columns based on number of child controls. */ get rows(): int; set rows(value: int); /** * Creates new VolumeBasedPanel * @param name */ constructor(name?: string); protected _arrangeChildren(): void; /** Child classes must implement this function to provide correct control positioning */ protected abstract _mapGridNode(control: Control3D, nodePosition: Vector3): void; /** Child classes can implement this function to provide additional processing */ protected _finalProcessing(): void; } } declare module "babylonjs-gui/3D/controls/touchMeshButton3D" { import { TransformNode } from "babylonjs/Meshes/transformNode"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { Mesh } from "babylonjs/Meshes/mesh"; import { TouchButton3D } from "babylonjs-gui/3D/controls/touchButton3D"; /** * Class used to create an interactable object. It's a touchable 3D button using a mesh coming from the current scene * @since 5.0.0 */ export class TouchMeshButton3D extends TouchButton3D { /** @internal */ protected _currentMesh: Mesh; /** * Creates a new 3D button based on a mesh * @param mesh mesh to become a 3D button. By default this is also the mesh for near interaction collision checking * @param name defines the control name */ constructor(mesh: Mesh, name?: string); protected _getTypeName(): string; protected _createNode(): TransformNode; protected _affectMaterial(mesh: AbstractMesh): void; } } declare module "babylonjs-gui/3D/controls/touchHolographicMenu" { import { Scene } from "babylonjs/scene"; import { Vector3 } from "babylonjs/Maths/math.vector"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Nullable } from "babylonjs/types"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel"; import { Mesh } from "babylonjs/Meshes/mesh"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { Container3D } from "babylonjs-gui/3D/controls/container3D"; import { TouchHolographicButton } from "babylonjs-gui/3D/controls/touchHolographicButton"; /** * Simple menu that can contain holographic buttons */ export class TouchHolographicMenu extends VolumeBasedPanel { protected _backPlate: Mesh; private _backPlateMaterial; private _pickedPointObserver; private _currentMin; private _currentMax; private _backPlateMargin; /** * Scale for the buttons added to the menu */ protected static MENU_BUTTON_SCALE: number; /** * Gets or sets the margin size of the backplate in button size units. * Setting this to 1, will make the backPlate margin the size of 1 button */ get backPlateMargin(): number; set backPlateMargin(value: number); protected _createNode(scene: Scene): Nullable; protected _affectMaterial(mesh: AbstractMesh): void; protected _mapGridNode(control: Control3D, nodePosition: Vector3): void; protected _finalProcessing(): void; private _updateCurrentMinMax; private _updateMargins; /** * Creates a holographic menu GUI 3D control * @param name name of the menu */ constructor(name?: string); /** * Adds a button to the menu. * Please note that the back material of the button will be set to transparent as it is attached to the menu. * * @param button Button to add * @returns This menu */ addButton(button: TouchHolographicButton): TouchHolographicMenu; /** * This method should not be used directly. It is inherited from `Container3D`. * Please use `addButton` instead. * @param _control the control to add * @returns the current container */ addControl(_control: Control3D): Container3D; /** * Disposes the menu */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/touchHolographicButton" { import { Nullable } from "babylonjs/types"; import { StandardMaterial } from "babylonjs/Materials/standardMaterial"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; import { FluentMaterial } from "babylonjs-gui/3D/materials/fluent/fluentMaterial"; import { FluentButtonMaterial } from "babylonjs-gui/3D/materials/fluentButton/fluentButtonMaterial"; import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture"; import { TouchButton3D } from "babylonjs-gui/3D/controls/touchButton3D"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; /** * Class used to create a holographic button in 3D * @since 5.0.0 */ export class TouchHolographicButton extends TouchButton3D { /** * Base Url for the button model. */ static MODEL_BASE_URL: string; /** * File name for the button model. */ static MODEL_FILENAME: string; private _backPlate; private _textPlate; private _frontPlate; private _text; private _imageUrl; private _shareMaterials; private _isBackplateVisible; private _frontMaterial; private _backMaterial; private _plateMaterial; private _pickedPointObserver; private _pointerHoverObserver; private _frontPlateDepth; private _backPlateDepth; private _backplateColor; private _backplateToggledColor; private _tooltipFade; private _tooltipTextBlock; private _tooltipTexture; private _tooltipMesh; private _tooltipHoverObserver; private _tooltipOutObserver; private _disposeTooltip; /** * Rendering ground id of all the mesh in the button */ set renderingGroupId(id: number); get renderingGroupId(): number; /** * Gets the mesh used to render this control */ get mesh(): Nullable; /** * Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null) */ set tooltipText(text: Nullable); get tooltipText(): Nullable; /** * Gets or sets text for the button */ get text(): string; set text(value: string); /** * Gets or sets the image url for the button */ get imageUrl(): string; set imageUrl(value: string); /** * Gets the back material used by this button */ get backMaterial(): FluentMaterial; /** * Gets the front material used by this button */ get frontMaterial(): FluentButtonMaterial; /** * Gets the plate material used by this button */ get plateMaterial(): StandardMaterial; /** * Gets a boolean indicating if this button shares its material with other HolographicButtons */ get shareMaterials(): boolean; /** * Sets whether the backplate is visible or hidden. Hiding the backplate is not recommended without some sort of replacement */ set isBackplateVisible(isVisible: boolean); /** * Creates a new button * @param name defines the control name * @param shareMaterials */ constructor(name?: string, shareMaterials?: boolean); protected _getTypeName(): string; private _rebuildContent; protected _createNode(scene: Scene): TransformNode; protected _applyFacade(facadeTexture: AdvancedDynamicTexture): void; private _createBackMaterial; private _createFrontMaterial; private _createPlateMaterial; protected _onToggle(newState: boolean): void; protected _affectMaterial(mesh: Mesh): void; /** * Releases all associated resources */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/touchButton3D" { import { Vector3 } from "babylonjs/Maths/math.vector"; import { Mesh } from "babylonjs/Meshes/mesh"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Scene } from "babylonjs/scene"; import { Observable } from "babylonjs/Misc/observable"; import { Button3D } from "babylonjs-gui/3D/controls/button3D"; /** * Class used to create a touchable button in 3D */ export class TouchButton3D extends Button3D { private _collisionMesh; private _collidableFrontDirection; private _isNearPressed; private _interactionSurfaceHeight; private _isToggleButton; private _toggleState; private _toggleButtonCallback; /** * An event triggered when the button is toggled. Only fired if 'isToggleButton' is true */ onToggleObservable: Observable; /** * Creates a new touchable button * @param name defines the control name * @param collisionMesh mesh to track collisions with */ constructor(name?: string, collisionMesh?: Mesh); /** * Whether the current interaction is caused by near interaction or not */ get isActiveNearInteraction(): boolean; /** * Sets the front-facing direction of the button. Pass in Vector3.Zero to allow interactions from any direction * @param frontWorldDir the forward direction of the button */ set collidableFrontDirection(frontWorldDir: Vector3); /** * Returns the front-facing direction of the button, or Vector3.Zero if there is no 'front' */ get collidableFrontDirection(): Vector3; /** * Sets the mesh used for testing input collision * @param collisionMesh the new collision mesh for the button */ set collisionMesh(collisionMesh: Mesh); /** * Setter for if this TouchButton3D should be treated as a toggle button * @param value If this TouchHolographicButton should act like a toggle button */ set isToggleButton(value: boolean); get isToggleButton(): boolean; /** * A public entrypoint to set the toggle state of the TouchHolographicButton. Only works if 'isToggleButton' is true * @param newState The new state to set the TouchHolographicButton's toggle state to */ set isToggled(newState: boolean); get isToggled(): boolean; protected _onToggle(newState: boolean): void; private _isInteractionInFrontOfButton; /** * Get the height of the touchPoint from the collidable part of the button * @param touchPoint the point to compare to the button, in absolute position * @returns the depth of the touch point into the front of the button */ getPressDepth(touchPoint: Vector3): number; protected _getInteractionHeight(interactionPos: Vector3, basePos: Vector3): number; /** * @internal */ _generatePointerEventType(providedType: number, nearMeshPosition: Vector3, activeInteractionCount: number): number; protected _getTypeName(): string; protected _createNode(scene: Scene): TransformNode; /** * Releases all associated resources */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/stackPanel3D" { import { Container3D } from "babylonjs-gui/3D/controls/container3D"; /** * Class used to create a stack panel in 3D on XY plane */ export class StackPanel3D extends Container3D { private _isVertical; /** * Gets or sets a boolean indicating if the stack panel is vertical or horizontal (horizontal by default) */ get isVertical(): boolean; set isVertical(value: boolean); /** * Gets or sets the distance between elements */ margin: number; /** * Creates new StackPanel * @param isVertical */ constructor(isVertical?: boolean); protected _arrangeChildren(): void; } } declare module "babylonjs-gui/3D/controls/spherePanel" { import { Vector3 } from "babylonjs/Maths/math.vector"; import { float } from "babylonjs/types"; import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; /** * Class used to create a container panel deployed on the surface of a sphere */ export class SpherePanel extends VolumeBasedPanel { private _radius; /** * Gets or sets the radius of the sphere where to project controls (5 by default) */ get radius(): float; set radius(value: float); protected _mapGridNode(control: Control3D, nodePosition: Vector3): void; private _sphericalMapping; } } declare module "babylonjs-gui/3D/controls/slider3D" { import { Nullable } from "babylonjs/types"; import { Observable } from "babylonjs/Misc/observable"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Scene } from "babylonjs/scene"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { MRDLSliderBarMaterial } from "babylonjs-gui/3D/materials/mrdl/mrdlSliderBarMaterial"; import { MRDLSliderThumbMaterial } from "babylonjs-gui/3D/materials/mrdl/mrdlSliderThumbMaterial"; import { MRDLBackplateMaterial } from "babylonjs-gui/3D/materials/mrdl/mrdlBackplateMaterial"; /** * Class used to create a slider in 3D */ export class Slider3D extends Control3D { /** * Base Url for the models. */ static MODEL_BASE_URL: string; /** * File name for the 8x4 model. */ static MODEL_FILENAME: string; private _sliderBackplate; private _sliderBackplateMaterial; private _sliderBarMaterial; private _sliderThumbMaterial; private _sliderThumb; private _sliderBar; private _sliderBackplateVisible; private _minimum; private _maximum; private _value; private _step; private _draggedPosition; /** Observable raised when the sldier value changes */ onValueChangedObservable: Observable; /** * Creates a new slider * @param name defines the control name * @param sliderBackplateVisible defines if the control has a backplate, default is false */ constructor(name?: string, sliderBackplateVisible?: boolean); /** * Gets the mesh used to render this control */ get mesh(): Nullable; /** Gets or sets minimum value */ get minimum(): number; set minimum(value: number); /** Gets or sets maximum value */ get maximum(): number; set maximum(value: number); /** Gets or sets step value */ get step(): number; set step(value: number); /** Gets or sets current value */ get value(): number; set value(value: number); protected get start(): number; protected get end(): number; /** * Gets the slider bar material used by this control */ get sliderBarMaterial(): MRDLSliderBarMaterial; /** * Gets the slider thumb material used by this control */ get sliderThumbMaterial(): MRDLSliderThumbMaterial; /** * Gets the slider backplate material used by this control */ get sliderBackplateMaterial(): MRDLBackplateMaterial; /** * Gets the slider bar mesh used by this control */ get sliderBar(): AbstractMesh; /** * Gets the slider thumb mesh used by this control */ get sliderThumb(): AbstractMesh; /** * Gets the slider backplate mesh used by this control */ get sliderBackplate(): AbstractMesh; /** Sets a boolean indicating if the control is visible */ set isVisible(value: boolean); protected _createNode(scene: Scene): TransformNode; protected _affectMaterial(mesh: AbstractMesh): void; private _createBehavior; private _convertToPosition; private _convertToValue; /** * Releases all associated resources */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/scatterPanel" { import { Vector3 } from "babylonjs/Maths/math.vector"; import { float } from "babylonjs/types"; import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; /** * Class used to create a container panel where items get randomized planar mapping */ export class ScatterPanel extends VolumeBasedPanel { private _iteration; /** * Gets or sets the number of iteration to use to scatter the controls (100 by default) */ get iteration(): float; set iteration(value: float); protected _mapGridNode(control: Control3D, nodePosition: Vector3): void; private _scatterMapping; protected _finalProcessing(): void; } } declare module "babylonjs-gui/3D/controls/planePanel" { import { Vector3 } from "babylonjs/Maths/math.vector"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel"; /** * Class used to create a container panel deployed on the surface of a plane */ export class PlanePanel extends VolumeBasedPanel { protected _mapGridNode(control: Control3D, nodePosition: Vector3): void; } } declare module "babylonjs-gui/3D/controls/nearMenu" { import { Scene } from "babylonjs/scene"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Nullable } from "babylonjs/types"; import { DefaultBehavior } from "babylonjs-gui/3D/behaviors/defaultBehavior"; import { TouchHolographicMenu } from "babylonjs-gui/3D/controls/touchHolographicMenu"; /** * NearMenu that displays buttons and follows the camera * @since 5.0.0 */ export class NearMenu extends TouchHolographicMenu { /** * Base Url for the assets. */ private static _ASSETS_BASE_URL; /** * File name for the close icon. */ private static _PIN_ICON_FILENAME; private _pinButton; private _dragObserver; private _defaultBehavior; /** * Regroups all mesh behaviors for the near menu */ get defaultBehavior(): DefaultBehavior; private _isPinned; /** * Indicates if the near menu is world-pinned */ get isPinned(): boolean; set isPinned(value: boolean); private _createPinButton; protected _createNode(scene: Scene): Nullable; protected _finalProcessing(): void; /** * Creates a near menu GUI 3D control * @param name name of the near menu */ constructor(name?: string); /** * Disposes the near menu */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/meshButton3D" { import { TransformNode } from "babylonjs/Meshes/transformNode"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; import { Button3D } from "babylonjs-gui/3D/controls/button3D"; /** * Class used to create an interactable object. It's a 3D button using a mesh coming from the current scene */ export class MeshButton3D extends Button3D { /** @internal */ protected _currentMesh: Mesh; /** * Creates a new 3D button based on a mesh * @param mesh mesh to become a 3D button * @param name defines the control name */ constructor(mesh: Mesh, name?: string); protected _getTypeName(): string; protected _createNode(scene: Scene): TransformNode; protected _affectMaterial(mesh: AbstractMesh): void; } } declare module "babylonjs-gui/3D/controls/index" { export * from "babylonjs-gui/3D/controls/abstractButton3D"; export * from "babylonjs-gui/3D/controls/button3D"; export * from "babylonjs-gui/3D/controls/container3D"; export * from "babylonjs-gui/3D/controls/control3D"; export * from "babylonjs-gui/3D/controls/cylinderPanel"; export * from "babylonjs-gui/3D/controls/handMenu"; export * from "babylonjs-gui/3D/controls/holographicBackplate"; export * from "babylonjs-gui/3D/controls/holographicButton"; export * from "babylonjs-gui/3D/controls/holographicSlate"; export * from "babylonjs-gui/3D/controls/meshButton3D"; export * from "babylonjs-gui/3D/controls/nearMenu"; export * from "babylonjs-gui/3D/controls/planePanel"; export * from "babylonjs-gui/3D/controls/scatterPanel"; export * from "babylonjs-gui/3D/controls/slider3D"; export * from "babylonjs-gui/3D/controls/spherePanel"; export * from "babylonjs-gui/3D/controls/stackPanel3D"; export * from "babylonjs-gui/3D/controls/touchButton3D"; export * from "babylonjs-gui/3D/controls/touchMeshButton3D"; export * from "babylonjs-gui/3D/controls/touchHolographicButton"; export * from "babylonjs-gui/3D/controls/touchHolographicMenu"; export * from "babylonjs-gui/3D/controls/volumeBasedPanel"; export { TouchHolographicButton as TouchHolographicButtonV3 } from "babylonjs-gui/3D/controls/MRTK3/touchHolographicButton"; } declare module "babylonjs-gui/3D/controls/holographicSlate" { import { ContentDisplay3D } from "babylonjs-gui/3D/controls/contentDisplay3D"; import { TouchHolographicButton } from "babylonjs-gui/3D/controls/touchHolographicButton"; import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture"; import { DefaultBehavior } from "babylonjs-gui/3D/behaviors/defaultBehavior"; import { SlateGizmo } from "babylonjs-gui/3D/gizmos/slateGizmo"; import { Vector2, Vector3 } from "babylonjs/Maths/math.vector"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; /** * Class used to create a holographic slate * @since 5.0.0 */ export class HolographicSlate extends ContentDisplay3D { /** * Base Url for the assets. */ static ASSETS_BASE_URL: string; /** * File name for the close icon. */ static CLOSE_ICON_FILENAME: string; /** * File name for the close icon. */ static FOLLOW_ICON_FILENAME: string; private static _DEFAULT_TEXT_RESOLUTION_Y; /** * Margin between title bar and contentplate */ titleBarMargin: number; /** * Origin in local coordinates (top left corner) */ origin: Vector3; private _dimensions; private _titleBarHeight; private _titleBarMaterial; private _backMaterial; private _contentMaterial; private _pickedPointObserver; private _positionChangedObserver; private _titleText; private _titleTextComponent; private _contentViewport; private _contentDragBehavior; private _defaultBehavior; /** * If true, the content will be scaled to fit the dimensions of the slate */ fitContentToDimensions: boolean; /** * Regroups all mesh behaviors for the slate */ get defaultBehavior(): DefaultBehavior; /** @internal */ _gizmo: SlateGizmo; protected _titleBar: Mesh; protected _titleBarTitle: Mesh; protected _contentPlate: Mesh; protected _backPlate: Mesh; /** @internal */ _followButton: TouchHolographicButton; protected _closeButton: TouchHolographicButton; protected _contentScaleRatio: number; /** * 2D dimensions of the slate */ get dimensions(): Vector2; set dimensions(value: Vector2); /** * Minimum dimensions of the slate */ minDimensions: Vector2; /** * Default dimensions of the slate */ readonly defaultDimensions: Vector2; /** * Height of the title bar component */ get titleBarHeight(): number; set titleBarHeight(value: number); /** * Rendering ground id of all the meshes */ set renderingGroupId(id: number); get renderingGroupId(): number; /** * The title text displayed at the top of the slate */ set title(title: string); get title(): string; /** * Creates a new slate * @param name defines the control name */ constructor(name?: string); /** * Apply the facade texture (created from the content property). * This function can be overloaded by child classes * @param facadeTexture defines the AdvancedDynamicTexture to use */ protected _applyFacade(facadeTexture: AdvancedDynamicTexture): void; private _addControl; protected _getTypeName(): string; /** * @internal */ _positionElements(): void; private _applyContentViewport; private _resetContentPositionAndZoom; /** * @internal */ _updatePivot(): void; protected _createNode(scene: Scene): TransformNode; private _attachContentPlateBehavior; protected _affectMaterial(mesh: AbstractMesh): void; /** * @internal */ _prepareNode(scene: Scene): void; /** * Resets the aspect and pose of the slate so it is right in front of the active camera, facing towards it. * @param resetAspect Should the slate's dimensions/aspect ratio be reset as well */ resetDefaultAspectAndPose(resetAspect?: boolean): void; /** * Releases all associated resources */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/holographicButton" { import { Button3D } from "babylonjs-gui/3D/controls/button3D"; import { Nullable } from "babylonjs/types"; import { StandardMaterial } from "babylonjs/Materials/standardMaterial"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; import { FluentMaterial } from "babylonjs-gui/3D/materials/fluent/fluentMaterial"; import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture"; /** * Class used to create a holographic button in 3D */ export class HolographicButton extends Button3D { private _backPlate; private _textPlate; private _frontPlate; private _text; private _imageUrl; private _shareMaterials; private _frontMaterial; private _backMaterial; private _plateMaterial; private _pickedPointObserver; private _tooltipFade; private _tooltipTextBlock; private _tooltipTexture; private _tooltipMesh; private _tooltipHoverObserver; private _tooltipOutObserver; private _disposeTooltip; /** * Rendering ground id of all the mesh in the button */ set renderingGroupId(id: number); get renderingGroupId(): number; /** * Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null) */ set tooltipText(text: Nullable); get tooltipText(): Nullable; /** * Gets or sets text for the button */ get text(): string; set text(value: string); /** * Gets or sets the image url for the button */ get imageUrl(): string; set imageUrl(value: string); /** * Gets the back material used by this button */ get backMaterial(): FluentMaterial; /** * Gets the front material used by this button */ get frontMaterial(): FluentMaterial; /** * Gets the plate material used by this button */ get plateMaterial(): StandardMaterial; /** * Gets a boolean indicating if this button shares its material with other HolographicButtons */ get shareMaterials(): boolean; /** * Creates a new button * @param name defines the control name * @param shareMaterials */ constructor(name?: string, shareMaterials?: boolean); protected _getTypeName(): string; private _rebuildContent; protected _createNode(scene: Scene): TransformNode; protected _applyFacade(facadeTexture: AdvancedDynamicTexture): void; private _createBackMaterial; private _createFrontMaterial; private _createPlateMaterial; protected _affectMaterial(mesh: Mesh): void; /** * Releases all associated resources */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/holographicBackplate" { import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Scene } from "babylonjs/scene"; import { FluentBackplateMaterial } from "babylonjs-gui/3D/materials/fluentBackplate/fluentBackplateMaterial"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; /** * Class used to create a holographic backplate in 3D * @since 5.0.0 */ export class HolographicBackplate extends Control3D { private _shareMaterials; /** * Base Url for the button model. */ static MODEL_BASE_URL: string; /** * File name for the button model. */ static MODEL_FILENAME: string; private _model; private _material; /** * Rendering ground id of the backplate mesh. */ set renderingGroupId(id: number); get renderingGroupId(): number; /** * Gets the material used by the backplate */ get material(): FluentBackplateMaterial; /** * Gets a boolean indicating if this backplate shares its material with other HolographicBackplates */ get shareMaterials(): boolean; /** * Creates a new holographic backplate * @param name defines the control name * @param _shareMaterials */ constructor(name?: string, _shareMaterials?: boolean); protected _getTypeName(): string; protected _createNode(scene: Scene): TransformNode; private _createMaterial; protected _affectMaterial(mesh: Mesh): void; /** * Releases all associated resources */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/handMenu" { import { Scene } from "babylonjs/scene"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Nullable } from "babylonjs/types"; import { TouchHolographicMenu } from "babylonjs-gui/3D/controls/touchHolographicMenu"; import { HandConstraintBehavior } from "babylonjs/Behaviors/Meshes/handConstraintBehavior"; import { WebXRExperienceHelper } from "babylonjs/XR/webXRExperienceHelper"; /** * Hand menu that displays buttons and floats around the hand. * @since 5.0.0 */ export class HandMenu extends TouchHolographicMenu { private _handConstraintBehavior; /** * The hand constraint behavior setting the transformation of this node */ get handConstraintBehavior(): HandConstraintBehavior; protected _createNode(scene: Scene): Nullable; /** * Creates a hand menu GUI 3D control * @param xr the WebXRExperienceHelper used to link this control to the enabled WebXRHandTracking feature * @param name name of the hand menu */ constructor(xr: WebXRExperienceHelper, name?: string); /** * Disposes the hand menu */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/cylinderPanel" { import { Vector3 } from "babylonjs/Maths/math.vector"; import { float } from "babylonjs/types"; import { VolumeBasedPanel } from "babylonjs-gui/3D/controls/volumeBasedPanel"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; /** * Class used to create a container panel deployed on the surface of a cylinder */ export class CylinderPanel extends VolumeBasedPanel { private _radius; /** * Gets or sets the radius of the cylinder where to project controls (5 by default) */ get radius(): float; set radius(value: float); protected _mapGridNode(control: Control3D, nodePosition: Vector3): void; private _cylindricalMapping; } } declare module "babylonjs-gui/3D/controls/control3D" { import { Nullable } from "babylonjs/types"; import { Observable } from "babylonjs/Misc/observable"; import { Vector3 } from "babylonjs/Maths/math.vector"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { IBehaviorAware, Behavior } from "babylonjs/Behaviors/behavior"; import { IDisposable, Scene } from "babylonjs/scene"; import { GUI3DManager } from "babylonjs-gui/3D/gui3DManager"; import { Vector3WithInfo } from "babylonjs-gui/3D/vector3WithInfo"; import { Container3D } from "babylonjs-gui/3D/controls/container3D"; /** * Class used as base class for controls */ export class Control3D implements IDisposable, IBehaviorAware { /** Defines the control name */ name?: string | undefined; private _node; private _downCount; private _enterCount; private _downPointerIds; protected _isVisible: boolean; /** @internal */ _host: GUI3DManager; /** @internal */ _isScaledByManager: boolean; private _position?; private _scaling?; /** Gets or sets the control position in world space */ get position(): Vector3; set position(value: Vector3); /** Gets or sets the control scaling in world space */ get scaling(): Vector3; set scaling(value: Vector3); /** Callback used to start pointer enter animation */ pointerEnterAnimation: () => void; /** Callback used to start pointer out animation */ pointerOutAnimation: () => void; /** Callback used to start pointer down animation */ pointerDownAnimation: () => void; /** Callback used to start pointer up animation */ pointerUpAnimation: () => void; /** * An event triggered when the pointer moves over the control */ onPointerMoveObservable: Observable; /** * An event triggered when the pointer moves out of the control */ onPointerOutObservable: Observable; /** * An event triggered when the pointer taps the control */ onPointerDownObservable: Observable; /** * An event triggered when pointer is up */ onPointerUpObservable: Observable; /** * An event triggered when a control is clicked on (with a mouse) */ onPointerClickObservable: Observable; /** * An event triggered when pointer enters the control */ onPointerEnterObservable: Observable; /** * Gets or sets the parent container */ parent: Nullable; private _behaviors; /** * Gets the list of attached behaviors * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors */ get behaviors(): Behavior[]; /** * Attach a behavior to the control * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors * @param behavior defines the behavior to attach * @returns the current control */ addBehavior(behavior: Behavior): Control3D; /** * Remove an attached behavior * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors * @param behavior defines the behavior to attach * @returns the current control */ removeBehavior(behavior: Behavior): Control3D; /** * Gets an attached behavior by name * @param name defines the name of the behavior to look for * @see https://doc.babylonjs.com/features/featuresDeepDive/behaviors * @returns null if behavior was not found else the requested behavior */ getBehaviorByName(name: string): Nullable>; /** Gets or sets a boolean indicating if the control is visible */ get isVisible(): boolean; set isVisible(value: boolean); /** * Creates a new control * @param name defines the control name */ constructor( /** Defines the control name */ name?: string | undefined); /** * Gets a string representing the class name */ get typeName(): string; /** * Get the current class name of the control. * @returns current class name */ getClassName(): string; protected _getTypeName(): string; /** * Gets the transform node used by this control */ get node(): Nullable; /** * Gets the mesh used to render this control */ get mesh(): Nullable; /** * Link the control as child of the given node * @param node defines the node to link to. Use null to unlink the control * @returns the current control */ linkToTransformNode(node: Nullable): Control3D; /** * @internal */ _prepareNode(scene: Scene): void; protected _injectGUI3DReservedDataStore(node: TransformNode): any; /** * Node creation. * Can be overriden by children * @param scene defines the scene where the node must be attached * @returns the attached node or null if none. Must return a Mesh or AbstractMesh if there is an attached visible object */ protected _createNode(scene: Scene): Nullable; /** * Affect a material to the given mesh * @param mesh defines the mesh which will represent the control */ protected _affectMaterial(mesh: AbstractMesh): void; private _isTouchButton3D; /** * @internal */ _onPointerMove(target: Control3D, coordinates: Vector3): void; /** * @internal */ _onPointerEnter(target: Control3D): boolean; /** * @internal */ _onPointerOut(target: Control3D): void; /** * @internal */ _onPointerDown(target: Control3D, coordinates: Vector3, pointerId: number, buttonIndex: number): boolean; /** * @internal */ _onPointerUp(target: Control3D, coordinates: Vector3, pointerId: number, buttonIndex: number, notifyClick: boolean): void; /** * @internal */ forcePointerUp(pointerId?: Nullable): void; /** * @internal */ _processObservables(type: number, pickedPoint: Vector3, originMeshPosition: Nullable, pointerId: number, buttonIndex: number): boolean; /** @internal */ _disposeNode(): void; /** * Releases all associated resources */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/contentDisplay3D" { import { Control } from "babylonjs-gui/2D/controls/control"; import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture"; import { Nullable } from "babylonjs/types"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; /** * The base class for controls that display content */ export class ContentDisplay3D extends Control3D { private _content; protected _facadeTexture: Nullable; protected _contentResolution: number | { width: number; height: number; }; protected _contentScaleRatio: number; protected _contentScaleRatioY?: number; /** * Gets or sets the GUI 2D content used to display the button's facade */ get content(): Control; set content(value: Control); protected _setFacadeTextureScaling(): void; /** * Gets or sets the texture resolution used to render content (512 by default) */ get contentResolution(): number | { width: number; height: number; }; set contentResolution(value: number | { width: number; height: number; }); protected _disposeFacadeTexture(): void; protected _resetContent(): void; /** * Apply the facade texture (created from the content property). * This function can be overloaded by child classes * @param facadeTexture defines the AdvancedDynamicTexture to use */ protected _applyFacade(facadeTexture: AdvancedDynamicTexture): void; } } declare module "babylonjs-gui/3D/controls/container3D" { import { Nullable } from "babylonjs/types"; import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Scene } from "babylonjs/scene"; import { Control3D } from "babylonjs-gui/3D/controls/control3D"; /** * Class used to create containers for controls */ export class Container3D extends Control3D { private _blockLayout; /** * Gets the list of child controls */ protected _children: Control3D[]; /** * Gets the list of child controls */ get children(): Array; /** * Gets or sets a boolean indicating if the layout must be blocked (default is false). * This is helpful to optimize layout operation when adding multiple children in a row */ get blockLayout(): boolean; set blockLayout(value: boolean); /** * Creates a new container * @param name defines the container name */ constructor(name?: string); /** * Force the container to update the layout. Please note that it will not take blockLayout property in account * @returns the current container */ updateLayout(): Container3D; /** * Gets a boolean indicating if the given control is in the children of this control * @param control defines the control to check * @returns true if the control is in the child list */ containsControl(control: Control3D): boolean; /** * Adds a control to the children of this control * @param control defines the control to add * @returns the current container */ addControl(control: Control3D): Container3D; /** * This function will be called everytime a new control is added */ protected _arrangeChildren(): void; protected _createNode(scene: Scene): Nullable; /** * Removes a control from the children of this control * @param control defines the control to remove * @returns the current container */ removeControl(control: Control3D): Container3D; protected _getTypeName(): string; /** * Releases all associated resources */ dispose(): void; /** Control rotation will remain unchanged */ static readonly UNSET_ORIENTATION: number; /** Control will rotate to make it look at sphere central axis */ static readonly FACEORIGIN_ORIENTATION: number; /** Control will rotate to make it look back at sphere central axis */ static readonly FACEORIGINREVERSED_ORIENTATION: number; /** Control will rotate to look at z axis (0, 0, 1) */ static readonly FACEFORWARD_ORIENTATION: number; /** Control will rotate to look at negative z axis (0, 0, -1) */ static readonly FACEFORWARDREVERSED_ORIENTATION: number; } } declare module "babylonjs-gui/3D/controls/button3D" { import { TransformNode } from "babylonjs/Meshes/transformNode"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { Material } from "babylonjs/Materials/material"; import { Scene } from "babylonjs/scene"; import { AbstractButton3D } from "babylonjs-gui/3D/controls/abstractButton3D"; import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture"; /** * Options used to create a button in 3D */ export interface IButton3DCreationOptions { /** * Width of the button. Default: 1 */ width?: number; /** * Height of the button. Default: 1 */ height?: number; /** * Depth of the button. Default: 0.08 */ depth?: number; } /** * Class used to create a button in 3D */ export class Button3D extends AbstractButton3D { /** @internal */ protected _currentMaterial: Material; protected _options: IButton3DCreationOptions; protected _height: number; protected _depth: number; /** * Creates a new button * @param name defines the control name * @param options defines the options used to create the button */ constructor(name?: string, options?: IButton3DCreationOptions); /** * Apply the facade texture (created from the content property). * @param facadeTexture defines the AdvancedDynamicTexture to use */ protected _applyFacade(facadeTexture: AdvancedDynamicTexture): void; protected _getTypeName(): string; protected _createNode(scene: Scene): TransformNode; protected _affectMaterial(mesh: AbstractMesh): void; /** * Releases all associated resources */ dispose(): void; } } declare module "babylonjs-gui/3D/controls/abstractButton3D" { import { TransformNode } from "babylonjs/Meshes/transformNode"; import { Scene } from "babylonjs/scene"; import { ContentDisplay3D } from "babylonjs-gui/3D/controls/contentDisplay3D"; /** * Class used as a root to all buttons */ export class AbstractButton3D extends ContentDisplay3D { /** * Creates a new button * @param name defines the control name */ constructor(name?: string); protected _getTypeName(): string; protected _createNode(scene: Scene): TransformNode; } } declare module "babylonjs-gui/3D/controls/MRTK3/touchHolographicButton" { import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Nullable } from "babylonjs/types"; import { Scene } from "babylonjs/scene"; import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture"; import { Color3, Color4 } from "babylonjs/Maths/math.color"; import { MRDLBackglowMaterial } from "babylonjs-gui/3D/materials/mrdl/mrdlBackglowMaterial"; import { MRDLBackplateMaterial } from "babylonjs-gui/3D/materials/mrdl/mrdlBackplateMaterial"; import { MRDLFrontplateMaterial } from "babylonjs-gui/3D/materials/mrdl/mrdlFrontplateMaterial"; import { MRDLInnerquadMaterial } from "babylonjs-gui/3D/materials/mrdl/mrdlInnerquadMaterial"; import { StandardMaterial } from "babylonjs/Materials/standardMaterial"; import { TouchButton3D } from "babylonjs-gui/3D/controls/touchButton3D"; import { TransformNode } from "babylonjs/Meshes/transformNode"; /** * Class used to create the mrtkv3 button */ export class TouchHolographicButton extends TouchButton3D { /** * Base Url for the frontplate model. */ static MRTK_ASSET_BASE_URL: string; /** * File name for the frontplate model. */ static FRONTPLATE_MODEL_FILENAME: string; /** * File name for the backplate model. */ static BACKPLATE_MODEL_FILENAME: string; /** * File name for the backglow model. */ static BACKGLOW_MODEL_FILENAME: string; /** * File name for the innerquad model. */ static INNERQUAD_MODEL_FILENAME: string; /** * Gets or sets the horizontal scaling for the button. */ width: number; /** * Gets or sets the vertical scaling for the button. */ height: number; /** * Gets or sets the bevel radius for the button. */ radius: number; /** * Gets or sets the font size of the button text in pixels. * This is only adjustable for a button with width to height ratio greater than 1. */ textSizeInPixels: number; /** * Gets or sets the size of the button image in pixels. * This is only adjustable for a button with width to height ratio greater than 1. */ imageSizeInPixels: number; /** * Gets or sets the color of the button plate. */ plateMaterialColor: Color3; /** * Gets or sets the depth of the button's front plate. * This variable determines the z scaling and z position for some of the button's meshes. */ frontPlateDepth: number; /** * Gets or sets the depth of the button's back plate. * This variable determines the z scaling and z position for some of the button's meshes. */ backPlateDepth: number; /** * Gets or sets the offset value for button's back glow. * This variable determines the x, y scaling of the button's meshes. */ backGlowOffset: number; /** * Gets or sets the value that determines the z scaling and z position for the innerQuad and BackGlow meshes. */ flatPlaneDepth: number; /** * Gets or sets the radius for FrontMaterial and innerQuadMaterial. */ innerQuadRadius: number; /** * Gets or sets the color for innerQuadMaterial. */ innerQuadColor: Color4; /** * Gets or sets the color for innerQuadMaterial for when it is toggled. */ innerQuadToggledColor: Color4; /** * Gets or sets the color for innerQuadMaterial for when it is hovered. */ innerQuadHoverColor: Color4; /** * Gets or sets the color for innerQuadMaterial for when it is toggled and hovered. */ innerQuadToggledHoverColor: Color4; private _backPlate; private _textPlate; private _frontPlate; private _backGlow; private _innerQuad; private _collisionPlate; private _frontPlateCollisionMesh; private _isBackplateVisible; private _text; private _subtext; private _imageUrl; private _shareMaterials; private _frontMaterial; private _backMaterial; private _backGlowMaterial; private _innerQuadMaterial; private _plateMaterial; private _pickedPointObserver; private _pointerClickObserver; private _pointerEnterObserver; private _pointerOutObserver; private _toggleObserver; private _tooltipFade; private _tooltipTextBlock; private _tooltipTexture; private _tooltipMesh; private _tooltipHoverObserver; private _tooltipOutObserver; private _disposeTooltip; /** * Rendering ground id of all the mesh in the button */ set renderingGroupId(id: number); get renderingGroupId(): number; /** * Gets the mesh used to render this control */ get mesh(): Nullable; /** * Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null) * Set this property after adding the button to the GUI3DManager */ set tooltipText(text: Nullable); get tooltipText(): Nullable; /** * Gets or sets text for the button */ get text(): string; set text(value: string); /** * Gets or sets subtext for a button with larger width */ get subtext(): string; set subtext(value: string); /** * Gets or sets the image url for the button */ get imageUrl(): string; set imageUrl(value: string); /** * Gets the back material used by this button */ get backMaterial(): MRDLBackplateMaterial; /** * Gets the front material used by this button */ get frontMaterial(): MRDLFrontplateMaterial; /** * Gets the back glow material used by this button */ get backGlowMaterial(): MRDLBackglowMaterial; /** * Gets the inner quad material used by this button */ get innerQuadMaterial(): MRDLInnerquadMaterial; /** * Gets the plate material used by this button */ get plateMaterial(): StandardMaterial; /** * Gets a boolean indicating if this button shares its material with other V3 Buttons */ get shareMaterials(): boolean; /** * Sets whether the backplate is visible or hidden. Hiding the backplate is not recommended without some sort of replacement */ set isBackplateVisible(isVisible: boolean); /** * Creates a new button * @param name defines the control name * @param shareMaterials */ constructor(name?: string, shareMaterials?: boolean); protected _getTypeName(): string; private _rebuildContent; private _getAspectRatio; private _alignContentVertically; private _alignContentHorizontally; protected _createNode(scene: Scene): TransformNode; private _createBackPlate; private _createFrontPlate; private _createInnerQuad; private _createBackGlow; protected _applyFacade(facadeTexture: AdvancedDynamicTexture): void; private _performClickAnimation; private _performEnterExitAnimation; private _createBackMaterial; private _createFrontMaterial; private _createBackGlowMaterial; private _createInnerQuadMaterial; private _createPlateMaterial; protected _onToggle(newState: boolean): void; protected _affectMaterial(mesh: Mesh): void; /** * Releases all associated resources */ dispose(): void; } } declare module "babylonjs-gui/3D/behaviors/defaultBehavior" { import { Behavior } from "babylonjs/Behaviors/behavior"; import { FollowBehavior } from "babylonjs/Behaviors/Meshes/followBehavior"; import { SixDofDragBehavior } from "babylonjs/Behaviors/Meshes/sixDofDragBehavior"; import { Mesh } from "babylonjs/Meshes/mesh"; import { Nullable } from "babylonjs/types"; import { SurfaceMagnetismBehavior } from "babylonjs/Behaviors/Meshes/surfaceMagnetismBehavior"; import { AbstractMesh } from "babylonjs/Meshes/abstractMesh"; /** * Default behavior for 3D UI elements. * Handles a FollowBehavior, SixDofBehavior and SurfaceMagnetismBehavior * @since 5.0.0 */ export class DefaultBehavior implements Behavior { private _scene; private _followBehavior; private _sixDofDragBehavior; private _surfaceMagnetismBehavior; private _onBeforeRenderObserver; private _onDragObserver; /** * Instantiates the default behavior */ constructor(); /** * Attached node of this behavior */ attachedNode: Nullable; /** * The name of the behavior */ get name(): string; /** * The follow behavior */ get followBehavior(): FollowBehavior; /** * The six DoF drag behavior */ get sixDofDragBehavior(): SixDofDragBehavior; /** * The surface magnetism behavior */ get surfaceMagnetismBehavior(): SurfaceMagnetismBehavior; /** * Enables the follow behavior */ followBehaviorEnabled: boolean; /** * Enables the six DoF drag behavior */ sixDofDragBehaviorEnabled: boolean; /** * Enables the surface magnetism behavior */ surfaceMagnetismBehaviorEnabled: boolean; /** * Initializes the behavior */ init(): void; /** * Attaches the default behavior * @param ownerMesh The top level mesh * @param draggablesMeshes Descendant meshes that can be used for dragging the owner mesh * @param sceneUnderstandingMeshes Meshes from the scene understanding that will be used for surface magnetism */ attach(ownerMesh: Mesh, draggablesMeshes?: Mesh[], sceneUnderstandingMeshes?: AbstractMesh[]): void; /** * Detaches the behavior from the mesh */ detach(): void; private _addObservables; private _removeObservables; } } declare module "babylonjs-gui/2D/xmlLoader" { import { Nullable } from "babylonjs/types"; /** * Class used to load GUI via XML. */ export class XmlLoader { private _nodes; private _nodeTypes; private _isLoaded; private _objectAttributes; private _rootNode; private _parentClass; /** * Create a new xml loader * @param parentClass Sets the class context. Used when the loader is instanced inside a class and not in a global context */ constructor(parentClass?: any); private _getChainElement; private _getClassAttribute; private _createGuiElement; private _parseGrid; private _parseElement; private _prepareSourceElement; private _parseElementsFromSource; private _parseXml; /** * Gets if the loading has finished. * @returns whether the loading has finished or not */ isLoaded(): boolean; /** * Gets a loaded node / control by id. * @param id the Controls id set in the xml * @returns element of type Control */ getNodeById(id: string): any; /** * Gets all loaded nodes / controls * @returns Array of controls */ getNodes(): any; /** * Disposes the loaded layout */ dispose(): void; /** * Initiates the xml layout loading * @param xmlFile defines the xml layout to load * @param rootNode defines the node / control to use as a parent for the loaded layout controls. * @param onSuccess defines the callback called on layout load successfully. * @param onError defines the callback called on layout load failure. */ loadLayout(xmlFile: any, rootNode: any, onSuccess?: Nullable<() => void>, onError?: Nullable<(error: string) => void>): void; /** * Initiates the xml layout loading asynchronously * @param xmlFile defines the xml layout to load * @param rootNode defines the node / control to use as a parent for the loaded layout controls. * @returns Promise */ loadLayoutAsync(xmlFile: any, rootNode: any): Promise; } } declare module "babylonjs-gui/2D/valueAndUnit" { import { Observable } from "babylonjs/Misc/observable"; import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture"; /** * Class used to specific a value and its associated unit */ export class ValueAndUnit { /** defines a boolean indicating if the value can be negative */ negativeValueAllowed: boolean; private _value; private _unit; private _originalUnit; /** * Gets or sets a value indicating that this value will not scale accordingly with adaptive scaling property * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#adaptive-scaling */ ignoreAdaptiveScaling: boolean; /** * Observable event triggered each time the value or unit changes */ onChangedObservable: Observable; /** * Creates a new ValueAndUnit * @param value defines the value to store * @param unit defines the unit to store - defaults to ValueAndUnit.UNITMODE_PIXEL * @param negativeValueAllowed defines a boolean indicating if the value can be negative */ constructor(value: number, /** defines the unit to store */ unit?: number, /** defines a boolean indicating if the value can be negative */ negativeValueAllowed?: boolean); /** Gets a boolean indicating if the value is a percentage */ get isPercentage(): boolean; /** Gets a boolean indicating if the value is store as pixel */ get isPixel(): boolean; /** * Gets value (without units) * @deprecated use value property instead */ get internalValue(): number; /** Gets value (without units) */ get value(): number; /** Sets value (without units) */ set value(value: number); /** Gets units (without value) */ get unit(): number; /** Sets units (without value) */ set unit(value: number); /** * Gets value as pixel * @param host defines the root host * @param refValue defines the reference value for percentages * @returns the value as pixel */ getValueInPixel(host: AdvancedDynamicTexture, refValue: number): number; /** * Update the current value and unit. * @param value defines the value to store * @param unit defines the unit to store * @returns the current ValueAndUnit */ updateInPlace(value: number, unit?: number): ValueAndUnit; /** * Gets the value accordingly to its unit * @param host defines the root host * @returns the value */ getValue(host: AdvancedDynamicTexture): number; /** * Gets a string representation of the value * @param host defines the root host * @param decimals defines an optional number of decimals to display * @returns a string */ toString(host: AdvancedDynamicTexture, decimals?: number): string; /** * Store a value parsed from a string * @param source defines the source string * @returns true if the value was successfully parsed and updated */ fromString(source: string | number): boolean; private static _Regex; private static _UNITMODE_PERCENTAGE; private static _UNITMODE_PIXEL; /** UNITMODE_PERCENTAGE */ static get UNITMODE_PERCENTAGE(): number; /** UNITMODE_PIXEL */ static get UNITMODE_PIXEL(): number; } } declare module "babylonjs-gui/2D/style" { import { Observable } from "babylonjs/Misc/observable"; import { IDisposable } from "babylonjs/scene"; import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture"; import { ValueAndUnit } from "babylonjs-gui/2D/valueAndUnit"; /** * Define a style used by control to automatically setup properties based on a template. * Only support font related properties so far */ export class Style implements IDisposable { private _fontFamily; private _fontStyle; private _fontWeight; /** @internal */ _host: AdvancedDynamicTexture; /** @internal */ _fontSize: ValueAndUnit; /** * Observable raised when the style values are changed */ onChangedObservable: Observable