Exemplo n.º 1
0
 def __init__(self):
     NodePath.__init__(self, 'ChrysanthemumEffect')
     EffectController.__init__(self)
     self.effectScale = 1.0
     self.effectColor = Vec4(1, 1, 1, 1)
     self.effectModel = loader.loadModel(
         'phase_4/models/props/tt_m_efx_ext_fireworkBurst_tflip')
     self.effectModel.setColorScale(Point4(0, 0, 0, 0))
     self.effectModel.reparentTo(self)
     self.seqNode = self.effectModel.getChild(0).getChild(0).node()
     self.effectModel2 = loader.loadModel(
         'phase_4/models/props/tt_m_efx_ext_fireworkBurst_tflip')
     self.effectModel2.setColorScale(Point4(0, 0, 0, 0))
     self.effectModel2.reparentTo(self)
     self.seqNode2 = self.effectModel2.getChild(0).getChild(0).node()
     model = loader.loadModel(
         'phase_4/models/props/tt_m_efx_ext_fireworkCards')
     self.stars = model.find('**/tt_t_efx_ext_fireworkStars_02')
     self.stars.setColorScale(Point4(0, 0, 0, 0))
     self.stars.reparentTo(self)
     self.setAttrib(
         ColorBlendAttrib.make(ColorBlendAttrib.MAdd,
                               ColorBlendAttrib.OIncomingAlpha,
                               ColorBlendAttrib.OOne))
     self.setBillboardPointWorld()
     self.setDepthWrite(0)
     self.setLightOff()
     self.setFogOff()
Exemplo n.º 2
0
 def __init__(self):
     PooledEffect.__init__(self)
     EffectController.__init__(self)
     model = loader.loadModel('phase_4/models/props/tt_m_efx_ext_particleCards')
     self.card = model.find('**/tt_t_efx_ext_particleStars')
     self.cardScale = 64.0
     self.effectColor = Vec4(1, 1, 1, 1)
     self.effectScale = 1.0
     self.lifespan = 2.0
     if not SparksTrailLong.particleDummy:
         SparksTrailLong.particleDummy = render.attachNewNode(ModelNode('SparksTrailLongParticleDummy'))
         SparksTrailLong.particleDummy.setDepthWrite(0)
     self.f = ParticleEffect.ParticleEffect('SparksTrailLong')
     self.f.reparentTo(self)
     self.p0 = Particles.Particles('particles-1')
     self.p0.setFactory('ZSpinParticleFactory')
     self.p0.setRenderer('SpriteParticleRenderer')
     self.p0.setEmitter('PointEmitter')
     self.f.addParticles(self.p0)
     f0 = ForceGroup.ForceGroup('Gravity')
     force0 = LinearVectorForce(Vec3(0.0, 0.0, -2.0), 1.0, 0)
     force0.setVectorMasks(1, 1, 1)
     force0.setActive(1)
     f0.addForce(force0)
     self.f.addForceGroup(f0)
     self.p0.setPoolSize(128)
     self.p0.setBirthRate(0.02)
     self.p0.setLitterSize(1)
     self.p0.setLitterSpread(0)
     self.p0.setSystemLifespan(0.0)
     self.p0.setLocalVelocityFlag(0)
     self.p0.setSystemGrowsOlderFlag(0)
     self.p0.factory.setLifespanBase(self.lifespan)
     self.p0.factory.setLifespanSpread(0.1)
     self.p0.factory.setMassBase(1.0)
     self.p0.factory.setMassSpread(0.0)
     self.p0.factory.setTerminalVelocityBase(400.0)
     self.p0.factory.setTerminalVelocitySpread(0.0)
     self.p0.factory.setInitialAngle(0.0)
     self.p0.factory.setInitialAngleSpread(90.0)
     self.p0.factory.enableAngularVelocity(1)
     self.p0.factory.setAngularVelocity(0.0)
     self.p0.factory.setAngularVelocitySpread(25.0)
     self.p0.renderer.setAlphaMode(BaseParticleRenderer.PRALPHAOUT)
     self.p0.renderer.setUserAlpha(1.0)
     self.p0.renderer.setFromNode(self.card)
     self.p0.renderer.setColor(Vec4(1.0, 1.0, 1.0, 1.0))
     self.p0.renderer.setXScaleFlag(1)
     self.p0.renderer.setYScaleFlag(1)
     self.p0.renderer.setAnimAngleFlag(1)
     self.p0.renderer.setNonanimatedTheta(0.0)
     self.p0.renderer.setAlphaBlendMethod(BaseParticleRenderer.PPBLENDLINEAR)
     self.p0.renderer.setAlphaDisable(0)
     self.p0.renderer.setColorBlendMode(ColorBlendAttrib.MAdd, ColorBlendAttrib.OIncomingAlpha, ColorBlendAttrib.OOne)
     self.p0.emitter.setEmissionType(BaseParticleEmitter.ETRADIATE)
     self.p0.emitter.setAmplitudeSpread(0.0)
     self.p0.emitter.setOffsetForce(Vec3(0.0, 0.0, -2.0))
     self.p0.emitter.setExplicitLaunchVector(Vec3(1.0, 0.0, 0.0))
     self.p0.emitter.setRadiateOrigin(Point3(0.0, 0.0, 0.0))
     self.setEffectScale(self.effectScale)
Exemplo n.º 3
0
 def __init__(self):
     PooledEffect.__init__(self)
     EffectController.__init__(self)
     self.card = loader.loadModel('phase_4/models/props/icecream')
     self.cardScale = 18.0
     self.setDepthWrite(0)
     self.setColorScaleOff()
     self.setLightOff()
     self.effectScale = 1.0
     self.effectColor = Vec4(1, 1, 1, 1)
     self.f = ParticleEffect.ParticleEffect('IceCream')
     self.f.reparentTo(self)
     self.p0 = Particles.Particles('particles-0')
     self.p0.setFactory('ZSpinParticleFactory')
     self.p0.setRenderer('SpriteParticleRenderer')
     self.p0.setEmitter('SphereSurfaceEmitter')
     self.f.addParticles(self.p0)
     f0 = ForceGroup.ForceGroup('Gravity')
     force0 = LinearVectorForce(Vec3(0.0, 0.0, -0.25), 1.0, 0)
     force0.setVectorMasks(1, 1, 1)
     force0.setActive(1)
     f0.addForce(force0)
     self.f.addForceGroup(f0)
     self.p0.setPoolSize(128)
     self.p0.setBirthRate(0.04)
     self.p0.setLitterSize(64)
     self.p0.setLitterSpread(0)
     self.p0.setSystemLifespan(0.0)
     self.p0.setLocalVelocityFlag(1)
     self.p0.setSystemGrowsOlderFlag(0)
     self.p0.factory.setLifespanBase(3.25)
     self.p0.factory.setLifespanSpread(1.0)
     self.p0.factory.setMassBase(0.5)
     self.p0.factory.setMassSpread(0.0)
     self.p0.factory.setTerminalVelocityBase(400.0)
     self.p0.factory.setTerminalVelocitySpread(0.0)
     self.p0.factory.setInitialAngle(0.0)
     self.p0.factory.setInitialAngleSpread(360.0)
     self.p0.factory.enableAngularVelocity(1)
     self.p0.factory.setAngularVelocity(100.0)
     self.p0.factory.setAngularVelocitySpread(0.0)
     self.p0.renderer.setAlphaMode(BaseParticleRenderer.PRALPHAOUT)
     self.p0.renderer.setUserAlpha(1.0)
     self.p0.renderer.setFromNode(self.card)
     self.p0.renderer.setColor(Vec4(1.0, 1.0, 1.0, 1.0))
     self.p0.renderer.setXScaleFlag(2)
     self.p0.renderer.setYScaleFlag(2)
     self.p0.renderer.setAnimAngleFlag(1)
     self.p0.renderer.setNonanimatedTheta(0.0)
     self.p0.renderer.setAlphaBlendMethod(
         BaseParticleRenderer.PPBLENDLINEAR)
     self.p0.renderer.setAlphaDisable(0)
     self.p0.emitter.setEmissionType(BaseParticleEmitter.ETRADIATE)
     self.p0.emitter.setOffsetForce(Vec3(0.0, 0.0, 0.0))
     self.p0.emitter.setExplicitLaunchVector(Vec3(1.0, 0.0, 0.0))
     self.p0.emitter.setRadiateOrigin(Point3(0.0, 0.0, 0.0))
     self.setEffectScale(self.effectScale)
     self.setEffectColor(self.effectColor)
 def __init__(self):
     PooledEffect.__init__(self)
     EffectController.__init__(self)
     self.effectScale = 1.0
     self.effectColor = Vec4(1, 1, 1, 1)
     self.numTrails = 5
     self.trails = []
     self.trailEffects = []
     self.trailIval = Parallel()
Exemplo n.º 5
0
 def __init__(self):
     PooledEffect.__init__(self)
     EffectController.__init__(self)
     model = loader.loadModel(
         'phase_4/models/props/tt_m_efx_ext_particleCards')
     self.card = model.find('**/tt_t_efx_ext_particleWhiteGlow')
     self.cardScale = 64.0
     self.effectColor = Vec4(1, 1, 1, 1)
     self.effectScale = 1.0
     self.lifespan = 0.5
     if not GlowTrail.particleDummy:
         GlowTrail.particleDummy = render.attachNewNode(
             ModelNode('GlowTrailParticleDummy'))
         GlowTrail.particleDummy.setDepthWrite(0)
         GlowTrail.particleDummy.setLightOff()
         GlowTrail.particleDummy.setFogOff()
     self.f = ParticleEffect.ParticleEffect('GlowTrail')
     self.f.reparentTo(self)
     self.p0 = Particles.Particles('particles-1')
     self.p0.setFactory('PointParticleFactory')
     self.p0.setRenderer('SpriteParticleRenderer')
     self.p0.setEmitter('PointEmitter')
     self.f.addParticles(self.p0)
     self.p0.setPoolSize(64)
     self.p0.setBirthRate(0.02)
     self.p0.setLitterSize(1)
     self.p0.setLitterSpread(0)
     self.p0.setSystemLifespan(0.0)
     self.p0.setLocalVelocityFlag(0)
     self.p0.setSystemGrowsOlderFlag(0)
     self.p0.factory.setLifespanBase(self.lifespan)
     self.p0.factory.setLifespanSpread(0.1)
     self.p0.factory.setMassBase(1.0)
     self.p0.factory.setMassSpread(0.0)
     self.p0.factory.setTerminalVelocityBase(400.0)
     self.p0.factory.setTerminalVelocitySpread(0.0)
     self.p0.renderer.setAlphaMode(BaseParticleRenderer.PRALPHAOUT)
     self.p0.renderer.setUserAlpha(1.0)
     self.p0.renderer.setFromNode(self.card)
     self.p0.renderer.setColor(Vec4(1.0, 1.0, 1.0, 1.0))
     self.p0.renderer.setXScaleFlag(1)
     self.p0.renderer.setYScaleFlag(1)
     self.p0.renderer.setAnimAngleFlag(1)
     self.p0.renderer.setNonanimatedTheta(0.0)
     self.p0.renderer.setAlphaBlendMethod(
         BaseParticleRenderer.PPBLENDLINEAR)
     self.p0.renderer.setAlphaDisable(0)
     self.p0.renderer.setColorBlendMode(ColorBlendAttrib.MAdd,
                                        ColorBlendAttrib.OIncomingAlpha,
                                        ColorBlendAttrib.OOne)
     self.p0.emitter.setEmissionType(BaseParticleEmitter.ETRADIATE)
     self.p0.emitter.setAmplitudeSpread(0.0)
     self.p0.emitter.setOffsetForce(Vec3(0.0, 0.0, -2.0))
     self.p0.emitter.setExplicitLaunchVector(Vec3(1.0, 0.0, 0.0))
     self.p0.emitter.setRadiateOrigin(Point3(0.0, 0.0, 0.0))
     self.setEffectScale(self.effectScale)
Exemplo n.º 6
0
 def __init__(self):
     NodePath.__init__(self, 'FlashEffect')
     EffectController.__init__(self)
     self.fadeTime = 0.15
     self.effectColor = Vec4(1, 1, 1, 1)
     model = loader.loadModel('phase_4/models/props/tt_m_efx_ext_particleCards')
     self.effectModel = model.find('**/tt_t_efx_ext_particleWhiteGlow')
     self.effectModel.setBillboardAxis(0)
     self.effectModel.reparentTo(self)
     self.effectModel.setColorScale(0, 0, 0, 0)
     self.setAttrib(ColorBlendAttrib.make(ColorBlendAttrib.MAdd, ColorBlendAttrib.OIncomingAlpha, ColorBlendAttrib.OOne))
     self.setBillboardPointWorld()
     self.setDepthWrite(0)
     self.setLightOff()
     self.setFogOff()
Exemplo n.º 7
0
 def __init__(self):
     PooledEffect.__init__(self)
     EffectController.__init__(self)
     self.fadeTime = 1.5
     self.startDelay = 0.0
     self.effectScale = 1.0
     self.effectColor = Vec4(1, 1, 1, 1)
     model = loader.loadModel('phase_4/models/props/tt_m_efx_ext_fireworkCards')
     self.effectModel = model.find('**/tt_t_efx_ext_skull')
     self.effectModel.reparentTo(self)
     self.effectModel.setColorScale(0, 0, 0, 0)
     self.setAttrib(ColorBlendAttrib.make(ColorBlendAttrib.MAdd, ColorBlendAttrib.OIncomingAlpha, ColorBlendAttrib.OOne))
     self.setBillboardPointWorld()
     self.setDepthWrite(0)
     self.setLightOff()
     self.setFogOff()
 def __init__(self):
     PooledEffect.__init__(self)
     EffectController.__init__(self)
     model = loader.loadModel('phase_4/models/props/tt_m_efx_ext_fireworkCards')
     self.card = model.find('**/tt_t_efx_ext_particleSpark_soft')
     self.cardScale = 16.0
     self.effectModel = model.find('**/tt_t_efx_ext_particleStars')
     self.effectModel.reparentTo(self)
     self.effectModel.setColorScale(0, 0, 0, 0)
     self.setAttrib(ColorBlendAttrib.make(ColorBlendAttrib.MAdd, ColorBlendAttrib.OIncomingAlpha, ColorBlendAttrib.OOne))
     self.setBillboardPointWorld()
     self.setDepthWrite(0)
     self.setLightOff()
     self.setFogOff()
     self.effectScale = 1.0
     self.effectColor = Vec4(1, 1, 1, 1)
     self.f = ParticleEffect.ParticleEffect('RingEffect')
     self.f.reparentTo(self)
     self.p0 = Particles.Particles('particles-2')
     self.p0.setFactory('PointParticleFactory')
     self.p0.setRenderer('SpriteParticleRenderer')
     self.p0.setEmitter('RingEmitter')
     self.f.addParticles(self.p0)
     f0 = ForceGroup.ForceGroup('Gravity')
     force0 = LinearVectorForce(Vec3(0.0, 0.0, -15.0), 1.0, 0)
     force0.setVectorMasks(1, 1, 1)
     force0.setActive(1)
     f0.addForce(force0)
     self.f.addForceGroup(f0)
     f1 = ForceGroup.ForceGroup('Noise')
     force1 = LinearNoiseForce(2.5, 0.0)
     force1.setVectorMasks(1, 1, 1)
     force1.setActive(1)
     f1.addForce(force1)
     self.f.addForceGroup(f1)
     self.p0.setPoolSize(16)
     self.p0.setBirthRate(0.1)
     self.p0.setLitterSize(16)
     self.p0.setLitterSpread(0)
     self.p0.setSystemLifespan(0.0)
     self.p0.setLocalVelocityFlag(1)
     self.p0.setSystemGrowsOlderFlag(0)
     self.p0.factory.setLifespanBase(1.0)
     self.p0.factory.setLifespanSpread(0.2)
     self.p0.factory.setMassBase(1.0)
     self.p0.factory.setMassSpread(0.0)
     self.p0.factory.setTerminalVelocityBase(400.0)
     self.p0.factory.setTerminalVelocitySpread(0.0)
     self.p0.renderer.setAlphaMode(BaseParticleRenderer.PRALPHAINOUT)
     self.p0.renderer.setUserAlpha(1.0)
     self.p0.renderer.setColorBlendMode(ColorBlendAttrib.MAdd, ColorBlendAttrib.OIncomingAlpha, ColorBlendAttrib.OOne)
     self.p0.renderer.setFromNode(self.card)
     self.p0.renderer.setColor(Vec4(1.0, 1.0, 1.0, 1.0))
     self.p0.renderer.setXScaleFlag(1)
     self.p0.renderer.setYScaleFlag(1)
     self.p0.renderer.setAnimAngleFlag(0)
     self.p0.renderer.setNonanimatedTheta(0.0)
     self.p0.renderer.setAlphaBlendMethod(BaseParticleRenderer.PPBLENDLINEAR)
     self.p0.renderer.setAlphaDisable(0)
     self.p0.emitter.setEmissionType(BaseParticleEmitter.ETRADIATE)
     self.p0.emitter.setAmplitudeSpread(0.0)
     self.p0.emitter.setOffsetForce(Vec3(0.0, 0.0, 0.0))
     self.p0.emitter.setExplicitLaunchVector(Vec3(1.0, 0.0, 0.0))
     self.p0.emitter.setRadiateOrigin(Point3(0.0, 0.0, 0.0))
     self.p0.emitter.setUniformEmission(16)
     self.setEffectScale(self.effectScale)
     self.setEffectColor(self.effectColor)
Exemplo n.º 9
0
 def __init__(self):
     PooledEffect.__init__(self)
     EffectController.__init__(self)
 def __init__(self):
     PooledEffect.__init__(self)
     EffectController.__init__(self)
     model = loader.loadModel(
         'phase_4/models/props/tt_m_efx_ext_fireworkCards')
     self.card = model.find('**/tt_t_efx_ext_particleStars')
     self.cardScale = 64.0
     self.setDepthWrite(0)
     self.setColorScaleOff()
     self.setLightOff()
     self.effectScale = 1.0
     self.effectColor = Vec4(1, 1, 1, 1)
     self.f = ParticleEffect.ParticleEffect('StarBurst')
     self.f.reparentTo(self)
     self.p0 = Particles.Particles('particles-0')
     self.p0.setFactory('ZSpinParticleFactory')
     self.p0.setRenderer('SpriteParticleRenderer')
     self.p0.setEmitter('SphereSurfaceEmitter')
     self.f.addParticles(self.p0)
     f0 = ForceGroup.ForceGroup('Gravity')
     force0 = LinearVectorForce(Vec3(0.0, 0.0, -25.0), 1.0, 0)
     force0.setVectorMasks(1, 1, 1)
     force0.setActive(1)
     f0.addForce(force0)
     self.f.addForceGroup(f0)
     self.p0.setPoolSize(128)
     self.p0.setBirthRate(0.04)
     self.p0.setLitterSize(64)
     self.p0.setLitterSpread(0)
     self.p0.setSystemLifespan(0.0)
     self.p0.setLocalVelocityFlag(1)
     self.p0.setSystemGrowsOlderFlag(0)
     self.p0.factory.setLifespanBase(1.25)
     self.p0.factory.setLifespanSpread(0.5)
     self.p0.factory.setMassBase(1.0)
     self.p0.factory.setMassSpread(0.0)
     self.p0.factory.setTerminalVelocityBase(400.0)
     self.p0.factory.setTerminalVelocitySpread(0.0)
     self.p0.factory.setInitialAngle(0.0)
     self.p0.factory.setInitialAngleSpread(360.0)
     self.p0.factory.enableAngularVelocity(1)
     self.p0.factory.setAngularVelocity(0.0)
     self.p0.factory.setAngularVelocitySpread(0.0)
     self.p0.renderer.setAlphaMode(BaseParticleRenderer.PRALPHAOUT)
     self.p0.renderer.setUserAlpha(1.0)
     self.p0.renderer.setColorBlendMode(ColorBlendAttrib.MAdd,
                                        ColorBlendAttrib.OIncomingAlpha,
                                        ColorBlendAttrib.OOne)
     self.p0.renderer.setFromNode(self.card)
     self.p0.renderer.setColor(Vec4(1.0, 1.0, 1.0, 1.0))
     self.p0.renderer.setXScaleFlag(1)
     self.p0.renderer.setYScaleFlag(1)
     self.p0.renderer.setAnimAngleFlag(1)
     self.p0.renderer.setNonanimatedTheta(0.0)
     self.p0.renderer.setAlphaBlendMethod(
         BaseParticleRenderer.PPBLENDLINEAR)
     self.p0.renderer.setAlphaDisable(0)
     self.p0.renderer.getColorInterpolationManager().addLinear(
         0.0, 0.1, Vec4(0, 0, 0, 0), self.effectColor, 1)
     self.p0.emitter.setEmissionType(BaseParticleEmitter.ETRADIATE)
     self.p0.emitter.setOffsetForce(Vec3(0.0, 0.0, 0.0))
     self.p0.emitter.setExplicitLaunchVector(Vec3(1.0, 0.0, 0.0))
     self.p0.emitter.setRadiateOrigin(Point3(0.0, 0.0, 0.0))
     self.setEffectScale(self.effectScale)
     self.setEffectColor(self.effectColor)