예제 #1
0
   def __init__(self):
      
      lifetime = randint(300, 400)
      vortex = Vortex.random_vortex()
      
      BaseItem.__init__(self, lifetime, vortex)

      self.points = []
      self.coords = []

      self.history = randint(15, 30)
      self.height = uniform(0.5, 3.25)
 
      c = uniform(0.0005, 0.8)   # 0.0001 to 0.8 for vortex
      self.color = [c, c, c, 1.0]   # gives the strips various intensities
            
      # Initializes the texture (for donna's as well)
      try:
         self.texture = get_strip()
      except:
         self.texture = get_dancer()
         
      self.initialize()
      self.step()     # This step() results in self.buffer() being defined
      
      self.transforms = [[0.,0.,0.],[0.,0.,0.],1.]
      self.pos = [0.,0.,0.]
예제 #2
0
파일: dream.py 프로젝트: jvan/dream-vortex
   def __init__(self, lifetime):
      BaseParticle.__init__(self, lifetime, None)

      points, texcoords = Vortex.image_strip()
      self.dream = Buffer(points)
      self.dream.loadTexCoordData(texcoords)
      self.dream.renderMode('triangles:strip')

      self.texture = get_dream()

      self.color = [1.0, 1.0, 1.0, 0.0]
예제 #3
0
 def __init__(self):
    
    lifetime = randint(300, 500)  # 400, 600
    vortex = Vortex.random_vortex()
    
    BaseItem.__init__(self, lifetime, vortex)
    
    c = [settings.get_uniform('particle-red-range'), \
       settings.get_uniform('particle-green-range'), \
       settings.get_uniform('particle-blue-range'), \
       settings['particle-transparency']]
    self.color = c
    
    # set transform for z to be 1 above floor
    self.transforms = [[0.,0.,1.],[0.,0.,0.],1.]
    self.pos = [0.,0.,0.]
    
    RandPlay()
예제 #4
0
   def __init__(self, lifetime):
      BaseItem.__init__(self, lifetime, None)

      points, texcoords = Vortex.image_strip()
#      print len(points)
      delta_x = -points[6][0] + randrange(-10,10)   #- points[7][0]
      delta_y = -points[6][1] + randrange(-10,10)   #- points[7][1]
      delta_z = - points[0][2]   
      
      # Added to move dreams down in the space - messes up rendering w/ vortex
      for i in range(len(points)):
         points[i][0] = points[i][0] + delta_x
         points[i][1] = points[i][1] + delta_y
         points[i][2] = points[i][2] + delta_z
      
      self.dream = Buffer(points)
      self.dream.loadTexCoordData(texcoords)
      self.dream.renderMode('triangles:strip')

      self.texture = get_dream()

      self.color = [1.0, 1.0, 1.0, 0.0]
예제 #5
0
 def add_particle(self):
    self.particles.append(Emblem(randint(2000, 3000), Vortex.random_vortex()))
예제 #6
0
파일: vortex.py 프로젝트: jvan/dream-vortex
 def add_particle(self):
    self.particles.append(BrushStroke(randint(400, 500), Vortex.random_vortex()))
예제 #7
0
 def RandomParticleTrail():
    return ParticleTrail(randint(400, 550), Vortex.random_vortex())
예제 #8
0
 def RandomParticle():
    return Particle(randint(400, 600), Vortex.random_vortex())
예제 #9
0
 def add_particle(self):
    self.particles.append(Particle(randint(400, 600), Vortex.random_vortex()))