ソースを参照

No breaking change in setVerticesBuffer

Ben Adams 7 年 前
コミット
b6bc9e1c7f
1 ファイル変更5 行追加0 行削除
  1. 5 0
      src/Mesh/babylon.geometry.ts

+ 5 - 0
src/Mesh/babylon.geometry.ts

@@ -239,6 +239,11 @@
             if (kind === VertexBuffer.PositionKind) {
                 if (totalVertices != null) {
                     this._totalVertices = totalVertices;
+                } else {
+                    var data = <FloatArray>buffer.getData();
+                    if (data != null) {
+                        this._totalVertices = data.length / (buffer.byteStride * 4);
+                    }
                 }
 
                 this._updateExtend();