Переглянути джерело

Fixing issue with instances and octrees

David Catuhe 11 роки тому
батько
коміт
60abd9b5fb

+ 1 - 1
Babylon/Mesh/babylon.mesh.js

@@ -266,7 +266,7 @@ var BABYLON;
         Mesh.prototype._getInstancesRenderList = function (subMeshId) {
         Mesh.prototype._getInstancesRenderList = function (subMeshId) {
             var scene = this.getScene();
             var scene = this.getScene();
             this._batchCache.mustReturn = false;
             this._batchCache.mustReturn = false;
-            this._batchCache.renderSelf[subMeshId] = true;
+            this._batchCache.renderSelf[subMeshId] = this.isEnabled() && this.isVisible;
             this._batchCache.visibleInstances[subMeshId] = null;
             this._batchCache.visibleInstances[subMeshId] = null;
 
 
             if (this._visibleInstances) {
             if (this._visibleInstances) {

+ 1 - 1
Babylon/Mesh/babylon.mesh.ts

@@ -269,7 +269,7 @@
         public _getInstancesRenderList(subMeshId: number): _InstancesBatch {
         public _getInstancesRenderList(subMeshId: number): _InstancesBatch {
             var scene = this.getScene();
             var scene = this.getScene();
             this._batchCache.mustReturn = false;
             this._batchCache.mustReturn = false;
-            this._batchCache.renderSelf[subMeshId] = true;
+            this._batchCache.renderSelf[subMeshId] = this.isEnabled() && this.isVisible;
             this._batchCache.visibleInstances[subMeshId] = null;
             this._batchCache.visibleInstances[subMeshId] = null;
 
 
             if (this._visibleInstances) {
             if (this._visibleInstances) {

+ 1 - 0
Tools/BuildOurOwnBabylonJS/BuildOurOwnBabylonJS/babylonJS.xml

@@ -30,6 +30,7 @@
   <script src="Babylon/Tools/babylon.sceneSerializer.js"></script>
   <script src="Babylon/Tools/babylon.sceneSerializer.js"></script>
   <script src="Babylon/Physics/babylon.physicsEngine.js"></script>
   <script src="Babylon/Physics/babylon.physicsEngine.js"></script>
   <script src="Babylon/Physics/Plugins/babylon.cannonJSPlugin.js"></script>
   <script src="Babylon/Physics/Plugins/babylon.cannonJSPlugin.js"></script>
+  <script src="Babylon/Physics/Plugins/babylon.oimoJSPlugin.js"></script>
   <script src="Babylon/LensFlare/babylon.lensFlareSystem.js"></script>
   <script src="Babylon/LensFlare/babylon.lensFlareSystem.js"></script>
   <script src="Babylon/LensFlare/babylon.lensFlare.js"></script>
   <script src="Babylon/LensFlare/babylon.lensFlare.js"></script>
   <script src="Babylon/PostProcess/babylon.fxaaPostProcess.js"></script>
   <script src="Babylon/PostProcess/babylon.fxaaPostProcess.js"></script>

+ 1 - 0
Tools/Gulp/gulpfile.js

@@ -118,6 +118,7 @@ gulp.task('scripts', ['shaders'] ,function() {
       '../../Babylon/LensFlare/babylon.lensFlare.js',
       '../../Babylon/LensFlare/babylon.lensFlare.js',
       '../../Babylon/LensFlare/babylon.lensFlareSystem.js',
       '../../Babylon/LensFlare/babylon.lensFlareSystem.js',
       '../../Babylon/Physics/Plugins/babylon.cannonJSPlugin.js',
       '../../Babylon/Physics/Plugins/babylon.cannonJSPlugin.js',
+      '../../Babylon/Physics/Plugins/babylon.oimoJSPlugin.js',
       '../../Babylon/Physics/babylon.physicsEngine.js',
       '../../Babylon/Physics/babylon.physicsEngine.js',
       '../../Babylon/Tools/babylon.sceneSerializer.js',
       '../../Babylon/Tools/babylon.sceneSerializer.js',
       '../../Babylon/Mesh/babylon.csg.js',
       '../../Babylon/Mesh/babylon.csg.js',

Різницю між файлами не показано, бо вона завелика
+ 2 - 2
babylon.1.13-beta-debug.js


Різницю між файлами не показано, бо вона завелика
+ 13 - 13
babylon.1.13-beta.js