Note that there are some explanatory texts on larger screens.

plurals
  1. POThree.js Sparks.js - "Assertion failed, pool ran out"
    primarykey
    data
    text
    <p>I have the following simple function which is supposed to produce a simple flame effect, I build the actual display part of the code from here: </p> <p><a href="http://jeromeetienne.github.io/sparkseditor/" rel="nofollow">http://jeromeetienne.github.io/sparkseditor/</a></p> <p>Whenever I run the function it seems to exhaust the pool (max particles) and then die, with no visible trace of it on the screen. I'm using r53, whereas many if not all of the sparks.js examples use r47, not sure if this is relevant.</p> <p>You can find the actual file producing the error over here:</p> <p><a href="http://jeromeetienne.github.io/threex/docs/threex.sparks.html" rel="nofollow">http://jeromeetienne.github.io/threex/docs/threex.sparks.html</a></p> <p>And the code for my flame below:</p> <pre><code> var position = data.status.position; var group = new Object3D(); scene.add(group); var sparks = new THREEx.Sparks({ maxParticles : 10, counter : new SPARKS.SteadyCounter(300) }); var emitter = sparks.emitter(); var color = function() { this.initialize = function(emitter, particle) { particle.target.color().setHSV(0.4, 0.8, 0.4); particle.target.size(100); }; }; emitter.addInitializer(new color()); emitter.addInitializer(new SPARKS.Position(new SPARKS.PointZone(new THREE.Vector3( position.x, position.y, position.z )))); emitter.addInitializer(new SPARKS.Lifetime(0, 0.8)); emitter.addInitializer(new SPARKS.Velocity(new SPARKS.PointZone(new THREE.Vector3( position.x, position.y-100, position.z )))); emitter.addAction(new SPARKS.Age()); emitter.addAction(new SPARKS.Move()); emitter.addAction(new SPARKS.RandomDrift(1000,0,1000)); emitter.addAction(new SPARKS.Accelerate(0,-200,0)); emitter.addCallback('created', function(particle) { group.add(particle); }); emitter.addCallback('dead', function(particle) { particle.target.visible = false; group.remove(particle); }); emitter.start(); </code></pre> <p>Thanks in advance, any help is much appreciated :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload