|
@@ -11262,7 +11262,7 @@ var BABYLON;
|
|
});
|
|
});
|
|
Object.defineProperty(Engine, "Version", {
|
|
Object.defineProperty(Engine, "Version", {
|
|
get: function () {
|
|
get: function () {
|
|
- return "3.2.0-beta.1";
|
|
|
|
|
|
+ return "3.2.0-beta.2";
|
|
},
|
|
},
|
|
enumerable: true,
|
|
enumerable: true,
|
|
configurable: true
|
|
configurable: true
|
|
@@ -15709,6 +15709,7 @@ var BABYLON;
|
|
/** @ignore */
|
|
/** @ignore */
|
|
this._currentRenderId = -1;
|
|
this._currentRenderId = -1;
|
|
this._parentRenderId = -1;
|
|
this._parentRenderId = -1;
|
|
|
|
+ this._childRenderId = -1;
|
|
this._animationPropertiesOverride = null;
|
|
this._animationPropertiesOverride = null;
|
|
/**
|
|
/**
|
|
* An event triggered when the mesh is disposed
|
|
* An event triggered when the mesh is disposed
|
|
@@ -15912,7 +15913,7 @@ var BABYLON;
|
|
/** @ignore */
|
|
/** @ignore */
|
|
Node.prototype._markSyncedWithParent = function () {
|
|
Node.prototype._markSyncedWithParent = function () {
|
|
if (this.parent) {
|
|
if (this.parent) {
|
|
- this._parentRenderId = this.parent._currentRenderId;
|
|
|
|
|
|
+ this._parentRenderId = this.parent._childRenderId;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
/** @ignore */
|
|
/** @ignore */
|
|
@@ -15920,7 +15921,7 @@ var BABYLON;
|
|
if (!this.parent) {
|
|
if (!this.parent) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
- if (this._parentRenderId !== this.parent._currentRenderId) {
|
|
|
|
|
|
+ if (this._parentRenderId !== this.parent._childRenderId) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
return this.parent.isSynchronized();
|
|
return this.parent.isSynchronized();
|
|
@@ -17228,6 +17229,7 @@ var BABYLON;
|
|
return this._worldMatrix;
|
|
return this._worldMatrix;
|
|
}
|
|
}
|
|
if (!force && this.isSynchronized(true)) {
|
|
if (!force && this.isSynchronized(true)) {
|
|
|
|
+ this._currentRenderId = this.getScene().getRenderId();
|
|
return this._worldMatrix;
|
|
return this._worldMatrix;
|
|
}
|
|
}
|
|
this._cache.position.copyFrom(this.position);
|
|
this._cache.position.copyFrom(this.position);
|
|
@@ -17235,6 +17237,7 @@ var BABYLON;
|
|
this._cache.pivotMatrixUpdated = false;
|
|
this._cache.pivotMatrixUpdated = false;
|
|
this._cache.billboardMode = this.billboardMode;
|
|
this._cache.billboardMode = this.billboardMode;
|
|
this._currentRenderId = this.getScene().getRenderId();
|
|
this._currentRenderId = this.getScene().getRenderId();
|
|
|
|
+ this._childRenderId = this.getScene().getRenderId();
|
|
this._isDirty = false;
|
|
this._isDirty = false;
|
|
// Scaling
|
|
// Scaling
|
|
BABYLON.Matrix.ScalingToRef(this.scaling.x * this.scalingDeterminant, this.scaling.y * this.scalingDeterminant, this.scaling.z * this.scalingDeterminant, BABYLON.Tmp.Matrix[1]);
|
|
BABYLON.Matrix.ScalingToRef(this.scaling.x * this.scalingDeterminant, this.scaling.y * this.scalingDeterminant, this.scaling.z * this.scalingDeterminant, BABYLON.Tmp.Matrix[1]);
|
|
@@ -78586,15 +78589,14 @@ var BABYLON;
|
|
if (!this._intersectsWithSphere(impostor, origin, radius)) {
|
|
if (!this._intersectsWithSphere(impostor, origin, radius)) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
- if (impostor.object.getClassName() !== 'Mesh') {
|
|
|
|
|
|
+ if (impostor.object.getClassName() !== 'Mesh' && impostor.object.getClassName() !== 'InstancedMesh') {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
- var impostorObject = impostor.object;
|
|
|
|
var impostorObjectCenter = impostor.getObjectCenter();
|
|
var impostorObjectCenter = impostor.getObjectCenter();
|
|
var direction = impostorObjectCenter.subtract(origin);
|
|
var direction = impostorObjectCenter.subtract(origin);
|
|
var ray = new BABYLON.Ray(origin, direction, radius);
|
|
var ray = new BABYLON.Ray(origin, direction, radius);
|
|
this._rays.push(ray);
|
|
this._rays.push(ray);
|
|
- var hit = ray.intersectsMesh(impostorObject);
|
|
|
|
|
|
+ var hit = ray.intersectsMesh(impostor.object);
|
|
var contactPoint = hit.pickedPoint;
|
|
var contactPoint = hit.pickedPoint;
|
|
if (!contactPoint) {
|
|
if (!contactPoint) {
|
|
return null;
|
|
return null;
|
|
@@ -78890,15 +78892,14 @@ var BABYLON;
|
|
if (!this._intersectsWithCylinder(impostor)) {
|
|
if (!this._intersectsWithCylinder(impostor)) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
- if (impostor.object.getClassName() !== 'Mesh') {
|
|
|
|
|
|
+ if (impostor.object.getClassName() !== 'Mesh' && impostor.object.getClassName() !== 'InstancedMesh') {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
- var impostorObject = impostor.object;
|
|
|
|
var impostorObjectCenter = impostor.getObjectCenter();
|
|
var impostorObjectCenter = impostor.getObjectCenter();
|
|
var originOnPlane = new BABYLON.Vector3(this._origin.x, impostorObjectCenter.y, this._origin.z); // the distance to the origin as if both objects were on a plane (Y-axis)
|
|
var originOnPlane = new BABYLON.Vector3(this._origin.x, impostorObjectCenter.y, this._origin.z); // the distance to the origin as if both objects were on a plane (Y-axis)
|
|
var originToImpostorDirection = impostorObjectCenter.subtract(originOnPlane);
|
|
var originToImpostorDirection = impostorObjectCenter.subtract(originOnPlane);
|
|
var ray = new BABYLON.Ray(originOnPlane, originToImpostorDirection, this._radius);
|
|
var ray = new BABYLON.Ray(originOnPlane, originToImpostorDirection, this._radius);
|
|
- var hit = ray.intersectsMesh(impostorObject);
|
|
|
|
|
|
+ var hit = ray.intersectsMesh(impostor.object);
|
|
var contactPoint = hit.pickedPoint;
|
|
var contactPoint = hit.pickedPoint;
|
|
if (!contactPoint) {
|
|
if (!contactPoint) {
|
|
return null;
|
|
return null;
|