Exemplo n.º 1
0
 def CreateKeyframe(self, frame, strength=None, strengthrandrange=None,
                    direction=[None, None],
                    interpolationtype=INTERPOLATIONTYPE_LINEAR):
     values = {
         'strength': strength, 'strengthrandrange': strengthrandrange,
         'direction_x': direction[0], 'direction_y': direction[1],
         'interpolationtype': interpolationtype
     }
     return keyframes.CreateKeyframe(self.keyframes, frame, values)
Exemplo n.º 2
0
 def CreateKeyframe(self, frame, strength=None, strengthrandrange=None,
                    pos=(None, None),
                    interpolationtype=INTERPOLATIONTYPE_LINEAR):
     values = {
         'strength': strength,
         'strengthrandrange': strengthrandrange,
         'pos_x': pos[0],
         'pos_y': pos[1],
         'interpolationtype': interpolationtype
     }
     return keyframes.CreateKeyframe(self.keyframes, frame, values)
Exemplo n.º 3
0
 def CreateKeyframe(self,
                    frame,
                    colour=(None, None, None),
                    radius=None,
                    length=None):
     keyframes.CreateKeyframe(
         self.keyframes, frame, {
             'colour_r': colour[0],
             'colour_g': colour[1],
             'colour_b': colour[2],
             'radius': radius,
             'length': length
         })
Exemplo n.º 4
0
 def CreateParticleKeyframe(self,
                            frame,
                            colour=(None, None, None),
                            radius=None,
                            length=None,
                            interpolationtype="linear"):
     keyframes.CreateKeyframe(
         self.particlekeyframes, frame, {
             'colour_r': colour[0],
             'colour_g': colour[1],
             'colour_b': colour[2],
             'radius': radius,
             'length': length,
             'interpolationtype': interpolationtype
         })
     self.PreCalculateParticles()
Exemplo n.º 5
0
 def CreateParticleKeyframe(self,
                            frame,
                            colour=(None, None, None),
                            radius=None,
                            length=None,
                            interpolationtype=INTERPOLATIONTYPE_LINEAR):
     newframe = keyframes.CreateKeyframe(
         self.particlekeyframes, frame, {
             'colour_r': colour[0],
             'colour_g': colour[1],
             'colour_b': colour[2],
             'radius': radius,
             'length': length,
             'interpolationtype': interpolationtype
         })
     self.PreCalculateParticles()
     return newframe
Exemplo n.º 6
0
 def CreateKeyframe(self,
                    frame,
                    pos=(None, None),
                    colour=(None, None, None),
                    bounce=None,
                    radius=None,
                    interpolationtype=INTERPOLATIONTYPE_LINEAR):
     values = {
         'pos_x': pos[0],
         'pos_y': pos[1],
         'colour_r': colour[0],
         'colour_g': colour[1],
         'colour_b': colour[2],
         'bounce': bounce,
         'radius': radius,
         'interpolationtype': interpolationtype
     }
     return keyframes.CreateKeyframe(self.keyframes, frame, values)
Exemplo n.º 7
0
 def CreateKeyframe(self,
                    frame,
                    pos=(None, None),
                    colour=(None, None, None),
                    bounce=None,
                    radius=None,
                    interpolationtype="linear"):
     keyframes.CreateKeyframe(
         self.keyframes, frame, {
             'pos_x': pos[0],
             'pos_y': pos[1],
             'colour_r': colour[0],
             'colour_g': colour[1],
             'colour_b': colour[2],
             'bounce': bounce,
             'radius': radius,
             'interpolationtype': interpolationtype
         })
Exemplo n.º 8
0
 def CreateKeyframe(self,
                    frame,
                    pos=(None, None),
                    colour=(None, None, None),
                    bounce=None,
                    width=None,
                    height=None,
                    interpolationtype=INTERPOLATIONTYPE_LINEAR):
     values = {
         'pos_x': pos[0],
         'pos_y': pos[1],
         'colour_r': colour[0],
         'colour_g': colour[1],
         'colour_b': colour[2],
         'bounce': bounce,
         'width': width,
         'height': height,
         'interpolationtype': interpolationtype
     }
     return keyframes.CreateKeyframe(self.keyframes, frame, values)
Exemplo n.º 9
0
 def CreateKeyframe(self,
                    frame,
                    pos=(None, None),
                    colour=(None, None, None),
                    bounce=None,
                    width=None,
                    height=None,
                    interpolationtype="linear"):
     keyframes.CreateKeyframe(
         self.keyframes, frame, {
             'pos_x': pos[0],
             'pos_y': pos[1],
             'colour_r': colour[0],
             'colour_g': colour[1],
             'colour_b': colour[2],
             'bounce': bounce,
             'width': width,
             'height': height,
             'interpolationtype': interpolationtype
         })
Exemplo n.º 10
0
 def CreateKeyframe(self,
                    frame,
                    pos=(None, None),
                    colour=(None, None, None),
                    bounce=None,
                    normal=[None, None],
                    interpolationtype=INTERPOLATIONTYPE_LINEAR):
     if (normal != [None, None]) and \
        (abs(magnitudesquared(normal) - 1.0) >= 0.3):
         normal = normalise(normal)
     values = {
         'pos_x': pos[0],
         'pos_y': pos[1],
         'colour_r': colour[0],
         'colour_g': colour[1],
         'colour_b': colour[2],
         'bounce': bounce,
         'normal_x': normal[0],
         'normal_y': normal[1],
         'interpolationtype': interpolationtype
     }
     return keyframes.CreateKeyframe(self.keyframes, frame, values)
Exemplo n.º 11
0
 def CreateKeyframe(self,
                    frame,
                    pos=(None, None),
                    initspeed=None,
                    initdirection=None,
                    initspeedrandrange=None,
                    initdirectionrandrange=None,
                    particlesperframe=None,
                    genspacing=None,
                    interpolationtype=INTERPOLATIONTYPE_LINEAR):
     return keyframes.CreateKeyframe(
         self.keyframes, frame, {
             'pos_x': pos[0],
             'pos_y': pos[1],
             'initspeed': initspeed,
             'initdirection': initdirection,
             'initspeedrandrange': initspeedrandrange,
             'initdirectionrandrange': initdirectionrandrange,
             'particlesperframe': particlesperframe,
             'genspacing': genspacing,
             'interpolationtype': interpolationtype
         })
Exemplo n.º 12
0
 def CreateKeyframe(self,
                    frame,
                    pos=(None, None),
                    initspeed=None,
                    initdirection=None,
                    initspeedrandrange=None,
                    initdirectionrandrange=None,
                    particlesperframe=None,
                    genspacing=None,
                    interpolationtype="linear"):
     keyframes.CreateKeyframe(
         self.keyframes, frame, {
             'pos_x': pos[0],
             'pos_y': pos[1],
             'initspeed': initspeed,
             'initdirection': initdirection,
             'initspeedrandrange': initspeedrandrange,
             'initdirectionrandrange': initdirectionrandrange,
             'particlesperframe': particlesperframe,
             'genspacing': genspacing,
             'interpolationtype': interpolationtype
         })
Exemplo n.º 13
0
 def CreateKeyframe(self,
                    frame,
                    pos=(None, None),
                    colour=(None, None, None),
                    bounce=None,
                    normal=[None, None],
                    interpolationtype="linear"):
     if (normal != [None, None]) and (abs(magnitudesquared(normal) - 1.0) >=
                                      0.3):
         normal = normalise(normal)
     keyframes.CreateKeyframe(
         self.keyframes, frame, {
             'pos_x': pos[0],
             'pos_y': pos[1],
             'colour_r': colour[0],
             'colour_g': colour[1],
             'colour_b': colour[2],
             'bounce': bounce,
             'normal_x': normal[0],
             'normal_y': normal[1],
             'interpolationtype': interpolationtype
         })
Exemplo n.º 14
0
	def CreateKeyframe(self, frame, strength = None, strengthrandrange = None, direction = [None, None], interpolationtype = "linear"):
		keyframes.CreateKeyframe(self.keyframes, frame, {'strength':strength, 'strengthrandrange':strengthrandrange, 'direction_x':direction[0], 'direction_y':direction[1], 'interpolationtype':interpolationtype})
Exemplo n.º 15
0
	def CreateKeyframe(self, frame, strength = None, strengthrandrange = None, pos = (None, None), interpolationtype = "linear"):
		keyframes.CreateKeyframe(self.keyframes, frame, {'strength':strength, 'strengthrandrange':strengthrandrange, 'pos_x':pos[0], 'pos_y':pos[1], 'interpolationtype':interpolationtype})