空に立ち上る茶色い煙を作りたいです。
どうすればこれを作成できますか?
ShaderParticleEngineは、大幅なthree.js-r72
API の変更を伴う書き直しを受けたため、この回答を更新しています。/ の比較および/または設定については、この Answers history を参照してください。
ShaderParticleEngine 0.8
three.js-r71
スクリーンショットのエミッタの設定例:
var loader = new THREE.TextureLoader();
var url = 'assets/images/particles/cloudSml.png';
var texture = loader.load( url );
var particleGroupCrash = new SPE.Group({
texture: {
value: texture
},
blending: THREE.NormalBlending
});
var crashemitter = new SPE.Emitter({
maxAge: { value: 12 },
position: {
value: new THREE.Vector3( 0, 0, 0 ),
spread: new THREE.Vector3( 1, 0.5, 2 ),
},
size: {
value: [ 2, 8 ],
spread: [ 0, 1, 2 ]
},
acceleration: {
value: new THREE.Vector3( 0, 0, 0 ),
},
rotation: {
axis: new THREE.Vector3( 0, 1, 0 ),
spread: new THREE.Vector3( 0, 20, 0 ),
angle: 100 * Math.PI / 180,
},
velocity: {
value: new THREE.Vector3( 0, 1, -0.5 ),
spread: new THREE.Vector3( 0.25, 0.1, 0.25 )
},
opacity: {
value: [ 0.2, 0.5, 0 ]
},
color: {
value: [ new THREE.Color( 0x333333 ), new THREE.Color( 0x111111 ) ],
spread: [ new THREE.Vector3( 0.2, 0.1, 0.1 ), new THREE.Vector3( 0, 0, 0 ) ]
},
particleCount: 600,
});
Three.js r73