Skip to content
New issue

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

SPARKS.RandomDrift/Accelerate should accept a Zone ? #7

Closed
jeromeetienne opened this issue Dec 13, 2011 · 4 comments
Closed

SPARKS.RandomDrift/Accelerate should accept a Zone ? #7

jeromeetienne opened this issue Dec 13, 2011 · 4 comments
Labels

Comments

@jeromeetienne
Copy link
Contributor

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 ?

@zz85
Copy link
Owner

zz85 commented Dec 14, 2011

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.

@zz85
Copy link
Owner

zz85 commented Dec 15, 2011

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.

@zz85
Copy link
Owner

zz85 commented Dec 17, 2011

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

@jeromeetienne
Copy link
Contributor Author

too old. closing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants