javascript 如何在 THREE.js 中生成粒子系统
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16766524/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to produce Particle System in THREE.js
提问by Najam-us-Saqib
I am making game in which I want to add smoke, flameand blasteffect. I am using THREE.js
library for the game making. I tried lots of technique but can't find the result.
I tried SPARK.js
library and the particle system of THREE.js
itself but did not able to produce the desired results. I am using r51version of THREE.js
.
Any one can help in this regard.
Thanks
我正在制作我想添加烟雾、火焰和爆炸效果的游戏。我正在使用THREE.js
库进行游戏制作。我尝试了很多技术,但找不到结果。我尝试了SPARK.js
库和粒子系统THREE.js
本身,但无法产生预期的结果。我正在使用r51版本的THREE.js
. 任何人都可以在这方面提供帮助。谢谢
回答by Lee Stemkoski
I have recently written a Particle Engine that is capable of the special effects you described, which currently works with Three.js v.56:
我最近编写了一个粒子引擎,它能够产生你所描述的特殊效果,目前适用于 Three.js v.56:
http://stemkoski.github.io/Three.js/Particle-Engine.html
http://stemkoski.github.io/Three.js/Particle-Engine.html
and see the blog post http://stemkoski.blogspot.com/2013/06/creating-particle-effects-engine-in.htmlfor related details.
有关相关详细信息,请参阅博客文章http://stemkoski.blogspot.com/2013/06/creating-particle-effects-engine-in.html。
[Update Sept. 2013] The Particle Engine has been greatly improved and is still undergoing development at http://squarefeet.github.io/ShaderParticleEngine/
[2013 年 9 月更新] 粒子引擎已经大大改进,并且仍在开发中,网址为http://squarefeet.github.io/ShaderParticleEngine/
回答by Ronen Ness
The accepted answer's library no longer works with latest THREE.js (r111) and it seems to be abandoned.
接受的答案的库不再适用于最新的 THREE.js (r111),它似乎已被放弃。
Wrote my own lib if anyone interested:
如果有人感兴趣,请编写我自己的库:
https://github.com/RonenNess/partykals
https://github.com/RonenNess/partykals
Live demo: https://ronenness.github.io/partykals/demo/index.html