فهرست منبع

fix : buildMesh creates now a single triangle particle if no shape were added before

jbousquie 9 سال پیش
والد
کامیت
546b2bdeda
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      src/Particles/babylon.solidParticleSystem.ts

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

@@ -60,7 +60,9 @@ module BABYLON {
         // build the SPS mesh : returns the mesh
         public buildMesh(): Mesh {
             if (this.nbParticles === 0) {
-                return null;
+                var triangle = Mesh.CreateDisc("", {radius: 1, tessellation: 3}, this._scene);
+                this.addShape(triangle, 1);
+                triangle.dispose();
             }
             VertexData.ComputeNormals(this._positions, this._indices, this._normals);
             var vertexData = new VertexData();