babylonjs-gui
Version:
Babylon.js GUI module =====================
1,602 lines (1,533 loc) • 316 kB
TypeScript
declare module BABYLON.GUI {
/**
* Class used to transport BABYLON.Vector3 information for pointer events
*/
export class Vector3WithInfo extends BABYLON.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: BABYLON.Vector3,
/** defines the current mouse button index */
buttonIndex?: number);
}
/**
* Class used to manage 3D user interface
* @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui3D
*/
export class GUI3DManager implements BABYLON.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;
/**
* BABYLON.Observable raised when the point picked by the pointer events changed
*/
onPickedPointChangedObservable: BABYLON.Observable<BABYLON.Nullable<BABYLON.Vector3>>;
/**
* BABYLON.Observable raised when a picking happens
*/
onPickingObservable: BABYLON.Observable<BABYLON.Nullable<BABYLON.AbstractMesh>>;
/** @internal */
_sharedMaterials: {
[key: string]: BABYLON.Material;
};
/** @internal */
_touchSharedMaterials: {
[key: string]: BABYLON.Material;
};
/** Gets the hosting scene */
get scene(): BABYLON.Scene;
/** Gets associated utility layer */
get utilityLayer(): BABYLON.Nullable<BABYLON.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?: BABYLON.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;
}
/**
* This is here for backwards compatibility with 4.2
*/
/**
* Class used to render Slider Thumb material with MRDL
*/
export class MRDLSliderThumbMaterial extends BABYLON.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: BABYLON.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: BABYLON.Color4;
/**
* Gets or sets the right gradient color.
*/
rightGradientColor: BABYLON.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: BABYLON.Color4;
/**
* Gets or sets the horizon color.
*/
horizonColor: BABYLON.Color4;
/**
* Gets or sets the ground color.
*/
groundColor: BABYLON.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: BABYLON.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: BABYLON.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: BABYLON.Texture;
/**
* Gets or sets the finger position for left index.
*/
leftIndexPosition: BABYLON.Vector3;
/**
* Gets or sets the finger position for right index.
*/
rightIndexPosition: BABYLON.Vector3;
/**
* Gets or sets the finger position for left index middle position.
*/
leftIndexMiddlePosition: BABYLON.Vector3;
/**
* Gets or sets the finger position for right index middle position.
*/
rightIndexMiddlePosition: BABYLON.Vector3;
/**
* Gets or sets the Decal Scale for XY.
*/
decalScaleXY: BABYLON.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: BABYLON.Vector4;
/**
* @internal
*/
globaRightIndexTipPosition: BABYLON.Vector4;
/**
* @internal
*/
globalLeftThumbTipPosition: BABYLON.Vector4;
/**
* @internal
*/
globalRightThumbTipPosition: BABYLON.Vector4;
/**
* @internal
*/
globalLeftIndexMiddlePosition: BABYLON.Vector4;
/**
* @internal
*/
globalRightIndexMiddlePosition: BABYLON.Vector4;
constructor(name: string, scene?: BABYLON.Scene);
needAlphaBlending(): boolean;
needAlphaTesting(): boolean;
getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh): boolean;
bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
/**
* Get the list of animatables in the material.
* @returns the list of animatables object used in the material
*/
getAnimatables(): BABYLON.IAnimatable[];
dispose(forceDisposeEffect?: boolean): void;
clone(name: string): MRDLSliderThumbMaterial;
serialize(): any;
getClassName(): string;
static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): MRDLSliderThumbMaterial;
}
/**
* Class used to render Slider Bar material with MRDL
*/
export class MRDLSliderBarMaterial extends BABYLON.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: BABYLON.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: BABYLON.Color4;
/**
* Gets or sets the right gradient color.
*/
rightGradientColor: BABYLON.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: BABYLON.Color4;
/**
* Gets or sets the horizon color.
*/
horizonColor: BABYLON.Color4;
/**
* Gets or sets the ground color.
*/
groundColor: BABYLON.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: BABYLON.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: BABYLON.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: BABYLON.Texture;
/**
* Gets or sets the finger position for left index.
*/
leftIndexPosition: BABYLON.Vector3;
/**
* Gets or sets the finger position for right index.
*/
rightIndexPosition: BABYLON.Vector3;
/**
* Gets or sets the finger position for left index middle position.
*/
leftIndexMiddlePosition: BABYLON.Vector3;
/**
* Gets or sets the finger position for right index middle position.
*/
rightIndexMiddlePosition: BABYLON.Vector3;
/**
* Gets or sets the Decal Scle for XY.
*/
decalScaleXY: BABYLON.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: BABYLON.Vector4;
/**
* @internal
*/
globaRightIndexTipPosition: BABYLON.Vector4;
/**
* @internal
*/
globalLeftThumbTipPosition: BABYLON.Vector4;
/**
* @internal
*/
globalRightThumbTipPosition: BABYLON.Vector4;
/**
* @internal
*/
globalLeftIndexMiddlePosition: BABYLON.Vector4;
/**
* @internal
*/
globalRightIndexMiddlePosition: BABYLON.Vector4;
constructor(name: string, scene?: BABYLON.Scene);
needAlphaBlending(): boolean;
needAlphaTesting(): boolean;
getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh): boolean;
bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
/**
* Get the list of animatables in the material.
* @returns the list of animatables object used in the material
*/
getAnimatables(): BABYLON.IAnimatable[];
dispose(forceDisposeEffect?: boolean): void;
clone(name: string): MRDLSliderBarMaterial;
serialize(): any;
getClassName(): string;
static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): MRDLSliderBarMaterial;
}
export class MRDLInnerquadMaterial extends BABYLON.PushMaterial {
/**
* Gets or sets the color of the innerquad.
*/
color: BABYLON.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: BABYLON.Scene);
needAlphaBlending(): boolean;
needAlphaTesting(): boolean;
getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh): boolean;
bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
/**
* Get the list of animatables in the material.
* @returns the list of animatables object used in the material
*/
getAnimatables(): BABYLON.IAnimatable[];
dispose(forceDisposeEffect?: boolean): void;
clone(name: string): MRDLInnerquadMaterial;
serialize(): unknown;
getClassName(): string;
static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): MRDLInnerquadMaterial;
}
export class MRDLFrontplateMaterial extends BABYLON.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: BABYLON.Color4;
/**
* Gets or sets whether to enable blob effects on the frontplate.
*/
blobEnable: boolean;
/**
* Gets or sets the blob position on the frontplate.
*/
blobPosition: BABYLON.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: BABYLON.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: BABYLON.Scene);
needAlphaBlending(): boolean;
needAlphaTesting(): boolean;
getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh): boolean;
bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
/**
* Get the list of animatables in the material.
* @returns the list of animatables object used in the material
*/
getAnimatables(): BABYLON.IAnimatable[];
dispose(forceDisposeEffect?: boolean): void;
clone(name: string): MRDLFrontplateMaterial;
serialize(): unknown;
getClassName(): string;
static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): MRDLFrontplateMaterial;
}
/**
* Class used to render backplate material with MRDL
*/
export class MRDLBackplateMaterial extends BABYLON.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: BABYLON.Color4;
/**
* Gets or sets the line color of the backplate.
*/
lineColor: BABYLON.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: BABYLON.Color4;
/**
* Gets or sets the width of the highlights on the backplate line.
*/
highlightWidth: number;
/** @internal */
_highlightTransform: BABYLON.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: BABYLON.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: BABYLON.Color4;
/**
* Gets or sets the top left gradient color effect on the backplate.
*/
topLeftGradientColor: BABYLON.Color4;
/**
* Gets or sets the top right gradient color effect on the backplate.
*/
topRightGradientColor: BABYLON.Color4;
/**
* Gets or sets the bottom left gradient color effect on the backplate.
*/
bottomLeftGradientColor: BABYLON.Color4;
/**
* Gets or sets the bottom right gradient color effect on the backplate.
*/
bottomRightGradientColor: BABYLON.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?: BABYLON.Scene);
needAlphaBlending(): boolean;
needAlphaTesting(): boolean;
getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh): boolean;
bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
/**
* Get the list of animatables in the material.
* @returns the list of animatables object used in the material
*/
getAnimatables(): BABYLON.IAnimatable[];
dispose(forceDisposeEffect?: boolean): void;
clone(name: string): MRDLBackplateMaterial;
serialize(): any;
getClassName(): string;
static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): MRDLBackplateMaterial;
}
export class MRDLBackglowMaterial extends BABYLON.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: BABYLON.Color4;
/**
* Gets or sets the inner color of the backglow.
*/
innerColor: BABYLON.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: BABYLON.Scene);
needAlphaBlending(): boolean;
needAlphaTesting(): boolean;
getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh): boolean;
bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
/**
* Get the list of animatables in the material.
* @returns the list of animatables object used in the material
*/
getAnimatables(): BABYLON.IAnimatable[];
dispose(forceDisposeEffect?: boolean): void;
clone(name: string): MRDLBackglowMaterial;
serialize(): unknown;
getClassName(): string;
static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): MRDLBackglowMaterial;
}
/** @internal */
export var mrdlSliderThumbVertexShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlSliderThumbPixelShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlSliderBarVertexShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlSliderBarPixelShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlInnerquadVertexShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlInnerquadPixelShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlFrontplateVertexShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlFrontplatePixelShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlBackplateVertexShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlBackplatePixelShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlBackglowVertexShader: {
name: string;
shader: string;
};
/** @internal */
export var mrdlBackglowPixelShader: {
name: string;
shader: string;
};
/**
* Class used to render gizmo handles with fluent design
*/
export class HandleMaterial extends BABYLON.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: BABYLON.Color3;
/**
* Color of the handle when idle
*/
baseColor: BABYLON.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: BABYLON.Vector3;
/**
* Creates a handle material
* @param name Name of the material
* @param scene BABYLON.Scene
*/
constructor(name: string, scene: BABYLON.Scene);
private _updateInterpolationTarget;
/**
* Disposes the handle material
*/
dispose(): void;
}
/** @internal */
export var handleVertexShader: {
name: string;
shader: string;
};
/** @internal */
export var handlePixelShader: {
name: string;
shader: string;
};
/**
* Class used to render square buttons with fluent design
* @since 5.0.0
*/
export class FluentButtonMaterial extends BABYLON.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: BABYLON.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: BABYLON.Vector3;
/**
* Gets or sets the button's up direction before the world transform is applied.
* This should almost always be set to +y.
*/
activeFaceUp: BABYLON.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: BABYLON.Vector3;
/**
* Gets or sets the world-space position of the tip of the right index finger.
*/
globalRightIndexTipPosition: BABYLON.Vector3;
private _blobTexture;
constructor(name: string, scene?: BABYLON.Scene);
needAlphaBlending(): boolean;
needAlphaTesting(): boolean;
getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh): boolean;
bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
/**
* Get the list of animatables in the material.
* @returns the list of animatables object used in the material
*/
getAnimatables(): BABYLON.IAnimatable[];
dispose(forceDisposeEffect?: boolean): void;
clone(name: string): FluentButtonMaterial;
serialize(): any;
getClassName(): string;
static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FluentButtonMaterial;
}
/** @internal */
export var fluentButtonVertexShader: {
name: string;
shader: string;
};
/** @internal */
export var fluentButtonPixelShader: {
name: string;
shader: string;
};
/**
* Class used to render square buttons with fluent design
*/
export class FluentBackplateMaterial extends BABYLON.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: BABYLON.Color4;
/**
* Gets or sets the line color of the backplate.
*/
lineColor: BABYLON.