瀏覽代碼

fix solid particle uvs property : computation with Vector4 instead of array(4)

jbousquie 10 年之前
父節點
當前提交
5d0e1b8db0
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Particles/babylon.solidParticleSystem.ts

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

@@ -248,8 +248,8 @@ module BABYLON {
                     }
 
                     if (this._useParticleTexture) {
-                        this._uvs[uvidx] = this._particle._shapeUV[pt * 2] * (this._particle.uvs[2] - this._particle.uvs[0]) + this._particle.uvs[0];
-                        this._uvs[uvidx + 1] = this._particle._shapeUV[pt * 2 + 1] * (this._particle.uvs[3] - this._particle.uvs[1]) + this._particle.uvs[1];
+                        this._uvs[uvidx] = this._particle._shapeUV[pt * 2] * (this._particle.uvs.z - this._particle.uvs.x) + this._particle.uvs.x;
+                        this._uvs[uvidx + 1] = this._particle._shapeUV[pt * 2 + 1] * (this._particle.uvs.w - this._particle.uvs.y) + this._particle.uvs.y;
                     }
                 }
                 index = idx + 3;