Browse Source

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js into shadowdepthmat

Popov72 5 years ago
parent
commit
d7b43201e5
2 changed files with 4 additions and 3 deletions
  1. 1 1
      contributing.md
  2. 3 2
      src/Meshes/abstractMesh.ts

+ 1 - 1
contributing.md

@@ -45,7 +45,7 @@ You can use Gitpod (A free online VS Code like IDE) for contributing online. Wit
 
 so that you can start straight away.
 
-[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
+[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/BabylonJS/Babylon.js)
 
 ## Pull requests
 

+ 3 - 2
src/Meshes/abstractMesh.ts

@@ -785,7 +785,7 @@ export class AbstractMesh extends TransformNode implements IDisposable, ICullabl
         var isIn = light.isEnabled() && light.canAffectMesh(this);
 
         var index = this._lightSources.indexOf(light);
-
+        var removed = false;
         if (index === -1) {
             if (!isIn) {
                 return;
@@ -795,10 +795,11 @@ export class AbstractMesh extends TransformNode implements IDisposable, ICullabl
             if (isIn) {
                 return;
             }
+            removed = true;
             this._lightSources.splice(index, 1);
         }
 
-        this._markSubMeshesAsLightDirty();
+        this._markSubMeshesAsLightDirty(removed);
     }
 
     /** @hidden */