예제 #1
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
         })
예제 #2
0
 def CreateKeyframe(self,
                    frame,
                    strength=None,
                    strengthrandrange=None,
                    direction=[None, None],
                    interpolationtype=INTERPOLATIONTYPE_LINEAR):
     return keyframes.CreateKeyframe(
         self.keyframes, frame, {
             'strength': strength,
             'strengthrandrange': strengthrandrange,
             'direction_x': direction[0],
             'direction_y': direction[1],
             'interpolationtype': interpolationtype
         })
예제 #3
0
 def CreateKeyframe(self,
                    frame,
                    strength=None,
                    strengthrandrange=None,
                    pos=(None, None),
                    interpolationtype=INTERPOLATIONTYPE_LINEAR):
     return keyframes.CreateKeyframe(
         self.keyframes, frame, {
             'strength': strength,
             'strengthrandrange': strengthrandrange,
             'pos_x': pos[0],
             'pos_y': pos[1],
             'interpolationtype': interpolationtype
         })
예제 #4
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
예제 #5
0
 def CreateKeyframe(self,
                    frame,
                    pos=(None, None),
                    colour=(None, None, None),
                    bounce=None,
                    radius=None,
                    interpolationtype=INTERPOLATIONTYPE_LINEAR):
     return 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
         })
예제 #6
0
 def CreateKeyframe(self,
                    frame,
                    pos=(None, None),
                    colour=(None, None, None),
                    bounce=None,
                    width=None,
                    height=None,
                    interpolationtype=INTERPOLATIONTYPE_LINEAR):
     return 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
         })
예제 #7
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)
     return 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
         })
예제 #8
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
         })