|
@@ -50533,6 +50533,13 @@ var BABYLON;
|
|
this._stopped = true;
|
|
this._stopped = true;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
|
|
+ * Remove all active particles
|
|
|
|
+ */
|
|
|
|
+ ParticleSystem.prototype.reset = function () {
|
|
|
|
+ this._stockParticles = [];
|
|
|
|
+ this._particles = [];
|
|
|
|
+ };
|
|
|
|
+ /**
|
|
* @ignore (for internal use only)
|
|
* @ignore (for internal use only)
|
|
*/
|
|
*/
|
|
ParticleSystem.prototype._appendParticleVertex = function (index, particle, offsetX, offsetY) {
|
|
ParticleSystem.prototype._appendParticleVertex = function (index, particle, offsetX, offsetY) {
|
|
@@ -51409,7 +51416,7 @@ var BABYLON;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-//# sourceMappingURL=babylon.IParticleEmitterType.js.map
|
|
|
|
|
|
+//# sourceMappingURL=babylon.iParticleEmitterType.js.map
|
|
|
|
|
|
var BABYLON;
|
|
var BABYLON;
|
|
(function (BABYLON) {
|
|
(function (BABYLON) {
|
|
@@ -51707,6 +51714,15 @@ var BABYLON;
|
|
* Last computed particle rotation matrix
|
|
* Last computed particle rotation matrix
|
|
*/
|
|
*/
|
|
this._rotationMatrix = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0];
|
|
this._rotationMatrix = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0];
|
|
|
|
+ /**
|
|
|
|
+ * Parent particle Id, if any.
|
|
|
|
+ * Default null.
|
|
|
|
+ */
|
|
|
|
+ this.parentId = null;
|
|
|
|
+ /**
|
|
|
|
+ * Internal global position in the SPS.
|
|
|
|
+ */
|
|
|
|
+ this._globalPosition = BABYLON.Vector3.Zero();
|
|
this.idx = particleIndex;
|
|
this.idx = particleIndex;
|
|
this._pos = positionIndex;
|
|
this._pos = positionIndex;
|
|
this._ind = indiceIndex;
|
|
this._ind = indiceIndex;
|
|
@@ -51935,6 +51951,8 @@ var BABYLON;
|
|
};
|
|
};
|
|
this._needs32Bits = false;
|
|
this._needs32Bits = false;
|
|
this._pivotBackTranslation = BABYLON.Vector3.Zero();
|
|
this._pivotBackTranslation = BABYLON.Vector3.Zero();
|
|
|
|
+ this._scaledPivot = BABYLON.Vector3.Zero();
|
|
|
|
+ this._particleHasParent = false;
|
|
this.name = name;
|
|
this.name = name;
|
|
this._scene = scene || BABYLON.Engine.LastCreatedScene;
|
|
this._scene = scene || BABYLON.Engine.LastCreatedScene;
|
|
this._camera = scene.activeCamera;
|
|
this._camera = scene.activeCamera;
|
|
@@ -52169,11 +52187,14 @@ var BABYLON;
|
|
this._quaternionRotationYPR();
|
|
this._quaternionRotationYPR();
|
|
}
|
|
}
|
|
this._quaternionToRotationMatrix();
|
|
this._quaternionToRotationMatrix();
|
|
|
|
+ this._scaledPivot.x = this._copy.pivot.x * this._copy.scaling.x;
|
|
|
|
+ this._scaledPivot.y = this._copy.pivot.y * this._copy.scaling.y;
|
|
|
|
+ this._scaledPivot.z = this._copy.pivot.z * this._copy.scaling.z;
|
|
if (this._copy.translateFromPivot) {
|
|
if (this._copy.translateFromPivot) {
|
|
this._pivotBackTranslation.copyFromFloats(0.0, 0.0, 0.0);
|
|
this._pivotBackTranslation.copyFromFloats(0.0, 0.0, 0.0);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- this._pivotBackTranslation.copyFrom(this._copy.pivot);
|
|
|
|
|
|
+ this._pivotBackTranslation.copyFrom(this._scaledPivot);
|
|
}
|
|
}
|
|
for (i = 0; i < shape.length; i++) {
|
|
for (i = 0; i < shape.length; i++) {
|
|
this._vertex.x = shape[i].x;
|
|
this._vertex.x = shape[i].x;
|
|
@@ -52185,9 +52206,9 @@ var BABYLON;
|
|
this._vertex.x *= this._copy.scaling.x;
|
|
this._vertex.x *= this._copy.scaling.x;
|
|
this._vertex.y *= this._copy.scaling.y;
|
|
this._vertex.y *= this._copy.scaling.y;
|
|
this._vertex.z *= this._copy.scaling.z;
|
|
this._vertex.z *= this._copy.scaling.z;
|
|
- this._vertex.x -= this._copy.pivot.x;
|
|
|
|
- this._vertex.y -= this._copy.pivot.y;
|
|
|
|
- this._vertex.z -= this._copy.pivot.z;
|
|
|
|
|
|
+ this._vertex.x -= this._scaledPivot.x;
|
|
|
|
+ this._vertex.y -= this._scaledPivot.y;
|
|
|
|
+ this._vertex.z -= this._scaledPivot.z;
|
|
BABYLON.Vector3.TransformCoordinatesToRef(this._vertex, this._rotMatrix, this._rotated);
|
|
BABYLON.Vector3.TransformCoordinatesToRef(this._vertex, this._rotMatrix, this._rotated);
|
|
this._rotated.addInPlace(this._pivotBackTranslation);
|
|
this._rotated.addInPlace(this._pivotBackTranslation);
|
|
positions.push(this._copy.position.x + this._rotated.x, this._copy.position.y + this._rotated.y, this._copy.position.z + this._rotated.z);
|
|
positions.push(this._copy.position.x + this._rotated.x, this._copy.position.y + this._rotated.y, this._copy.position.z + this._rotated.z);
|
|
@@ -52331,11 +52352,14 @@ var BABYLON;
|
|
this._quaternionRotationYPR();
|
|
this._quaternionRotationYPR();
|
|
}
|
|
}
|
|
this._quaternionToRotationMatrix();
|
|
this._quaternionToRotationMatrix();
|
|
|
|
+ this._scaledPivot.x = this._particle.pivot.x * this._particle.scaling.x;
|
|
|
|
+ this._scaledPivot.y = this._particle.pivot.y * this._particle.scaling.y;
|
|
|
|
+ this._scaledPivot.z = this._particle.pivot.z * this._particle.scaling.z;
|
|
if (this._copy.translateFromPivot) {
|
|
if (this._copy.translateFromPivot) {
|
|
this._pivotBackTranslation.copyFromFloats(0.0, 0.0, 0.0);
|
|
this._pivotBackTranslation.copyFromFloats(0.0, 0.0, 0.0);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- this._pivotBackTranslation.copyFrom(this._copy.pivot);
|
|
|
|
|
|
+ this._pivotBackTranslation.copyFrom(this._scaledPivot);
|
|
}
|
|
}
|
|
this._shape = particle._model._shape;
|
|
this._shape = particle._model._shape;
|
|
for (var pt = 0; pt < this._shape.length; pt++) {
|
|
for (var pt = 0; pt < this._shape.length; pt++) {
|
|
@@ -52348,9 +52372,9 @@ var BABYLON;
|
|
this._vertex.x *= this._copy.scaling.x;
|
|
this._vertex.x *= this._copy.scaling.x;
|
|
this._vertex.y *= this._copy.scaling.y;
|
|
this._vertex.y *= this._copy.scaling.y;
|
|
this._vertex.z *= this._copy.scaling.z;
|
|
this._vertex.z *= this._copy.scaling.z;
|
|
- this._vertex.x -= this._copy.pivot.x;
|
|
|
|
- this._vertex.y -= this._copy.pivot.y;
|
|
|
|
- this._vertex.z -= this._copy.pivot.z;
|
|
|
|
|
|
+ this._vertex.x -= this._scaledPivot.x;
|
|
|
|
+ this._vertex.y -= this._scaledPivot.y;
|
|
|
|
+ this._vertex.z -= this._scaledPivot.z;
|
|
BABYLON.Vector3.TransformCoordinatesToRef(this._vertex, this._rotMatrix, this._rotated);
|
|
BABYLON.Vector3.TransformCoordinatesToRef(this._vertex, this._rotMatrix, this._rotated);
|
|
this._rotated.addInPlace(this._pivotBackTranslation);
|
|
this._rotated.addInPlace(this._pivotBackTranslation);
|
|
this._positions32[particle._pos + pt * 3] = this._copy.position.x + this._rotated.x;
|
|
this._positions32[particle._pos + pt * 3] = this._copy.position.x + this._rotated.x;
|
|
@@ -52367,6 +52391,15 @@ var BABYLON;
|
|
particle.scaling.x = 1.0;
|
|
particle.scaling.x = 1.0;
|
|
particle.scaling.y = 1.0;
|
|
particle.scaling.y = 1.0;
|
|
particle.scaling.z = 1.0;
|
|
particle.scaling.z = 1.0;
|
|
|
|
+ particle.uvs.x = 0.0;
|
|
|
|
+ particle.uvs.y = 0.0;
|
|
|
|
+ particle.uvs.z = 1.0;
|
|
|
|
+ particle.uvs.w = 1.0;
|
|
|
|
+ particle.pivot.x = 0.0;
|
|
|
|
+ particle.pivot.y = 0.0;
|
|
|
|
+ particle.pivot.z = 0.0;
|
|
|
|
+ particle.translateFromPivot = false;
|
|
|
|
+ particle.parentId = null;
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
* Rebuilds the whole mesh and updates the VBO : custom positions and vertices are recomputed if needed.
|
|
* Rebuilds the whole mesh and updates the VBO : custom positions and vertices are recomputed if needed.
|
|
@@ -52481,6 +52514,10 @@ var BABYLON;
|
|
}
|
|
}
|
|
if (this._particle.isVisible) {
|
|
if (this._particle.isVisible) {
|
|
this._particle._stillInvisible = false; // un-mark permanent invisibility
|
|
this._particle._stillInvisible = false; // un-mark permanent invisibility
|
|
|
|
+ this._particleHasParent = (this._particle.parentId !== null);
|
|
|
|
+ this._scaledPivot.x = this._particle.pivot.x * this._particle.scaling.x;
|
|
|
|
+ this._scaledPivot.y = this._particle.pivot.y * this._particle.scaling.y;
|
|
|
|
+ this._scaledPivot.z = this._particle.pivot.z * this._particle.scaling.z;
|
|
// particle rotation matrix
|
|
// particle rotation matrix
|
|
if (this.billboard) {
|
|
if (this.billboard) {
|
|
this._particle.rotation.x = 0.0;
|
|
this._particle.rotation.x = 0.0;
|
|
@@ -52497,15 +52534,42 @@ var BABYLON;
|
|
this._quaternionRotationYPR();
|
|
this._quaternionRotationYPR();
|
|
}
|
|
}
|
|
this._quaternionToRotationMatrix();
|
|
this._quaternionToRotationMatrix();
|
|
- this._particle._rotationMatrix[0] = this._rotMatrix.m[0];
|
|
|
|
- this._particle._rotationMatrix[1] = this._rotMatrix.m[1];
|
|
|
|
- this._particle._rotationMatrix[2] = this._rotMatrix.m[2];
|
|
|
|
- this._particle._rotationMatrix[3] = this._rotMatrix.m[4];
|
|
|
|
- this._particle._rotationMatrix[4] = this._rotMatrix.m[5];
|
|
|
|
- this._particle._rotationMatrix[5] = this._rotMatrix.m[6];
|
|
|
|
- this._particle._rotationMatrix[6] = this._rotMatrix.m[8];
|
|
|
|
- this._particle._rotationMatrix[7] = this._rotMatrix.m[9];
|
|
|
|
- this._particle._rotationMatrix[8] = this._rotMatrix.m[10];
|
|
|
|
|
|
+ }
|
|
|
|
+ if (this._particleHasParent) {
|
|
|
|
+ this._parent = this.particles[this._particle.parentId];
|
|
|
|
+ this._rotated.x = this._particle.position.x * this._parent._rotationMatrix[0] + this._particle.position.y * this._parent._rotationMatrix[3] + this._particle.position.z * this._parent._rotationMatrix[6];
|
|
|
|
+ this._rotated.y = this._particle.position.x * this._parent._rotationMatrix[1] + this._particle.position.y * this._parent._rotationMatrix[4] + this._particle.position.z * this._parent._rotationMatrix[7];
|
|
|
|
+ this._rotated.z = this._particle.position.x * this._parent._rotationMatrix[2] + this._particle.position.y * this._parent._rotationMatrix[5] + this._particle.position.z * this._parent._rotationMatrix[8];
|
|
|
|
+ this._particle._globalPosition.x = this._parent._globalPosition.x + this._rotated.x;
|
|
|
|
+ this._particle._globalPosition.y = this._parent._globalPosition.y + this._rotated.y;
|
|
|
|
+ this._particle._globalPosition.z = this._parent._globalPosition.z + this._rotated.z;
|
|
|
|
+ if (this._computeParticleRotation || this.billboard) {
|
|
|
|
+ this._particle._rotationMatrix[0] = this._rotMatrix.m[0] * this._parent._rotationMatrix[0] + this._rotMatrix.m[1] * this._parent._rotationMatrix[3] + this._rotMatrix.m[2] * this._parent._rotationMatrix[6];
|
|
|
|
+ this._particle._rotationMatrix[1] = this._rotMatrix.m[0] * this._parent._rotationMatrix[1] + this._rotMatrix.m[1] * this._parent._rotationMatrix[4] + this._rotMatrix.m[2] * this._parent._rotationMatrix[7];
|
|
|
|
+ this._particle._rotationMatrix[2] = this._rotMatrix.m[0] * this._parent._rotationMatrix[2] + this._rotMatrix.m[1] * this._parent._rotationMatrix[5] + this._rotMatrix.m[2] * this._parent._rotationMatrix[8];
|
|
|
|
+ this._particle._rotationMatrix[3] = this._rotMatrix.m[4] * this._parent._rotationMatrix[0] + this._rotMatrix.m[5] * this._parent._rotationMatrix[3] + this._rotMatrix.m[6] * this._parent._rotationMatrix[6];
|
|
|
|
+ this._particle._rotationMatrix[4] = this._rotMatrix.m[4] * this._parent._rotationMatrix[1] + this._rotMatrix.m[5] * this._parent._rotationMatrix[4] + this._rotMatrix.m[6] * this._parent._rotationMatrix[7];
|
|
|
|
+ this._particle._rotationMatrix[5] = this._rotMatrix.m[4] * this._parent._rotationMatrix[2] + this._rotMatrix.m[5] * this._parent._rotationMatrix[5] + this._rotMatrix.m[6] * this._parent._rotationMatrix[8];
|
|
|
|
+ this._particle._rotationMatrix[6] = this._rotMatrix.m[8] * this._parent._rotationMatrix[0] + this._rotMatrix.m[9] * this._parent._rotationMatrix[3] + this._rotMatrix.m[10] * this._parent._rotationMatrix[6];
|
|
|
|
+ this._particle._rotationMatrix[7] = this._rotMatrix.m[8] * this._parent._rotationMatrix[1] + this._rotMatrix.m[9] * this._parent._rotationMatrix[4] + this._rotMatrix.m[10] * this._parent._rotationMatrix[7];
|
|
|
|
+ this._particle._rotationMatrix[8] = this._rotMatrix.m[8] * this._parent._rotationMatrix[2] + this._rotMatrix.m[9] * this._parent._rotationMatrix[5] + this._rotMatrix.m[10] * this._parent._rotationMatrix[8];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this._particle._globalPosition.x = this._particle.position.x;
|
|
|
|
+ this._particle._globalPosition.y = this._particle.position.y;
|
|
|
|
+ this._particle._globalPosition.z = this._particle.position.z;
|
|
|
|
+ if (this._computeParticleRotation || this.billboard) {
|
|
|
|
+ this._particle._rotationMatrix[0] = this._rotMatrix.m[0];
|
|
|
|
+ this._particle._rotationMatrix[1] = this._rotMatrix.m[1];
|
|
|
|
+ this._particle._rotationMatrix[2] = this._rotMatrix.m[2];
|
|
|
|
+ this._particle._rotationMatrix[3] = this._rotMatrix.m[4];
|
|
|
|
+ this._particle._rotationMatrix[4] = this._rotMatrix.m[5];
|
|
|
|
+ this._particle._rotationMatrix[5] = this._rotMatrix.m[6];
|
|
|
|
+ this._particle._rotationMatrix[6] = this._rotMatrix.m[8];
|
|
|
|
+ this._particle._rotationMatrix[7] = this._rotMatrix.m[9];
|
|
|
|
+ this._particle._rotationMatrix[8] = this._rotMatrix.m[10];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (this._particle.translateFromPivot) {
|
|
if (this._particle.translateFromPivot) {
|
|
this._pivotBackTranslation.x = 0.0;
|
|
this._pivotBackTranslation.x = 0.0;
|
|
@@ -52513,9 +52577,9 @@ var BABYLON;
|
|
this._pivotBackTranslation.z = 0.0;
|
|
this._pivotBackTranslation.z = 0.0;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- this._pivotBackTranslation.x = this._particle.pivot.x;
|
|
|
|
- this._pivotBackTranslation.y = this._particle.pivot.y;
|
|
|
|
- this._pivotBackTranslation.z = this._particle.pivot.z;
|
|
|
|
|
|
+ this._pivotBackTranslation.x = this._scaledPivot.x;
|
|
|
|
+ this._pivotBackTranslation.y = this._scaledPivot.y;
|
|
|
|
+ this._pivotBackTranslation.z = this._scaledPivot.z;
|
|
}
|
|
}
|
|
// particle vertex loop
|
|
// particle vertex loop
|
|
for (pt = 0; pt < this._shape.length; pt++) {
|
|
for (pt = 0; pt < this._shape.length; pt++) {
|
|
@@ -52532,18 +52596,18 @@ var BABYLON;
|
|
this._vertex.x *= this._particle.scaling.x;
|
|
this._vertex.x *= this._particle.scaling.x;
|
|
this._vertex.y *= this._particle.scaling.y;
|
|
this._vertex.y *= this._particle.scaling.y;
|
|
this._vertex.z *= this._particle.scaling.z;
|
|
this._vertex.z *= this._particle.scaling.z;
|
|
- this._vertex.x -= this._particle.pivot.x;
|
|
|
|
- this._vertex.y -= this._particle.pivot.y;
|
|
|
|
- this._vertex.z -= this._particle.pivot.z;
|
|
|
|
|
|
+ this._vertex.x -= this._scaledPivot.x;
|
|
|
|
+ this._vertex.y -= this._scaledPivot.y;
|
|
|
|
+ this._vertex.z -= this._scaledPivot.z;
|
|
this._rotated.x = this._vertex.x * this._particle._rotationMatrix[0] + this._vertex.y * this._particle._rotationMatrix[3] + this._vertex.z * this._particle._rotationMatrix[6];
|
|
this._rotated.x = this._vertex.x * this._particle._rotationMatrix[0] + this._vertex.y * this._particle._rotationMatrix[3] + this._vertex.z * this._particle._rotationMatrix[6];
|
|
this._rotated.y = this._vertex.x * this._particle._rotationMatrix[1] + this._vertex.y * this._particle._rotationMatrix[4] + this._vertex.z * this._particle._rotationMatrix[7];
|
|
this._rotated.y = this._vertex.x * this._particle._rotationMatrix[1] + this._vertex.y * this._particle._rotationMatrix[4] + this._vertex.z * this._particle._rotationMatrix[7];
|
|
this._rotated.z = this._vertex.x * this._particle._rotationMatrix[2] + this._vertex.y * this._particle._rotationMatrix[5] + this._vertex.z * this._particle._rotationMatrix[8];
|
|
this._rotated.z = this._vertex.x * this._particle._rotationMatrix[2] + this._vertex.y * this._particle._rotationMatrix[5] + this._vertex.z * this._particle._rotationMatrix[8];
|
|
this._rotated.x += this._pivotBackTranslation.x;
|
|
this._rotated.x += this._pivotBackTranslation.x;
|
|
this._rotated.y += this._pivotBackTranslation.y;
|
|
this._rotated.y += this._pivotBackTranslation.y;
|
|
this._rotated.z += this._pivotBackTranslation.z;
|
|
this._rotated.z += this._pivotBackTranslation.z;
|
|
- this._positions32[idx] = this._particle.position.x + this._cam_axisX.x * this._rotated.x + this._cam_axisY.x * this._rotated.y + this._cam_axisZ.x * this._rotated.z;
|
|
|
|
- this._positions32[idx + 1] = this._particle.position.y + this._cam_axisX.y * this._rotated.x + this._cam_axisY.y * this._rotated.y + this._cam_axisZ.y * this._rotated.z;
|
|
|
|
- this._positions32[idx + 2] = this._particle.position.z + this._cam_axisX.z * this._rotated.x + this._cam_axisY.z * this._rotated.y + this._cam_axisZ.z * this._rotated.z;
|
|
|
|
|
|
+ this._positions32[idx] = this._particle._globalPosition.x + this._cam_axisX.x * this._rotated.x + this._cam_axisY.x * this._rotated.y + this._cam_axisZ.x * this._rotated.z;
|
|
|
|
+ this._positions32[idx + 1] = this._particle._globalPosition.y + this._cam_axisX.y * this._rotated.x + this._cam_axisY.y * this._rotated.y + this._cam_axisZ.y * this._rotated.z;
|
|
|
|
+ this._positions32[idx + 2] = this._particle._globalPosition.z + this._cam_axisX.z * this._rotated.x + this._cam_axisY.z * this._rotated.y + this._cam_axisZ.z * this._rotated.z;
|
|
if (this._computeBoundingBox) {
|
|
if (this._computeBoundingBox) {
|
|
if (this._positions32[idx] < this._minimum.x) {
|
|
if (this._positions32[idx] < this._minimum.x) {
|
|
this._minimum.x = this._positions32[idx];
|
|
this._minimum.x = this._positions32[idx];
|
|
@@ -52639,9 +52703,9 @@ var BABYLON;
|
|
this._maxBbox.x = this._particle._modelBoundingInfo.maximum.x * this._particle.scaling.x;
|
|
this._maxBbox.x = this._particle._modelBoundingInfo.maximum.x * this._particle.scaling.x;
|
|
this._maxBbox.y = this._particle._modelBoundingInfo.maximum.y * this._particle.scaling.y;
|
|
this._maxBbox.y = this._particle._modelBoundingInfo.maximum.y * this._particle.scaling.y;
|
|
this._maxBbox.z = this._particle._modelBoundingInfo.maximum.z * this._particle.scaling.z;
|
|
this._maxBbox.z = this._particle._modelBoundingInfo.maximum.z * this._particle.scaling.z;
|
|
- bSphere.center.x = this._particle.position.x + (this._minBbox.x + this._maxBbox.x) * 0.5;
|
|
|
|
- bSphere.center.y = this._particle.position.y + (this._minBbox.y + this._maxBbox.y) * 0.5;
|
|
|
|
- bSphere.center.z = this._particle.position.z + (this._minBbox.z + this._maxBbox.z) * 0.5;
|
|
|
|
|
|
+ bSphere.center.x = this._particle._globalPosition.x + (this._minBbox.x + this._maxBbox.x) * 0.5;
|
|
|
|
+ bSphere.center.y = this._particle._globalPosition.y + (this._minBbox.y + this._maxBbox.y) * 0.5;
|
|
|
|
+ bSphere.center.z = this._particle._globalPosition.z + (this._minBbox.z + this._maxBbox.z) * 0.5;
|
|
bSphere.radius = this._bSphereRadiusFactor * 0.5 * Math.sqrt((this._maxBbox.x - this._minBbox.x) * (this._maxBbox.x - this._minBbox.x) + (this._maxBbox.y - this._minBbox.y) * (this._maxBbox.y - this._minBbox.y) + (this._maxBbox.z - this._minBbox.z) * (this._maxBbox.z - this._minBbox.z));
|
|
bSphere.radius = this._bSphereRadiusFactor * 0.5 * Math.sqrt((this._maxBbox.x - this._minBbox.x) * (this._maxBbox.x - this._minBbox.x) + (this._maxBbox.y - this._minBbox.y) * (this._maxBbox.y - this._minBbox.y) + (this._maxBbox.z - this._minBbox.z) * (this._maxBbox.z - this._minBbox.z));
|
|
bSphere._update(this.mesh._worldMatrix);
|
|
bSphere._update(this.mesh._worldMatrix);
|
|
}
|
|
}
|
|
@@ -83634,6 +83698,8 @@ var BABYLON;
|
|
mainTextureFixedSize: _this._options.mainTextureFixedSize,
|
|
mainTextureFixedSize: _this._options.mainTextureFixedSize,
|
|
mainTextureRatio: _this._options.mainTextureRatio
|
|
mainTextureRatio: _this._options.mainTextureRatio
|
|
});
|
|
});
|
|
|
|
+ // Do not render as long as no meshes have been added
|
|
|
|
+ _this._shouldRender = false;
|
|
return _this;
|
|
return _this;
|
|
}
|
|
}
|
|
Object.defineProperty(HighlightLayer.prototype, "blurHorizontalSize", {
|
|
Object.defineProperty(HighlightLayer.prototype, "blurHorizontalSize", {
|
|
@@ -83786,6 +83852,7 @@ var BABYLON;
|
|
var previousStencilOperationPass = engine.getStencilOperationPass();
|
|
var previousStencilOperationPass = engine.getStencilOperationPass();
|
|
var previousStencilOperationFail = engine.getStencilOperationFail();
|
|
var previousStencilOperationFail = engine.getStencilOperationFail();
|
|
var previousStencilOperationDepthFail = engine.getStencilOperationDepthFail();
|
|
var previousStencilOperationDepthFail = engine.getStencilOperationDepthFail();
|
|
|
|
+ var previousStencilReference = engine.getStencilFunctionReference();
|
|
// Stencil operations
|
|
// Stencil operations
|
|
engine.setStencilOperationPass(BABYLON.Engine.REPLACE);
|
|
engine.setStencilOperationPass(BABYLON.Engine.REPLACE);
|
|
engine.setStencilOperationFail(BABYLON.Engine.KEEP);
|
|
engine.setStencilOperationFail(BABYLON.Engine.KEEP);
|
|
@@ -83812,6 +83879,7 @@ var BABYLON;
|
|
engine.setStencilOperationPass(previousStencilOperationPass);
|
|
engine.setStencilOperationPass(previousStencilOperationPass);
|
|
engine.setStencilOperationFail(previousStencilOperationFail);
|
|
engine.setStencilOperationFail(previousStencilOperationFail);
|
|
engine.setStencilOperationDepthFail(previousStencilOperationDepthFail);
|
|
engine.setStencilOperationDepthFail(previousStencilOperationDepthFail);
|
|
|
|
+ engine.setStencilFunctionReference(previousStencilReference);
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
* Returns true if the layer contains information to display, otherwise false.
|
|
* Returns true if the layer contains information to display, otherwise false.
|