Browse Source

fix bbox generation

David Catuhe 8 years ago
parent
commit
b26cb8877e

File diff suppressed because it is too large
+ 5519 - 5518
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 36 - 36
dist/preview release/babylon.js


+ 11 - 1
dist/preview release/babylon.max.js

@@ -38526,7 +38526,7 @@ var BABYLON;
             for (var index = 0; index < this._options.attributes.length; index++) {
                 attribs.push(this._options.attributes[index]);
             }
-            if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.ColorKind)) {
+            if (mesh && mesh.isVerticesDataPresent(BABYLON.VertexBuffer.ColorKind)) {
                 attribs.push(BABYLON.VertexBuffer.ColorKind);
                 defines.push("#define VERTEXCOLOR");
             }
@@ -57104,6 +57104,13 @@ var BABYLON;
             enumerable: true,
             configurable: true
         });
+        Object.defineProperty(MorphTargetManager.prototype, "numTargets", {
+            get: function () {
+                return this._targets.length;
+            },
+            enumerable: true,
+            configurable: true
+        });
         Object.defineProperty(MorphTargetManager.prototype, "numInfluencers", {
             get: function () {
                 return this._activeTargets.length;
@@ -57121,6 +57128,9 @@ var BABYLON;
         MorphTargetManager.prototype.getActiveTarget = function (index) {
             return this._activeTargets.data[index];
         };
+        MorphTargetManager.prototype.getTarget = function (index) {
+            return this._targets[index];
+        };
         MorphTargetManager.prototype.addTarget = function (target) {
             var _this = this;
             if (this._vertexCount) {

File diff suppressed because it is too large
+ 5519 - 5518
dist/preview release/babylon.module.d.ts


File diff suppressed because it is too large
+ 37 - 37
dist/preview release/babylon.worker.js


+ 1 - 1
src/Materials/babylon.shaderMaterial.ts

@@ -189,7 +189,7 @@
                 attribs.push(this._options.attributes[index]);
             }
 
-            if (mesh.isVerticesDataPresent(VertexBuffer.ColorKind)) {
+            if (mesh && mesh.isVerticesDataPresent(VertexBuffer.ColorKind)) {
                 attribs.push(VertexBuffer.ColorKind);
                 defines.push("#define VERTEXCOLOR");
             }