|
@@ -631,7 +631,9 @@
|
|
* @param mesh The mesh to exclude from the highlight layer
|
|
* @param mesh The mesh to exclude from the highlight layer
|
|
*/
|
|
*/
|
|
public addExcludedMesh(mesh: Mesh) {
|
|
public addExcludedMesh(mesh: Mesh) {
|
|
- mesh = mesh instanceof BABYLON.InstancedMesh ? mesh.sourceMesh : mesh;
|
|
|
|
|
|
+ if (mesh instanceof BABYLON.InstancedMesh) {
|
|
|
|
+ mesh = (<BABYLON.InstancedMesh> mesh).sourceMesh;
|
|
|
|
+ }
|
|
|
|
|
|
var meshExcluded = this._excludedMeshes[mesh.id];
|
|
var meshExcluded = this._excludedMeshes[mesh.id];
|
|
if (!meshExcluded) {
|
|
if (!meshExcluded) {
|
|
@@ -652,7 +654,9 @@
|
|
* @param mesh The mesh to highlight
|
|
* @param mesh The mesh to highlight
|
|
*/
|
|
*/
|
|
public removeExcludedMesh(mesh: Mesh) {
|
|
public removeExcludedMesh(mesh: Mesh) {
|
|
- mesh = mesh instanceof BABYLON.InstancedMesh ? mesh.sourceMesh : mesh;
|
|
|
|
|
|
+ if (mesh instanceof BABYLON.InstancedMesh) {
|
|
|
|
+ mesh = (<BABYLON.InstancedMesh> mesh).sourceMesh;
|
|
|
|
+ }
|
|
|
|
|
|
var meshExcluded = this._excludedMeshes[mesh.id];
|
|
var meshExcluded = this._excludedMeshes[mesh.id];
|
|
if (meshExcluded) {
|
|
if (meshExcluded) {
|
|
@@ -670,7 +674,9 @@
|
|
* @param glowEmissiveOnly Extract the glow from the emissive texture
|
|
* @param glowEmissiveOnly Extract the glow from the emissive texture
|
|
*/
|
|
*/
|
|
public addMesh(mesh: Mesh, color: Color3, glowEmissiveOnly = false) {
|
|
public addMesh(mesh: Mesh, color: Color3, glowEmissiveOnly = false) {
|
|
- mesh = mesh instanceof BABYLON.InstancedMesh ? mesh.sourceMesh : mesh;
|
|
|
|
|
|
+ if (mesh instanceof BABYLON.InstancedMesh) {
|
|
|
|
+ mesh = (<BABYLON.InstancedMesh> mesh).sourceMesh;
|
|
|
|
+ }
|
|
|
|
|
|
var meshHighlight = this._meshes[mesh.id];
|
|
var meshHighlight = this._meshes[mesh.id];
|
|
if (meshHighlight) {
|
|
if (meshHighlight) {
|
|
@@ -702,7 +708,9 @@
|
|
* @param mesh The mesh to highlight
|
|
* @param mesh The mesh to highlight
|
|
*/
|
|
*/
|
|
public removeMesh(mesh: Mesh) {
|
|
public removeMesh(mesh: Mesh) {
|
|
- mesh = mesh instanceof BABYLON.InstancedMesh ? mesh.sourceMesh : mesh;
|
|
|
|
|
|
+ if (mesh instanceof BABYLON.InstancedMesh) {
|
|
|
|
+ mesh = (<BABYLON.InstancedMesh> mesh).sourceMesh;
|
|
|
|
+ }
|
|
|
|
|
|
var meshHighlight = this._meshes[mesh.id];
|
|
var meshHighlight = this._meshes[mesh.id];
|
|
if (meshHighlight) {
|
|
if (meshHighlight) {
|