소스 검색

Update WN

David Catuhe 7 년 전
부모
커밋
5b44da7cc8
2개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 0
      dist/preview release/what's new.md
  2. 4 5
      src/Particles/babylon.particleSystem.ts

+ 1 - 0
dist/preview release/what's new.md

@@ -39,6 +39,7 @@
   - Added support for drag gradients. [Doc](https://doc.babylonjs.com/babylon101/particles#drag-factor)
   - Added support for noise textures. [Doc](http://doc.babylonjs.com/babylon101/particles#noise-texture)
   - Added support for emit rate gradients. [Doc](http://doc.babylonjs.com/babylon101/particles#emit-rate-over-time)
+  - Added support for ramp gradients. [Doc](http://doc.babylonjs.com/babylon101/particles#ramp-gradients)
   - Start size gradient support for particles. [Doc](http://doc.babylonjs.com/babylon101/particles#start-size-over-time) ([TrevorDev](https://github.com/TrevorDev))
   - Attached sub emitters. [Doc](http://doc.babylonjs.com/how_to/sub_emitters) ([TrevorDev](https://github.com/TrevorDev))
   - Cylinder particle emitter and constructor in baseParticle [Doc](https://doc.babylonjs.com/babylon101/particles#cylinder-emitter) ([TrevorDev](https://github.com/TrevorDev))

+ 4 - 5
src/Particles/babylon.particleSystem.ts

@@ -1695,13 +1695,8 @@
                     break;
             }
 
-            if (this.forceDepthWrite) {
-                engine.setDepthWrite(true);
-            }
-
             if (this._useInstancing) {
                 engine.drawArraysType(Material.TriangleFanDrawMode, 0, 4, this._particles.length);
-
             } else {
                 engine.drawElementsType(Material.TriangleFillMode, 0, this._particles.length * 6);
             }
@@ -1722,6 +1717,10 @@
             var engine = this._scene.getEngine();
             engine.setState(false);
 
+            if (this.forceDepthWrite) {
+                engine.setDepthWrite(true);
+            }            
+
             let outparticles = 0;
 
             if (this.blendMode === ParticleSystem.BLENDMODE_MULTIPLYADD) {