# cocos.actions.quadmoveby_actions module

Implementation of QuadMoveBy actions

These actions modifies the x and y coordinates of fixed-size grid of (1,1). The z-coordinate is not modified.

class `QuadMoveBy`(*args, **kwargs)

  Bases: `cocos.actions.basegrid_actions.Grid3DAction`

  QuadMoveBy moves each vertex of the grid. The size of the grid is (1,1)

  Vertex positions:

      vertex3 --<-- vertex2
          |            |
          v            ^
          |            |
      vertex0 -->-- vertex1

      The vertices will move from the origin (src parameters) a relative distance (delta parameters) in duration time.

  Example:

      scene.do(QuadMoveBy(src0, src1, src2, src3,
              delta0, delta1, delta2, delta3,
              duration))

  `init`(src0=(0, 0), src1=(-1, -1), src2=(-1, -1), src3=(-1, -1), delta0=(0, 0), delta1=(0, 0), delta2=(0, 0), delta3=(0, 0), grid=(1, 1), *args, **kw)

    Initializes the QuadMoveBy

    Parameters
      src0(int, int)

        Initial value for the bottom-left coordinate. Default is (0,0)

      src1(int, int)

        Initial value for the bottom-right coordinate. Default is (win_size_x,0)

      src2(int, int)

        Initial value for the upper-right coordinate. Default is (win_size_x, win_size_y)

      src3(int, int)

        Initial value for the upper-left coordinate. Default is (0, win_size_y)

      delta0(int, int)

        The bottom-left relative coordinate. Default is (0,0)

      delta1(int, int)

        The bottom-right relative coordinate. Default is (0,0)

      delta2(int, int)

        The upper-right relative coordinate. Default is (0,0)

      delta3(int, int)

        The upper-left relative coordinate. Default is (0,0)

  `update`(t)

    Gets called on every frame ‘t’ is the time elapsed normalized to [0, 1] If this action takes 5 seconds to execute, t will be equal to 0 at 0 seconds. t will be 0.5 at 2.5 seconds and t will be 1 at 5sec. This method must not use self._elapsed, which is not guaranted to be updated.

class `MoveCornerUp`(*args, **kw)

  Bases: `cocos.actions.quadmoveby_actions.QuadMoveBy`

  MoveCornerUp moves the bottom-right corner to the upper-left corner in duration time

class `MoveCornerDown`(*args, **kw)

  Bases: `cocos.actions.quadmoveby_actions.QuadMoveBy`

  MoveCornerDown moves the upper-left corner to the bottom-right corner in duration time

class `CornerSwap`(*args, **kw)

  Bases: `cocos.actions.quadmoveby_actions.QuadMoveBy`

  CornerSwap moves the upper-left corner to the bottom-right corner in vice-versa in duration time. The resulting effect is a reflection + rotation.

class `Flip`(*args, **kw)

  Bases: `cocos.actions.quadmoveby_actions.QuadMoveBy`

  Flip moves the upper-left corner to the bottom-left corner and vice-versa, and moves the upper-right corner to the bottom-left corner and vice-versa, flipping the window upside-down, and right-left.

class `FlipX`(*args, **kw)

  Bases: `cocos.actions.quadmoveby_actions.QuadMoveBy`

  FlipX flips the screen horizontally, moving the left corners to the right, and vice-versa.

class `FlipY`(*args, **kw)

  Bases: `cocos.actions.quadmoveby_actions.QuadMoveBy`

  FlipY flips the screen vertically, moving the upper corners to the bottom, and vice-versa.

class `SkewHorizontal`(delta=None, *args, **kw)

  Bases: `cocos.actions.quadmoveby_actions.QuadMoveBy`

  SkewHorizontal skews the screen horizontally. default skew: x/3

class `SkewVertical`(delta=None, *args, **kw)

  Bases: `cocos.actions.quadmoveby_actions.QuadMoveBy`

  SkewVertical skews the screen vertically. default skew: y/3