浏览代码

Merge pull request #4214 from a-carvallo/fix-sps-vertexdata-serialization

Fix SPS vertexdata serialization
David Catuhe 7 年之前
父节点
当前提交
318256494f
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/Particles/babylon.solidParticleSystem.ts

+ 3 - 2
src/Particles/babylon.solidParticleSystem.ts

@@ -200,10 +200,11 @@
                 vertexData.indices = (this._depthSort) ? this._indices : this._indices32;
                 vertexData.set(this._positions32, VertexBuffer.PositionKind);
                 vertexData.set(this._normals32, VertexBuffer.NormalKind);
-                if (this._uvs32) {
+
+                if (this._uvs32.length > 0) {
                     vertexData.set(this._uvs32, VertexBuffer.UVKind);
                 }
-                if (this._colors32) {
+                if (this._colors32.length > 0) {
                     vertexData.set(this._colors32, VertexBuffer.ColorKind);
                 }
                 var mesh = new Mesh(this.name, this._scene);