babylonjs-gui 5.0.0-beta.9 → 5.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babylon.gui.js +531 -336
- package/babylon.gui.js.map +1 -1
- package/babylon.gui.min.js +2 -2
- package/babylon.gui.module.d.ts +314 -234
- package/package.json +2 -2
package/babylon.gui.module.d.ts
CHANGED
|
@@ -401,6 +401,7 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
401
401
|
private _resizeObserver;
|
|
402
402
|
private _preKeyboardObserver;
|
|
403
403
|
private _pointerMoveObserver;
|
|
404
|
+
private _sceneRenderObserver;
|
|
404
405
|
private _pointerObserver;
|
|
405
406
|
private _canvasPointerOutObserver;
|
|
406
407
|
private _canvasBlurObserver;
|
|
@@ -573,6 +574,13 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
573
574
|
*/
|
|
574
575
|
get clipboardData(): string;
|
|
575
576
|
set clipboardData(value: string);
|
|
577
|
+
/**
|
|
578
|
+
* If set to true, every scene render will trigger a pointer event for the GUI
|
|
579
|
+
* if it is linked to a mesh or has controls linked to a mesh. This will allow
|
|
580
|
+
* you to catch the pointer moving around the GUI due to camera or mesh movements,
|
|
581
|
+
* but it has a performance cost.
|
|
582
|
+
*/
|
|
583
|
+
checkPointerEveryFrame: boolean;
|
|
576
584
|
/**
|
|
577
585
|
* Creates a new AdvancedDynamicTexture
|
|
578
586
|
* @param name defines the name of the texture
|
|
@@ -675,6 +683,7 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
675
683
|
}, control: Control): void;
|
|
676
684
|
/** @hidden */
|
|
677
685
|
_cleanControlAfterRemoval(control: Control): void;
|
|
686
|
+
private _translateToPicking;
|
|
678
687
|
/** Attach to all scene events required to support pointer events */
|
|
679
688
|
attach(): void;
|
|
680
689
|
/** @hidden */
|
|
@@ -703,6 +712,7 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
703
712
|
*/
|
|
704
713
|
moveFocusToControl(control: IFocusableControl): void;
|
|
705
714
|
private _manageFocus;
|
|
715
|
+
private _attachPickingToSceneRender;
|
|
706
716
|
private _attachToOnPointerOut;
|
|
707
717
|
private _attachToOnBlur;
|
|
708
718
|
/**
|
|
@@ -745,9 +755,11 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
745
755
|
* @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
|
|
746
756
|
* @param onlyAlphaTesting defines a boolean indicating that alpha blending will not be used (only alpha testing) (false by default)
|
|
747
757
|
* @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
|
|
758
|
+
* @param materialSetupCallback defines a custom way of creating and seting up the material on the mesh
|
|
748
759
|
* @returns a new AdvancedDynamicTexture
|
|
749
760
|
*/
|
|
750
|
-
static CreateForMesh(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean, invertY?: boolean): AdvancedDynamicTexture;
|
|
761
|
+
static CreateForMesh(mesh: AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean, invertY?: boolean, materialSetupCallback?: (mesh: AbstractMesh, uniqueId: string, texture: AdvancedDynamicTexture, onlyAlphaTesting: boolean) => void): AdvancedDynamicTexture;
|
|
762
|
+
private static _CreateMaterial;
|
|
751
763
|
/**
|
|
752
764
|
* Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh) BUT do not create a new material for the mesh. You will be responsible for connecting the texture
|
|
753
765
|
* @param mesh defines the mesh which will receive the texture
|
|
@@ -784,6 +796,7 @@ declare module "babylonjs-gui/2D/advancedDynamicTexture" {
|
|
|
784
796
|
*/
|
|
785
797
|
scaleTo(width: number, height: number): void;
|
|
786
798
|
}
|
|
799
|
+
export { IFocusableControl };
|
|
787
800
|
}
|
|
788
801
|
declare module "babylonjs-gui/2D/controls/control" {
|
|
789
802
|
import { Nullable } from "babylonjs/types";
|
|
@@ -1400,7 +1413,7 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
1400
1413
|
/** @hidden */
|
|
1401
1414
|
_flagDescendantsAsMatrixDirty(): void;
|
|
1402
1415
|
/** @hidden */
|
|
1403
|
-
_intersectsRect(rect: Measure): boolean;
|
|
1416
|
+
_intersectsRect(rect: Measure, context?: ICanvasRenderingContext): boolean;
|
|
1404
1417
|
/** @hidden */
|
|
1405
1418
|
protected _computeAdditionnalOffsetX(): number;
|
|
1406
1419
|
/** @hidden */
|
|
@@ -1451,17 +1464,17 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
1451
1464
|
*/
|
|
1452
1465
|
contains(x: number, y: number): boolean;
|
|
1453
1466
|
/** @hidden */
|
|
1454
|
-
_processPicking(x: number, y: number, pi: PointerInfoBase
|
|
1467
|
+
_processPicking(x: number, y: number, pi: Nullable<PointerInfoBase>, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
|
|
1455
1468
|
/** @hidden */
|
|
1456
|
-
_onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: PointerInfoBase): void;
|
|
1469
|
+
_onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: Nullable<PointerInfoBase>): void;
|
|
1457
1470
|
/** @hidden */
|
|
1458
|
-
_onPointerEnter(target: Control, pi: PointerInfoBase): boolean;
|
|
1471
|
+
_onPointerEnter(target: Control, pi: Nullable<PointerInfoBase>): boolean;
|
|
1459
1472
|
/** @hidden */
|
|
1460
1473
|
_onPointerOut(target: Control, pi: Nullable<PointerInfoBase>, force?: boolean): void;
|
|
1461
1474
|
/** @hidden */
|
|
1462
|
-
_onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: PointerInfoBase): boolean;
|
|
1475
|
+
_onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: Nullable<PointerInfoBase>): boolean;
|
|
1463
1476
|
/** @hidden */
|
|
1464
|
-
_onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi?: PointerInfoBase): void;
|
|
1477
|
+
_onPointerUp(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi?: Nullable<PointerInfoBase>): void;
|
|
1465
1478
|
/** @hidden */
|
|
1466
1479
|
_forcePointerUp(pointerId?: Nullable<number>): void;
|
|
1467
1480
|
/** @hidden */
|
|
@@ -1469,7 +1482,7 @@ declare module "babylonjs-gui/2D/controls/control" {
|
|
|
1469
1482
|
/** @hidden */
|
|
1470
1483
|
_onCanvasBlur(): void;
|
|
1471
1484
|
/** @hidden */
|
|
1472
|
-
_processObservables(type: number, x: number, y: number, pi: PointerInfoBase
|
|
1485
|
+
_processObservables(type: number, x: number, y: number, pi: Nullable<PointerInfoBase>, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
|
|
1473
1486
|
private _prepareFont;
|
|
1474
1487
|
/**
|
|
1475
1488
|
* Serializes the current control
|
|
@@ -1648,7 +1661,7 @@ declare module "babylonjs-gui/2D/controls/container" {
|
|
|
1648
1661
|
_draw(context: ICanvasRenderingContext, invalidatedRectangle?: Measure): void;
|
|
1649
1662
|
getDescendantsToRef(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
|
|
1650
1663
|
/** @hidden */
|
|
1651
|
-
_processPicking(x: number, y: number, pi: PointerInfoBase
|
|
1664
|
+
_processPicking(x: number, y: number, pi: Nullable<PointerInfoBase>, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
|
|
1652
1665
|
/** @hidden */
|
|
1653
1666
|
protected _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void;
|
|
1654
1667
|
/**
|
|
@@ -1853,6 +1866,7 @@ declare module "babylonjs-gui/2D/controls/textBlock" {
|
|
|
1853
1866
|
protected _applyStates(context: ICanvasRenderingContext): void;
|
|
1854
1867
|
protected _breakLines(refWidth: number, refHeight: number, context: ICanvasRenderingContext): object[];
|
|
1855
1868
|
protected _parseLine(line: string | undefined, context: ICanvasRenderingContext): object;
|
|
1869
|
+
private _getCharsToRemove;
|
|
1856
1870
|
protected _parseLineEllipsis(line: string | undefined, width: number, context: ICanvasRenderingContext): object;
|
|
1857
1871
|
protected _parseLineWordWrap(line: string | undefined, width: number, context: ICanvasRenderingContext): object[];
|
|
1858
1872
|
protected _parseLineWordWrapEllipsis(line: string | undefined, width: number, height: number, context: ICanvasRenderingContext): object[];
|
|
@@ -2416,6 +2430,8 @@ declare module "babylonjs-gui/2D/controls/inputText" {
|
|
|
2416
2430
|
private _autoStretchWidth;
|
|
2417
2431
|
private _maxWidth;
|
|
2418
2432
|
private _isFocused;
|
|
2433
|
+
/** the type of device that most recently focused the input: "mouse", "touch" or "pen" */
|
|
2434
|
+
private _focusedBy;
|
|
2419
2435
|
private _blinkTimeout;
|
|
2420
2436
|
private _blinkIsEven;
|
|
2421
2437
|
private _cursorOffset;
|
|
@@ -4376,7 +4392,8 @@ declare module "babylonjs-gui/3D/controls/touchButton3D" {
|
|
|
4376
4392
|
export class TouchButton3D extends Button3D {
|
|
4377
4393
|
private _collisionMesh;
|
|
4378
4394
|
private _collidableFrontDirection;
|
|
4379
|
-
|
|
4395
|
+
private _isNearPressed;
|
|
4396
|
+
private _interactionSurfaceHeight;
|
|
4380
4397
|
private _isToggleButton;
|
|
4381
4398
|
private _toggleState;
|
|
4382
4399
|
private _toggleButtonCallback;
|
|
@@ -4390,6 +4407,10 @@ declare module "babylonjs-gui/3D/controls/touchButton3D" {
|
|
|
4390
4407
|
* @param collisionMesh mesh to track collisions with
|
|
4391
4408
|
*/
|
|
4392
4409
|
constructor(name?: string, collisionMesh?: Mesh);
|
|
4410
|
+
/**
|
|
4411
|
+
* Whether the current interaction is caused by near interaction or not
|
|
4412
|
+
*/
|
|
4413
|
+
get isActiveNearInteraction(): boolean;
|
|
4393
4414
|
/**
|
|
4394
4415
|
* Sets the front-facing direction of the button. Pass in Vector3.Zero to allow interactions from any direction
|
|
4395
4416
|
* @param frontDir the forward direction of the button
|
|
@@ -4418,6 +4439,12 @@ declare module "babylonjs-gui/3D/controls/touchButton3D" {
|
|
|
4418
4439
|
get isToggled(): boolean;
|
|
4419
4440
|
protected _onToggle(newState: boolean): void;
|
|
4420
4441
|
private _isInteractionInFrontOfButton;
|
|
4442
|
+
/**
|
|
4443
|
+
* Get the height of the touchPoint from the collidable part of the button
|
|
4444
|
+
* @param touchPoint the point to compare to the button, in absolute position
|
|
4445
|
+
* @returns the depth of the touch point into the front of the button
|
|
4446
|
+
*/
|
|
4447
|
+
getPressDepth(touchPoint: Vector3): number;
|
|
4421
4448
|
protected _getInteractionHeight(interactionPos: Vector3, basePos: Vector3): number;
|
|
4422
4449
|
/** @hidden */
|
|
4423
4450
|
_generatePointerEventType(providedType: number, nearMeshPosition: Vector3, activeInteractionCount: number): number;
|
|
@@ -5124,6 +5151,7 @@ declare module "babylonjs-gui/3D/controls/touchHolographicButton" {
|
|
|
5124
5151
|
import { FluentButtonMaterial } from "babylonjs-gui/3D/materials/fluentButton/fluentButtonMaterial";
|
|
5125
5152
|
import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
|
|
5126
5153
|
import { TouchButton3D } from "babylonjs-gui/3D/controls/touchButton3D";
|
|
5154
|
+
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
5127
5155
|
/**
|
|
5128
5156
|
* Class used to create a holographic button in 3D
|
|
5129
5157
|
* @since 5.0.0
|
|
@@ -5165,6 +5193,10 @@ declare module "babylonjs-gui/3D/controls/touchHolographicButton" {
|
|
|
5165
5193
|
*/
|
|
5166
5194
|
set renderingGroupId(id: number);
|
|
5167
5195
|
get renderingGroupId(): number;
|
|
5196
|
+
/**
|
|
5197
|
+
* Gets the mesh used to render this control
|
|
5198
|
+
*/
|
|
5199
|
+
get mesh(): Nullable<AbstractMesh>;
|
|
5168
5200
|
/**
|
|
5169
5201
|
* Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null)
|
|
5170
5202
|
*/
|
|
@@ -5220,6 +5252,81 @@ declare module "babylonjs-gui/3D/controls/touchHolographicButton" {
|
|
|
5220
5252
|
dispose(): void;
|
|
5221
5253
|
}
|
|
5222
5254
|
}
|
|
5255
|
+
declare module "babylonjs-gui/3D/behaviors/defaultBehavior" {
|
|
5256
|
+
import { Behavior } from "babylonjs/Behaviors/behavior";
|
|
5257
|
+
import { FollowBehavior } from "babylonjs/Behaviors/Meshes/followBehavior";
|
|
5258
|
+
import { SixDofDragBehavior } from "babylonjs/Behaviors/Meshes/sixDofDragBehavior";
|
|
5259
|
+
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
5260
|
+
import { Nullable } from "babylonjs/types";
|
|
5261
|
+
import { SurfaceMagnetismBehavior } from "babylonjs/Behaviors/Meshes/surfaceMagnetismBehavior";
|
|
5262
|
+
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
5263
|
+
/**
|
|
5264
|
+
* Default behavior for 3D UI elements.
|
|
5265
|
+
* Handles a FollowBehavior, SixDofBehavior and SurfaceMagnetismBehavior
|
|
5266
|
+
* @since 5.0.0
|
|
5267
|
+
*/
|
|
5268
|
+
export class DefaultBehavior implements Behavior<Mesh> {
|
|
5269
|
+
private _scene;
|
|
5270
|
+
private _followBehavior;
|
|
5271
|
+
private _sixDofDragBehavior;
|
|
5272
|
+
private _surfaceMagnetismBehavior;
|
|
5273
|
+
private _onBeforeRenderObserver;
|
|
5274
|
+
private _onDragObserver;
|
|
5275
|
+
/**
|
|
5276
|
+
* Instantiates the default behavior
|
|
5277
|
+
*/
|
|
5278
|
+
constructor();
|
|
5279
|
+
/**
|
|
5280
|
+
* Attached node of this behavior
|
|
5281
|
+
*/
|
|
5282
|
+
attachedNode: Nullable<Mesh>;
|
|
5283
|
+
/**
|
|
5284
|
+
* The name of the behavior
|
|
5285
|
+
*/
|
|
5286
|
+
get name(): string;
|
|
5287
|
+
/**
|
|
5288
|
+
* The follow behavior
|
|
5289
|
+
*/
|
|
5290
|
+
get followBehavior(): FollowBehavior;
|
|
5291
|
+
/**
|
|
5292
|
+
* The six DoF drag behavior
|
|
5293
|
+
*/
|
|
5294
|
+
get sixDofDragBehavior(): SixDofDragBehavior;
|
|
5295
|
+
/**
|
|
5296
|
+
* The surface magnetism behavior
|
|
5297
|
+
*/
|
|
5298
|
+
get surfaceMagnetismBehavior(): SurfaceMagnetismBehavior;
|
|
5299
|
+
/**
|
|
5300
|
+
* Enables the follow behavior
|
|
5301
|
+
*/
|
|
5302
|
+
followBehaviorEnabled: boolean;
|
|
5303
|
+
/**
|
|
5304
|
+
* Enables the six DoF drag behavior
|
|
5305
|
+
*/
|
|
5306
|
+
sixDofDragBehaviorEnabled: boolean;
|
|
5307
|
+
/**
|
|
5308
|
+
* Enables the surface magnetism behavior
|
|
5309
|
+
*/
|
|
5310
|
+
surfaceMagnetismBehaviorEnabled: boolean;
|
|
5311
|
+
/**
|
|
5312
|
+
* Initializes the behavior
|
|
5313
|
+
*/
|
|
5314
|
+
init(): void;
|
|
5315
|
+
/**
|
|
5316
|
+
* Attaches the default behavior
|
|
5317
|
+
* @param ownerMesh The top level mesh
|
|
5318
|
+
* @param draggablesMeshes Descendant meshes that can be used for dragging the owner mesh
|
|
5319
|
+
* @param sceneUnderstandingMeshes Meshes from the scene understanding that will be used for surface magnetism
|
|
5320
|
+
*/
|
|
5321
|
+
attach(ownerMesh: Mesh, draggablesMeshes?: Mesh[], sceneUnderstandingMeshes?: AbstractMesh[]): void;
|
|
5322
|
+
/**
|
|
5323
|
+
* Detaches the behavior from the mesh
|
|
5324
|
+
*/
|
|
5325
|
+
detach(): void;
|
|
5326
|
+
private _addObservables;
|
|
5327
|
+
private _removeObservables;
|
|
5328
|
+
}
|
|
5329
|
+
}
|
|
5223
5330
|
declare module "babylonjs-gui/3D/materials/handle/shaders/handle.vertex" {
|
|
5224
5331
|
/** @hidden */
|
|
5225
5332
|
export var handleVertexShader: {
|
|
@@ -5439,6 +5546,7 @@ declare module "babylonjs-gui/3D/gizmos/slateGizmo" {
|
|
|
5439
5546
|
* Value we use to offset handles from mesh
|
|
5440
5547
|
*/
|
|
5441
5548
|
private _margin;
|
|
5549
|
+
private _handleSize;
|
|
5442
5550
|
private _attachedSlate;
|
|
5443
5551
|
private _existingSlateScale;
|
|
5444
5552
|
/**
|
|
@@ -5449,10 +5557,6 @@ declare module "babylonjs-gui/3D/gizmos/slateGizmo" {
|
|
|
5449
5557
|
* The distance away from the object which the draggable meshes should appear world sized when fixedScreenSize is set to true (default: 10)
|
|
5450
5558
|
*/
|
|
5451
5559
|
fixedScreenSizeDistanceFactor: number;
|
|
5452
|
-
/**
|
|
5453
|
-
* Size of the handles (meters in XR)
|
|
5454
|
-
*/
|
|
5455
|
-
handleSize: number;
|
|
5456
5560
|
/**
|
|
5457
5561
|
* The slate attached to this gizmo
|
|
5458
5562
|
*/
|
|
@@ -5471,85 +5575,11 @@ declare module "babylonjs-gui/3D/gizmos/slateGizmo" {
|
|
|
5471
5575
|
*/
|
|
5472
5576
|
updateBoundingBox(): void;
|
|
5473
5577
|
private _updateHandlesPosition;
|
|
5578
|
+
private _updateHandlesScaling;
|
|
5474
5579
|
protected _update(): void;
|
|
5475
5580
|
dispose(): void;
|
|
5476
5581
|
}
|
|
5477
5582
|
}
|
|
5478
|
-
declare module "babylonjs-gui/3D/behaviors/defaultBehavior" {
|
|
5479
|
-
import { Behavior } from "babylonjs/Behaviors/behavior";
|
|
5480
|
-
import { FollowBehavior } from "babylonjs/Behaviors/Meshes/followBehavior";
|
|
5481
|
-
import { SixDofDragBehavior } from "babylonjs/Behaviors/Meshes/sixDofDragBehavior";
|
|
5482
|
-
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
5483
|
-
import { Nullable } from "babylonjs/types";
|
|
5484
|
-
import { SurfaceMagnetismBehavior } from "babylonjs/Behaviors/Meshes/surfaceMagnetismBehavior";
|
|
5485
|
-
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
5486
|
-
/**
|
|
5487
|
-
* Default behavior for 3D UI elements.
|
|
5488
|
-
* Handles a FollowBehavior, SixDofBehavior and SurfaceMagnetismBehavior
|
|
5489
|
-
* @since 5.0.0
|
|
5490
|
-
*/
|
|
5491
|
-
export class DefaultBehavior implements Behavior<Mesh> {
|
|
5492
|
-
private _scene;
|
|
5493
|
-
private _followBehavior;
|
|
5494
|
-
private _sixDofDragBehavior;
|
|
5495
|
-
private _surfaceMagnetismBehavior;
|
|
5496
|
-
private _onBeforeRenderObserver;
|
|
5497
|
-
private _onDragObserver;
|
|
5498
|
-
/**
|
|
5499
|
-
* Instantiates the default behavior
|
|
5500
|
-
*/
|
|
5501
|
-
constructor();
|
|
5502
|
-
/**
|
|
5503
|
-
* Attached node of this behavior
|
|
5504
|
-
*/
|
|
5505
|
-
attachedNode: Nullable<Mesh>;
|
|
5506
|
-
/**
|
|
5507
|
-
* The name of the behavior
|
|
5508
|
-
*/
|
|
5509
|
-
get name(): string;
|
|
5510
|
-
/**
|
|
5511
|
-
* The follow behavior
|
|
5512
|
-
*/
|
|
5513
|
-
get followBehavior(): FollowBehavior;
|
|
5514
|
-
/**
|
|
5515
|
-
* The six DoF drag behavior
|
|
5516
|
-
*/
|
|
5517
|
-
get sixDofDragBehavior(): SixDofDragBehavior;
|
|
5518
|
-
/**
|
|
5519
|
-
* The surface magnetism behavior
|
|
5520
|
-
*/
|
|
5521
|
-
get surfaceMagnetismBehavior(): SurfaceMagnetismBehavior;
|
|
5522
|
-
/**
|
|
5523
|
-
* Enables the follow behavior
|
|
5524
|
-
*/
|
|
5525
|
-
followBehaviorEnabled: boolean;
|
|
5526
|
-
/**
|
|
5527
|
-
* Enables the six DoF drag behavior
|
|
5528
|
-
*/
|
|
5529
|
-
sixDofDragBehaviorEnabled: boolean;
|
|
5530
|
-
/**
|
|
5531
|
-
* Enables the surface magnetism behavior
|
|
5532
|
-
*/
|
|
5533
|
-
surfaceMagnetismBehaviorEnabled: boolean;
|
|
5534
|
-
/**
|
|
5535
|
-
* Initializes the behavior
|
|
5536
|
-
*/
|
|
5537
|
-
init(): void;
|
|
5538
|
-
/**
|
|
5539
|
-
* Attaches the default behavior
|
|
5540
|
-
* @param ownerMesh The top level mesh
|
|
5541
|
-
* @param draggablesMeshes Descendant meshes that can be used for dragging the owner mesh
|
|
5542
|
-
* @param sceneUnderstandingMeshes Meshes from the scene understanding that will be used for surface magnetism
|
|
5543
|
-
*/
|
|
5544
|
-
attach(ownerMesh: Mesh, draggablesMeshes?: Mesh[], sceneUnderstandingMeshes?: AbstractMesh[]): void;
|
|
5545
|
-
/**
|
|
5546
|
-
* Detaches the behavior from the mesh
|
|
5547
|
-
*/
|
|
5548
|
-
detach(): void;
|
|
5549
|
-
private _addObservables;
|
|
5550
|
-
private _removeObservables;
|
|
5551
|
-
}
|
|
5552
|
-
}
|
|
5553
5583
|
declare module "babylonjs-gui/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment" {
|
|
5554
5584
|
/** @hidden */
|
|
5555
5585
|
export var fluentBackplatePixelShader: {
|
|
@@ -5721,16 +5751,16 @@ declare module "babylonjs-gui/3D/materials/fluentBackplate/fluentBackplateMateri
|
|
|
5721
5751
|
}
|
|
5722
5752
|
}
|
|
5723
5753
|
declare module "babylonjs-gui/3D/controls/holographicSlate" {
|
|
5724
|
-
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
5725
|
-
import { Scene } from "babylonjs/scene";
|
|
5726
|
-
import { TransformNode } from "babylonjs/Meshes/transformNode";
|
|
5727
|
-
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
5728
|
-
import { TouchHolographicButton } from "babylonjs-gui/3D/controls/touchHolographicButton";
|
|
5729
|
-
import { Vector3 } from "babylonjs/Maths/math.vector";
|
|
5730
5754
|
import { ContentDisplay3D } from "babylonjs-gui/3D/controls/contentDisplay3D";
|
|
5755
|
+
import { TouchHolographicButton } from "babylonjs-gui/3D/controls/touchHolographicButton";
|
|
5731
5756
|
import { AdvancedDynamicTexture } from "babylonjs-gui/2D/advancedDynamicTexture";
|
|
5732
|
-
import { SlateGizmo } from "babylonjs-gui/3D/gizmos/slateGizmo";
|
|
5733
5757
|
import { DefaultBehavior } from "babylonjs-gui/3D/behaviors/defaultBehavior";
|
|
5758
|
+
import { SlateGizmo } from "babylonjs-gui/3D/gizmos/slateGizmo";
|
|
5759
|
+
import { Vector2, Vector3 } from "babylonjs/Maths/math.vector";
|
|
5760
|
+
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
5761
|
+
import { TransformNode } from "babylonjs/Meshes/transformNode";
|
|
5762
|
+
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
5763
|
+
import { Scene } from "babylonjs/scene";
|
|
5734
5764
|
/**
|
|
5735
5765
|
* Class used to create a holographic slate
|
|
5736
5766
|
* @since 5.0.0
|
|
@@ -5748,35 +5778,24 @@ declare module "babylonjs-gui/3D/controls/holographicSlate" {
|
|
|
5748
5778
|
* File name for the close icon.
|
|
5749
5779
|
*/
|
|
5750
5780
|
static FOLLOW_ICON_FILENAME: string;
|
|
5781
|
+
private static DEFAULT_TEXT_RESOLUTION_Y;
|
|
5751
5782
|
/**
|
|
5752
|
-
*
|
|
5753
|
-
*/
|
|
5754
|
-
dimensions: Vector3;
|
|
5755
|
-
/**
|
|
5756
|
-
* Minimum dimensions of the slate
|
|
5757
|
-
*/
|
|
5758
|
-
minDimensions: Vector3;
|
|
5759
|
-
/**
|
|
5760
|
-
* Default dimensions of the slate
|
|
5761
|
-
*/
|
|
5762
|
-
readonly defaultDimensions: Vector3;
|
|
5763
|
-
/**
|
|
5764
|
-
* Dimensions of the backplate
|
|
5783
|
+
* Margin between title bar and contentplate
|
|
5765
5784
|
*/
|
|
5766
|
-
|
|
5767
|
-
/**
|
|
5768
|
-
* Margin between backplate and contentplate
|
|
5769
|
-
*/
|
|
5770
|
-
backPlateMargin: number;
|
|
5785
|
+
titleBarMargin: number;
|
|
5771
5786
|
/**
|
|
5772
5787
|
* Origin in local coordinates (top left corner)
|
|
5773
5788
|
*/
|
|
5774
5789
|
origin: Vector3;
|
|
5775
|
-
private
|
|
5790
|
+
private _dimensions;
|
|
5791
|
+
private _titleBarHeight;
|
|
5792
|
+
private _titleBarMaterial;
|
|
5793
|
+
private _backMaterial;
|
|
5776
5794
|
private _contentMaterial;
|
|
5777
5795
|
private _pickedPointObserver;
|
|
5778
5796
|
private _positionChangedObserver;
|
|
5779
|
-
private
|
|
5797
|
+
private _titleText;
|
|
5798
|
+
private _titleTextComponent;
|
|
5780
5799
|
private _contentViewport;
|
|
5781
5800
|
private _contentDragBehavior;
|
|
5782
5801
|
private _defaultBehavior;
|
|
@@ -5786,21 +5805,42 @@ declare module "babylonjs-gui/3D/controls/holographicSlate" {
|
|
|
5786
5805
|
get defaultBehavior(): DefaultBehavior;
|
|
5787
5806
|
/** @hidden */
|
|
5788
5807
|
_gizmo: SlateGizmo;
|
|
5789
|
-
protected
|
|
5808
|
+
protected _titleBar: Mesh;
|
|
5809
|
+
protected _titleBarTitle: Mesh;
|
|
5790
5810
|
protected _contentPlate: Mesh;
|
|
5791
|
-
protected
|
|
5811
|
+
protected _backPlate: Mesh;
|
|
5812
|
+
/** @hidden */
|
|
5813
|
+
_followButton: TouchHolographicButton;
|
|
5792
5814
|
protected _closeButton: TouchHolographicButton;
|
|
5793
5815
|
protected _contentScaleRatio: number;
|
|
5794
5816
|
/**
|
|
5795
|
-
*
|
|
5817
|
+
* 2D dimensions of the slate
|
|
5818
|
+
*/
|
|
5819
|
+
get dimensions(): Vector2;
|
|
5820
|
+
set dimensions(value: Vector2);
|
|
5821
|
+
/**
|
|
5822
|
+
* Minimum dimensions of the slate
|
|
5823
|
+
*/
|
|
5824
|
+
minDimensions: Vector2;
|
|
5825
|
+
/**
|
|
5826
|
+
* Default dimensions of the slate
|
|
5827
|
+
*/
|
|
5828
|
+
readonly defaultDimensions: Vector2;
|
|
5829
|
+
/**
|
|
5830
|
+
* Height of the title bar component
|
|
5831
|
+
*/
|
|
5832
|
+
get titleBarHeight(): number;
|
|
5833
|
+
set titleBarHeight(value: number);
|
|
5834
|
+
/**
|
|
5835
|
+
* Rendering ground id of all the meshes
|
|
5796
5836
|
*/
|
|
5797
5837
|
set renderingGroupId(id: number);
|
|
5798
5838
|
get renderingGroupId(): number;
|
|
5799
5839
|
/**
|
|
5800
|
-
*
|
|
5840
|
+
* The title text displayed at the top of the slate
|
|
5801
5841
|
*/
|
|
5802
|
-
|
|
5803
|
-
|
|
5842
|
+
set title(title: string);
|
|
5843
|
+
get title(): string;
|
|
5804
5844
|
/**
|
|
5805
5845
|
* Creates a new slate
|
|
5806
5846
|
* @param name defines the control name
|
|
@@ -5812,7 +5852,6 @@ declare module "babylonjs-gui/3D/controls/holographicSlate" {
|
|
|
5812
5852
|
* @param facadeTexture defines the AdvancedDynamicTexture to use
|
|
5813
5853
|
*/
|
|
5814
5854
|
protected _applyFacade(facadeTexture: AdvancedDynamicTexture): void;
|
|
5815
|
-
private _rebuildContent;
|
|
5816
5855
|
private _addControl;
|
|
5817
5856
|
protected _getTypeName(): string;
|
|
5818
5857
|
/**
|
|
@@ -5832,8 +5871,9 @@ declare module "babylonjs-gui/3D/controls/holographicSlate" {
|
|
|
5832
5871
|
_prepareNode(scene: Scene): void;
|
|
5833
5872
|
/**
|
|
5834
5873
|
* Resets the aspect and pose of the slate so it is right in front of the active camera, facing towards it.
|
|
5874
|
+
* @param resetAspect Should the slate's dimensions/aspect ratio be reset as well
|
|
5835
5875
|
*/
|
|
5836
|
-
resetDefaultAspectAndPose(): void;
|
|
5876
|
+
resetDefaultAspectAndPose(resetAspect?: boolean): void;
|
|
5837
5877
|
/**
|
|
5838
5878
|
* Releases all associated resources
|
|
5839
5879
|
*/
|
|
@@ -6927,6 +6967,7 @@ declare module "babylonjs-gui/3D/controls/slider3D" {
|
|
|
6927
6967
|
private _maximum;
|
|
6928
6968
|
private _value;
|
|
6929
6969
|
private _step;
|
|
6970
|
+
private _draggedPosition;
|
|
6930
6971
|
/** Observable raised when the sldier value changes */
|
|
6931
6972
|
onValueChangedObservable: Observable<number>;
|
|
6932
6973
|
/**
|
|
@@ -7545,6 +7586,7 @@ declare module BABYLON.GUI {
|
|
|
7545
7586
|
private _resizeObserver;
|
|
7546
7587
|
private _preKeyboardObserver;
|
|
7547
7588
|
private _pointerMoveObserver;
|
|
7589
|
+
private _sceneRenderObserver;
|
|
7548
7590
|
private _pointerObserver;
|
|
7549
7591
|
private _canvasPointerOutObserver;
|
|
7550
7592
|
private _canvasBlurObserver;
|
|
@@ -7717,6 +7759,13 @@ declare module BABYLON.GUI {
|
|
|
7717
7759
|
*/
|
|
7718
7760
|
get clipboardData(): string;
|
|
7719
7761
|
set clipboardData(value: string);
|
|
7762
|
+
/**
|
|
7763
|
+
* If set to true, every scene render will trigger a pointer event for the GUI
|
|
7764
|
+
* if it is linked to a mesh or has controls linked to a mesh. This will allow
|
|
7765
|
+
* you to catch the pointer moving around the GUI due to camera or mesh movements,
|
|
7766
|
+
* but it has a performance cost.
|
|
7767
|
+
*/
|
|
7768
|
+
checkPointerEveryFrame: boolean;
|
|
7720
7769
|
/**
|
|
7721
7770
|
* Creates a new AdvancedDynamicTexture
|
|
7722
7771
|
* @param name defines the name of the texture
|
|
@@ -7819,6 +7868,7 @@ declare module BABYLON.GUI {
|
|
|
7819
7868
|
}, control: Control): void;
|
|
7820
7869
|
/** @hidden */
|
|
7821
7870
|
_cleanControlAfterRemoval(control: Control): void;
|
|
7871
|
+
private _translateToPicking;
|
|
7822
7872
|
/** Attach to all scene events required to support pointer events */
|
|
7823
7873
|
attach(): void;
|
|
7824
7874
|
/** @hidden */
|
|
@@ -7847,6 +7897,7 @@ declare module BABYLON.GUI {
|
|
|
7847
7897
|
*/
|
|
7848
7898
|
moveFocusToControl(control: IFocusableControl): void;
|
|
7849
7899
|
private _manageFocus;
|
|
7900
|
+
private _attachPickingToSceneRender;
|
|
7850
7901
|
private _attachToOnPointerOut;
|
|
7851
7902
|
private _attachToOnBlur;
|
|
7852
7903
|
/**
|
|
@@ -7889,9 +7940,11 @@ declare module BABYLON.GUI {
|
|
|
7889
7940
|
* @param supportPointerMove defines a boolean indicating if the texture must capture move events (true by default)
|
|
7890
7941
|
* @param onlyAlphaTesting defines a boolean indicating that alpha blending will not be used (only alpha testing) (false by default)
|
|
7891
7942
|
* @param invertY defines if the texture needs to be inverted on the y axis during loading (true by default)
|
|
7943
|
+
* @param materialSetupCallback defines a custom way of creating and seting up the material on the mesh
|
|
7892
7944
|
* @returns a new AdvancedDynamicTexture
|
|
7893
7945
|
*/
|
|
7894
|
-
static CreateForMesh(mesh: BABYLON.AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean, invertY?: boolean): AdvancedDynamicTexture;
|
|
7946
|
+
static CreateForMesh(mesh: BABYLON.AbstractMesh, width?: number, height?: number, supportPointerMove?: boolean, onlyAlphaTesting?: boolean, invertY?: boolean, materialSetupCallback?: (mesh: BABYLON.AbstractMesh, uniqueId: string, texture: AdvancedDynamicTexture, onlyAlphaTesting: boolean) => void): AdvancedDynamicTexture;
|
|
7947
|
+
private static _CreateMaterial;
|
|
7895
7948
|
/**
|
|
7896
7949
|
* Creates a new AdvancedDynamicTexture in projected mode (ie. attached to a mesh) BUT do not create a new material for the mesh. You will be responsible for connecting the texture
|
|
7897
7950
|
* @param mesh defines the mesh which will receive the texture
|
|
@@ -8531,7 +8584,7 @@ declare module BABYLON.GUI {
|
|
|
8531
8584
|
/** @hidden */
|
|
8532
8585
|
_flagDescendantsAsMatrixDirty(): void;
|
|
8533
8586
|
/** @hidden */
|
|
8534
|
-
_intersectsRect(rect: Measure): boolean;
|
|
8587
|
+
_intersectsRect(rect: Measure, context?: BABYLON.ICanvasRenderingContext): boolean;
|
|
8535
8588
|
/** @hidden */
|
|
8536
8589
|
protected _computeAdditionnalOffsetX(): number;
|
|
8537
8590
|
/** @hidden */
|
|
@@ -8582,17 +8635,17 @@ declare module BABYLON.GUI {
|
|
|
8582
8635
|
*/
|
|
8583
8636
|
contains(x: number, y: number): boolean;
|
|
8584
8637
|
/** @hidden */
|
|
8585
|
-
_processPicking(x: number, y: number, pi: BABYLON.PointerInfoBase
|
|
8638
|
+
_processPicking(x: number, y: number, pi: BABYLON.Nullable<BABYLON.PointerInfoBase>, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
|
|
8586
8639
|
/** @hidden */
|
|
8587
|
-
_onPointerMove(target: Control, coordinates: BABYLON.Vector2, pointerId: number, pi: BABYLON.PointerInfoBase): void;
|
|
8640
|
+
_onPointerMove(target: Control, coordinates: BABYLON.Vector2, pointerId: number, pi: BABYLON.Nullable<BABYLON.PointerInfoBase>): void;
|
|
8588
8641
|
/** @hidden */
|
|
8589
|
-
_onPointerEnter(target: Control, pi: BABYLON.PointerInfoBase): boolean;
|
|
8642
|
+
_onPointerEnter(target: Control, pi: BABYLON.Nullable<BABYLON.PointerInfoBase>): boolean;
|
|
8590
8643
|
/** @hidden */
|
|
8591
8644
|
_onPointerOut(target: Control, pi: BABYLON.Nullable<BABYLON.PointerInfoBase>, force?: boolean): void;
|
|
8592
8645
|
/** @hidden */
|
|
8593
|
-
_onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, pi: BABYLON.PointerInfoBase): boolean;
|
|
8646
|
+
_onPointerDown(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, pi: BABYLON.Nullable<BABYLON.PointerInfoBase>): boolean;
|
|
8594
8647
|
/** @hidden */
|
|
8595
|
-
_onPointerUp(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi?: BABYLON.PointerInfoBase): void;
|
|
8648
|
+
_onPointerUp(target: Control, coordinates: BABYLON.Vector2, pointerId: number, buttonIndex: number, notifyClick: boolean, pi?: BABYLON.Nullable<BABYLON.PointerInfoBase>): void;
|
|
8596
8649
|
/** @hidden */
|
|
8597
8650
|
_forcePointerUp(pointerId?: BABYLON.Nullable<number>): void;
|
|
8598
8651
|
/** @hidden */
|
|
@@ -8600,7 +8653,7 @@ declare module BABYLON.GUI {
|
|
|
8600
8653
|
/** @hidden */
|
|
8601
8654
|
_onCanvasBlur(): void;
|
|
8602
8655
|
/** @hidden */
|
|
8603
|
-
_processObservables(type: number, x: number, y: number, pi: BABYLON.PointerInfoBase
|
|
8656
|
+
_processObservables(type: number, x: number, y: number, pi: BABYLON.Nullable<BABYLON.PointerInfoBase>, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
|
|
8604
8657
|
private _prepareFont;
|
|
8605
8658
|
/**
|
|
8606
8659
|
* Serializes the current control
|
|
@@ -8772,7 +8825,7 @@ declare module BABYLON.GUI {
|
|
|
8772
8825
|
_draw(context: BABYLON.ICanvasRenderingContext, invalidatedRectangle?: Measure): void;
|
|
8773
8826
|
getDescendantsToRef(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void;
|
|
8774
8827
|
/** @hidden */
|
|
8775
|
-
_processPicking(x: number, y: number, pi: BABYLON.PointerInfoBase
|
|
8828
|
+
_processPicking(x: number, y: number, pi: BABYLON.Nullable<BABYLON.PointerInfoBase>, type: number, pointerId: number, buttonIndex: number, deltaX?: number, deltaY?: number): boolean;
|
|
8776
8829
|
/** @hidden */
|
|
8777
8830
|
protected _additionalProcessing(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): void;
|
|
8778
8831
|
/**
|
|
@@ -8969,6 +9022,7 @@ declare module BABYLON.GUI {
|
|
|
8969
9022
|
protected _applyStates(context: BABYLON.ICanvasRenderingContext): void;
|
|
8970
9023
|
protected _breakLines(refWidth: number, refHeight: number, context: BABYLON.ICanvasRenderingContext): object[];
|
|
8971
9024
|
protected _parseLine(line: string | undefined, context: BABYLON.ICanvasRenderingContext): object;
|
|
9025
|
+
private _getCharsToRemove;
|
|
8972
9026
|
protected _parseLineEllipsis(line: string | undefined, width: number, context: BABYLON.ICanvasRenderingContext): object;
|
|
8973
9027
|
protected _parseLineWordWrap(line: string | undefined, width: number, context: BABYLON.ICanvasRenderingContext): object[];
|
|
8974
9028
|
protected _parseLineWordWrapEllipsis(line: string | undefined, width: number, height: number, context: BABYLON.ICanvasRenderingContext): object[];
|
|
@@ -9492,6 +9546,8 @@ declare module BABYLON.GUI {
|
|
|
9492
9546
|
private _autoStretchWidth;
|
|
9493
9547
|
private _maxWidth;
|
|
9494
9548
|
private _isFocused;
|
|
9549
|
+
/** the type of device that most recently focused the input: "mouse", "touch" or "pen" */
|
|
9550
|
+
private _focusedBy;
|
|
9495
9551
|
private _blinkTimeout;
|
|
9496
9552
|
private _blinkIsEven;
|
|
9497
9553
|
private _cursorOffset;
|
|
@@ -11279,7 +11335,8 @@ declare module BABYLON.GUI {
|
|
|
11279
11335
|
export class TouchButton3D extends Button3D {
|
|
11280
11336
|
private _collisionMesh;
|
|
11281
11337
|
private _collidableFrontDirection;
|
|
11282
|
-
|
|
11338
|
+
private _isNearPressed;
|
|
11339
|
+
private _interactionSurfaceHeight;
|
|
11283
11340
|
private _isToggleButton;
|
|
11284
11341
|
private _toggleState;
|
|
11285
11342
|
private _toggleButtonCallback;
|
|
@@ -11293,6 +11350,10 @@ declare module BABYLON.GUI {
|
|
|
11293
11350
|
* @param collisionMesh mesh to track collisions with
|
|
11294
11351
|
*/
|
|
11295
11352
|
constructor(name?: string, collisionMesh?: BABYLON.Mesh);
|
|
11353
|
+
/**
|
|
11354
|
+
* Whether the current interaction is caused by near interaction or not
|
|
11355
|
+
*/
|
|
11356
|
+
get isActiveNearInteraction(): boolean;
|
|
11296
11357
|
/**
|
|
11297
11358
|
* Sets the front-facing direction of the button. Pass in BABYLON.Vector3.Zero to allow interactions from any direction
|
|
11298
11359
|
* @param frontDir the forward direction of the button
|
|
@@ -11321,6 +11382,12 @@ declare module BABYLON.GUI {
|
|
|
11321
11382
|
get isToggled(): boolean;
|
|
11322
11383
|
protected _onToggle(newState: boolean): void;
|
|
11323
11384
|
private _isInteractionInFrontOfButton;
|
|
11385
|
+
/**
|
|
11386
|
+
* Get the height of the touchPoint from the collidable part of the button
|
|
11387
|
+
* @param touchPoint the point to compare to the button, in absolute position
|
|
11388
|
+
* @returns the depth of the touch point into the front of the button
|
|
11389
|
+
*/
|
|
11390
|
+
getPressDepth(touchPoint: BABYLON.Vector3): number;
|
|
11324
11391
|
protected _getInteractionHeight(interactionPos: BABYLON.Vector3, basePos: BABYLON.Vector3): number;
|
|
11325
11392
|
/** @hidden */
|
|
11326
11393
|
_generatePointerEventType(providedType: number, nearMeshPosition: BABYLON.Vector3, activeInteractionCount: number): number;
|
|
@@ -12003,6 +12070,10 @@ declare module BABYLON.GUI {
|
|
|
12003
12070
|
*/
|
|
12004
12071
|
set renderingGroupId(id: number);
|
|
12005
12072
|
get renderingGroupId(): number;
|
|
12073
|
+
/**
|
|
12074
|
+
* Gets the mesh used to render this control
|
|
12075
|
+
*/
|
|
12076
|
+
get mesh(): BABYLON.Nullable<BABYLON.AbstractMesh>;
|
|
12006
12077
|
/**
|
|
12007
12078
|
* Text to be displayed on the tooltip shown when hovering on the button. When set to null tooltip is disabled. (Default: null)
|
|
12008
12079
|
*/
|
|
@@ -12058,6 +12129,74 @@ declare module BABYLON.GUI {
|
|
|
12058
12129
|
dispose(): void;
|
|
12059
12130
|
}
|
|
12060
12131
|
}
|
|
12132
|
+
declare module BABYLON.GUI {
|
|
12133
|
+
/**
|
|
12134
|
+
* Default behavior for 3D UI elements.
|
|
12135
|
+
* Handles a BABYLON.FollowBehavior, SixDofBehavior and BABYLON.SurfaceMagnetismBehavior
|
|
12136
|
+
* @since 5.0.0
|
|
12137
|
+
*/
|
|
12138
|
+
export class DefaultBehavior implements BABYLON.Behavior<BABYLON.Mesh> {
|
|
12139
|
+
private _scene;
|
|
12140
|
+
private _followBehavior;
|
|
12141
|
+
private _sixDofDragBehavior;
|
|
12142
|
+
private _surfaceMagnetismBehavior;
|
|
12143
|
+
private _onBeforeRenderObserver;
|
|
12144
|
+
private _onDragObserver;
|
|
12145
|
+
/**
|
|
12146
|
+
* Instantiates the default behavior
|
|
12147
|
+
*/
|
|
12148
|
+
constructor();
|
|
12149
|
+
/**
|
|
12150
|
+
* Attached node of this behavior
|
|
12151
|
+
*/
|
|
12152
|
+
attachedNode: BABYLON.Nullable<BABYLON.Mesh>;
|
|
12153
|
+
/**
|
|
12154
|
+
* The name of the behavior
|
|
12155
|
+
*/
|
|
12156
|
+
get name(): string;
|
|
12157
|
+
/**
|
|
12158
|
+
* The follow behavior
|
|
12159
|
+
*/
|
|
12160
|
+
get followBehavior(): BABYLON.FollowBehavior;
|
|
12161
|
+
/**
|
|
12162
|
+
* The six DoF drag behavior
|
|
12163
|
+
*/
|
|
12164
|
+
get sixDofDragBehavior(): BABYLON.SixDofDragBehavior;
|
|
12165
|
+
/**
|
|
12166
|
+
* The surface magnetism behavior
|
|
12167
|
+
*/
|
|
12168
|
+
get surfaceMagnetismBehavior(): BABYLON.SurfaceMagnetismBehavior;
|
|
12169
|
+
/**
|
|
12170
|
+
* Enables the follow behavior
|
|
12171
|
+
*/
|
|
12172
|
+
followBehaviorEnabled: boolean;
|
|
12173
|
+
/**
|
|
12174
|
+
* Enables the six DoF drag behavior
|
|
12175
|
+
*/
|
|
12176
|
+
sixDofDragBehaviorEnabled: boolean;
|
|
12177
|
+
/**
|
|
12178
|
+
* Enables the surface magnetism behavior
|
|
12179
|
+
*/
|
|
12180
|
+
surfaceMagnetismBehaviorEnabled: boolean;
|
|
12181
|
+
/**
|
|
12182
|
+
* Initializes the behavior
|
|
12183
|
+
*/
|
|
12184
|
+
init(): void;
|
|
12185
|
+
/**
|
|
12186
|
+
* Attaches the default behavior
|
|
12187
|
+
* @param ownerMesh The top level mesh
|
|
12188
|
+
* @param draggablesMeshes Descendant meshes that can be used for dragging the owner mesh
|
|
12189
|
+
* @param sceneUnderstandingMeshes Meshes from the scene understanding that will be used for surface magnetism
|
|
12190
|
+
*/
|
|
12191
|
+
attach(ownerMesh: BABYLON.Mesh, draggablesMeshes?: BABYLON.Mesh[], sceneUnderstandingMeshes?: BABYLON.AbstractMesh[]): void;
|
|
12192
|
+
/**
|
|
12193
|
+
* Detaches the behavior from the mesh
|
|
12194
|
+
*/
|
|
12195
|
+
detach(): void;
|
|
12196
|
+
private _addObservables;
|
|
12197
|
+
private _removeObservables;
|
|
12198
|
+
}
|
|
12199
|
+
}
|
|
12061
12200
|
declare module BABYLON.GUI {
|
|
12062
12201
|
/** @hidden */
|
|
12063
12202
|
export var handleVertexShader: {
|
|
@@ -12260,6 +12399,7 @@ declare module BABYLON.GUI {
|
|
|
12260
12399
|
* Value we use to offset handles from mesh
|
|
12261
12400
|
*/
|
|
12262
12401
|
private _margin;
|
|
12402
|
+
private _handleSize;
|
|
12263
12403
|
private _attachedSlate;
|
|
12264
12404
|
private _existingSlateScale;
|
|
12265
12405
|
/**
|
|
@@ -12270,10 +12410,6 @@ declare module BABYLON.GUI {
|
|
|
12270
12410
|
* The distance away from the object which the draggable meshes should appear world sized when fixedScreenSize is set to true (default: 10)
|
|
12271
12411
|
*/
|
|
12272
12412
|
fixedScreenSizeDistanceFactor: number;
|
|
12273
|
-
/**
|
|
12274
|
-
* Size of the handles (meters in XR)
|
|
12275
|
-
*/
|
|
12276
|
-
handleSize: number;
|
|
12277
12413
|
/**
|
|
12278
12414
|
* The slate attached to this gizmo
|
|
12279
12415
|
*/
|
|
@@ -12292,78 +12428,11 @@ declare module BABYLON.GUI {
|
|
|
12292
12428
|
*/
|
|
12293
12429
|
updateBoundingBox(): void;
|
|
12294
12430
|
private _updateHandlesPosition;
|
|
12431
|
+
private _updateHandlesScaling;
|
|
12295
12432
|
protected _update(): void;
|
|
12296
12433
|
dispose(): void;
|
|
12297
12434
|
}
|
|
12298
12435
|
}
|
|
12299
|
-
declare module BABYLON.GUI {
|
|
12300
|
-
/**
|
|
12301
|
-
* Default behavior for 3D UI elements.
|
|
12302
|
-
* Handles a BABYLON.FollowBehavior, SixDofBehavior and BABYLON.SurfaceMagnetismBehavior
|
|
12303
|
-
* @since 5.0.0
|
|
12304
|
-
*/
|
|
12305
|
-
export class DefaultBehavior implements BABYLON.Behavior<BABYLON.Mesh> {
|
|
12306
|
-
private _scene;
|
|
12307
|
-
private _followBehavior;
|
|
12308
|
-
private _sixDofDragBehavior;
|
|
12309
|
-
private _surfaceMagnetismBehavior;
|
|
12310
|
-
private _onBeforeRenderObserver;
|
|
12311
|
-
private _onDragObserver;
|
|
12312
|
-
/**
|
|
12313
|
-
* Instantiates the default behavior
|
|
12314
|
-
*/
|
|
12315
|
-
constructor();
|
|
12316
|
-
/**
|
|
12317
|
-
* Attached node of this behavior
|
|
12318
|
-
*/
|
|
12319
|
-
attachedNode: BABYLON.Nullable<BABYLON.Mesh>;
|
|
12320
|
-
/**
|
|
12321
|
-
* The name of the behavior
|
|
12322
|
-
*/
|
|
12323
|
-
get name(): string;
|
|
12324
|
-
/**
|
|
12325
|
-
* The follow behavior
|
|
12326
|
-
*/
|
|
12327
|
-
get followBehavior(): BABYLON.FollowBehavior;
|
|
12328
|
-
/**
|
|
12329
|
-
* The six DoF drag behavior
|
|
12330
|
-
*/
|
|
12331
|
-
get sixDofDragBehavior(): BABYLON.SixDofDragBehavior;
|
|
12332
|
-
/**
|
|
12333
|
-
* The surface magnetism behavior
|
|
12334
|
-
*/
|
|
12335
|
-
get surfaceMagnetismBehavior(): BABYLON.SurfaceMagnetismBehavior;
|
|
12336
|
-
/**
|
|
12337
|
-
* Enables the follow behavior
|
|
12338
|
-
*/
|
|
12339
|
-
followBehaviorEnabled: boolean;
|
|
12340
|
-
/**
|
|
12341
|
-
* Enables the six DoF drag behavior
|
|
12342
|
-
*/
|
|
12343
|
-
sixDofDragBehaviorEnabled: boolean;
|
|
12344
|
-
/**
|
|
12345
|
-
* Enables the surface magnetism behavior
|
|
12346
|
-
*/
|
|
12347
|
-
surfaceMagnetismBehaviorEnabled: boolean;
|
|
12348
|
-
/**
|
|
12349
|
-
* Initializes the behavior
|
|
12350
|
-
*/
|
|
12351
|
-
init(): void;
|
|
12352
|
-
/**
|
|
12353
|
-
* Attaches the default behavior
|
|
12354
|
-
* @param ownerMesh The top level mesh
|
|
12355
|
-
* @param draggablesMeshes Descendant meshes that can be used for dragging the owner mesh
|
|
12356
|
-
* @param sceneUnderstandingMeshes Meshes from the scene understanding that will be used for surface magnetism
|
|
12357
|
-
*/
|
|
12358
|
-
attach(ownerMesh: BABYLON.Mesh, draggablesMeshes?: BABYLON.Mesh[], sceneUnderstandingMeshes?: BABYLON.AbstractMesh[]): void;
|
|
12359
|
-
/**
|
|
12360
|
-
* Detaches the behavior from the mesh
|
|
12361
|
-
*/
|
|
12362
|
-
detach(): void;
|
|
12363
|
-
private _addObservables;
|
|
12364
|
-
private _removeObservables;
|
|
12365
|
-
}
|
|
12366
|
-
}
|
|
12367
12436
|
declare module BABYLON.GUI {
|
|
12368
12437
|
/** @hidden */
|
|
12369
12438
|
export var fluentBackplatePixelShader: {
|
|
@@ -12540,35 +12609,24 @@ declare module BABYLON.GUI {
|
|
|
12540
12609
|
* File name for the close icon.
|
|
12541
12610
|
*/
|
|
12542
12611
|
static FOLLOW_ICON_FILENAME: string;
|
|
12612
|
+
private static DEFAULT_TEXT_RESOLUTION_Y;
|
|
12543
12613
|
/**
|
|
12544
|
-
*
|
|
12545
|
-
*/
|
|
12546
|
-
dimensions: BABYLON.Vector3;
|
|
12547
|
-
/**
|
|
12548
|
-
* Minimum dimensions of the slate
|
|
12549
|
-
*/
|
|
12550
|
-
minDimensions: BABYLON.Vector3;
|
|
12551
|
-
/**
|
|
12552
|
-
* Default dimensions of the slate
|
|
12614
|
+
* Margin between title bar and contentplate
|
|
12553
12615
|
*/
|
|
12554
|
-
|
|
12555
|
-
/**
|
|
12556
|
-
* Dimensions of the backplate
|
|
12557
|
-
*/
|
|
12558
|
-
backplateDimensions: BABYLON.Vector3;
|
|
12559
|
-
/**
|
|
12560
|
-
* Margin between backplate and contentplate
|
|
12561
|
-
*/
|
|
12562
|
-
backPlateMargin: number;
|
|
12616
|
+
titleBarMargin: number;
|
|
12563
12617
|
/**
|
|
12564
12618
|
* Origin in local coordinates (top left corner)
|
|
12565
12619
|
*/
|
|
12566
12620
|
origin: BABYLON.Vector3;
|
|
12567
|
-
private
|
|
12621
|
+
private _dimensions;
|
|
12622
|
+
private _titleBarHeight;
|
|
12623
|
+
private _titleBarMaterial;
|
|
12624
|
+
private _backMaterial;
|
|
12568
12625
|
private _contentMaterial;
|
|
12569
12626
|
private _pickedPointObserver;
|
|
12570
12627
|
private _positionChangedObserver;
|
|
12571
|
-
private
|
|
12628
|
+
private _titleText;
|
|
12629
|
+
private _titleTextComponent;
|
|
12572
12630
|
private _contentViewport;
|
|
12573
12631
|
private _contentDragBehavior;
|
|
12574
12632
|
private _defaultBehavior;
|
|
@@ -12578,21 +12636,42 @@ declare module BABYLON.GUI {
|
|
|
12578
12636
|
get defaultBehavior(): DefaultBehavior;
|
|
12579
12637
|
/** @hidden */
|
|
12580
12638
|
_gizmo: SlateGizmo;
|
|
12581
|
-
protected
|
|
12639
|
+
protected _titleBar: BABYLON.Mesh;
|
|
12640
|
+
protected _titleBarTitle: BABYLON.Mesh;
|
|
12582
12641
|
protected _contentPlate: BABYLON.Mesh;
|
|
12583
|
-
protected
|
|
12642
|
+
protected _backPlate: BABYLON.Mesh;
|
|
12643
|
+
/** @hidden */
|
|
12644
|
+
_followButton: TouchHolographicButton;
|
|
12584
12645
|
protected _closeButton: TouchHolographicButton;
|
|
12585
12646
|
protected _contentScaleRatio: number;
|
|
12586
12647
|
/**
|
|
12587
|
-
*
|
|
12648
|
+
* 2D dimensions of the slate
|
|
12649
|
+
*/
|
|
12650
|
+
get dimensions(): BABYLON.Vector2;
|
|
12651
|
+
set dimensions(value: BABYLON.Vector2);
|
|
12652
|
+
/**
|
|
12653
|
+
* Minimum dimensions of the slate
|
|
12654
|
+
*/
|
|
12655
|
+
minDimensions: BABYLON.Vector2;
|
|
12656
|
+
/**
|
|
12657
|
+
* Default dimensions of the slate
|
|
12658
|
+
*/
|
|
12659
|
+
readonly defaultDimensions: BABYLON.Vector2;
|
|
12660
|
+
/**
|
|
12661
|
+
* Height of the title bar component
|
|
12662
|
+
*/
|
|
12663
|
+
get titleBarHeight(): number;
|
|
12664
|
+
set titleBarHeight(value: number);
|
|
12665
|
+
/**
|
|
12666
|
+
* Rendering ground id of all the meshes
|
|
12588
12667
|
*/
|
|
12589
12668
|
set renderingGroupId(id: number);
|
|
12590
12669
|
get renderingGroupId(): number;
|
|
12591
12670
|
/**
|
|
12592
|
-
*
|
|
12671
|
+
* The title text displayed at the top of the slate
|
|
12593
12672
|
*/
|
|
12594
|
-
|
|
12595
|
-
|
|
12673
|
+
set title(title: string);
|
|
12674
|
+
get title(): string;
|
|
12596
12675
|
/**
|
|
12597
12676
|
* Creates a new slate
|
|
12598
12677
|
* @param name defines the control name
|
|
@@ -12604,7 +12683,6 @@ declare module BABYLON.GUI {
|
|
|
12604
12683
|
* @param facadeTexture defines the AdvancedDynamicTexture to use
|
|
12605
12684
|
*/
|
|
12606
12685
|
protected _applyFacade(facadeTexture: AdvancedDynamicTexture): void;
|
|
12607
|
-
private _rebuildContent;
|
|
12608
12686
|
private _addControl;
|
|
12609
12687
|
protected _getTypeName(): string;
|
|
12610
12688
|
/**
|
|
@@ -12624,8 +12702,9 @@ declare module BABYLON.GUI {
|
|
|
12624
12702
|
_prepareNode(scene: BABYLON.Scene): void;
|
|
12625
12703
|
/**
|
|
12626
12704
|
* Resets the aspect and pose of the slate so it is right in front of the active camera, facing towards it.
|
|
12705
|
+
* @param resetAspect Should the slate's dimensions/aspect ratio be reset as well
|
|
12627
12706
|
*/
|
|
12628
|
-
resetDefaultAspectAndPose(): void;
|
|
12707
|
+
resetDefaultAspectAndPose(resetAspect?: boolean): void;
|
|
12629
12708
|
/**
|
|
12630
12709
|
* Releases all associated resources
|
|
12631
12710
|
*/
|
|
@@ -13639,6 +13718,7 @@ declare module BABYLON.GUI {
|
|
|
13639
13718
|
private _maximum;
|
|
13640
13719
|
private _value;
|
|
13641
13720
|
private _step;
|
|
13721
|
+
private _draggedPosition;
|
|
13642
13722
|
/** BABYLON.Observable raised when the sldier value changes */
|
|
13643
13723
|
onValueChangedObservable: BABYLON.Observable<number>;
|
|
13644
13724
|
/**
|