Closed jeromeetienne closed 12 years ago
Zones are basically to describe a area / volume of space.
It can be used for particle emission, but can also be used for actions.
I could add a few more classes to illustrate this, and think of a way to chain Actions to Zones, but meanwhile you could try to modify RandomDrift to perhaps a RandomDriftInZone
class.
I've added a new class called ActionZone, which takes in an action and zone.
An example can be found in examples/tests_sandbox.html
sparksEmitter.addAction(new SPARKS.ActionZone(
new SPARKS.Accelerate(0, 0, 1000),
new SPARKS.CubeZone( new THREE.Vector3(20,20,0), 30, 30, 100 ) ) );
This means that any particles found in the cube zone would get an acceleration action applies on them.
hmm, I think I misunderstood your point here.. if you have a use case for this, i could see where i could change the classes
too old. closing :)
if i understand zone concept, i think
randomdrift
/accelerate
may benefit in accepting a zone.Currently they accept x,y,z raw. it seems a bit like a
SPARKS.PointZone
.what do you think ?