Flint Particle System Forum - how to take away3d primitive as a particle?2011-12-13T03:23:24+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
how to take away3d primitive as a particle?http://flintparticles.org/forum/comments.php?DiscussionID=474&Focus=1604#Comment_16042011-04-18T09:44:57+01:002011-12-13T03:23:24+00:00jack1505http://flintparticles.org/forum/account.php?u=485
Hi,
I am learning to develop a 3d program with away3d and flint. Can I create custom particles based on the primitives (for example, a polygon)? I got the error message that ...
I am learning to develop a 3d program with away3d and flint. Can I create custom particles based on the primitives (for example, a polygon)? I got the error message that away3d.primitives::RegularPolygon@3b5f971 can not be converted to flash.display.DisplayObject. The codes are as follows:
var particles:Vector.<Particle> = new Vector.<Particle>(); var rp:RegularPolygon; var p:Particle3D; ... p=new Particle3D(); p.position= new Vector3D(rp.x,rp.y,rp.z,1); p.image = rp; particles.push(p);
Some codes will be helpful. Thanks. Jacky]]>
how to take away3d primitive as a particle?http://flintparticles.org/forum/comments.php?DiscussionID=474&Focus=1612#Comment_16122011-04-20T08:52:49+01:002011-04-20T08:53:05+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
Which renderer are you using? You need to use the Away3DRenderer to render particles as away 3d objects.
A couple of the examples on this site have Away3D versions (Fire and Smoke and Brownian ...
Away3DRenderer to render particles as away 3d objects.
A couple of the examples on this site have Away3D versions (Fire and Smoke and Brownian Motion) which you may find useful.]]>
how to take away3d primitive as a particle?http://flintparticles.org/forum/comments.php?DiscussionID=474&Focus=1617#Comment_16172011-04-25T12:52:47+01:002011-12-13T03:23:24+00:00jack1505http://flintparticles.org/forum/account.php?u=485
Thanks a lot.
how to take away3d primitive as a particle?http://flintparticles.org/forum/comments.php?DiscussionID=474&Focus=1631#Comment_16312011-05-03T09:05:47+01:002011-12-13T03:23:24+00:00jack1505http://flintparticles.org/forum/account.php?u=485
When the renderer is Away3DRenderer, the flint particle system does work with addInitializer and addAction functions (the particles are initialized by addInitializer, for example, addInitializer( ...
renderer = new Away3DRenderer( scene ); ......
var ExplosionEmitter:Emitter3D = new Emitter3D();
var particles:Vector.<Particle> = createSphereParticles(); ExplosionEmitter.addParticles( particles, false );
ExplosionEmitter.addInitializer( new Velocity( new SphereZone( new Vector3D(), 200 ) ) ); ExplosionEmitter.addInitializer( new Lifetime( 3 ) );
ExplosionEmitter.addAction( new Age( Quadratic.easeIn ) ); ExplosionEmitter.addAction( new Move() ); ExplosionEmitter.addAction( new Accelerate( new Vector3D( 0, -50, 0 ) ) );
public function createSphereParticles():Vector.<Particle> { var particles:Vector.<Particle> = new Vector.<Particle>(); var p:Particle3D; var i:int; var sphere:Sphere;
for(i=0;i<100;i++) { p=new Particle3D(); p.position= new Vector3D(0,50,0 ,0);
} return particles; }]]>
how to take away3d primitive as a particle?http://flintparticles.org/forum/comments.php?DiscussionID=474&Focus=1637#Comment_16372011-05-09T08:38:16+01:002011-12-13T03:23:24+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
I think this is what you're trying to do.
package
{
import away3d.containers.View3D;
import away3d.primitives.Sphere;
import org.flintparticles.common.actions.Age;
import ...
package { import away3d.containers.View3D; import away3d.primitives.Sphere;