浏览代码

make sure colors are defined even when the colors array is defined

jbousquie 9 年之前
父节点
当前提交
d2197fdfd9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Particles/babylon.solidParticleSystem.ts

+ 1 - 1
src/Particles/babylon.solidParticleSystem.ts

@@ -93,7 +93,7 @@ module BABYLON {
                     u += 2;
                 }
                 if (meshCol) {
-                    colors.push(meshCol[c], meshCol[c + 1], meshCol[c + 2], meshCol[c + 3]);
+                    colors.push(meshCol[c] || 1, meshCol[c + 1] || 1, meshCol[c + 2] || 1, meshCol[c + 3] || 1);
                     c += 4;
                 } else {
                     colors.push(1, 1, 1, 1);