Ejemplo n.º 1
0
 def __init__(self, x, y, label = 'Pulse', target = None, num_particles = 10):
   Button.__init__(self, x, y, label, target)
   Process.__init__(self, x, y, Button.size, Button.size)
   
   self.num_particles = num_particles
   self.add_particles = 0
   self.skip_count = 0
   self.speed = 2
Ejemplo n.º 2
0
 def __init__(self, x, y, rate = 1, particle_radius = 4.0):
   Process.__init__(self, x, y, SIZE, SIZE)
   
   self.rate = rate # particles per second
   self.particle_radius = particle_radius
   self.next_particle_time = time.time() + (1.0 / self.rate)
   
   self.min_rate = 0.0
   self.max_rate = 11.0
   self.range = self.max_rate - self.min_rate
   self.pie_slice = (self.rate / self.range) * 360.0
Ejemplo n.º 3
0
  def __init__(self, x, y, width = 30.0, height = 30.0, do_reaction = False):
    Newton.__init__(self, x, y, width, height)
    Process.__init__(self, x, y, width, height)

    self.__ode_walls = []
    self.__rotor = None
    self.__reactor_output = None

    self.render_walls = True
    self.render_valves = True
    self.mouse_over_property= False
    self.bounds_check = True
    self.do_reaction = do_reaction

    self._delete_list = [] # for buffering removals during ode reaction collision callback