toontown-just-works/build/nirai/panda3d/samples/particles/fountain.ptf
2024-07-07 18:08:39 -05:00

58 lines
1.9 KiB
Text

self.reset()
self.setPos(0.000, 0.000, 0.000)
self.setHpr(0.000, 0.000, 0.000)
self.setScale(2.000, 2.000, 2.000)
p0 = Particles.Particles('particles-1')
# Particles parameters
p0.setFactory("PointParticleFactory")
p0.setRenderer("PointParticleRenderer")
p0.setEmitter("DiscEmitter")
p0.setPoolSize(10000)
p0.setBirthRate(0.0200)
p0.setLitterSize(300)
p0.setLitterSpread(100)
p0.setSystemLifespan(0.0000)
p0.setLocalVelocityFlag(1)
p0.setSystemGrowsOlderFlag(0)
# Factory parameters
p0.factory.setLifespanBase(0.5000)
p0.factory.setLifespanSpread(0.2500)
p0.factory.setMassBase(2.0000)
p0.factory.setMassSpread(0.0100)
p0.factory.setTerminalVelocityBase(400.0000)
p0.factory.setTerminalVelocitySpread(0.0000)
# Point factory parameters
# Renderer parameters
p0.renderer.setAlphaMode(BaseParticleRenderer.PRALPHAOUT)
p0.renderer.setUserAlpha(0.45)
# Point parameters
p0.renderer.setPointSize(3.00)
p0.renderer.setStartColor(LVector4(0.25, 0.90, 1.00, 1.00))
p0.renderer.setEndColor(LVector4(1.00, 1.00, 1.00, 1.00))
p0.renderer.setBlendType(PointParticleRenderer.PPONECOLOR)
p0.renderer.setBlendMethod(BaseParticleRenderer.PPNOBLEND)
# Emitter parameters
p0.emitter.setEmissionType(BaseParticleEmitter.ETCUSTOM)
p0.emitter.setAmplitude(1.0000)
p0.emitter.setAmplitudeSpread(0.0000)
p0.emitter.setOffsetForce(LVector3(0.0000, 0.0000, 4.0000))
p0.emitter.setExplicitLaunchVector(LVector3(1.0000, 0.0000, 0.0000))
p0.emitter.setRadiateOrigin(LPoint3(0.0000, 0.0000, 0.0000))
# Disc parameters
p0.emitter.setRadius(0.0500)
p0.emitter.setOuterAngle(356.1859)
p0.emitter.setInnerAngle(0.0000)
p0.emitter.setOuterMagnitude(2.0000)
p0.emitter.setInnerMagnitude(1.0000)
p0.emitter.setCubicLerping(0)
self.addParticles(p0)
f0 = ForceGroup.ForceGroup('gravity')
# Force parameters
force0 = LinearVectorForce(LVector3(0.0000, 0.0000, -1.0000), 25.0000, 1)
force0.setActive(1)
f0.addForce(force0)
force1 = LinearJitterForce(3.0000, 1)
force1.setActive(1)
f0.addForce(force1)
self.addForceGroup(f0)