babylonjs-gui
Version:
Babylon.js GUI module =====================
1,682 lines (1,651 loc) • 639 kB
TypeScript
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<Nullable<Vector3>>;
/**
* Observable raised when a picking happens
*/
onPickingObservable: Observable<Nullable<AbstractMesh>>;
/** @internal */
_sharedMaterials: {
[key: string]: Material;
};
/** @internal */
_touchSharedMaterials: {
[key: string]: Material;
};
/** Gets the hosting scene */
get scene(): Scene;
/** Gets associated utility layer */
get utilityLayer(): Nullable<UtilityLayerRenderer>;
/** 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<BaseTexture>;
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<BaseTexture>;
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<BaseTexture>;
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<BaseTexture>;
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<BaseTexture>;
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<BaseTexture>;
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-sp