babylonjs-gui 5.15.1 → 5.17.1
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.d.ts +40 -8
- package/babylon.gui.js +112 -47
- package/babylon.gui.js.map +1 -1
- package/babylon.gui.min.js +1 -1
- package/babylon.gui.min.js.map +1 -1
- package/babylon.gui.module.d.ts +80 -16
- package/package.json +2 -2
package/babylon.gui.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare module BABYLON.GUI {
|
|
|
66
66
|
private _renderObserver;
|
|
67
67
|
private _resizeObserver;
|
|
68
68
|
private _preKeyboardObserver;
|
|
69
|
-
private
|
|
69
|
+
private _prePointerObserver;
|
|
70
70
|
private _sceneRenderObserver;
|
|
71
71
|
private _pointerObserver;
|
|
72
72
|
private _canvasPointerOutObserver;
|
|
@@ -414,21 +414,45 @@ declare module BABYLON.GUI {
|
|
|
414
414
|
* @param serializedObject define the JSON serialized object to restore from
|
|
415
415
|
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
416
416
|
*/
|
|
417
|
-
|
|
417
|
+
parseSerializedObject(serializedObject: any, scaleToSize?: boolean): void;
|
|
418
|
+
/**
|
|
419
|
+
* Recreate the content of the ADT from a JSON object
|
|
420
|
+
* @param serializedObject define the JSON serialized object to restore from
|
|
421
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
422
|
+
* @deprecated Please use parseSerializedObject instead
|
|
423
|
+
*/
|
|
424
|
+
parseContent: (serializedObject: any, scaleToSize?: boolean | undefined) => void;
|
|
425
|
+
/**
|
|
426
|
+
* Recreate the content of the ADT from a snippet saved by the GUI editor
|
|
427
|
+
* @param snippetId defines the snippet to load
|
|
428
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
429
|
+
* @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
|
|
430
|
+
* @returns a promise that will resolve on success
|
|
431
|
+
*/
|
|
432
|
+
static ParseFromSnippetAsync(snippetId: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture): Promise<AdvancedDynamicTexture>;
|
|
418
433
|
/**
|
|
419
434
|
* Recreate the content of the ADT from a snippet saved by the GUI editor
|
|
420
435
|
* @param snippetId defines the snippet to load
|
|
421
436
|
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
422
437
|
* @returns a promise that will resolve on success
|
|
423
438
|
*/
|
|
424
|
-
parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<
|
|
439
|
+
parseFromSnippetAsync(snippetId: string, scaleToSize?: boolean): Promise<AdvancedDynamicTexture>;
|
|
440
|
+
/**
|
|
441
|
+
* Recreate the content of the ADT from a url json
|
|
442
|
+
* @param url defines the url to load
|
|
443
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
444
|
+
* @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
|
|
445
|
+
* @returns a promise that will resolve on success
|
|
446
|
+
*/
|
|
447
|
+
static ParseFromFileAsync(url: string, scaleToSize?: boolean, appendToAdt?: AdvancedDynamicTexture): Promise<AdvancedDynamicTexture>;
|
|
425
448
|
/**
|
|
426
449
|
* Recreate the content of the ADT from a url json
|
|
427
450
|
* @param url defines the url to load
|
|
428
451
|
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
429
452
|
* @returns a promise that will resolve on success
|
|
430
453
|
*/
|
|
431
|
-
parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<
|
|
454
|
+
parseFromURLAsync(url: string, scaleToSize?: boolean): Promise<AdvancedDynamicTexture>;
|
|
455
|
+
private static _LoadURLContentAsync;
|
|
432
456
|
/**
|
|
433
457
|
* Compares two rectangle based controls for pixel overlap
|
|
434
458
|
* @param control1 The first control to compare
|
|
@@ -1063,7 +1087,13 @@ declare module BABYLON.GUI {
|
|
|
1063
1087
|
metadata: any;
|
|
1064
1088
|
/** Gets or sets a boolean indicating if the control can be hit with pointer events */
|
|
1065
1089
|
isHitTestVisible: boolean;
|
|
1066
|
-
/** Gets or sets a boolean indicating if the control can block pointer events
|
|
1090
|
+
/** Gets or sets a boolean indicating if the control can block pointer events. False by default except on the following controls:
|
|
1091
|
+
* * Button controls (Button, RadioButton, ToggleButton)
|
|
1092
|
+
* * Checkbox
|
|
1093
|
+
* * ColorPicker
|
|
1094
|
+
* * InputText
|
|
1095
|
+
* * Slider
|
|
1096
|
+
*/
|
|
1067
1097
|
isPointerBlocker: boolean;
|
|
1068
1098
|
/** Gets or sets a boolean indicating if the control can be focusable */
|
|
1069
1099
|
isFocusInvisible: boolean;
|
|
@@ -4735,13 +4765,13 @@ declare module BABYLON.GUI {
|
|
|
4735
4765
|
export class Control3D implements BABYLON.IDisposable, BABYLON.IBehaviorAware<Control3D> {
|
|
4736
4766
|
/** Defines the control name */
|
|
4737
4767
|
name?: string | undefined;
|
|
4738
|
-
/** @hidden */
|
|
4739
|
-
_host: GUI3DManager;
|
|
4740
4768
|
private _node;
|
|
4741
4769
|
private _downCount;
|
|
4742
4770
|
private _enterCount;
|
|
4743
4771
|
private _downPointerIds;
|
|
4744
|
-
|
|
4772
|
+
protected _isVisible: boolean;
|
|
4773
|
+
/** @hidden */
|
|
4774
|
+
_host: GUI3DManager;
|
|
4745
4775
|
/** @hidden */
|
|
4746
4776
|
_isScaledByManager: boolean;
|
|
4747
4777
|
/** Gets or sets the control position in world space */
|
|
@@ -5355,6 +5385,8 @@ declare module BABYLON.GUI {
|
|
|
5355
5385
|
* Gets the slider backplate material used by this control
|
|
5356
5386
|
*/
|
|
5357
5387
|
get sliderBackplateMaterial(): MRDLBackplateMaterial;
|
|
5388
|
+
/** Sets a boolean indicating if the control is visible */
|
|
5389
|
+
set isVisible(value: boolean);
|
|
5358
5390
|
protected _createNode(scene: BABYLON.Scene): BABYLON.TransformNode;
|
|
5359
5391
|
protected _affectMaterial(mesh: BABYLON.AbstractMesh): void;
|
|
5360
5392
|
private _createBehavior;
|
package/babylon.gui.js
CHANGED
|
@@ -603,6 +603,13 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
603
603
|
_this.onClipboardObservable.notifyObservers(ev);
|
|
604
604
|
evt.preventDefault();
|
|
605
605
|
};
|
|
606
|
+
/**
|
|
607
|
+
* Recreate the content of the ADT from a JSON object
|
|
608
|
+
* @param serializedObject define the JSON serialized object to restore from
|
|
609
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
610
|
+
* @deprecated Please use parseSerializedObject instead
|
|
611
|
+
*/
|
|
612
|
+
_this.parseContent = _this.parseSerializedObject;
|
|
606
613
|
scene = _this.getScene();
|
|
607
614
|
if (!scene || !_this._texture) {
|
|
608
615
|
return _this;
|
|
@@ -1048,8 +1055,8 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1048
1055
|
if (this._resizeObserver) {
|
|
1049
1056
|
scene.getEngine().onResizeObservable.remove(this._resizeObserver);
|
|
1050
1057
|
}
|
|
1051
|
-
if (this.
|
|
1052
|
-
scene.onPrePointerObservable.remove(this.
|
|
1058
|
+
if (this._prePointerObserver) {
|
|
1059
|
+
scene.onPrePointerObservable.remove(this._prePointerObserver);
|
|
1053
1060
|
}
|
|
1054
1061
|
if (this._sceneRenderObserver) {
|
|
1055
1062
|
scene.onBeforeRenderObservable.remove(this._sceneRenderObserver);
|
|
@@ -1261,6 +1268,9 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1261
1268
|
y = y * (textureSize.height / (engine.getRenderHeight() * viewport.height));
|
|
1262
1269
|
}
|
|
1263
1270
|
if (this._capturingControl[pointerId]) {
|
|
1271
|
+
if (this._capturingControl[pointerId].isPointerBlocker) {
|
|
1272
|
+
this._shouldBlockPointer = true;
|
|
1273
|
+
}
|
|
1264
1274
|
this._capturingControl[pointerId]._processObservables(type, x, y, pi, pointerId, buttonIndex);
|
|
1265
1275
|
return;
|
|
1266
1276
|
}
|
|
@@ -1368,18 +1378,21 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1368
1378
|
return;
|
|
1369
1379
|
}
|
|
1370
1380
|
var tempViewport = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.Viewport(0, 0, 0, 0);
|
|
1371
|
-
this.
|
|
1372
|
-
if (scene.isPointerCaptured(pi.event.pointerId)) {
|
|
1373
|
-
return;
|
|
1374
|
-
}
|
|
1381
|
+
this._prePointerObserver = scene.onPrePointerObservable.add(function (pi) {
|
|
1375
1382
|
if (pi.type !== core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERMOVE &&
|
|
1376
1383
|
pi.type !== core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERUP &&
|
|
1377
1384
|
pi.type !== core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERDOWN &&
|
|
1378
1385
|
pi.type !== core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERWHEEL) {
|
|
1379
1386
|
return;
|
|
1380
1387
|
}
|
|
1381
|
-
if (pi.type === core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERMOVE
|
|
1382
|
-
|
|
1388
|
+
if (pi.type === core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.PointerEventTypes.POINTERMOVE) {
|
|
1389
|
+
// Avoid pointerMove events firing while the pointer is captured by the scene
|
|
1390
|
+
if (scene.isPointerCaptured(pi.event.pointerId)) {
|
|
1391
|
+
return;
|
|
1392
|
+
}
|
|
1393
|
+
if (pi.event.pointerId) {
|
|
1394
|
+
_this._defaultMousePointerId = pi.event.pointerId; // This is required to make sure we have the correct pointer ID for wheel
|
|
1395
|
+
}
|
|
1383
1396
|
}
|
|
1384
1397
|
_this._translateToPicking(scene, tempViewport, pi);
|
|
1385
1398
|
});
|
|
@@ -1568,7 +1581,7 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1568
1581
|
* @param serializedObject define the JSON serialized object to restore from
|
|
1569
1582
|
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
1570
1583
|
*/
|
|
1571
|
-
AdvancedDynamicTexture.prototype.
|
|
1584
|
+
AdvancedDynamicTexture.prototype.parseSerializedObject = function (serializedObject, scaleToSize) {
|
|
1572
1585
|
this._rootContainer = _controls_control__WEBPACK_IMPORTED_MODULE_3__.Control.Parse(serializedObject.root, this);
|
|
1573
1586
|
if (scaleToSize) {
|
|
1574
1587
|
var width = serializedObject.width;
|
|
@@ -1582,6 +1595,32 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1582
1595
|
}
|
|
1583
1596
|
}
|
|
1584
1597
|
};
|
|
1598
|
+
/**
|
|
1599
|
+
* Recreate the content of the ADT from a snippet saved by the GUI editor
|
|
1600
|
+
* @param snippetId defines the snippet to load
|
|
1601
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
1602
|
+
* @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
|
|
1603
|
+
* @returns a promise that will resolve on success
|
|
1604
|
+
*/
|
|
1605
|
+
AdvancedDynamicTexture.ParseFromSnippetAsync = function (snippetId, scaleToSize, appendToAdt) {
|
|
1606
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
1607
|
+
var adt, serialized;
|
|
1608
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
1609
|
+
switch (_a.label) {
|
|
1610
|
+
case 0:
|
|
1611
|
+
adt = appendToAdt !== null && appendToAdt !== void 0 ? appendToAdt : AdvancedDynamicTexture.CreateFullscreenUI("ADT from snippet");
|
|
1612
|
+
if (snippetId === "_BLANK") {
|
|
1613
|
+
return [2 /*return*/, adt];
|
|
1614
|
+
}
|
|
1615
|
+
return [4 /*yield*/, AdvancedDynamicTexture._LoadURLContentAsync(AdvancedDynamicTexture.SnippetUrl + "/" + snippetId.replace(/#/g, "/"), true)];
|
|
1616
|
+
case 1:
|
|
1617
|
+
serialized = _a.sent();
|
|
1618
|
+
adt.parseSerializedObject(serialized, scaleToSize);
|
|
1619
|
+
return [2 /*return*/, adt];
|
|
1620
|
+
}
|
|
1621
|
+
});
|
|
1622
|
+
});
|
|
1623
|
+
};
|
|
1585
1624
|
/**
|
|
1586
1625
|
* Recreate the content of the ADT from a snippet saved by the GUI editor
|
|
1587
1626
|
* @param snippetId defines the snippet to load
|
|
@@ -1589,28 +1628,29 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1589
1628
|
* @returns a promise that will resolve on success
|
|
1590
1629
|
*/
|
|
1591
1630
|
AdvancedDynamicTexture.prototype.parseFromSnippetAsync = function (snippetId, scaleToSize) {
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1631
|
+
return AdvancedDynamicTexture.ParseFromSnippetAsync(snippetId, scaleToSize, this);
|
|
1632
|
+
};
|
|
1633
|
+
/**
|
|
1634
|
+
* Recreate the content of the ADT from a url json
|
|
1635
|
+
* @param url defines the url to load
|
|
1636
|
+
* @param scaleToSize defines whether to scale to texture to the saved size
|
|
1637
|
+
* @param appendToAdt if provided the snippet will be appended to the adt. Otherwise a fullscreen ADT will be created.
|
|
1638
|
+
* @returns a promise that will resolve on success
|
|
1639
|
+
*/
|
|
1640
|
+
AdvancedDynamicTexture.ParseFromFileAsync = function (url, scaleToSize, appendToAdt) {
|
|
1641
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
1642
|
+
var adt, serialized;
|
|
1643
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
1644
|
+
switch (_a.label) {
|
|
1645
|
+
case 0:
|
|
1646
|
+
adt = appendToAdt !== null && appendToAdt !== void 0 ? appendToAdt : AdvancedDynamicTexture.CreateFullscreenUI("ADT from URL");
|
|
1647
|
+
return [4 /*yield*/, AdvancedDynamicTexture._LoadURLContentAsync(url)];
|
|
1648
|
+
case 1:
|
|
1649
|
+
serialized = _a.sent();
|
|
1650
|
+
adt.parseSerializedObject(serialized, scaleToSize);
|
|
1651
|
+
return [2 /*return*/, adt];
|
|
1610
1652
|
}
|
|
1611
1653
|
});
|
|
1612
|
-
request.open("GET", AdvancedDynamicTexture.SnippetUrl + "/" + snippetId.replace(/#/g, "/"));
|
|
1613
|
-
request.send();
|
|
1614
1654
|
});
|
|
1615
1655
|
};
|
|
1616
1656
|
/**
|
|
@@ -1620,19 +1660,21 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1620
1660
|
* @returns a promise that will resolve on success
|
|
1621
1661
|
*/
|
|
1622
1662
|
AdvancedDynamicTexture.prototype.parseFromURLAsync = function (url, scaleToSize) {
|
|
1623
|
-
|
|
1663
|
+
return AdvancedDynamicTexture.ParseFromFileAsync(url, scaleToSize, this);
|
|
1664
|
+
};
|
|
1665
|
+
AdvancedDynamicTexture._LoadURLContentAsync = function (url, snippet) {
|
|
1666
|
+
if (snippet === void 0) { snippet = false; }
|
|
1624
1667
|
if (url === "") {
|
|
1625
|
-
return Promise.
|
|
1668
|
+
return Promise.reject("No URL provided");
|
|
1626
1669
|
}
|
|
1627
1670
|
return new Promise(function (resolve, reject) {
|
|
1628
1671
|
var request = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_1__.WebRequest();
|
|
1629
1672
|
request.addEventListener("readystatechange", function () {
|
|
1630
1673
|
if (request.readyState == 4) {
|
|
1631
1674
|
if (request.status == 200) {
|
|
1632
|
-
var gui = request.responseText;
|
|
1675
|
+
var gui = snippet ? JSON.parse(JSON.parse(request.responseText).jsonPayload).gui : request.responseText;
|
|
1633
1676
|
var serializationObject = JSON.parse(gui);
|
|
1634
|
-
|
|
1635
|
-
resolve();
|
|
1677
|
+
resolve(serializationObject);
|
|
1636
1678
|
}
|
|
1637
1679
|
else {
|
|
1638
1680
|
reject("Unable to load");
|
|
@@ -4446,7 +4488,13 @@ var Control = /** @class */ (function () {
|
|
|
4446
4488
|
this.metadata = null;
|
|
4447
4489
|
/** Gets or sets a boolean indicating if the control can be hit with pointer events */
|
|
4448
4490
|
this.isHitTestVisible = true;
|
|
4449
|
-
/** Gets or sets a boolean indicating if the control can block pointer events
|
|
4491
|
+
/** Gets or sets a boolean indicating if the control can block pointer events. False by default except on the following controls:
|
|
4492
|
+
* * Button controls (Button, RadioButton, ToggleButton)
|
|
4493
|
+
* * Checkbox
|
|
4494
|
+
* * ColorPicker
|
|
4495
|
+
* * InputText
|
|
4496
|
+
* * Slider
|
|
4497
|
+
*/
|
|
4450
4498
|
this.isPointerBlocker = false;
|
|
4451
4499
|
/** Gets or sets a boolean indicating if the control can be focusable */
|
|
4452
4500
|
this.isFocusInvisible = false;
|
|
@@ -6278,7 +6326,7 @@ var Control = /** @class */ (function () {
|
|
|
6278
6326
|
*/
|
|
6279
6327
|
Control.prototype._onPointerMove = function (target, coordinates, pointerId, pi) {
|
|
6280
6328
|
var canNotify = this.onPointerMoveObservable.notifyObservers(coordinates, -1, target, this, pi);
|
|
6281
|
-
if (canNotify && this.parent != null) {
|
|
6329
|
+
if (canNotify && this.parent != null && !this.isPointerBlocker) {
|
|
6282
6330
|
this.parent._onPointerMove(target, coordinates, pointerId, pi);
|
|
6283
6331
|
}
|
|
6284
6332
|
};
|
|
@@ -6300,7 +6348,7 @@ var Control = /** @class */ (function () {
|
|
|
6300
6348
|
}
|
|
6301
6349
|
this._enterCount++;
|
|
6302
6350
|
var canNotify = this.onPointerEnterObservable.notifyObservers(this, -1, target, this, pi);
|
|
6303
|
-
if (canNotify && this.parent != null) {
|
|
6351
|
+
if (canNotify && this.parent != null && !this.isPointerBlocker) {
|
|
6304
6352
|
this.parent._onPointerEnter(target, pi);
|
|
6305
6353
|
}
|
|
6306
6354
|
return true;
|
|
@@ -6321,7 +6369,7 @@ var Control = /** @class */ (function () {
|
|
|
6321
6369
|
if (!target.isAscendant(this)) {
|
|
6322
6370
|
canNotify = this.onPointerOutObservable.notifyObservers(this, -1, target, this, pi);
|
|
6323
6371
|
}
|
|
6324
|
-
if (canNotify && this.parent != null) {
|
|
6372
|
+
if (canNotify && this.parent != null && !this.isPointerBlocker) {
|
|
6325
6373
|
this.parent._onPointerOut(target, pi, force);
|
|
6326
6374
|
}
|
|
6327
6375
|
};
|
|
@@ -6343,7 +6391,7 @@ var Control = /** @class */ (function () {
|
|
|
6343
6391
|
this._downCount++;
|
|
6344
6392
|
this._downPointerIds[pointerId] = true;
|
|
6345
6393
|
var canNotify = this.onPointerDownObservable.notifyObservers(new _math2D__WEBPACK_IMPORTED_MODULE_4__.Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);
|
|
6346
|
-
if (canNotify && this.parent != null) {
|
|
6394
|
+
if (canNotify && this.parent != null && !this.isPointerBlocker) {
|
|
6347
6395
|
this.parent._onPointerDown(target, coordinates, pointerId, buttonIndex, pi);
|
|
6348
6396
|
}
|
|
6349
6397
|
return true;
|
|
@@ -6368,7 +6416,7 @@ var Control = /** @class */ (function () {
|
|
|
6368
6416
|
canNotifyClick = this.onPointerClickObservable.notifyObservers(new _math2D__WEBPACK_IMPORTED_MODULE_4__.Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);
|
|
6369
6417
|
}
|
|
6370
6418
|
var canNotify = this.onPointerUpObservable.notifyObservers(new _math2D__WEBPACK_IMPORTED_MODULE_4__.Vector2WithInfo(coordinates, buttonIndex), -1, target, this, pi);
|
|
6371
|
-
if (canNotify && this.parent != null) {
|
|
6419
|
+
if (canNotify && this.parent != null && !this.isPointerBlocker) {
|
|
6372
6420
|
this.parent._onPointerUp(target, coordinates, pointerId, buttonIndex, canNotifyClick, pi);
|
|
6373
6421
|
}
|
|
6374
6422
|
};
|
|
@@ -7744,12 +7792,12 @@ var Grid = /** @class */ (function (_super) {
|
|
|
7744
7792
|
for (var index = 0; index < this._columnDefinitions.length; index++) {
|
|
7745
7793
|
this._columnDefinitions[index].onChangedObservable.remove(this._columnDefinitionObservers[index]);
|
|
7746
7794
|
}
|
|
7747
|
-
this._rowDefinitionObservers =
|
|
7748
|
-
this._rowDefinitions =
|
|
7749
|
-
this._columnDefinitionObservers =
|
|
7750
|
-
this._columnDefinitions =
|
|
7795
|
+
this._rowDefinitionObservers.length = 0;
|
|
7796
|
+
this._rowDefinitions.length = 0;
|
|
7797
|
+
this._columnDefinitionObservers.length = 0;
|
|
7798
|
+
this._columnDefinitions.length = 0;
|
|
7751
7799
|
this._cells = {};
|
|
7752
|
-
this._childControls =
|
|
7800
|
+
this._childControls.length = 0;
|
|
7753
7801
|
};
|
|
7754
7802
|
/**
|
|
7755
7803
|
* Serializes the current control
|
|
@@ -16742,7 +16790,7 @@ var VirtualKeyboard = /** @class */ (function (_super) {
|
|
|
16742
16790
|
this._connectedInputTexts.forEach(function (connectedInputText) {
|
|
16743
16791
|
_this._removeConnectedInputObservables(connectedInputText);
|
|
16744
16792
|
});
|
|
16745
|
-
this._connectedInputTexts =
|
|
16793
|
+
this._connectedInputTexts.length = 0;
|
|
16746
16794
|
}
|
|
16747
16795
|
if (this._connectedInputTexts.length === 0) {
|
|
16748
16796
|
this._currentlyConnectedInputText = null;
|
|
@@ -18576,7 +18624,7 @@ var Container3D = /** @class */ (function (_super) {
|
|
|
18576
18624
|
var control = _a[_i];
|
|
18577
18625
|
control.dispose();
|
|
18578
18626
|
}
|
|
18579
|
-
this._children =
|
|
18627
|
+
this._children.length = 0;
|
|
18580
18628
|
_super.prototype.dispose.call(this);
|
|
18581
18629
|
};
|
|
18582
18630
|
/** Control rotation will remain unchanged */
|
|
@@ -20911,6 +20959,19 @@ var Slider3D = /** @class */ (function (_super) {
|
|
|
20911
20959
|
enumerable: false,
|
|
20912
20960
|
configurable: true
|
|
20913
20961
|
});
|
|
20962
|
+
Object.defineProperty(Slider3D.prototype, "isVisible", {
|
|
20963
|
+
/** Sets a boolean indicating if the control is visible */
|
|
20964
|
+
set: function (value) {
|
|
20965
|
+
var _a;
|
|
20966
|
+
if (this._isVisible === value) {
|
|
20967
|
+
return;
|
|
20968
|
+
}
|
|
20969
|
+
this._isVisible = value;
|
|
20970
|
+
(_a = this.node) === null || _a === void 0 ? void 0 : _a.setEnabled(value);
|
|
20971
|
+
},
|
|
20972
|
+
enumerable: false,
|
|
20973
|
+
configurable: true
|
|
20974
|
+
});
|
|
20914
20975
|
// Mesh association
|
|
20915
20976
|
Slider3D.prototype._createNode = function (scene) {
|
|
20916
20977
|
var _this = this;
|
|
@@ -20961,6 +21022,10 @@ var Slider3D = /** @class */ (function (_super) {
|
|
|
20961
21022
|
}
|
|
20962
21023
|
_this._sliderThumb = sliderThumbModel;
|
|
20963
21024
|
}
|
|
21025
|
+
_this._injectGUI3DReservedDataStore(sliderBackplate).control = _this;
|
|
21026
|
+
sliderBackplate.getChildMeshes().forEach(function (mesh) {
|
|
21027
|
+
_this._injectGUI3DReservedDataStore(mesh).control = _this;
|
|
21028
|
+
});
|
|
20964
21029
|
});
|
|
20965
21030
|
this._affectMaterial(sliderBackplate);
|
|
20966
21031
|
return sliderBackplate;
|