babylonjs-gui 5.0.0-beta.1 → 5.0.0-beta.10
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 +389 -308
- package/babylon.gui.js.map +1 -1
- package/babylon.gui.min.js +2 -2
- package/babylon.gui.module.d.ts +296 -274
- package/package.json +2 -2
package/babylon.gui.js
CHANGED
|
@@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
97
97
|
/******/ ({
|
|
98
98
|
|
|
99
99
|
/***/ "../../node_modules/tslib/tslib.es6.js":
|
|
100
|
-
|
|
101
|
-
!***
|
|
102
|
-
|
|
100
|
+
/*!************************************************************************************!*\
|
|
101
|
+
!*** C:/Users/raweber/Documents/GitHub/Babylon.js/node_modules/tslib/tslib.es6.js ***!
|
|
102
|
+
\************************************************************************************/
|
|
103
103
|
/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */
|
|
104
104
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
105
105
|
|
|
@@ -581,6 +581,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
581
581
|
|
|
582
582
|
|
|
583
583
|
|
|
584
|
+
|
|
584
585
|
/**
|
|
585
586
|
* Class used to create texture to support 2D GUI elements
|
|
586
587
|
* @see https://doc.babylonjs.com/how_to/gui
|
|
@@ -1610,6 +1611,10 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1610
1611
|
if (typeof width === "number" && typeof height === "number" && width >= 0 && height >= 0) {
|
|
1611
1612
|
this.scaleTo(width, height);
|
|
1612
1613
|
}
|
|
1614
|
+
else {
|
|
1615
|
+
// scales the GUI to a default size if none was available in the serialized content
|
|
1616
|
+
this.scaleTo(1920, 1080);
|
|
1617
|
+
}
|
|
1613
1618
|
}
|
|
1614
1619
|
};
|
|
1615
1620
|
/**
|
|
@@ -1701,8 +1706,10 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1701
1706
|
if (height === void 0) { height = 1024; }
|
|
1702
1707
|
if (supportPointerMove === void 0) { supportPointerMove = true; }
|
|
1703
1708
|
if (onlyAlphaTesting === void 0) { onlyAlphaTesting = false; }
|
|
1704
|
-
|
|
1705
|
-
var
|
|
1709
|
+
// use a unique ID in name so serialization will work even if you create two ADTs for a single mesh
|
|
1710
|
+
var uniqueId = Object(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["RandomGUID"])();
|
|
1711
|
+
var result = new AdvancedDynamicTexture("AdvancedDynamicTexture for ".concat(mesh.name, " [").concat(uniqueId, "]"), width, height, mesh.getScene(), true, babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["Texture"].TRILINEAR_SAMPLINGMODE, invertY);
|
|
1712
|
+
var material = new babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["StandardMaterial"]("AdvancedDynamicTextureMaterial for ".concat(mesh.name, " [").concat(uniqueId, "]"), mesh.getScene());
|
|
1706
1713
|
material.backFaceCulling = false;
|
|
1707
1714
|
material.diffuseColor = babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["Color3"].Black();
|
|
1708
1715
|
material.specularColor = babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["Color3"].Black();
|
|
@@ -1770,6 +1777,23 @@ var AdvancedDynamicTexture = /** @class */ (function (_super) {
|
|
|
1770
1777
|
result.attach();
|
|
1771
1778
|
return result;
|
|
1772
1779
|
};
|
|
1780
|
+
/**
|
|
1781
|
+
* Scales the texture
|
|
1782
|
+
* @param ratio the scale factor to apply to both width and height
|
|
1783
|
+
*/
|
|
1784
|
+
AdvancedDynamicTexture.prototype.scale = function (ratio) {
|
|
1785
|
+
_super.prototype.scale.call(this, ratio);
|
|
1786
|
+
this.markAsDirty();
|
|
1787
|
+
};
|
|
1788
|
+
/**
|
|
1789
|
+
* Resizes the texture
|
|
1790
|
+
* @param width the new width
|
|
1791
|
+
* @param height the new height
|
|
1792
|
+
*/
|
|
1793
|
+
AdvancedDynamicTexture.prototype.scaleTo = function (width, height) {
|
|
1794
|
+
_super.prototype.scaleTo.call(this, width, height);
|
|
1795
|
+
this.markAsDirty();
|
|
1796
|
+
};
|
|
1773
1797
|
/** Define the Uurl to load snippets */
|
|
1774
1798
|
AdvancedDynamicTexture.SnippetUrl = "https://snippet.babylonjs.com";
|
|
1775
1799
|
/** Indicates if some optimizations can be performed in GUI GPU management (the downside is additional memory/GPU texture memory used) */
|
|
@@ -2447,7 +2471,7 @@ var ColorPicker = /** @class */ (function (_super) {
|
|
|
2447
2471
|
};
|
|
2448
2472
|
ColorPicker.prototype._createColorWheelCanvas = function (radius, thickness) {
|
|
2449
2473
|
// Shoudl abstract platform instead of using LastCreatedEngine
|
|
2450
|
-
var engine = babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["
|
|
2474
|
+
var engine = babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["EngineStore"].LastCreatedEngine;
|
|
2451
2475
|
if (!engine) {
|
|
2452
2476
|
throw new Error("Invalid engine. Unable to create a canvas.");
|
|
2453
2477
|
}
|
|
@@ -4045,7 +4069,7 @@ var Container = /** @class */ (function (_super) {
|
|
|
4045
4069
|
rebuildCount++;
|
|
4046
4070
|
} while (this._rebuildLayout && rebuildCount < this.maxLayoutCycle);
|
|
4047
4071
|
if (rebuildCount >= 3 && this.logLayoutCycleErrors) {
|
|
4048
|
-
babylonjs_Misc_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"].Error("Layout cycle detected in GUI (Container name="
|
|
4072
|
+
babylonjs_Misc_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"].Error("Layout cycle detected in GUI (Container name=".concat(this.name, ", uniqueId=").concat(this.uniqueId, ")"));
|
|
4049
4073
|
}
|
|
4050
4074
|
context.restore();
|
|
4051
4075
|
if (this._isDirty) {
|
|
@@ -4115,7 +4139,10 @@ var Container = /** @class */ (function (_super) {
|
|
|
4115
4139
|
if (!this._isEnabled || !this.isVisible || this.notRenderable) {
|
|
4116
4140
|
return false;
|
|
4117
4141
|
}
|
|
4118
|
-
if
|
|
4142
|
+
// checks if the picking position is within the container
|
|
4143
|
+
var contains = _super.prototype.contains.call(this, x, y);
|
|
4144
|
+
// if clipChildren is off, we should still pass picking events to children even if we don't contain the pointer
|
|
4145
|
+
if (!contains && this.clipChildren) {
|
|
4119
4146
|
return false;
|
|
4120
4147
|
}
|
|
4121
4148
|
// Checking backwards to pick closest first
|
|
@@ -4128,6 +4155,9 @@ var Container = /** @class */ (function (_super) {
|
|
|
4128
4155
|
return true;
|
|
4129
4156
|
}
|
|
4130
4157
|
}
|
|
4158
|
+
if (!contains) {
|
|
4159
|
+
return false;
|
|
4160
|
+
}
|
|
4131
4161
|
if (!this.isHitTestVisible) {
|
|
4132
4162
|
return false;
|
|
4133
4163
|
}
|
|
@@ -5340,17 +5370,34 @@ var Control = /** @class */ (function () {
|
|
|
5340
5370
|
return this._isEnabled;
|
|
5341
5371
|
},
|
|
5342
5372
|
set: function (value) {
|
|
5373
|
+
var _this = this;
|
|
5343
5374
|
if (this._isEnabled === value) {
|
|
5344
5375
|
return;
|
|
5345
5376
|
}
|
|
5346
5377
|
this._isEnabled = value;
|
|
5347
5378
|
this._markAsDirty();
|
|
5379
|
+
// if this control or any of it's descendants are under a pointer, we need to fire a pointerOut event
|
|
5380
|
+
var recursivelyFirePointerOut = function (control) {
|
|
5381
|
+
if (!control.host) {
|
|
5382
|
+
return;
|
|
5383
|
+
}
|
|
5384
|
+
for (var pointer in control.host._lastControlOver) {
|
|
5385
|
+
if (control === _this.host._lastControlOver[pointer]) {
|
|
5386
|
+
control._onPointerOut(control, null, true);
|
|
5387
|
+
delete control.host._lastControlOver[pointer];
|
|
5388
|
+
}
|
|
5389
|
+
}
|
|
5390
|
+
if (control.children !== undefined) {
|
|
5391
|
+
control.children.forEach(recursivelyFirePointerOut);
|
|
5392
|
+
}
|
|
5393
|
+
};
|
|
5394
|
+
recursivelyFirePointerOut(this);
|
|
5348
5395
|
},
|
|
5349
5396
|
enumerable: false,
|
|
5350
5397
|
configurable: true
|
|
5351
5398
|
});
|
|
5352
5399
|
Object.defineProperty(Control.prototype, "disabledColor", {
|
|
5353
|
-
/** Gets or sets background color of control if it's disabled */
|
|
5400
|
+
/** Gets or sets background color of control if it's disabled. Only applies to Button class. */
|
|
5354
5401
|
get: function () {
|
|
5355
5402
|
return this._disabledColor;
|
|
5356
5403
|
},
|
|
@@ -5365,7 +5412,7 @@ var Control = /** @class */ (function () {
|
|
|
5365
5412
|
configurable: true
|
|
5366
5413
|
});
|
|
5367
5414
|
Object.defineProperty(Control.prototype, "disabledColorItem", {
|
|
5368
|
-
/** Gets or sets front color of control if it's disabled */
|
|
5415
|
+
/** Gets or sets front color of control if it's disabled. Only applies to Checkbox class. */
|
|
5369
5416
|
get: function () {
|
|
5370
5417
|
return this._disabledColorItem;
|
|
5371
5418
|
},
|
|
@@ -5397,6 +5444,19 @@ var Control = /** @class */ (function () {
|
|
|
5397
5444
|
}
|
|
5398
5445
|
return this.parent.getAscendantOfClass(className);
|
|
5399
5446
|
};
|
|
5447
|
+
/**
|
|
5448
|
+
* Mark control element as dirty
|
|
5449
|
+
* @param force force non visible elements to be marked too
|
|
5450
|
+
*/
|
|
5451
|
+
Control.prototype.markAsDirty = function (force) {
|
|
5452
|
+
this._markAsDirty(force);
|
|
5453
|
+
};
|
|
5454
|
+
/**
|
|
5455
|
+
* Mark the element and its children as dirty
|
|
5456
|
+
*/
|
|
5457
|
+
Control.prototype.markAllAsDirty = function () {
|
|
5458
|
+
this._markAllAsDirty();
|
|
5459
|
+
};
|
|
5400
5460
|
/** @hidden */
|
|
5401
5461
|
Control.prototype._resetFontCache = function () {
|
|
5402
5462
|
this._fontSet = true;
|
|
@@ -5559,11 +5619,9 @@ var Control = /** @class */ (function () {
|
|
|
5559
5619
|
var _a;
|
|
5560
5620
|
var oldLeft = this._left.getValue(this._host);
|
|
5561
5621
|
var oldTop = this._top.getValue(this._host);
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
this._processMeasures(parentMeasure, this._host.getContext());
|
|
5566
|
-
}
|
|
5622
|
+
var parentMeasure = (_a = this.parent) === null || _a === void 0 ? void 0 : _a._currentMeasure;
|
|
5623
|
+
if (parentMeasure) {
|
|
5624
|
+
this._processMeasures(parentMeasure, this._host.getContext());
|
|
5567
5625
|
}
|
|
5568
5626
|
var newLeft = projectedPosition.x + this._linkOffsetX.getValue(this._host) - this._currentMeasure.width / 2;
|
|
5569
5627
|
var newTop = projectedPosition.y + this._linkOffsetY.getValue(this._host) - this._currentMeasure.height / 2;
|
|
@@ -5601,19 +5659,19 @@ var Control = /** @class */ (function () {
|
|
|
5601
5659
|
// No child
|
|
5602
5660
|
};
|
|
5603
5661
|
/** @hidden */
|
|
5604
|
-
Control.prototype._intersectsRect = function (rect) {
|
|
5605
|
-
//
|
|
5606
|
-
this.
|
|
5607
|
-
if (this.
|
|
5662
|
+
Control.prototype._intersectsRect = function (rect, context) {
|
|
5663
|
+
// make sure we are transformed correctly before checking intersections. no-op if nothing is dirty.
|
|
5664
|
+
this._transform(context);
|
|
5665
|
+
if (this._evaluatedMeasure.left >= rect.left + rect.width) {
|
|
5608
5666
|
return false;
|
|
5609
5667
|
}
|
|
5610
|
-
if (this.
|
|
5668
|
+
if (this._evaluatedMeasure.top >= rect.top + rect.height) {
|
|
5611
5669
|
return false;
|
|
5612
5670
|
}
|
|
5613
|
-
if (this.
|
|
5671
|
+
if (this._evaluatedMeasure.left + this._evaluatedMeasure.width <= rect.left) {
|
|
5614
5672
|
return false;
|
|
5615
5673
|
}
|
|
5616
|
-
if (this.
|
|
5674
|
+
if (this._evaluatedMeasure.top + this._evaluatedMeasure.height <= rect.top) {
|
|
5617
5675
|
return false;
|
|
5618
5676
|
}
|
|
5619
5677
|
return true;
|
|
@@ -5655,6 +5713,7 @@ var Control = /** @class */ (function () {
|
|
|
5655
5713
|
return;
|
|
5656
5714
|
}
|
|
5657
5715
|
this._isDirty = true;
|
|
5716
|
+
this._markMatrixAsDirty();
|
|
5658
5717
|
// Redraw only this rectangle
|
|
5659
5718
|
if (this._host) {
|
|
5660
5719
|
this._host.markAsDirty();
|
|
@@ -5699,6 +5758,7 @@ var Control = /** @class */ (function () {
|
|
|
5699
5758
|
this._flagDescendantsAsMatrixDirty();
|
|
5700
5759
|
_math2D__WEBPACK_IMPORTED_MODULE_4__["Matrix2D"].ComposeToRef(-offsetX, -offsetY, this._rotation, this._scaleX, this._scaleY, this.parent ? this.parent._transformMatrix : null, this._transformMatrix);
|
|
5701
5760
|
this._transformMatrix.invertToRef(this._invertTransformMatrix);
|
|
5761
|
+
this._currentMeasure.transformToRef(this._transformMatrix, this._evaluatedMeasure);
|
|
5702
5762
|
}
|
|
5703
5763
|
};
|
|
5704
5764
|
/** @hidden */
|
|
@@ -5758,7 +5818,7 @@ var Control = /** @class */ (function () {
|
|
|
5758
5818
|
rebuildCount++;
|
|
5759
5819
|
} while (this._rebuildLayout && rebuildCount < 3);
|
|
5760
5820
|
if (rebuildCount >= 3) {
|
|
5761
|
-
babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["Logger"].Error("Layout cycle detected in GUI (Control name="
|
|
5821
|
+
babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["Logger"].Error("Layout cycle detected in GUI (Control name=".concat(this.name, ", uniqueId=").concat(this.uniqueId, ")"));
|
|
5762
5822
|
}
|
|
5763
5823
|
context.restore();
|
|
5764
5824
|
this.invalidateRect();
|
|
@@ -6305,7 +6365,7 @@ var Control = /** @class */ (function () {
|
|
|
6305
6365
|
if (Control._FontHeightSizes[font]) {
|
|
6306
6366
|
return Control._FontHeightSizes[font];
|
|
6307
6367
|
}
|
|
6308
|
-
var engine = babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["
|
|
6368
|
+
var engine = babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["EngineStore"].LastCreatedEngine;
|
|
6309
6369
|
if (!engine) {
|
|
6310
6370
|
throw new Error("Invalid engine. Unable to create a canvas.");
|
|
6311
6371
|
}
|
|
@@ -7155,7 +7215,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
7155
7215
|
* @returns the list of controls
|
|
7156
7216
|
*/
|
|
7157
7217
|
Grid.prototype.getChildrenAt = function (row, column) {
|
|
7158
|
-
var cell = this._cells[row
|
|
7218
|
+
var cell = this._cells["".concat(row, ":").concat(column)];
|
|
7159
7219
|
if (!cell) {
|
|
7160
7220
|
return null;
|
|
7161
7221
|
}
|
|
@@ -7204,14 +7264,14 @@ var Grid = /** @class */ (function (_super) {
|
|
|
7204
7264
|
return this;
|
|
7205
7265
|
}
|
|
7206
7266
|
for (var x = 0; x < this._rowDefinitions.length; x++) {
|
|
7207
|
-
var key = x
|
|
7267
|
+
var key = "".concat(x, ":").concat(index);
|
|
7208
7268
|
var cell = this._cells[key];
|
|
7209
7269
|
this._removeCell(cell, key);
|
|
7210
7270
|
}
|
|
7211
7271
|
for (var x = 0; x < this._rowDefinitions.length; x++) {
|
|
7212
7272
|
for (var y = index + 1; y < this._columnDefinitions.length; y++) {
|
|
7213
|
-
var previousKey = x
|
|
7214
|
-
var key = x
|
|
7273
|
+
var previousKey = "".concat(x, ":").concat(y - 1);
|
|
7274
|
+
var key = "".concat(x, ":").concat(y);
|
|
7215
7275
|
this._offsetCell(previousKey, key);
|
|
7216
7276
|
}
|
|
7217
7277
|
}
|
|
@@ -7231,14 +7291,14 @@ var Grid = /** @class */ (function (_super) {
|
|
|
7231
7291
|
return this;
|
|
7232
7292
|
}
|
|
7233
7293
|
for (var y = 0; y < this._columnDefinitions.length; y++) {
|
|
7234
|
-
var key = index
|
|
7294
|
+
var key = "".concat(index, ":").concat(y);
|
|
7235
7295
|
var cell = this._cells[key];
|
|
7236
7296
|
this._removeCell(cell, key);
|
|
7237
7297
|
}
|
|
7238
7298
|
for (var y = 0; y < this._columnDefinitions.length; y++) {
|
|
7239
7299
|
for (var x = index + 1; x < this._rowDefinitions.length; x++) {
|
|
7240
|
-
var previousKey = x - 1
|
|
7241
|
-
var key = x
|
|
7300
|
+
var previousKey = "".concat(x - 1, ":").concat(y);
|
|
7301
|
+
var key = "".concat(x, ":").concat(y);
|
|
7242
7302
|
this._offsetCell(previousKey, key);
|
|
7243
7303
|
}
|
|
7244
7304
|
}
|
|
@@ -7267,12 +7327,12 @@ var Grid = /** @class */ (function (_super) {
|
|
|
7267
7327
|
this.addColumnDefinition(1, false);
|
|
7268
7328
|
}
|
|
7269
7329
|
if (this._childControls.indexOf(control) !== -1) {
|
|
7270
|
-
babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_4__["Tools"].Warn("Control (Name:"
|
|
7330
|
+
babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_4__["Tools"].Warn("Control (Name:".concat(control.name, ", UniqueId:").concat(control.uniqueId, ") is already associated with this grid. You must remove it before reattaching it"));
|
|
7271
7331
|
return this;
|
|
7272
7332
|
}
|
|
7273
7333
|
var x = Math.min(row, this._rowDefinitions.length - 1);
|
|
7274
7334
|
var y = Math.min(column, this._columnDefinitions.length - 1);
|
|
7275
|
-
var key = x
|
|
7335
|
+
var key = "".concat(x, ":").concat(y);
|
|
7276
7336
|
var goodContainer = this._cells[key];
|
|
7277
7337
|
if (!goodContainer) {
|
|
7278
7338
|
goodContainer = new _container__WEBPACK_IMPORTED_MODULE_1__["Container"](key);
|
|
@@ -7840,7 +7900,7 @@ var Image = /** @class */ (function (_super) {
|
|
|
7840
7900
|
var width = this._domImage.width;
|
|
7841
7901
|
var height = this._domImage.height;
|
|
7842
7902
|
// Should abstract platform instead of using LastCreatedEngine
|
|
7843
|
-
var engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["
|
|
7903
|
+
var engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["EngineStore"].LastCreatedEngine;
|
|
7844
7904
|
if (!engine) {
|
|
7845
7905
|
throw new Error("Invalid engine. Unable to create a canvas.");
|
|
7846
7906
|
}
|
|
@@ -7910,7 +7970,7 @@ var Image = /** @class */ (function (_super) {
|
|
|
7910
7970
|
var width = this._domImage.width;
|
|
7911
7971
|
var height = this._domImage.height;
|
|
7912
7972
|
if (!this._workingCanvas) {
|
|
7913
|
-
var engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["
|
|
7973
|
+
var engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["EngineStore"].LastCreatedEngine;
|
|
7914
7974
|
if (!engine) {
|
|
7915
7975
|
throw new Error("Invalid engine. Unable to create a canvas.");
|
|
7916
7976
|
}
|
|
@@ -8010,7 +8070,7 @@ var Image = /** @class */ (function (_super) {
|
|
|
8010
8070
|
value = this._svgCheck(value);
|
|
8011
8071
|
}
|
|
8012
8072
|
// Should abstract platform instead of using LastCreatedEngine
|
|
8013
|
-
var engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["
|
|
8073
|
+
var engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["EngineStore"].LastCreatedEngine;
|
|
8014
8074
|
if (!engine) {
|
|
8015
8075
|
throw new Error("Invalid engine. Unable to create a canvas.");
|
|
8016
8076
|
}
|
|
@@ -8241,7 +8301,7 @@ var Image = /** @class */ (function (_super) {
|
|
|
8241
8301
|
var width = this._currentMeasure.width;
|
|
8242
8302
|
var height = this._currentMeasure.height;
|
|
8243
8303
|
if (!this._workingCanvas) {
|
|
8244
|
-
var engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["
|
|
8304
|
+
var engine = ((_b = (_a = this._host) === null || _a === void 0 ? void 0 : _a.getScene()) === null || _b === void 0 ? void 0 : _b.getEngine()) || babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["EngineStore"].LastCreatedEngine;
|
|
8245
8305
|
if (!engine) {
|
|
8246
8306
|
throw new Error("Invalid engine. Unable to create a canvas.");
|
|
8247
8307
|
}
|
|
@@ -12611,7 +12671,7 @@ var BaseSlider = /** @class */ (function (_super) {
|
|
|
12611
12671
|
else {
|
|
12612
12672
|
value = this._minimum + ((x - this._currentMeasure.left) / this._currentMeasure.width) * (this._maximum - this._minimum);
|
|
12613
12673
|
}
|
|
12614
|
-
this.value = this._step ? (
|
|
12674
|
+
this.value = this._step ? Math.round(value / this._step) * this._step : value;
|
|
12615
12675
|
};
|
|
12616
12676
|
BaseSlider.prototype._onPointerDown = function (target, coordinates, pointerId, buttonIndex, pi) {
|
|
12617
12677
|
if (!_super.prototype._onPointerDown.call(this, target, coordinates, pointerId, buttonIndex, pi)) {
|
|
@@ -13771,7 +13831,7 @@ var StackPanel = /** @class */ (function (_super) {
|
|
|
13771
13831
|
}
|
|
13772
13832
|
if (child._height.isPercentage && !child._automaticSize) {
|
|
13773
13833
|
if (!this.ignoreLayoutWarnings) {
|
|
13774
|
-
babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__["Tools"].Warn("Control (Name:"
|
|
13834
|
+
babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__["Tools"].Warn("Control (Name:".concat(child.name, ", UniqueId:").concat(child.uniqueId, ") is using height in percentage mode inside a vertical StackPanel"));
|
|
13775
13835
|
}
|
|
13776
13836
|
}
|
|
13777
13837
|
else {
|
|
@@ -13786,7 +13846,7 @@ var StackPanel = /** @class */ (function (_super) {
|
|
|
13786
13846
|
}
|
|
13787
13847
|
if (child._width.isPercentage && !child._automaticSize) {
|
|
13788
13848
|
if (!this.ignoreLayoutWarnings) {
|
|
13789
|
-
babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__["Tools"].Warn("Control (Name:"
|
|
13849
|
+
babylonjs_Misc_tools__WEBPACK_IMPORTED_MODULE_1__["Tools"].Warn("Control (Name:".concat(child.name, ", UniqueId:").concat(child.uniqueId, ") is using width in percentage mode inside a horizontal StackPanel"));
|
|
13790
13850
|
}
|
|
13791
13851
|
}
|
|
13792
13852
|
else {
|
|
@@ -14379,7 +14439,7 @@ var TextBlock = /** @class */ (function (_super) {
|
|
|
14379
14439
|
else {
|
|
14380
14440
|
while (characters.length && lineWidth > width) {
|
|
14381
14441
|
characters.pop();
|
|
14382
|
-
line = characters.join("")
|
|
14442
|
+
line = "".concat(characters.join(""), "...");
|
|
14383
14443
|
textMetrics = context.measureText(line);
|
|
14384
14444
|
lineWidth = Math.abs(textMetrics.actualBoundingBoxLeft) + Math.abs(textMetrics.actualBoundingBoxRight);
|
|
14385
14445
|
}
|
|
@@ -14418,7 +14478,7 @@ var TextBlock = /** @class */ (function (_super) {
|
|
|
14418
14478
|
if (currentHeight > height && n > 1) {
|
|
14419
14479
|
var lastLine = lines[n - 2];
|
|
14420
14480
|
var currentLine = lines[n - 1];
|
|
14421
|
-
lines[n - 2] = this._parseLineEllipsis(""
|
|
14481
|
+
lines[n - 2] = this._parseLineEllipsis("".concat(lastLine.text + currentLine.text), width, context);
|
|
14422
14482
|
var linesToRemove = lines.length - n + 1;
|
|
14423
14483
|
for (var i = 0; i < linesToRemove; i++) {
|
|
14424
14484
|
lines.pop();
|
|
@@ -14479,7 +14539,7 @@ var TextBlock = /** @class */ (function (_super) {
|
|
|
14479
14539
|
var _a;
|
|
14480
14540
|
if (this.text && this.widthInPixels) {
|
|
14481
14541
|
// Should abstract platform instead of using LastCreatedEngine
|
|
14482
|
-
var context_1 = (_a = babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["
|
|
14542
|
+
var context_1 = (_a = babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["EngineStore"].LastCreatedEngine) === null || _a === void 0 ? void 0 : _a.createCanvas(0, 0).getContext("2d");
|
|
14483
14543
|
if (context_1) {
|
|
14484
14544
|
this._applyStates(context_1);
|
|
14485
14545
|
if (!this._fontOffset) {
|
|
@@ -17042,7 +17102,7 @@ var ContentDisplay3D = /** @class */ (function (_super) {
|
|
|
17042
17102
|
},
|
|
17043
17103
|
set: function (value) {
|
|
17044
17104
|
this._content = value;
|
|
17045
|
-
if (!this._host || !this._host.utilityLayer) {
|
|
17105
|
+
if (!value || !this._host || !this._host.utilityLayer) {
|
|
17046
17106
|
return;
|
|
17047
17107
|
}
|
|
17048
17108
|
if (!this._facadeTexture) {
|
|
@@ -17761,7 +17821,7 @@ var HolographicBackplate = /** @class */ (function (_super) {
|
|
|
17761
17821
|
babylonjs_Meshes_Builders_boxBuilder__WEBPACK_IMPORTED_MODULE_1__["SceneLoader"].ImportMeshAsync(undefined, HolographicBackplate.MODEL_BASE_URL, HolographicBackplate.MODEL_FILENAME, scene)
|
|
17762
17822
|
.then(function (result) {
|
|
17763
17823
|
var importedModel = result.meshes[1];
|
|
17764
|
-
importedModel.name = _this.name
|
|
17824
|
+
importedModel.name = "".concat(_this.name, "_frontPlate");
|
|
17765
17825
|
importedModel.isPickable = false;
|
|
17766
17826
|
importedModel.parent = collisionMesh;
|
|
17767
17827
|
if (!!_this._material) {
|
|
@@ -18186,15 +18246,20 @@ var HolographicButton = /** @class */ (function (_super) {
|
|
|
18186
18246
|
__webpack_require__.r(__webpack_exports__);
|
|
18187
18247
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HolographicSlate", function() { return HolographicSlate; });
|
|
18188
18248
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
|
|
18189
|
-
/* harmony import */ var
|
|
18190
|
-
/* harmony import */ var
|
|
18191
|
-
/* harmony import */ var
|
|
18192
|
-
/* harmony import */ var
|
|
18193
|
-
/* harmony import */ var
|
|
18194
|
-
/* harmony import */ var
|
|
18195
|
-
/* harmony import */ var
|
|
18196
|
-
/* harmony import */ var
|
|
18197
|
-
/* harmony import */ var
|
|
18249
|
+
/* harmony import */ var _contentDisplay3D__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./contentDisplay3D */ "./3D/controls/contentDisplay3D.ts");
|
|
18250
|
+
/* harmony import */ var _touchHolographicButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./touchHolographicButton */ "./3D/controls/touchHolographicButton.ts");
|
|
18251
|
+
/* harmony import */ var _2D_advancedDynamicTexture__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../2D/advancedDynamicTexture */ "./2D/advancedDynamicTexture.ts");
|
|
18252
|
+
/* harmony import */ var _2D_controls_control__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../2D/controls/control */ "./2D/controls/control.ts");
|
|
18253
|
+
/* harmony import */ var _2D_controls_textBlock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../2D/controls/textBlock */ "./2D/controls/textBlock.ts");
|
|
18254
|
+
/* harmony import */ var _behaviors_defaultBehavior__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../behaviors/defaultBehavior */ "./3D/behaviors/defaultBehavior.ts");
|
|
18255
|
+
/* harmony import */ var _gizmos_slateGizmo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../gizmos/slateGizmo */ "./3D/gizmos/slateGizmo.ts");
|
|
18256
|
+
/* harmony import */ var _materials_fluent_fluentMaterial__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../materials/fluent/fluentMaterial */ "./3D/materials/fluent/fluentMaterial.ts");
|
|
18257
|
+
/* harmony import */ var _materials_fluentBackplate_fluentBackplateMaterial__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../materials/fluentBackplate/fluentBackplateMaterial */ "./3D/materials/fluentBackplate/fluentBackplateMaterial.ts");
|
|
18258
|
+
/* harmony import */ var babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! babylonjs/Behaviors/Meshes/pointerDragBehavior */ "babylonjs/Misc/observable");
|
|
18259
|
+
/* harmony import */ var babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__);
|
|
18260
|
+
|
|
18261
|
+
|
|
18262
|
+
|
|
18198
18263
|
|
|
18199
18264
|
|
|
18200
18265
|
|
|
@@ -18224,35 +18289,36 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18224
18289
|
function HolographicSlate(name) {
|
|
18225
18290
|
var _this = _super.call(this, name) || this;
|
|
18226
18291
|
/**
|
|
18227
|
-
*
|
|
18292
|
+
* 2D dimensions of the slate
|
|
18228
18293
|
*/
|
|
18229
|
-
_this.dimensions = new
|
|
18294
|
+
_this.dimensions = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector2"](21.875, 12.5);
|
|
18230
18295
|
/**
|
|
18231
18296
|
* Minimum dimensions of the slate
|
|
18232
18297
|
*/
|
|
18233
|
-
_this.minDimensions = new
|
|
18298
|
+
_this.minDimensions = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector2"](15.625, 6.25);
|
|
18234
18299
|
/**
|
|
18235
18300
|
* Default dimensions of the slate
|
|
18236
18301
|
*/
|
|
18237
18302
|
_this.defaultDimensions = _this.dimensions.clone();
|
|
18238
18303
|
/**
|
|
18239
|
-
*
|
|
18304
|
+
* Height of the title bar component
|
|
18240
18305
|
*/
|
|
18241
|
-
_this.
|
|
18306
|
+
_this.titleBarHeight = 0.625;
|
|
18242
18307
|
/**
|
|
18243
|
-
* Margin between
|
|
18308
|
+
* Margin between title bar and contentplate
|
|
18244
18309
|
*/
|
|
18245
|
-
_this.
|
|
18310
|
+
_this.titleBarMargin = 0.005;
|
|
18246
18311
|
/**
|
|
18247
18312
|
* Origin in local coordinates (top left corner)
|
|
18248
18313
|
*/
|
|
18249
|
-
_this.origin = new
|
|
18314
|
+
_this.origin = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"](0, 0, 0);
|
|
18315
|
+
_this._titleText = "";
|
|
18250
18316
|
_this._contentScaleRatio = 1;
|
|
18251
|
-
_this._followButton = new
|
|
18252
|
-
_this._closeButton = new
|
|
18253
|
-
_this._contentViewport = new
|
|
18254
|
-
_this._contentDragBehavior = new
|
|
18255
|
-
dragPlaneNormal: new
|
|
18317
|
+
_this._followButton = new _touchHolographicButton__WEBPACK_IMPORTED_MODULE_2__["TouchHolographicButton"]("followButton" + _this.name);
|
|
18318
|
+
_this._closeButton = new _touchHolographicButton__WEBPACK_IMPORTED_MODULE_2__["TouchHolographicButton"]("closeButton" + _this.name);
|
|
18319
|
+
_this._contentViewport = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Viewport"](0, 0, 1, 1);
|
|
18320
|
+
_this._contentDragBehavior = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["PointerDragBehavior"]({
|
|
18321
|
+
dragPlaneNormal: new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"](0, 0, -1),
|
|
18256
18322
|
});
|
|
18257
18323
|
return _this;
|
|
18258
18324
|
}
|
|
@@ -18268,33 +18334,31 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18268
18334
|
});
|
|
18269
18335
|
Object.defineProperty(HolographicSlate.prototype, "renderingGroupId", {
|
|
18270
18336
|
get: function () {
|
|
18271
|
-
return this.
|
|
18337
|
+
return this._titleBar.renderingGroupId;
|
|
18272
18338
|
},
|
|
18273
18339
|
/**
|
|
18274
|
-
* Rendering ground id of all the
|
|
18340
|
+
* Rendering ground id of all the meshes
|
|
18275
18341
|
*/
|
|
18276
18342
|
set: function (id) {
|
|
18277
|
-
this.
|
|
18343
|
+
this._titleBar.renderingGroupId = id;
|
|
18344
|
+
this._titleBarTitle.renderingGroupId = id;
|
|
18278
18345
|
this._contentPlate.renderingGroupId = id;
|
|
18279
18346
|
},
|
|
18280
18347
|
enumerable: false,
|
|
18281
18348
|
configurable: true
|
|
18282
18349
|
});
|
|
18283
|
-
Object.defineProperty(HolographicSlate.prototype, "
|
|
18284
|
-
/**
|
|
18285
|
-
* Gets or sets the image url for the button
|
|
18286
|
-
*/
|
|
18350
|
+
Object.defineProperty(HolographicSlate.prototype, "title", {
|
|
18287
18351
|
get: function () {
|
|
18288
|
-
return this.
|
|
18352
|
+
return this._titleText;
|
|
18289
18353
|
},
|
|
18290
|
-
|
|
18291
|
-
|
|
18292
|
-
|
|
18354
|
+
/**
|
|
18355
|
+
* The title text displayed at the top of the slate
|
|
18356
|
+
*/
|
|
18357
|
+
set: function (title) {
|
|
18358
|
+
this._titleText = title;
|
|
18359
|
+
if (this._titleTextComponent) {
|
|
18360
|
+
this._titleTextComponent.text = title;
|
|
18293
18361
|
}
|
|
18294
|
-
this._imageUrl = value;
|
|
18295
|
-
this._rebuildContent();
|
|
18296
|
-
this._resetContentPositionAndZoom();
|
|
18297
|
-
this._applyContentViewport();
|
|
18298
18362
|
},
|
|
18299
18363
|
enumerable: false,
|
|
18300
18364
|
configurable: true
|
|
@@ -18306,18 +18370,9 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18306
18370
|
*/
|
|
18307
18371
|
HolographicSlate.prototype._applyFacade = function (facadeTexture) {
|
|
18308
18372
|
this._contentMaterial.albedoTexture = facadeTexture;
|
|
18309
|
-
|
|
18310
|
-
|
|
18311
|
-
this.
|
|
18312
|
-
if (babylonjs_Meshes_Builders_boxBuilder__WEBPACK_IMPORTED_MODULE_1__["DomManagement"].IsDocumentAvailable() && !!document.createElement) {
|
|
18313
|
-
if (this._imageUrl) {
|
|
18314
|
-
var image = new _2D_controls_image__WEBPACK_IMPORTED_MODULE_5__["Image"]();
|
|
18315
|
-
image.source = this._imageUrl;
|
|
18316
|
-
if (this._contentPlate) {
|
|
18317
|
-
this.content = image;
|
|
18318
|
-
}
|
|
18319
|
-
}
|
|
18320
|
-
}
|
|
18373
|
+
this._resetContentPositionAndZoom();
|
|
18374
|
+
this._applyContentViewport();
|
|
18375
|
+
facadeTexture.attachToMesh(this._contentPlate, true);
|
|
18321
18376
|
};
|
|
18322
18377
|
HolographicSlate.prototype._addControl = function (control) {
|
|
18323
18378
|
control._host = this._host;
|
|
@@ -18334,26 +18389,27 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18334
18389
|
HolographicSlate.prototype._positionElements = function () {
|
|
18335
18390
|
var followButtonMesh = this._followButton.mesh;
|
|
18336
18391
|
var closeButtonMesh = this._closeButton.mesh;
|
|
18337
|
-
var
|
|
18392
|
+
var titleBar = this._titleBar;
|
|
18393
|
+
var titleBarTitle = this._titleBarTitle;
|
|
18338
18394
|
var contentPlate = this._contentPlate;
|
|
18339
|
-
if (followButtonMesh && closeButtonMesh &&
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
// Buttons take full backPlate on Y axis
|
|
18343
|
-
var backPlateYScale = this.backplateDimensions.y / buttonBaseSize;
|
|
18344
|
-
closeButtonMesh.scaling.setAll(backPlateYScale);
|
|
18345
|
-
followButtonMesh.scaling.setAll(backPlateYScale);
|
|
18395
|
+
if (followButtonMesh && closeButtonMesh && titleBar) {
|
|
18396
|
+
closeButtonMesh.scaling.setAll(this.titleBarHeight);
|
|
18397
|
+
followButtonMesh.scaling.setAll(this.titleBarHeight);
|
|
18346
18398
|
closeButtonMesh.position
|
|
18347
|
-
.copyFromFloats(this.
|
|
18399
|
+
.copyFromFloats(this.dimensions.x - this.titleBarHeight / 2, -this.titleBarHeight / 2, (-babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Epsilon"] / 2) * (this._host.scene.useRightHandedSystem ? -1 : 1))
|
|
18348
18400
|
.addInPlace(this.origin);
|
|
18349
18401
|
followButtonMesh.position
|
|
18350
|
-
.copyFromFloats(this.
|
|
18402
|
+
.copyFromFloats(this.dimensions.x - (3 * this.titleBarHeight) / 2, -this.titleBarHeight / 2, (-babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Epsilon"] / 2) * (this._host.scene.useRightHandedSystem ? -1 : 1))
|
|
18351
18403
|
.addInPlace(this.origin);
|
|
18352
|
-
var contentPlateHeight = this.dimensions.y - this.
|
|
18353
|
-
|
|
18354
|
-
|
|
18355
|
-
|
|
18356
|
-
|
|
18404
|
+
var contentPlateHeight = this.dimensions.y - this.titleBarHeight - this.titleBarMargin;
|
|
18405
|
+
titleBar.scaling.set(this.dimensions.x, this.titleBarHeight, babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Epsilon"]);
|
|
18406
|
+
titleBarTitle.scaling.set(this.dimensions.x - (2 * this.titleBarHeight), this.titleBarHeight, babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Epsilon"]);
|
|
18407
|
+
contentPlate.scaling.copyFromFloats(this.dimensions.x, contentPlateHeight, babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Epsilon"]);
|
|
18408
|
+
titleBar.position.copyFromFloats(this.dimensions.x / 2, -(this.titleBarHeight / 2), 0).addInPlace(this.origin);
|
|
18409
|
+
titleBarTitle.position.copyFromFloats((this.dimensions.x / 2) - this.titleBarHeight, -(this.titleBarHeight / 2), -babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Epsilon"]).addInPlace(this.origin);
|
|
18410
|
+
contentPlate.position.copyFromFloats(this.dimensions.x / 2, -(this.titleBarHeight + this.titleBarMargin + contentPlateHeight / 2), 0).addInPlace(this.origin);
|
|
18411
|
+
// Update the title's AdvancedDynamicTexture scale to avoid visual stretching
|
|
18412
|
+
this._titleTextComponent.host.scaleTo(HolographicSlate.DEFAULT_TEXT_RESOLUTION_Y * titleBarTitle.scaling.x / titleBarTitle.scaling.y, HolographicSlate.DEFAULT_TEXT_RESOLUTION_Y);
|
|
18357
18413
|
var aspectRatio = this.dimensions.x / contentPlateHeight;
|
|
18358
18414
|
this._contentViewport.width = this._contentScaleRatio;
|
|
18359
18415
|
this._contentViewport.height = this._contentScaleRatio / aspectRatio;
|
|
@@ -18361,7 +18417,8 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18361
18417
|
}
|
|
18362
18418
|
};
|
|
18363
18419
|
HolographicSlate.prototype._applyContentViewport = function () {
|
|
18364
|
-
|
|
18420
|
+
var _a;
|
|
18421
|
+
if (((_a = this._contentPlate) === null || _a === void 0 ? void 0 : _a.material) && this._contentPlate.material.albedoTexture) {
|
|
18365
18422
|
var tex = this._contentPlate.material.albedoTexture;
|
|
18366
18423
|
tex.uScale = this._contentScaleRatio;
|
|
18367
18424
|
tex.vScale = (this._contentScaleRatio / this._contentViewport.width) * this._contentViewport.height;
|
|
@@ -18382,30 +18439,40 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18382
18439
|
return;
|
|
18383
18440
|
}
|
|
18384
18441
|
// Update pivot point so it is at the center of geometry
|
|
18385
|
-
var center = this.dimensions.scale(0.5);
|
|
18386
18442
|
// As origin is topleft corner in 2D, dimensions are calculated towards bottom right corner, thus y axis is downwards
|
|
18387
|
-
center.y
|
|
18443
|
+
var center = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"](this.dimensions.x * 0.5, -this.dimensions.y * 0.5, babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Epsilon"]);
|
|
18388
18444
|
center.addInPlace(this.origin);
|
|
18389
18445
|
center.z = 0;
|
|
18390
|
-
var origin = new
|
|
18391
|
-
|
|
18446
|
+
var origin = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"](0, 0, 0);
|
|
18447
|
+
babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].TransformCoordinatesToRef(origin, this.mesh.computeWorldMatrix(true), origin);
|
|
18392
18448
|
this.mesh.setPivotPoint(center);
|
|
18393
|
-
var origin2 = new
|
|
18394
|
-
|
|
18449
|
+
var origin2 = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"](0, 0, 0);
|
|
18450
|
+
babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].TransformCoordinatesToRef(origin2, this.mesh.computeWorldMatrix(true), origin2);
|
|
18395
18451
|
this.mesh.position.addInPlace(origin).subtractInPlace(origin2);
|
|
18396
18452
|
};
|
|
18397
18453
|
// Mesh association
|
|
18398
18454
|
HolographicSlate.prototype._createNode = function (scene) {
|
|
18399
18455
|
var _this = this;
|
|
18400
|
-
var node = new
|
|
18401
|
-
this.
|
|
18402
|
-
|
|
18456
|
+
var node = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Mesh"]("slate_" + this.name, scene);
|
|
18457
|
+
this._titleBar = Object(babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["CreateBox"])("titleBar_" + this.name, { size: 1 }, scene);
|
|
18458
|
+
this._titleBarTitle = Object(babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["CreatePlane"])("titleText_" + this.name, { size: 1 }, scene);
|
|
18459
|
+
this._titleBarTitle.parent = node;
|
|
18460
|
+
this._titleBarTitle.isPickable = false;
|
|
18461
|
+
var adt = _2D_advancedDynamicTexture__WEBPACK_IMPORTED_MODULE_3__["AdvancedDynamicTexture"].CreateForMesh(this._titleBarTitle);
|
|
18462
|
+
this._titleTextComponent = new _2D_controls_textBlock__WEBPACK_IMPORTED_MODULE_5__["TextBlock"]("titleText_" + this.name, this._titleText);
|
|
18463
|
+
this._titleTextComponent.textWrapping = _2D_controls_textBlock__WEBPACK_IMPORTED_MODULE_5__["TextWrapping"].Ellipsis;
|
|
18464
|
+
this._titleTextComponent.textHorizontalAlignment = _2D_controls_control__WEBPACK_IMPORTED_MODULE_4__["Control"].HORIZONTAL_ALIGNMENT_LEFT;
|
|
18465
|
+
this._titleTextComponent.color = "white";
|
|
18466
|
+
this._titleTextComponent.fontSize = HolographicSlate.DEFAULT_TEXT_RESOLUTION_Y / 2;
|
|
18467
|
+
this._titleTextComponent.paddingLeft = HolographicSlate.DEFAULT_TEXT_RESOLUTION_Y / 4;
|
|
18468
|
+
adt.addControl(this._titleTextComponent);
|
|
18469
|
+
var faceUV = new Array(6).fill(new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector4"](0, 0, 1, 1));
|
|
18403
18470
|
if (scene.useRightHandedSystem) {
|
|
18404
18471
|
faceUV[0].copyFromFloats(0, 1, 1, 0);
|
|
18405
18472
|
}
|
|
18406
|
-
this._contentPlate = Object(
|
|
18407
|
-
this.
|
|
18408
|
-
this.
|
|
18473
|
+
this._contentPlate = Object(babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["CreateBox"])("contentPlate_" + this.name, { size: 1, faceUV: faceUV }, scene);
|
|
18474
|
+
this._titleBar.parent = node;
|
|
18475
|
+
this._titleBar.isNearGrabbable = true;
|
|
18409
18476
|
this._contentPlate.parent = node;
|
|
18410
18477
|
this._attachContentPlateBehavior();
|
|
18411
18478
|
this._addControl(this._followButton);
|
|
@@ -18428,7 +18495,7 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18428
18495
|
this._closeButton.onPointerClickObservable.add(function () {
|
|
18429
18496
|
_this.dispose();
|
|
18430
18497
|
});
|
|
18431
|
-
node.rotationQuaternion =
|
|
18498
|
+
node.rotationQuaternion = babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Quaternion"].Identity();
|
|
18432
18499
|
node.isVisible = false;
|
|
18433
18500
|
return node;
|
|
18434
18501
|
};
|
|
@@ -18438,11 +18505,11 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18438
18505
|
this._contentDragBehavior.moveAttached = false;
|
|
18439
18506
|
this._contentDragBehavior.useObjectOrientationForDragging = true;
|
|
18440
18507
|
this._contentDragBehavior.updateDragPlane = false;
|
|
18441
|
-
var origin = new
|
|
18442
|
-
var worldDimensions = new
|
|
18443
|
-
var upWorld = new
|
|
18444
|
-
var rightWorld = new
|
|
18445
|
-
var projectedOffset = new
|
|
18508
|
+
var origin = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"]();
|
|
18509
|
+
var worldDimensions = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"]();
|
|
18510
|
+
var upWorld = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"]();
|
|
18511
|
+
var rightWorld = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"]();
|
|
18512
|
+
var projectedOffset = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector2"]();
|
|
18446
18513
|
var startViewport;
|
|
18447
18514
|
var worldMatrix;
|
|
18448
18515
|
this._contentDragBehavior.onDragStartObservable.add(function (event) {
|
|
@@ -18452,55 +18519,55 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18452
18519
|
startViewport = _this._contentViewport.clone();
|
|
18453
18520
|
worldMatrix = _this.node.computeWorldMatrix(true);
|
|
18454
18521
|
origin.copyFrom(event.dragPlanePoint);
|
|
18455
|
-
worldDimensions.
|
|
18456
|
-
worldDimensions.y -= _this.
|
|
18457
|
-
|
|
18522
|
+
worldDimensions.set(_this.dimensions.x, _this.dimensions.y, babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Epsilon"]);
|
|
18523
|
+
worldDimensions.y -= _this.titleBarHeight + _this.titleBarMargin;
|
|
18524
|
+
babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].TransformNormalToRef(worldDimensions, worldMatrix, worldDimensions);
|
|
18458
18525
|
upWorld.copyFromFloats(0, 1, 0);
|
|
18459
|
-
|
|
18526
|
+
babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].TransformNormalToRef(upWorld, worldMatrix, upWorld);
|
|
18460
18527
|
rightWorld.copyFromFloats(1, 0, 0);
|
|
18461
|
-
|
|
18528
|
+
babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].TransformNormalToRef(rightWorld, worldMatrix, rightWorld);
|
|
18462
18529
|
upWorld.normalize();
|
|
18463
|
-
upWorld.scaleInPlace(1 /
|
|
18530
|
+
upWorld.scaleInPlace(1 / babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].Dot(upWorld, worldDimensions));
|
|
18464
18531
|
rightWorld.normalize();
|
|
18465
|
-
rightWorld.scaleInPlace(1 /
|
|
18532
|
+
rightWorld.scaleInPlace(1 / babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].Dot(rightWorld, worldDimensions));
|
|
18466
18533
|
});
|
|
18467
|
-
var offset = new
|
|
18534
|
+
var offset = new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"]();
|
|
18468
18535
|
this._contentDragBehavior.onDragObservable.add(function (event) {
|
|
18469
18536
|
offset.copyFrom(event.dragPlanePoint);
|
|
18470
18537
|
offset.subtractInPlace(origin);
|
|
18471
|
-
projectedOffset.copyFromFloats(
|
|
18538
|
+
projectedOffset.copyFromFloats(babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].Dot(offset, rightWorld), babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].Dot(offset, upWorld));
|
|
18472
18539
|
// By default, content takes full width available and height is cropped to keep aspect ratio
|
|
18473
|
-
_this._contentViewport.x =
|
|
18474
|
-
_this._contentViewport.y =
|
|
18540
|
+
_this._contentViewport.x = babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Scalar"].Clamp(startViewport.x - offset.x, 0, 1 - _this._contentViewport.width * _this._contentScaleRatio);
|
|
18541
|
+
_this._contentViewport.y = babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Scalar"].Clamp(startViewport.y - offset.y, 0, 1 - _this._contentViewport.height * _this._contentScaleRatio);
|
|
18475
18542
|
_this._applyContentViewport();
|
|
18476
18543
|
});
|
|
18477
18544
|
};
|
|
18478
18545
|
HolographicSlate.prototype._affectMaterial = function (mesh) {
|
|
18479
18546
|
// TODO share materials
|
|
18480
|
-
this.
|
|
18481
|
-
this._pickedPointObserver = this._host.onPickedPointChangedObservable.add(
|
|
18482
|
-
|
|
18483
|
-
|
|
18484
|
-
|
|
18485
|
-
|
|
18486
|
-
|
|
18487
|
-
|
|
18488
|
-
});
|
|
18489
|
-
this._contentMaterial = new
|
|
18547
|
+
this._titleBarMaterial = new _materials_fluentBackplate_fluentBackplateMaterial__WEBPACK_IMPORTED_MODULE_9__["FluentBackplateMaterial"]("".concat(this.name, " plateMaterial"), mesh.getScene());
|
|
18548
|
+
// this._pickedPointObserver = this._host.onPickedPointChangedObservable.add((pickedPoint) => {
|
|
18549
|
+
// if (pickedPoint) {
|
|
18550
|
+
// this._titleBarMaterial.globalLeftIndexTipPosition = pickedPoint;
|
|
18551
|
+
// this._titleBarMaterial.hoverColor.a = 1.0;
|
|
18552
|
+
// } else {
|
|
18553
|
+
// this._titleBarMaterial.hoverColor.a = 0;
|
|
18554
|
+
// }
|
|
18555
|
+
// });
|
|
18556
|
+
this._contentMaterial = new _materials_fluent_fluentMaterial__WEBPACK_IMPORTED_MODULE_8__["FluentMaterial"](this.name + "contentMaterial", mesh.getScene());
|
|
18490
18557
|
this._contentMaterial.renderBorders = true;
|
|
18491
|
-
this.
|
|
18558
|
+
this._titleBar.material = this._titleBarMaterial;
|
|
18492
18559
|
this._contentPlate.material = this._contentMaterial;
|
|
18493
|
-
this.
|
|
18560
|
+
this._resetContent();
|
|
18494
18561
|
this._applyContentViewport();
|
|
18495
18562
|
};
|
|
18496
18563
|
/** @hidden **/
|
|
18497
18564
|
HolographicSlate.prototype._prepareNode = function (scene) {
|
|
18498
18565
|
var _this = this;
|
|
18499
18566
|
_super.prototype._prepareNode.call(this, scene);
|
|
18500
|
-
this._gizmo = new
|
|
18567
|
+
this._gizmo = new _gizmos_slateGizmo__WEBPACK_IMPORTED_MODULE_7__["SlateGizmo"](this._host.utilityLayer);
|
|
18501
18568
|
this._gizmo.attachedSlate = this;
|
|
18502
|
-
this._defaultBehavior = new
|
|
18503
|
-
this._defaultBehavior.attach(this.node, [this.
|
|
18569
|
+
this._defaultBehavior = new _behaviors_defaultBehavior__WEBPACK_IMPORTED_MODULE_6__["DefaultBehavior"]();
|
|
18570
|
+
this._defaultBehavior.attach(this.node, [this._titleBar]);
|
|
18504
18571
|
this._positionChangedObserver = this._defaultBehavior.sixDofDragBehavior.onPositionChangedObservable.add(function () {
|
|
18505
18572
|
_this._gizmo.updateBoundingBox();
|
|
18506
18573
|
});
|
|
@@ -18518,13 +18585,13 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18518
18585
|
var camera = scene.activeCamera;
|
|
18519
18586
|
if (camera) {
|
|
18520
18587
|
var worldMatrix = camera.getWorldMatrix();
|
|
18521
|
-
var backward =
|
|
18588
|
+
var backward = babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].TransformNormal(babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"].Backward(scene.useRightHandedSystem), worldMatrix);
|
|
18522
18589
|
this.dimensions.copyFrom(this.defaultDimensions);
|
|
18523
18590
|
this.origin.setAll(0);
|
|
18524
18591
|
this._gizmo.updateBoundingBox();
|
|
18525
18592
|
var pivot = this.node.getAbsolutePivotPoint();
|
|
18526
18593
|
this.node.position.copyFrom(camera.position).subtractInPlace(backward).subtractInPlace(pivot);
|
|
18527
|
-
this.node.rotationQuaternion =
|
|
18594
|
+
this.node.rotationQuaternion = babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Quaternion"].FromLookDirectionLH(backward, new babylonjs_Behaviors_Meshes_pointerDragBehavior__WEBPACK_IMPORTED_MODULE_10__["Vector3"](0, 1, 0));
|
|
18528
18595
|
}
|
|
18529
18596
|
};
|
|
18530
18597
|
/**
|
|
@@ -18532,9 +18599,10 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18532
18599
|
*/
|
|
18533
18600
|
HolographicSlate.prototype.dispose = function () {
|
|
18534
18601
|
_super.prototype.dispose.call(this);
|
|
18535
|
-
this.
|
|
18602
|
+
this._titleBarMaterial.dispose();
|
|
18536
18603
|
this._contentMaterial.dispose();
|
|
18537
|
-
this.
|
|
18604
|
+
this._titleBar.dispose();
|
|
18605
|
+
this._titleBarTitle.dispose();
|
|
18538
18606
|
this._contentPlate.dispose();
|
|
18539
18607
|
this._followButton.dispose();
|
|
18540
18608
|
this._closeButton.dispose();
|
|
@@ -18556,8 +18624,9 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18556
18624
|
* File name for the close icon.
|
|
18557
18625
|
*/
|
|
18558
18626
|
HolographicSlate.FOLLOW_ICON_FILENAME = "IconFollowMe.png";
|
|
18627
|
+
HolographicSlate.DEFAULT_TEXT_RESOLUTION_Y = 102.4;
|
|
18559
18628
|
return HolographicSlate;
|
|
18560
|
-
}(
|
|
18629
|
+
}(_contentDisplay3D__WEBPACK_IMPORTED_MODULE_1__["ContentDisplay3D"]));
|
|
18561
18630
|
|
|
18562
18631
|
|
|
18563
18632
|
|
|
@@ -18567,7 +18636,7 @@ var HolographicSlate = /** @class */ (function (_super) {
|
|
|
18567
18636
|
/*!******************************!*\
|
|
18568
18637
|
!*** ./3D/controls/index.ts ***!
|
|
18569
18638
|
\******************************/
|
|
18570
|
-
/*! exports provided: AbstractButton3D, Button3D, Container3D, Control3D, CylinderPanel, HolographicButton, HolographicSlate, HandMenu, MeshButton3D, NearMenu, PlanePanel, ScatterPanel, Slider3D, SpherePanel, StackPanel3D, TouchButton3D, TouchMeshButton3D, TouchHolographicButton, TouchHolographicMenu,
|
|
18639
|
+
/*! exports provided: AbstractButton3D, Button3D, Container3D, Control3D, CylinderPanel, HolographicButton, HolographicSlate, HandMenu, MeshButton3D, NearMenu, PlanePanel, ScatterPanel, Slider3D, SpherePanel, StackPanel3D, TouchButton3D, TouchMeshButton3D, TouchHolographicButton, TouchHolographicMenu, VolumeBasedPanel, HolographicBackplate */
|
|
18571
18640
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
18572
18641
|
|
|
18573
18642
|
"use strict";
|
|
@@ -18629,14 +18698,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18629
18698
|
/* harmony import */ var _touchHolographicMenu__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./touchHolographicMenu */ "./3D/controls/touchHolographicMenu.ts");
|
|
18630
18699
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchHolographicMenu", function() { return _touchHolographicMenu__WEBPACK_IMPORTED_MODULE_18__["TouchHolographicMenu"]; });
|
|
18631
18700
|
|
|
18632
|
-
/* harmony import */ var
|
|
18633
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
18634
|
-
|
|
18635
|
-
/* harmony import */ var _volumeBasedPanel__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./volumeBasedPanel */ "./3D/controls/volumeBasedPanel.ts");
|
|
18636
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VolumeBasedPanel", function() { return _volumeBasedPanel__WEBPACK_IMPORTED_MODULE_20__["VolumeBasedPanel"]; });
|
|
18701
|
+
/* harmony import */ var _volumeBasedPanel__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./volumeBasedPanel */ "./3D/controls/volumeBasedPanel.ts");
|
|
18702
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VolumeBasedPanel", function() { return _volumeBasedPanel__WEBPACK_IMPORTED_MODULE_19__["VolumeBasedPanel"]; });
|
|
18637
18703
|
|
|
18638
|
-
/* harmony import */ var
|
|
18639
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HolographicBackplate", function() { return
|
|
18704
|
+
/* harmony import */ var _holographicBackplate__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./holographicBackplate */ "./3D/controls/holographicBackplate.ts");
|
|
18705
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HolographicBackplate", function() { return _holographicBackplate__WEBPACK_IMPORTED_MODULE_20__["HolographicBackplate"]; });
|
|
18640
18706
|
|
|
18641
18707
|
|
|
18642
18708
|
|
|
@@ -18657,7 +18723,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18657
18723
|
|
|
18658
18724
|
|
|
18659
18725
|
|
|
18660
|
-
|
|
18661
18726
|
|
|
18662
18727
|
|
|
18663
18728
|
|
|
@@ -18797,13 +18862,16 @@ var NearMenu = /** @class */ (function (_super) {
|
|
|
18797
18862
|
return this._isPinned;
|
|
18798
18863
|
},
|
|
18799
18864
|
set: function (value) {
|
|
18865
|
+
// Tell the pin button to toggle if this was called manually, for clean state control
|
|
18866
|
+
if (this._pinButton.isToggled !== value) {
|
|
18867
|
+
this._pinButton.isToggled = value;
|
|
18868
|
+
return;
|
|
18869
|
+
}
|
|
18800
18870
|
this._isPinned = value;
|
|
18801
|
-
if (
|
|
18802
|
-
this._pinMaterial.emissiveColor.copyFromFloats(0.25, 0.4, 0.95);
|
|
18871
|
+
if (value) {
|
|
18803
18872
|
this._defaultBehavior.followBehaviorEnabled = false;
|
|
18804
18873
|
}
|
|
18805
18874
|
else {
|
|
18806
|
-
this._pinMaterial.emissiveColor.copyFromFloats(0.08, 0.15, 0.55);
|
|
18807
18875
|
this._defaultBehavior.followBehaviorEnabled = true;
|
|
18808
18876
|
}
|
|
18809
18877
|
},
|
|
@@ -18816,12 +18884,11 @@ var NearMenu = /** @class */ (function (_super) {
|
|
|
18816
18884
|
control.imageUrl = NearMenu.ASSETS_BASE_URL + NearMenu.PIN_ICON_FILENAME;
|
|
18817
18885
|
control.parent = this;
|
|
18818
18886
|
control._host = this._host;
|
|
18819
|
-
control.
|
|
18887
|
+
control.isToggleButton = true;
|
|
18888
|
+
control.onToggleObservable.add(function (newState) { _this.isPinned = newState; });
|
|
18820
18889
|
if (this._host.utilityLayer) {
|
|
18821
18890
|
control._prepareNode(this._host.utilityLayer.utilityLayerScene);
|
|
18822
18891
|
control.scaling.scaleInPlace(_touchHolographicMenu__WEBPACK_IMPORTED_MODULE_3__["TouchHolographicMenu"].MENU_BUTTON_SCALE);
|
|
18823
|
-
this._pinMaterial = control.backMaterial;
|
|
18824
|
-
this._pinMaterial.diffuseColor.copyFromFloats(0, 0, 0);
|
|
18825
18892
|
if (control.node) {
|
|
18826
18893
|
control.node.parent = parent;
|
|
18827
18894
|
}
|
|
@@ -19230,7 +19297,7 @@ var Slider3D = /** @class */ (function (_super) {
|
|
|
19230
19297
|
// Mesh association
|
|
19231
19298
|
Slider3D.prototype._createNode = function (scene) {
|
|
19232
19299
|
var _this = this;
|
|
19233
|
-
var sliderBackplate = Object(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["CreateBox"])(this.name
|
|
19300
|
+
var sliderBackplate = Object(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["CreateBox"])("".concat(this.name, "_sliderbackplate"), {
|
|
19234
19301
|
width: 1.0,
|
|
19235
19302
|
height: 1.0,
|
|
19236
19303
|
depth: 1.0,
|
|
@@ -19241,12 +19308,12 @@ var Slider3D = /** @class */ (function (_super) {
|
|
|
19241
19308
|
babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["SceneLoader"].ImportMeshAsync(undefined, Slider3D.MODEL_BASE_URL, Slider3D.MODEL_FILENAME, scene)
|
|
19242
19309
|
.then(function (result) {
|
|
19243
19310
|
var sliderBackplateModel = result.meshes[1];
|
|
19244
|
-
var sliderBarModel = result.meshes[1].clone(_this.name
|
|
19245
|
-
var sliderThumbModel = result.meshes[1].clone(_this.name
|
|
19311
|
+
var sliderBarModel = result.meshes[1].clone("".concat(_this.name, "_sliderbar"), sliderBackplate);
|
|
19312
|
+
var sliderThumbModel = result.meshes[1].clone("".concat(_this.name, "_sliderthumb"), sliderBackplate);
|
|
19246
19313
|
sliderBackplateModel.visibility = 0;
|
|
19247
19314
|
if (_this._sliderBackplateVisible) {
|
|
19248
19315
|
sliderBackplateModel.visibility = 1;
|
|
19249
|
-
sliderBackplateModel.name = _this.name
|
|
19316
|
+
sliderBackplateModel.name = "".concat(_this.name, "_sliderbackplate");
|
|
19250
19317
|
sliderBackplateModel.isPickable = false;
|
|
19251
19318
|
sliderBackplateModel.scaling.x = 1;
|
|
19252
19319
|
sliderBackplateModel.scaling.z = 0.2;
|
|
@@ -19284,9 +19351,9 @@ var Slider3D = /** @class */ (function (_super) {
|
|
|
19284
19351
|
};
|
|
19285
19352
|
Slider3D.prototype._affectMaterial = function (mesh) {
|
|
19286
19353
|
var _a, _b, _c;
|
|
19287
|
-
this._sliderBackplateMaterial = (_a = this._sliderBackplateMaterial) !== null && _a !== void 0 ? _a : new _materials_mrdl_mrdlBackplateMaterial__WEBPACK_IMPORTED_MODULE_5__["MRDLBackplateMaterial"](this.name
|
|
19288
|
-
this._sliderBarMaterial = (_b = this._sliderBarMaterial) !== null && _b !== void 0 ? _b : new _materials_mrdl_mrdlSliderBarMaterial__WEBPACK_IMPORTED_MODULE_3__["MRDLSliderBarMaterial"](this.name
|
|
19289
|
-
this._sliderThumbMaterial = (_c = this._sliderThumbMaterial) !== null && _c !== void 0 ? _c : new _materials_mrdl_mrdlSliderThumbMaterial__WEBPACK_IMPORTED_MODULE_4__["MRDLSliderThumbMaterial"](this.name
|
|
19354
|
+
this._sliderBackplateMaterial = (_a = this._sliderBackplateMaterial) !== null && _a !== void 0 ? _a : new _materials_mrdl_mrdlBackplateMaterial__WEBPACK_IMPORTED_MODULE_5__["MRDLBackplateMaterial"]("".concat(this.name, "_sliderbackplate_material"), mesh.getScene());
|
|
19355
|
+
this._sliderBarMaterial = (_b = this._sliderBarMaterial) !== null && _b !== void 0 ? _b : new _materials_mrdl_mrdlSliderBarMaterial__WEBPACK_IMPORTED_MODULE_3__["MRDLSliderBarMaterial"]("".concat(this.name, "_sliderbar_material"), mesh.getScene());
|
|
19356
|
+
this._sliderThumbMaterial = (_c = this._sliderThumbMaterial) !== null && _c !== void 0 ? _c : new _materials_mrdl_mrdlSliderThumbMaterial__WEBPACK_IMPORTED_MODULE_4__["MRDLSliderThumbMaterial"]("".concat(this.name, "_sliderthumb_material"), mesh.getScene());
|
|
19290
19357
|
};
|
|
19291
19358
|
Slider3D.prototype._createBehavior = function () {
|
|
19292
19359
|
var _this = this;
|
|
@@ -19570,6 +19637,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19570
19637
|
|
|
19571
19638
|
|
|
19572
19639
|
|
|
19640
|
+
|
|
19573
19641
|
/**
|
|
19574
19642
|
* Class used to create a touchable button in 3D
|
|
19575
19643
|
*/
|
|
@@ -19583,6 +19651,13 @@ var TouchButton3D = /** @class */ (function (_super) {
|
|
|
19583
19651
|
function TouchButton3D(name, collisionMesh) {
|
|
19584
19652
|
var _this = _super.call(this, name) || this;
|
|
19585
19653
|
_this._isNearPressed = false;
|
|
19654
|
+
_this._isToggleButton = false;
|
|
19655
|
+
_this._toggleState = false;
|
|
19656
|
+
_this._toggleButtonCallback = function () { _this._onToggle(!_this._toggleState); };
|
|
19657
|
+
/**
|
|
19658
|
+
* An event triggered when the button is toggled. Only fired if 'isToggleButton' is true
|
|
19659
|
+
*/
|
|
19660
|
+
_this.onToggleObservable = new babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
|
|
19586
19661
|
_this.collidableFrontDirection = babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Zero();
|
|
19587
19662
|
if (collisionMesh) {
|
|
19588
19663
|
_this.collisionMesh = collisionMesh;
|
|
@@ -19625,21 +19700,81 @@ var TouchButton3D = /** @class */ (function (_super) {
|
|
|
19625
19700
|
* @param collisionMesh the new collision mesh for the button
|
|
19626
19701
|
*/
|
|
19627
19702
|
set: function (collisionMesh) {
|
|
19703
|
+
var _this = this;
|
|
19704
|
+
var _a;
|
|
19705
|
+
// Remove the GUI3DManager's data from the previous collision mesh's reserved data store, and reset interactability
|
|
19628
19706
|
if (this._collisionMesh) {
|
|
19629
|
-
this._collisionMesh.
|
|
19630
|
-
|
|
19631
|
-
|
|
19632
|
-
|
|
19633
|
-
|
|
19707
|
+
this._collisionMesh.isNearPickable = false;
|
|
19708
|
+
if ((_a = this._collisionMesh.reservedDataStore) === null || _a === void 0 ? void 0 : _a.GUI3D) {
|
|
19709
|
+
this._collisionMesh.reservedDataStore.GUI3D = {};
|
|
19710
|
+
}
|
|
19711
|
+
this._collisionMesh.getChildMeshes().forEach(function (mesh) {
|
|
19712
|
+
var _a;
|
|
19713
|
+
mesh.isNearPickable = false;
|
|
19714
|
+
if ((_a = mesh.reservedDataStore) === null || _a === void 0 ? void 0 : _a.GUI3D) {
|
|
19715
|
+
mesh.reservedDataStore.GUI3D = {};
|
|
19716
|
+
}
|
|
19717
|
+
});
|
|
19634
19718
|
}
|
|
19635
19719
|
this._collisionMesh = collisionMesh;
|
|
19636
19720
|
this._injectGUI3DReservedDataStore(this._collisionMesh).control = this;
|
|
19637
19721
|
this._collisionMesh.isNearPickable = true;
|
|
19722
|
+
this._collisionMesh.getChildMeshes().forEach(function (mesh) {
|
|
19723
|
+
_this._injectGUI3DReservedDataStore(mesh).control = _this;
|
|
19724
|
+
mesh.isNearPickable = true;
|
|
19725
|
+
});
|
|
19638
19726
|
this.collidableFrontDirection = collisionMesh.forward;
|
|
19639
19727
|
},
|
|
19640
19728
|
enumerable: false,
|
|
19641
19729
|
configurable: true
|
|
19642
19730
|
});
|
|
19731
|
+
Object.defineProperty(TouchButton3D.prototype, "isToggleButton", {
|
|
19732
|
+
get: function () {
|
|
19733
|
+
return this._isToggleButton;
|
|
19734
|
+
},
|
|
19735
|
+
/**
|
|
19736
|
+
* Setter for if this TouchButton3D should be treated as a toggle button
|
|
19737
|
+
* @param value If this TouchHolographicButton should act like a toggle button
|
|
19738
|
+
*/
|
|
19739
|
+
set: function (value) {
|
|
19740
|
+
if (value === this._isToggleButton) {
|
|
19741
|
+
return;
|
|
19742
|
+
}
|
|
19743
|
+
this._isToggleButton = value;
|
|
19744
|
+
if (value) {
|
|
19745
|
+
this.onPointerUpObservable.add(this._toggleButtonCallback);
|
|
19746
|
+
}
|
|
19747
|
+
else {
|
|
19748
|
+
this.onPointerUpObservable.removeCallback(this._toggleButtonCallback);
|
|
19749
|
+
// Safety check, reset the button if it's toggled on but no longer a toggle button
|
|
19750
|
+
if (this._toggleState) {
|
|
19751
|
+
this._onToggle(false);
|
|
19752
|
+
}
|
|
19753
|
+
}
|
|
19754
|
+
},
|
|
19755
|
+
enumerable: false,
|
|
19756
|
+
configurable: true
|
|
19757
|
+
});
|
|
19758
|
+
Object.defineProperty(TouchButton3D.prototype, "isToggled", {
|
|
19759
|
+
get: function () {
|
|
19760
|
+
return this._toggleState;
|
|
19761
|
+
},
|
|
19762
|
+
/**
|
|
19763
|
+
* A public entrypoint to set the toggle state of the TouchHolographicButton. Only works if 'isToggleButton' is true
|
|
19764
|
+
* @param newState The new state to set the TouchHolographicButton's toggle state to
|
|
19765
|
+
*/
|
|
19766
|
+
set: function (newState) {
|
|
19767
|
+
if (this._isToggleButton && this._toggleState !== newState) {
|
|
19768
|
+
this._onToggle(newState);
|
|
19769
|
+
}
|
|
19770
|
+
},
|
|
19771
|
+
enumerable: false,
|
|
19772
|
+
configurable: true
|
|
19773
|
+
});
|
|
19774
|
+
TouchButton3D.prototype._onToggle = function (newState) {
|
|
19775
|
+
this._toggleState = newState;
|
|
19776
|
+
this.onToggleObservable.notifyObservers(newState);
|
|
19777
|
+
};
|
|
19643
19778
|
// Returns true if the collidable is in front of the button, or if the button has no front direction
|
|
19644
19779
|
TouchButton3D.prototype._isInteractionInFrontOfButton = function (collidablePos) {
|
|
19645
19780
|
return this._getInteractionHeight(collidablePos, this._collisionMesh.getAbsolutePosition()) > 0;
|
|
@@ -19689,6 +19824,9 @@ var TouchButton3D = /** @class */ (function (_super) {
|
|
|
19689
19824
|
*/
|
|
19690
19825
|
TouchButton3D.prototype.dispose = function () {
|
|
19691
19826
|
_super.prototype.dispose.call(this);
|
|
19827
|
+
// Clean up toggle observables
|
|
19828
|
+
this.onPointerUpObservable.removeCallback(this._toggleButtonCallback);
|
|
19829
|
+
this.onToggleObservable.clear();
|
|
19692
19830
|
if (this._collisionMesh) {
|
|
19693
19831
|
this._collisionMesh.dispose();
|
|
19694
19832
|
}
|
|
@@ -19713,12 +19851,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19713
19851
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
|
|
19714
19852
|
/* harmony import */ var babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Maths/math.vector */ "babylonjs/Misc/observable");
|
|
19715
19853
|
/* harmony import */ var babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__);
|
|
19716
|
-
/* harmony import */ var
|
|
19717
|
-
/* harmony import */ var
|
|
19718
|
-
/* harmony import */ var
|
|
19719
|
-
/* harmony import */ var
|
|
19720
|
-
/* harmony import */ var
|
|
19721
|
-
/* harmony import */ var
|
|
19854
|
+
/* harmony import */ var _materials_fluent_fluentMaterial__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../materials/fluent/fluentMaterial */ "./3D/materials/fluent/fluentMaterial.ts");
|
|
19855
|
+
/* harmony import */ var _materials_fluentButton_fluentButtonMaterial__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../materials/fluentButton/fluentButtonMaterial */ "./3D/materials/fluentButton/fluentButtonMaterial.ts");
|
|
19856
|
+
/* harmony import */ var _2D_controls_stackPanel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../2D/controls/stackPanel */ "./2D/controls/stackPanel.ts");
|
|
19857
|
+
/* harmony import */ var _2D_controls_image__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../2D/controls/image */ "./2D/controls/image.ts");
|
|
19858
|
+
/* harmony import */ var _2D_controls_textBlock__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../2D/controls/textBlock */ "./2D/controls/textBlock.ts");
|
|
19859
|
+
/* harmony import */ var _2D_advancedDynamicTexture__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../2D/advancedDynamicTexture */ "./2D/advancedDynamicTexture.ts");
|
|
19860
|
+
/* harmony import */ var _touchButton3D__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./touchButton3D */ "./3D/controls/touchButton3D.ts");
|
|
19861
|
+
|
|
19722
19862
|
|
|
19723
19863
|
|
|
19724
19864
|
|
|
@@ -19753,6 +19893,8 @@ var TouchHolographicButton = /** @class */ (function (_super) {
|
|
|
19753
19893
|
_this._isBackplateVisible = true;
|
|
19754
19894
|
_this._frontPlateDepth = 0.5;
|
|
19755
19895
|
_this._backPlateDepth = 0.04;
|
|
19896
|
+
_this._backplateColor = new babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.08, 0.15, 0.55);
|
|
19897
|
+
_this._backplateToggledColor = new babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.25, 0.4, 0.95);
|
|
19756
19898
|
_this._shareMaterials = shareMaterials;
|
|
19757
19899
|
_this.pointerEnterAnimation = function () {
|
|
19758
19900
|
_this._frontMaterial.leftBlobEnable = true;
|
|
@@ -19780,7 +19922,7 @@ var TouchHolographicButton = /** @class */ (function (_super) {
|
|
|
19780
19922
|
if (_this._frontPlate && _this._isNearPressed) {
|
|
19781
19923
|
var scale = babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Zero();
|
|
19782
19924
|
if (_this._backPlate.getWorldMatrix().decompose(scale, undefined, undefined)) {
|
|
19783
|
-
var interactionHeight = _this._getInteractionHeight(position, _this._backPlate.
|
|
19925
|
+
var interactionHeight = _this._getInteractionHeight(position, _this._backPlate.getAbsolutePosition()) / scale.z;
|
|
19784
19926
|
interactionHeight = babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Scalar"].Clamp(interactionHeight - (_this._backPlateDepth / 2), 0.2 * _this._frontPlateDepth, _this._frontPlateDepth);
|
|
19785
19927
|
_this._frontPlate.scaling.z = interactionHeight;
|
|
19786
19928
|
_this._frontPlate.position = babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Forward(_this._frontPlate._scene.useRightHandedSystem).scale((_this._frontPlateDepth - interactionHeight) / 2);
|
|
@@ -19857,8 +19999,8 @@ var TouchHolographicButton = /** @class */ (function (_super) {
|
|
|
19857
19999
|
this._tooltipMesh.isPickable = false;
|
|
19858
20000
|
this._tooltipMesh.parent = this._backPlate;
|
|
19859
20001
|
// Create text texture for the tooltip
|
|
19860
|
-
this._tooltipTexture =
|
|
19861
|
-
this._tooltipTextBlock = new
|
|
20002
|
+
this._tooltipTexture = _2D_advancedDynamicTexture__WEBPACK_IMPORTED_MODULE_7__["AdvancedDynamicTexture"].CreateForMesh(this._tooltipMesh);
|
|
20003
|
+
this._tooltipTextBlock = new _2D_controls_textBlock__WEBPACK_IMPORTED_MODULE_6__["TextBlock"]();
|
|
19862
20004
|
this._tooltipTextBlock.scaleY = 3;
|
|
19863
20005
|
this._tooltipTextBlock.color = "white";
|
|
19864
20006
|
this._tooltipTextBlock.fontSize = 130;
|
|
@@ -19982,11 +20124,11 @@ var TouchHolographicButton = /** @class */ (function (_super) {
|
|
|
19982
20124
|
};
|
|
19983
20125
|
TouchHolographicButton.prototype._rebuildContent = function () {
|
|
19984
20126
|
this._disposeFacadeTexture();
|
|
19985
|
-
var panel = new
|
|
20127
|
+
var panel = new _2D_controls_stackPanel__WEBPACK_IMPORTED_MODULE_4__["StackPanel"]();
|
|
19986
20128
|
panel.isVertical = true;
|
|
19987
20129
|
if (babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["DomManagement"].IsDocumentAvailable() && !!document.createElement) {
|
|
19988
20130
|
if (this._imageUrl) {
|
|
19989
|
-
var image = new
|
|
20131
|
+
var image = new _2D_controls_image__WEBPACK_IMPORTED_MODULE_5__["Image"]();
|
|
19990
20132
|
image.source = this._imageUrl;
|
|
19991
20133
|
image.paddingTop = "40px";
|
|
19992
20134
|
image.height = "180px";
|
|
@@ -19996,7 +20138,7 @@ var TouchHolographicButton = /** @class */ (function (_super) {
|
|
|
19996
20138
|
}
|
|
19997
20139
|
}
|
|
19998
20140
|
if (this._text) {
|
|
19999
|
-
var text = new
|
|
20141
|
+
var text = new _2D_controls_textBlock__WEBPACK_IMPORTED_MODULE_6__["TextBlock"]();
|
|
20000
20142
|
text.text = this._text;
|
|
20001
20143
|
text.color = "white";
|
|
20002
20144
|
text.height = "30px";
|
|
@@ -20010,7 +20152,7 @@ var TouchHolographicButton = /** @class */ (function (_super) {
|
|
|
20010
20152
|
var _this = this;
|
|
20011
20153
|
var _a;
|
|
20012
20154
|
this.name = (_a = this.name) !== null && _a !== void 0 ? _a : "TouchHolographicButton";
|
|
20013
|
-
var collisionMesh = Object(babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["CreateBox"])(this.name
|
|
20155
|
+
var collisionMesh = Object(babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["CreateBox"])("".concat(this.name, "_collisionMesh"), {
|
|
20014
20156
|
width: 1.0,
|
|
20015
20157
|
height: 1.0,
|
|
20016
20158
|
depth: this._frontPlateDepth,
|
|
@@ -20021,17 +20163,26 @@ var TouchHolographicButton = /** @class */ (function (_super) {
|
|
|
20021
20163
|
collisionMesh.position = babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Forward(scene.useRightHandedSystem).scale(-this._frontPlateDepth / 2);
|
|
20022
20164
|
babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["SceneLoader"].ImportMeshAsync(undefined, TouchHolographicButton.MODEL_BASE_URL, TouchHolographicButton.MODEL_FILENAME, scene)
|
|
20023
20165
|
.then(function (result) {
|
|
20166
|
+
var alphaMesh = Object(babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["CreateBox"])("${this.name}_alphaMesh", {
|
|
20167
|
+
width: 1.0,
|
|
20168
|
+
height: 1.0,
|
|
20169
|
+
depth: 1.0,
|
|
20170
|
+
}, scene);
|
|
20171
|
+
alphaMesh.isPickable = false;
|
|
20172
|
+
alphaMesh.material = new babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["StandardMaterial"]("${this.name}_alphaMesh_material", scene);
|
|
20173
|
+
alphaMesh.material.alpha = 0.15;
|
|
20024
20174
|
var importedFrontPlate = result.meshes[1];
|
|
20025
|
-
importedFrontPlate.name = _this.name
|
|
20175
|
+
importedFrontPlate.name = "".concat(_this.name, "_frontPlate");
|
|
20026
20176
|
importedFrontPlate.isPickable = false;
|
|
20027
20177
|
importedFrontPlate.scaling.z = _this._frontPlateDepth;
|
|
20178
|
+
alphaMesh.parent = importedFrontPlate;
|
|
20028
20179
|
importedFrontPlate.parent = collisionMesh;
|
|
20029
20180
|
if (!!_this._frontMaterial) {
|
|
20030
20181
|
importedFrontPlate.material = _this._frontMaterial;
|
|
20031
20182
|
}
|
|
20032
20183
|
_this._frontPlate = importedFrontPlate;
|
|
20033
20184
|
});
|
|
20034
|
-
this._backPlate = Object(babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["CreateBox"])(this.name
|
|
20185
|
+
this._backPlate = Object(babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["CreateBox"])("".concat(this.name, "_backPlate"), {
|
|
20035
20186
|
width: 1.0,
|
|
20036
20187
|
height: 1.0,
|
|
20037
20188
|
depth: this._backPlateDepth,
|
|
@@ -20039,7 +20190,7 @@ var TouchHolographicButton = /** @class */ (function (_super) {
|
|
|
20039
20190
|
this._backPlate.position = babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Forward(scene.useRightHandedSystem).scale(-this._backPlateDepth / 2);
|
|
20040
20191
|
this._backPlate.isPickable = false;
|
|
20041
20192
|
this._textPlate = _super.prototype._createNode.call(this, scene);
|
|
20042
|
-
this._textPlate.name = this.name
|
|
20193
|
+
this._textPlate.name = "".concat(this.name, "_textPlate");
|
|
20043
20194
|
this._textPlate.isPickable = false;
|
|
20044
20195
|
this._textPlate.position = babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Vector3"].Forward(scene.useRightHandedSystem).scale(-this._frontPlateDepth / 2);
|
|
20045
20196
|
this._backPlate.addChild(collisionMesh);
|
|
@@ -20054,16 +20205,29 @@ var TouchHolographicButton = /** @class */ (function (_super) {
|
|
|
20054
20205
|
this._plateMaterial.diffuseColor = new babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Color3"](0.4, 0.4, 0.4);
|
|
20055
20206
|
};
|
|
20056
20207
|
TouchHolographicButton.prototype._createBackMaterial = function (mesh) {
|
|
20057
|
-
this._backMaterial = new
|
|
20058
|
-
this._backMaterial.
|
|
20208
|
+
this._backMaterial = new _materials_fluent_fluentMaterial__WEBPACK_IMPORTED_MODULE_2__["FluentMaterial"](this.name + "backPlateMaterial", mesh.getScene());
|
|
20209
|
+
this._backMaterial.albedoColor = this._backplateColor;
|
|
20210
|
+
this._backMaterial.renderBorders = true;
|
|
20211
|
+
this._backMaterial.renderHoverLight = false;
|
|
20059
20212
|
};
|
|
20060
20213
|
TouchHolographicButton.prototype._createFrontMaterial = function (mesh) {
|
|
20061
|
-
this._frontMaterial = new
|
|
20214
|
+
this._frontMaterial = new _materials_fluentButton_fluentButtonMaterial__WEBPACK_IMPORTED_MODULE_3__["FluentButtonMaterial"](this.name + "Front Material", mesh.getScene());
|
|
20062
20215
|
};
|
|
20063
20216
|
TouchHolographicButton.prototype._createPlateMaterial = function (mesh) {
|
|
20064
20217
|
this._plateMaterial = new babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["StandardMaterial"](this.name + "Plate Material", mesh.getScene());
|
|
20065
20218
|
this._plateMaterial.specularColor = babylonjs_Maths_math_vector__WEBPACK_IMPORTED_MODULE_1__["Color3"].Black();
|
|
20066
20219
|
};
|
|
20220
|
+
TouchHolographicButton.prototype._onToggle = function (newState) {
|
|
20221
|
+
if (this._backMaterial) {
|
|
20222
|
+
if (newState) {
|
|
20223
|
+
this._backMaterial.albedoColor = this._backplateToggledColor;
|
|
20224
|
+
}
|
|
20225
|
+
else {
|
|
20226
|
+
this._backMaterial.albedoColor = this._backplateColor;
|
|
20227
|
+
}
|
|
20228
|
+
}
|
|
20229
|
+
_super.prototype._onToggle.call(this, newState);
|
|
20230
|
+
};
|
|
20067
20231
|
TouchHolographicButton.prototype._affectMaterial = function (mesh) {
|
|
20068
20232
|
if (this._shareMaterials) {
|
|
20069
20233
|
// Back
|
|
@@ -20124,7 +20288,7 @@ var TouchHolographicButton = /** @class */ (function (_super) {
|
|
|
20124
20288
|
*/
|
|
20125
20289
|
TouchHolographicButton.MODEL_FILENAME = "mrtk-fluent-button.glb";
|
|
20126
20290
|
return TouchHolographicButton;
|
|
20127
|
-
}(
|
|
20291
|
+
}(_touchButton3D__WEBPACK_IMPORTED_MODULE_8__["TouchButton3D"]));
|
|
20128
20292
|
|
|
20129
20293
|
|
|
20130
20294
|
|
|
@@ -20188,7 +20352,7 @@ var TouchHolographicMenu = /** @class */ (function (_super) {
|
|
|
20188
20352
|
configurable: true
|
|
20189
20353
|
});
|
|
20190
20354
|
TouchHolographicMenu.prototype._createNode = function (scene) {
|
|
20191
|
-
var node = new babylonjs_Meshes_mesh__WEBPACK_IMPORTED_MODULE_2__["Mesh"]("menu_"
|
|
20355
|
+
var node = new babylonjs_Meshes_mesh__WEBPACK_IMPORTED_MODULE_2__["Mesh"]("menu_".concat(this.name), scene);
|
|
20192
20356
|
this._backPlate = Object(babylonjs_Meshes_mesh__WEBPACK_IMPORTED_MODULE_2__["CreateBox"])("backPlate" + this.name, { size: 1 }, scene);
|
|
20193
20357
|
this._backPlate.parent = node;
|
|
20194
20358
|
return node;
|
|
@@ -20373,83 +20537,6 @@ var TouchMeshButton3D = /** @class */ (function (_super) {
|
|
|
20373
20537
|
|
|
20374
20538
|
|
|
20375
20539
|
|
|
20376
|
-
/***/ }),
|
|
20377
|
-
|
|
20378
|
-
/***/ "./3D/controls/touchToggleButton3D.ts":
|
|
20379
|
-
/*!********************************************!*\
|
|
20380
|
-
!*** ./3D/controls/touchToggleButton3D.ts ***!
|
|
20381
|
-
\********************************************/
|
|
20382
|
-
/*! exports provided: TouchToggleButton3D */
|
|
20383
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
20384
|
-
|
|
20385
|
-
"use strict";
|
|
20386
|
-
__webpack_require__.r(__webpack_exports__);
|
|
20387
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TouchToggleButton3D", function() { return TouchToggleButton3D; });
|
|
20388
|
-
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
|
|
20389
|
-
/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babylonjs/Misc/observable */ "babylonjs/Misc/observable");
|
|
20390
|
-
/* harmony import */ var babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__);
|
|
20391
|
-
/* harmony import */ var _touchButton3D__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./touchButton3D */ "./3D/controls/touchButton3D.ts");
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
|
|
20395
|
-
/**
|
|
20396
|
-
* Class used as base class for touch-enabled toggleable buttons
|
|
20397
|
-
*/
|
|
20398
|
-
var TouchToggleButton3D = /** @class */ (function (_super) {
|
|
20399
|
-
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(TouchToggleButton3D, _super);
|
|
20400
|
-
/**
|
|
20401
|
-
* Creates a new button
|
|
20402
|
-
* @param name defines the control name
|
|
20403
|
-
* @param collisionMesh defines the mesh to track near interactions with
|
|
20404
|
-
*/
|
|
20405
|
-
function TouchToggleButton3D(name, collisionMesh) {
|
|
20406
|
-
var _this = _super.call(this, name, collisionMesh) || this;
|
|
20407
|
-
_this._isPressed = false;
|
|
20408
|
-
/**
|
|
20409
|
-
* An event triggered when the button is toggled on
|
|
20410
|
-
*/
|
|
20411
|
-
_this.onToggleOnObservable = new babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
|
|
20412
|
-
/**
|
|
20413
|
-
* An event triggered when the button is toggled off
|
|
20414
|
-
*/
|
|
20415
|
-
_this.onToggleOffObservable = new babylonjs_Misc_observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
|
|
20416
|
-
_this.onPointerUpObservable.add(function (posVecWithInfo) {
|
|
20417
|
-
_this._onToggle(posVecWithInfo);
|
|
20418
|
-
});
|
|
20419
|
-
return _this;
|
|
20420
|
-
}
|
|
20421
|
-
TouchToggleButton3D.prototype._onToggle = function (position) {
|
|
20422
|
-
this._isPressed = !this._isPressed;
|
|
20423
|
-
if (this._isPressed) {
|
|
20424
|
-
this.onToggleOnObservable.notifyObservers(position);
|
|
20425
|
-
}
|
|
20426
|
-
else {
|
|
20427
|
-
this.onToggleOffObservable.notifyObservers(position);
|
|
20428
|
-
}
|
|
20429
|
-
};
|
|
20430
|
-
TouchToggleButton3D.prototype._getTypeName = function () {
|
|
20431
|
-
return "TouchToggleButton3D";
|
|
20432
|
-
};
|
|
20433
|
-
// Mesh association
|
|
20434
|
-
TouchToggleButton3D.prototype._createNode = function (scene) {
|
|
20435
|
-
return _super.prototype._createNode.call(this, scene);
|
|
20436
|
-
};
|
|
20437
|
-
TouchToggleButton3D.prototype._affectMaterial = function (mesh) {
|
|
20438
|
-
_super.prototype._affectMaterial.call(this, mesh);
|
|
20439
|
-
};
|
|
20440
|
-
/**
|
|
20441
|
-
* Releases all associated resources
|
|
20442
|
-
*/
|
|
20443
|
-
TouchToggleButton3D.prototype.dispose = function () {
|
|
20444
|
-
this.onToggleOnObservable.clear();
|
|
20445
|
-
this.onToggleOffObservable.clear();
|
|
20446
|
-
_super.prototype.dispose.call(this);
|
|
20447
|
-
};
|
|
20448
|
-
return TouchToggleButton3D;
|
|
20449
|
-
}(_touchButton3D__WEBPACK_IMPORTED_MODULE_2__["TouchButton3D"]));
|
|
20450
|
-
|
|
20451
|
-
|
|
20452
|
-
|
|
20453
20540
|
/***/ }),
|
|
20454
20541
|
|
|
20455
20542
|
/***/ "./3D/controls/volumeBasedPanel.ts":
|
|
@@ -20921,6 +21008,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20921
21008
|
|
|
20922
21009
|
|
|
20923
21010
|
|
|
21011
|
+
|
|
20924
21012
|
/**
|
|
20925
21013
|
* Gizmo to resize 2D slates
|
|
20926
21014
|
*/
|
|
@@ -21083,8 +21171,7 @@ var SlateGizmo = /** @class */ (function (_super) {
|
|
|
21083
21171
|
offsetOriginMasked.copyFrom(offset).multiplyInPlace(masks.origin);
|
|
21084
21172
|
offsetDimensionsMasked.copyFrom(offset).multiplyInPlace(masks.dimensions);
|
|
21085
21173
|
this._attachedSlate.origin.copyFrom(originStart).addInPlace(offsetOriginMasked);
|
|
21086
|
-
this._attachedSlate.dimensions.
|
|
21087
|
-
this._attachedSlate.backplateDimensions.x = this._attachedSlate.dimensions.x;
|
|
21174
|
+
this._attachedSlate.dimensions.set(dimensionsStart.x + offsetDimensionsMasked.x, dimensionsStart.y + offsetDimensionsMasked.y);
|
|
21088
21175
|
};
|
|
21089
21176
|
SlateGizmo.prototype._assignDragBehaviorCorners = function (handle, moveFn, masks) {
|
|
21090
21177
|
var _this = this;
|
|
@@ -21104,7 +21191,7 @@ var SlateGizmo = /** @class */ (function (_super) {
|
|
|
21104
21191
|
};
|
|
21105
21192
|
var dragStart = function (event) {
|
|
21106
21193
|
if (_this.attachedSlate && _this.attachedMesh) {
|
|
21107
|
-
dimensionsStart.
|
|
21194
|
+
dimensionsStart.set(_this.attachedSlate.dimensions.x, _this.attachedSlate.dimensions.y, babylonjs_Gizmos_gizmo__WEBPACK_IMPORTED_MODULE_1__["Epsilon"]);
|
|
21108
21195
|
originStart.copyFrom(_this.attachedSlate.origin);
|
|
21109
21196
|
dragOrigin.copyFrom(event.position);
|
|
21110
21197
|
toObjectFrame.copyFrom(_this.attachedMesh.computeWorldMatrix(true));
|
|
@@ -21560,7 +21647,7 @@ var GUI3DManager = /** @class */ (function () {
|
|
|
21560
21647
|
/*!*********************!*\
|
|
21561
21648
|
!*** ./3D/index.ts ***!
|
|
21562
21649
|
\*********************/
|
|
21563
|
-
/*! exports provided: AbstractButton3D, Button3D, Container3D, Control3D, CylinderPanel, HolographicButton, HolographicSlate, HandMenu, MeshButton3D, NearMenu, PlanePanel, ScatterPanel, Slider3D, SpherePanel, StackPanel3D, TouchButton3D, TouchMeshButton3D, TouchHolographicButton, TouchHolographicMenu,
|
|
21650
|
+
/*! exports provided: AbstractButton3D, Button3D, Container3D, Control3D, CylinderPanel, HolographicButton, HolographicSlate, HandMenu, MeshButton3D, NearMenu, PlanePanel, ScatterPanel, Slider3D, SpherePanel, StackPanel3D, TouchButton3D, TouchMeshButton3D, TouchHolographicButton, TouchHolographicMenu, VolumeBasedPanel, HolographicBackplate, FluentMaterialDefines, FluentMaterial, FluentButtonMaterial, FluentBackplateMaterial, HandleMaterial, MRDLSliderBarMaterial, MRDLSliderThumbMaterial, MRDLBackplateMaterial, SlateGizmo, HandleState, GizmoHandle, SideHandle, CornerHandle, GUI3DManager, Vector3WithInfo */
|
|
21564
21651
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
21565
21652
|
|
|
21566
21653
|
"use strict";
|
|
@@ -21604,8 +21691,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21604
21691
|
|
|
21605
21692
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchHolographicMenu", function() { return _controls_index__WEBPACK_IMPORTED_MODULE_0__["TouchHolographicMenu"]; });
|
|
21606
21693
|
|
|
21607
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchToggleButton3D", function() { return _controls_index__WEBPACK_IMPORTED_MODULE_0__["TouchToggleButton3D"]; });
|
|
21608
|
-
|
|
21609
21694
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VolumeBasedPanel", function() { return _controls_index__WEBPACK_IMPORTED_MODULE_0__["VolumeBasedPanel"]; });
|
|
21610
21695
|
|
|
21611
21696
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HolographicBackplate", function() { return _controls_index__WEBPACK_IMPORTED_MODULE_0__["HolographicBackplate"]; });
|
|
@@ -21742,7 +21827,7 @@ var FluentMaterial = /** @class */ (function (_super) {
|
|
|
21742
21827
|
/**
|
|
21743
21828
|
* Gets or sets the radius used to render the hover light (default is 1.0)
|
|
21744
21829
|
*/
|
|
21745
|
-
_this.hoverRadius =
|
|
21830
|
+
_this.hoverRadius = 0.01;
|
|
21746
21831
|
/**
|
|
21747
21832
|
* Gets or sets the color used to render the hover light (default is Color4(0.3, 0.3, 0.3, 1.0))
|
|
21748
21833
|
*/
|
|
@@ -21893,7 +21978,7 @@ var FluentMaterial = /** @class */ (function (_super) {
|
|
|
21893
21978
|
return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new FluentMaterial(name, _this.getScene()); }, this);
|
|
21894
21979
|
};
|
|
21895
21980
|
FluentMaterial.prototype.serialize = function () {
|
|
21896
|
-
var serializationObject =
|
|
21981
|
+
var serializationObject = _super.prototype.serialize.call(this);
|
|
21897
21982
|
serializationObject.customType = "BABYLON.GUI.FluentMaterial";
|
|
21898
21983
|
return serializationObject;
|
|
21899
21984
|
};
|
|
@@ -22181,8 +22266,8 @@ var FluentBackplateMaterial = /** @class */ (function (_super) {
|
|
|
22181
22266
|
_this._globalRightIndexTipPosition4 = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector4"].Zero();
|
|
22182
22267
|
_this.alphaMode = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].ALPHA_DISABLE;
|
|
22183
22268
|
_this.backFaceCulling = false;
|
|
22184
|
-
_this._blobTexture = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"](FluentBackplateMaterial.BLOB_TEXTURE_URL,
|
|
22185
|
-
_this._iridescentMap = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"](FluentBackplateMaterial.IM_TEXTURE_URL,
|
|
22269
|
+
_this._blobTexture = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"](FluentBackplateMaterial.BLOB_TEXTURE_URL, _this.getScene(), true, false, babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].NEAREST_SAMPLINGMODE);
|
|
22270
|
+
_this._iridescentMap = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"](FluentBackplateMaterial.IM_TEXTURE_URL, _this.getScene(), true, false, babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].NEAREST_SAMPLINGMODE);
|
|
22186
22271
|
return _this;
|
|
22187
22272
|
}
|
|
22188
22273
|
FluentBackplateMaterial.prototype.needAlphaBlending = function () {
|
|
@@ -22374,7 +22459,7 @@ var FluentBackplateMaterial = /** @class */ (function (_super) {
|
|
|
22374
22459
|
return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new FluentBackplateMaterial(name, _this.getScene()); }, this);
|
|
22375
22460
|
};
|
|
22376
22461
|
FluentBackplateMaterial.prototype.serialize = function () {
|
|
22377
|
-
var serializationObject =
|
|
22462
|
+
var serializationObject = _super.prototype.serialize.call(this);
|
|
22378
22463
|
serializationObject.customType = "BABYLON.FluentBackplateMaterial";
|
|
22379
22464
|
return serializationObject;
|
|
22380
22465
|
};
|
|
@@ -22735,7 +22820,7 @@ var FluentButtonMaterial = /** @class */ (function (_super) {
|
|
|
22735
22820
|
_this.alphaMode = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].ALPHA_ADD;
|
|
22736
22821
|
_this.disableDepthWrite = true;
|
|
22737
22822
|
_this.backFaceCulling = false;
|
|
22738
|
-
_this._blobTexture = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"](FluentButtonMaterial.BLOB_TEXTURE_URL,
|
|
22823
|
+
_this._blobTexture = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"](FluentButtonMaterial.BLOB_TEXTURE_URL, _this.getScene(), true, false, babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].NEAREST_SAMPLINGMODE);
|
|
22739
22824
|
return _this;
|
|
22740
22825
|
}
|
|
22741
22826
|
FluentButtonMaterial.prototype.needAlphaBlending = function () {
|
|
@@ -22956,7 +23041,7 @@ var FluentButtonMaterial = /** @class */ (function (_super) {
|
|
|
22956
23041
|
return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new FluentButtonMaterial(name, _this.getScene()); }, this);
|
|
22957
23042
|
};
|
|
22958
23043
|
FluentButtonMaterial.prototype.serialize = function () {
|
|
22959
|
-
var serializationObject =
|
|
23044
|
+
var serializationObject = _super.prototype.serialize.call(this);
|
|
22960
23045
|
serializationObject.customType = "BABYLON.FluentButtonMaterial";
|
|
22961
23046
|
return serializationObject;
|
|
22962
23047
|
};
|
|
@@ -23581,7 +23666,7 @@ var MRDLBackplateMaterial = /** @class */ (function (_super) {
|
|
|
23581
23666
|
_this.edgeLineGradientBlend = 0.5;
|
|
23582
23667
|
_this.alphaMode = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].ALPHA_DISABLE;
|
|
23583
23668
|
_this.backFaceCulling = false;
|
|
23584
|
-
_this._iridescentMapTexture = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"](MRDLBackplateMaterial.IRIDESCENT_MAP_TEXTURE_URL,
|
|
23669
|
+
_this._iridescentMapTexture = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"](MRDLBackplateMaterial.IRIDESCENT_MAP_TEXTURE_URL, _this.getScene(), true, false, babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].NEAREST_SAMPLINGMODE);
|
|
23585
23670
|
return _this;
|
|
23586
23671
|
}
|
|
23587
23672
|
MRDLBackplateMaterial.prototype.needAlphaBlending = function () {
|
|
@@ -23754,7 +23839,7 @@ var MRDLBackplateMaterial = /** @class */ (function (_super) {
|
|
|
23754
23839
|
return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new MRDLBackplateMaterial(name, _this.getScene()); }, this);
|
|
23755
23840
|
};
|
|
23756
23841
|
MRDLBackplateMaterial.prototype.serialize = function () {
|
|
23757
|
-
var serializationObject =
|
|
23842
|
+
var serializationObject = _super.prototype.serialize.call(this);
|
|
23758
23843
|
serializationObject.customType = "BABYLON.MRDLBackplateMaterial";
|
|
23759
23844
|
return serializationObject;
|
|
23760
23845
|
};
|
|
@@ -24196,7 +24281,7 @@ var MRDLSliderBarMaterial = /** @class */ (function (_super) {
|
|
|
24196
24281
|
_this.globalRightIndexMiddlePosition = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Vector4"](0.0, 0.0, 0.0, 1.0);
|
|
24197
24282
|
_this.alphaMode = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Constants"].ALPHA_DISABLE;
|
|
24198
24283
|
_this.backFaceCulling = false;
|
|
24199
|
-
_this._blueGradientTexture = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"](MRDLSliderBarMaterial.BLUE_GRADIENT_TEXTURE_URL,
|
|
24284
|
+
_this._blueGradientTexture = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"](MRDLSliderBarMaterial.BLUE_GRADIENT_TEXTURE_URL, _this.getScene(), true, false, babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["Texture"].NEAREST_SAMPLINGMODE);
|
|
24200
24285
|
return _this;
|
|
24201
24286
|
}
|
|
24202
24287
|
MRDLSliderBarMaterial.prototype.needAlphaBlending = function () {
|
|
@@ -24439,7 +24524,7 @@ var MRDLSliderBarMaterial = /** @class */ (function (_super) {
|
|
|
24439
24524
|
return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new MRDLSliderBarMaterial(name, _this.getScene()); }, this);
|
|
24440
24525
|
};
|
|
24441
24526
|
MRDLSliderBarMaterial.prototype.serialize = function () {
|
|
24442
|
-
var serializationObject =
|
|
24527
|
+
var serializationObject = _super.prototype.serialize.call(this);
|
|
24443
24528
|
serializationObject.customType = "BABYLON.MRDLSliderBarMaterial";
|
|
24444
24529
|
return serializationObject;
|
|
24445
24530
|
};
|
|
@@ -25244,7 +25329,7 @@ var MRDLSliderThumbMaterial = /** @class */ (function (_super) {
|
|
|
25244
25329
|
return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["SerializationHelper"].Clone(function () { return new MRDLSliderThumbMaterial(name, _this.getScene()); }, this);
|
|
25245
25330
|
};
|
|
25246
25331
|
MRDLSliderThumbMaterial.prototype.serialize = function () {
|
|
25247
|
-
var serializationObject =
|
|
25332
|
+
var serializationObject = _super.prototype.serialize.call(this);
|
|
25248
25333
|
serializationObject.customType = "BABYLON.MRDLSliderThumbMaterial";
|
|
25249
25334
|
return serializationObject;
|
|
25250
25335
|
};
|
|
@@ -25632,7 +25717,7 @@ var Vector3WithInfo = /** @class */ (function (_super) {
|
|
|
25632
25717
|
/*!******************!*\
|
|
25633
25718
|
!*** ./index.ts ***!
|
|
25634
25719
|
\******************/
|
|
25635
|
-
/*! exports provided: Button, Checkbox, ColorPicker, Container, Control, Ellipse, FocusableButton, Grid, Image, InputText, InputPassword, Line, MultiLine, RadioButton, StackPanel, SelectorGroup, CheckboxGroup, RadioGroup, SliderGroup, SelectionPanel, ScrollViewer, TextWrapping, TextBlock, TextWrapper, ToggleButton, KeyPropertySet, VirtualKeyboard, Rectangle, DisplayGrid, BaseSlider, Slider, ImageBasedSlider, ScrollBar, ImageScrollBar, name, AdvancedDynamicTexture, AdvancedDynamicTextureInstrumentation, Vector2WithInfo, Matrix2D, Measure, MultiLinePoint, Style, ValueAndUnit, XmlLoader, AbstractButton3D, Button3D, Container3D, Control3D, CylinderPanel, HolographicButton, HolographicSlate, HandMenu, MeshButton3D, NearMenu, PlanePanel, ScatterPanel, Slider3D, SpherePanel, StackPanel3D, TouchButton3D, TouchMeshButton3D, TouchHolographicButton, TouchHolographicMenu,
|
|
25720
|
+
/*! exports provided: Button, Checkbox, ColorPicker, Container, Control, Ellipse, FocusableButton, Grid, Image, InputText, InputPassword, Line, MultiLine, RadioButton, StackPanel, SelectorGroup, CheckboxGroup, RadioGroup, SliderGroup, SelectionPanel, ScrollViewer, TextWrapping, TextBlock, TextWrapper, ToggleButton, KeyPropertySet, VirtualKeyboard, Rectangle, DisplayGrid, BaseSlider, Slider, ImageBasedSlider, ScrollBar, ImageScrollBar, name, AdvancedDynamicTexture, AdvancedDynamicTextureInstrumentation, Vector2WithInfo, Matrix2D, Measure, MultiLinePoint, Style, ValueAndUnit, XmlLoader, AbstractButton3D, Button3D, Container3D, Control3D, CylinderPanel, HolographicButton, HolographicSlate, HandMenu, MeshButton3D, NearMenu, PlanePanel, ScatterPanel, Slider3D, SpherePanel, StackPanel3D, TouchButton3D, TouchMeshButton3D, TouchHolographicButton, TouchHolographicMenu, VolumeBasedPanel, HolographicBackplate, FluentMaterialDefines, FluentMaterial, FluentButtonMaterial, FluentBackplateMaterial, HandleMaterial, MRDLSliderBarMaterial, MRDLSliderThumbMaterial, MRDLBackplateMaterial, SlateGizmo, HandleState, GizmoHandle, SideHandle, CornerHandle, GUI3DManager, Vector3WithInfo */
|
|
25636
25721
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
25637
25722
|
|
|
25638
25723
|
"use strict";
|
|
@@ -25765,8 +25850,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25765
25850
|
|
|
25766
25851
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchHolographicMenu", function() { return _3D_index__WEBPACK_IMPORTED_MODULE_1__["TouchHolographicMenu"]; });
|
|
25767
25852
|
|
|
25768
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchToggleButton3D", function() { return _3D_index__WEBPACK_IMPORTED_MODULE_1__["TouchToggleButton3D"]; });
|
|
25769
|
-
|
|
25770
25853
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VolumeBasedPanel", function() { return _3D_index__WEBPACK_IMPORTED_MODULE_1__["VolumeBasedPanel"]; });
|
|
25771
25854
|
|
|
25772
25855
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HolographicBackplate", function() { return _3D_index__WEBPACK_IMPORTED_MODULE_1__["HolographicBackplate"]; });
|
|
@@ -25811,7 +25894,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25811
25894
|
/*!**************************!*\
|
|
25812
25895
|
!*** ./legacy/legacy.ts ***!
|
|
25813
25896
|
\**************************/
|
|
25814
|
-
/*! exports provided: Button, Checkbox, ColorPicker, Container, Control, Ellipse, FocusableButton, Grid, Image, InputText, InputPassword, Line, MultiLine, RadioButton, StackPanel, SelectorGroup, CheckboxGroup, RadioGroup, SliderGroup, SelectionPanel, ScrollViewer, TextWrapping, TextBlock, TextWrapper, ToggleButton, KeyPropertySet, VirtualKeyboard, Rectangle, DisplayGrid, BaseSlider, Slider, ImageBasedSlider, ScrollBar, ImageScrollBar, name, AdvancedDynamicTexture, AdvancedDynamicTextureInstrumentation, Vector2WithInfo, Matrix2D, Measure, MultiLinePoint, Style, ValueAndUnit, XmlLoader, AbstractButton3D, Button3D, Container3D, Control3D, CylinderPanel, HolographicButton, HolographicSlate, HandMenu, MeshButton3D, NearMenu, PlanePanel, ScatterPanel, Slider3D, SpherePanel, StackPanel3D, TouchButton3D, TouchMeshButton3D, TouchHolographicButton, TouchHolographicMenu,
|
|
25897
|
+
/*! exports provided: Button, Checkbox, ColorPicker, Container, Control, Ellipse, FocusableButton, Grid, Image, InputText, InputPassword, Line, MultiLine, RadioButton, StackPanel, SelectorGroup, CheckboxGroup, RadioGroup, SliderGroup, SelectionPanel, ScrollViewer, TextWrapping, TextBlock, TextWrapper, ToggleButton, KeyPropertySet, VirtualKeyboard, Rectangle, DisplayGrid, BaseSlider, Slider, ImageBasedSlider, ScrollBar, ImageScrollBar, name, AdvancedDynamicTexture, AdvancedDynamicTextureInstrumentation, Vector2WithInfo, Matrix2D, Measure, MultiLinePoint, Style, ValueAndUnit, XmlLoader, AbstractButton3D, Button3D, Container3D, Control3D, CylinderPanel, HolographicButton, HolographicSlate, HandMenu, MeshButton3D, NearMenu, PlanePanel, ScatterPanel, Slider3D, SpherePanel, StackPanel3D, TouchButton3D, TouchMeshButton3D, TouchHolographicButton, TouchHolographicMenu, VolumeBasedPanel, HolographicBackplate, FluentMaterialDefines, FluentMaterial, FluentButtonMaterial, FluentBackplateMaterial, HandleMaterial, MRDLSliderBarMaterial, MRDLSliderThumbMaterial, MRDLBackplateMaterial, SlateGizmo, HandleState, GizmoHandle, SideHandle, CornerHandle, GUI3DManager, Vector3WithInfo */
|
|
25815
25898
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
25816
25899
|
|
|
25817
25900
|
"use strict";
|
|
@@ -25943,8 +26026,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25943
26026
|
|
|
25944
26027
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchHolographicMenu", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["TouchHolographicMenu"]; });
|
|
25945
26028
|
|
|
25946
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TouchToggleButton3D", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["TouchToggleButton3D"]; });
|
|
25947
|
-
|
|
25948
26029
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VolumeBasedPanel", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["VolumeBasedPanel"]; });
|
|
25949
26030
|
|
|
25950
26031
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HolographicBackplate", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["HolographicBackplate"]; });
|