We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The sparkles on the keys in this pic get stuck after emitter.remove() is called:
The following is executed when the page loads:
this.sparkleParticles = new SPE.Group({ texture: { value: this.textureLoader.load('./media/sparkle.png') }, blending : THREE.AdditiveBlending, maxParticleCount:10000 }); this.scene.add(this.sparkleParticles.mesh);
And the following when a key is pressed:
// Spawn particles const sparkles = new SPE.Emitter({ maxAge: { value: 0.3 }, rotation : { //angleSpread : 0.3, //axisSpread : Math.PI*2 }, opacity : { value : [1] }, position: { value: new THREE.Vector3(raycastObj.point.x, raycastObj.point.y, raycastObj.point.z+0.1), spread: new THREE.Vector3( 0.1, 0.1, 0 ), randomise : true, radius : 1 }, acceleration: { value: new THREE.Vector3(0, 0, -0.1), spread: new THREE.Vector3( 0, 0, 0 ), randomise : true, }, velocity: { value: new THREE.Vector3(1, 1, 1), spread: new THREE.Vector3(2, 2, 0), randomise : true, distribution: SPE.distributions.SPHERE, }, angle : { spread : Math.PI*2, randomise : true, }, color: { value: [ new THREE.Color(1.0,1.0,0.0), new THREE.Color(0xFFFFFF) ] }, size: { value: [0.3,0.1] }, particleCount: 100 }); this.sparkleParticles.addEmitter(sparkles); setTimeout(() => { sparkles.remove(); }, 1000); setTimeout(() => { sparkles.disable(); }, 100); console.log(this.sparkleParticles.emitters);
For now I can make a pool of emitters when the page loads and use those. But being able to add and remove emitters ad-hoc would be neat!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The sparkles on the keys in this pic get stuck after emitter.remove() is called:
The following is executed when the page loads:
And the following when a key is pressed:
For now I can make a pool of emitters when the page loads and use those. But being able to add and remove emitters ad-hoc would be neat!
The text was updated successfully, but these errors were encountered: