|
@@ -17564,6 +17564,11 @@ var VRExperienceHelper = /** @class */ (function () {
|
|
|
*/
|
|
|
this.onNewMeshSelected = new _Misc_observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]();
|
|
|
/**
|
|
|
+ * Observable raised when a new mesh is selected based on meshSelectionPredicate.
|
|
|
+ * This observable will provide the mesh and the controller used to select the mesh
|
|
|
+ */
|
|
|
+ this.onMeshSelectedWithController = new _Misc_observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]();
|
|
|
+ /**
|
|
|
* Observable raised when a new mesh is picked based on meshSelectionPredicate
|
|
|
*/
|
|
|
this.onNewMeshPicked = new _Misc_observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]();
|
|
@@ -19022,9 +19027,13 @@ var VRExperienceHelper = /** @class */ (function () {
|
|
|
}
|
|
|
try {
|
|
|
this.onNewMeshSelected.notifyObservers(hit.pickedMesh);
|
|
|
+ var gazerAsControllerGazer = gazer;
|
|
|
+ if (gazerAsControllerGazer.webVRController) {
|
|
|
+ this.onMeshSelectedWithController.notifyObservers({ mesh: hit.pickedMesh, controller: gazerAsControllerGazer.webVRController });
|
|
|
+ }
|
|
|
}
|
|
|
catch (err) {
|
|
|
- _Misc_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"].Warn("Error in your custom logic onNewMeshSelected: " + err);
|
|
|
+ _Misc_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"].Warn("Error while raising onNewMeshSelected or onMeshSelectedWithController: " + err);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
@@ -59517,9 +59526,11 @@ var LightBlock = /** @class */ (function (_super) {
|
|
|
var diffuseOutput = this.diffuseOutput;
|
|
|
var specularOutput = this.specularOutput;
|
|
|
state.compilationString += this._declareOutput(diffuseOutput, state) + " = diffuseBase;\r\n";
|
|
|
- state.compilationString += "#ifdef SPECULARTERM\r\n";
|
|
|
- state.compilationString += this._declareOutput(specularOutput, state) + " = specularBase;\r\n";
|
|
|
- state.compilationString += "#endif\r\n";
|
|
|
+ if (specularOutput.hasEndpoints) {
|
|
|
+ state.compilationString += "#ifdef SPECULARTERM\r\n";
|
|
|
+ state.compilationString += this._declareOutput(specularOutput, state) + " = specularBase;\r\n";
|
|
|
+ state.compilationString += "#endif\r\n";
|
|
|
+ }
|
|
|
return this;
|
|
|
};
|
|
|
LightBlock.prototype.serialize = function () {
|
|
@@ -65124,7 +65135,7 @@ var NodeMaterialConnectionPoint = /** @class */ (function () {
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
|
});
|
|
|
- Object.defineProperty(NodeMaterialConnectionPoint.prototype, "isConnectedToInput", {
|
|
|
+ Object.defineProperty(NodeMaterialConnectionPoint.prototype, "isConnectedToInputBlock", {
|
|
|
/**
|
|
|
* Gets a boolean indicating that the current point is connected to an input block
|
|
|
*/
|
|
@@ -65139,7 +65150,7 @@ var NodeMaterialConnectionPoint = /** @class */ (function () {
|
|
|
* Gets a the connected input block (if any)
|
|
|
*/
|
|
|
get: function () {
|
|
|
- if (!this.isConnectedToInput) {
|
|
|
+ if (!this.isConnectedToInputBlock) {
|
|
|
return null;
|
|
|
}
|
|
|
return this.connectedPoint.ownerBlock;
|
|
@@ -65188,7 +65199,15 @@ var NodeMaterialConnectionPoint = /** @class */ (function () {
|
|
|
Object.defineProperty(NodeMaterialConnectionPoint.prototype, "endpoints", {
|
|
|
/** Gets the list of connected endpoints */
|
|
|
get: function () {
|
|
|
- return this, this._endpoints;
|
|
|
+ return this._endpoints;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(NodeMaterialConnectionPoint.prototype, "hasEndpoints", {
|
|
|
+ /** Gets a boolean indicating if that output point is connected to at least one input */
|
|
|
+ get: function () {
|
|
|
+ return this._endpoints && this._endpoints.length > 0;
|
|
|
},
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
@@ -73366,7 +73385,7 @@ var CubeTexture = /** @class */ (function (_super) {
|
|
|
if (parsedTexture.prefiltered) {
|
|
|
prefiltered = parsedTexture.prefiltered;
|
|
|
}
|
|
|
- return new CubeTexture(rootUrl + parsedTexture.name, scene, parsedTexture.extensions, false, null, null, null, undefined, prefiltered);
|
|
|
+ return new CubeTexture(rootUrl + parsedTexture.name, scene, parsedTexture.extensions, false, parsedTexture.files || null, null, null, undefined, prefiltered);
|
|
|
}, parsedTexture, scene);
|
|
|
// Local Cubemaps
|
|
|
if (parsedTexture.boundingBoxPosition) {
|
|
@@ -73410,6 +73429,9 @@ var CubeTexture = /** @class */ (function (_super) {
|
|
|
Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("rotationY")
|
|
|
], CubeTexture.prototype, "rotationY", null);
|
|
|
tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
|
|
|
+ Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])("files")
|
|
|
+ ], CubeTexture.prototype, "_files", void 0);
|
|
|
+ tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([
|
|
|
Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serializeAsMatrix"])("textureMatrix")
|
|
|
], CubeTexture.prototype, "_textureMatrix", void 0);
|
|
|
return CubeTexture;
|
|
@@ -141684,6 +141706,7 @@ var StandardRenderingPipeline = /** @class */ (function (_super) {
|
|
|
_this._hdrCurrentLuminance = 1.0;
|
|
|
_this._motionStrength = 1.0;
|
|
|
_this._isObjectBasedMotionBlur = false;
|
|
|
+ _this._camerasToBeAttached = [];
|
|
|
// Getters and setters
|
|
|
_this._bloomEnabled = false;
|
|
|
_this._depthOfFieldEnabled = false;
|
|
@@ -141695,7 +141718,9 @@ var StandardRenderingPipeline = /** @class */ (function (_super) {
|
|
|
_this._motionBlurSamples = 64.0;
|
|
|
_this._volumetricLightStepsCount = 50.0;
|
|
|
_this._samples = 1;
|
|
|
- _this._cameras = cameras || [];
|
|
|
+ _this._cameras = cameras || scene.cameras;
|
|
|
+ _this._cameras = _this._cameras.slice();
|
|
|
+ _this._camerasToBeAttached = _this._cameras.slice();
|
|
|
// Initialize
|
|
|
_this._scene = scene;
|
|
|
_this._basePostProcess = originalPostProcess;
|
|
@@ -141979,6 +142004,11 @@ var StandardRenderingPipeline = /** @class */ (function (_super) {
|
|
|
var ratio = this._ratio;
|
|
|
var scene = this._scene;
|
|
|
this._disposePostProcesses();
|
|
|
+ if (this._cameras !== null) {
|
|
|
+ this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name, this._cameras);
|
|
|
+ // get back cameras to be used to reattach pipeline
|
|
|
+ this._cameras = this._camerasToBeAttached.slice();
|
|
|
+ }
|
|
|
this._reset();
|
|
|
// Create pass post-process
|
|
|
if (!this._basePostProcess) {
|