Flint Particle System Forum - Noob error2010-12-25T19:40:58+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Noob errorhttp://flintparticles.org/forum/comments.php?DiscussionID=121&Focus=491#Comment_4912008-11-12T16:57:04+00:002010-12-25T19:40:58+00:00psiloshttp://flintparticles.org/forum/account.php?u=97
Hello,
my first attempt to create an emitter didn't work at all,
here is my code:
// PARTICLES SYSTEM
var particles:Particles = new ...
my first attempt to create an emitter didn't work at all,
here is my code:
// PARTICLES SYSTEM var particles:Particles = new Particles(); this._scene.addChild( particles );
var emitter:Emitter3D = new Whizzer( new LineZone( new Vector3D( -200, 0, 0 ), new Vector3D( 200, 0, 0) ) ); _flintRenderer = new PV3DParticleRenderer(particles); _flintRenderer.addEmitter(emitter); //emitter.addEventListener( ParticleEvent.PARTICLE_DEAD, whizzBang, false, 0, true ); //emitter.start();
And after running this I get the following error:
TypeError: Error #1034: Type Coercion failed: cannot convert org.flintparticles.common.displayObjects::Dot@1fe165f1 to org.papervision3d.core.geom.renderables.Particle. at org.flintparticles.threeD.papervision3d::PV3DParticleRenderer/addParticle()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/threeD/papervision3d/PV3DParticleRenderer.as:112] at org.flintparticles.common.renderers::RendererBase/particleAdded()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/common/renderers/RendererBase.as:91] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at org.flintparticles.common.emitters::Emitter/createParticle()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/common/emitters/Emitter.as:548] at org.flintparticles.common.emitters::Emitter/update()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/common/emitters/Emitter.as:677] at org.flintparticles.common.emitters::Emitter/updateEventListener()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/common/emitters/Emitter.as:642] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at org.flintparticles.common.utils::FrameUpdater/frameUpdate()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/common/utils/FrameUpdater.as:88]
Any ideas, did I forget something obvious?
Thanks in advance.]]>
Noob errorhttp://flintparticles.org/forum/comments.php?DiscussionID=121&Focus=492#Comment_4922008-11-12T17:37:21+00:002010-12-25T19:40:58+00:00psiloshttp://flintparticles.org/forum/account.php?u=97
ok, after modifying Whizzer Class it seems to compile without errors,
changed
addInitializer( new SharedImage( new Dot( 4 ) ) );
to
addInitializer( new PV3DObjectClass ( Particle, new ...
changed
addInitializer( new SharedImage( new Dot( 4 ) ) );
to
addInitializer( new PV3DObjectClass ( Particle, new ParticleMaterial(0xFFFFFFFF, 0xFFFFFFFF, 1), 5, 5));