pixi.js
    Preparing search index...

    Variable groupD8Const Advanced

    groupD8: {
        add: (rotationSecond: number, rotationFirst: number) => number;
        byDirection: (dx: number, dy: number) => number;
        E: number;
        inv: (rotation: number) => number;
        isVertical: (rotation: number) => boolean;
        MAIN_DIAGONAL: number;
        matrixAppendRotationInv: (
            matrix: Matrix,
            rotation: number,
            tx?: number,
            ty?: number,
        ) => void;
        MIRROR_HORIZONTAL: number;
        MIRROR_VERTICAL: number;
        N: number;
        NE: number;
        NW: number;
        REVERSE_DIAGONAL: number;
        rotate180: (rotation: number) => number;
        S: number;
        SE: number;
        sub: (rotationSecond: number, rotationFirst: number) => number;
        SW: number;
        uX: (ind: number) => number;
        uY: (ind: number) => number;
        vX: (ind: number) => number;
        vY: (ind: number) => number;
        W: number;
    } = ...

    Implements the dihedral group D8, which is similar to [group D4]http://mathworld.wolfram.com/DihedralGroupD4.html; D8 is the same but with diagonals, and it is used for texture rotations.

    The directions the U- and V- axes after rotation of an angle of a: GD8Constant are the vectors (uX(a), uY(a)) and (vX(a), vY(a)). These aren't necessarily unit vectors.

    Type declaration

    • add: (rotationSecond: number, rotationFirst: number) => number

      Composes the two D8 operations.

      Taking ^ as reflection:

      E=0 S=2 W=4 N=6 E^=8 S^=10 W^=12 N^=14
      E=0 E S W N E^ S^ W^ N^
      S=2 S W N E S^ W^ N^ E^
      W=4 W N E S W^ N^ E^ S^
      N=6 N E S W N^ E^ S^ W^
      E^=8 E^ N^ W^ S^ E N W S
      S^=10 S^ E^ N^ W^ S E N W
      W^=12 W^ S^ E^ N^ W S E N
      N^=14 N^ W^ S^ E^ N W S E

      [This is a Cayley table]https://en.wikipedia.org/wiki/Cayley_table

    • byDirection: (dx: number, dy: number) => number

      Approximates the vector V(dx,dy) into one of the eight directions provided by groupD8.

    • E: number
      Rotation Direction
      East
    • inv: (rotation: number) => number
    • isVertical: (rotation: number) => boolean

      Checks if the rotation angle is vertical, i.e. south or north. It doesn't work for reflections.

    • MAIN_DIAGONAL: number

      Reflection about the main diagonal.

    • matrixAppendRotationInv: (matrix: Matrix, rotation: number, tx?: number, ty?: number) => void

      Helps sprite to compensate texture packer rotation.

    • MIRROR_HORIZONTAL: number

      Reflection about X-axis.

    • MIRROR_VERTICAL: number

      Reflection about Y-axis.

    • N: number
      Rotation Direction
      -90°/270°↻ North
    • NE: number
      Rotation Direction
      -45°/315°↻ Northeast
    • NW: number
      Rotation Direction
      -135°/225°↻ Northwest
    • REVERSE_DIAGONAL: number

      Reflection about reverse diagonal.

    • rotate180: (rotation: number) => number

      Adds 180 degrees to rotation, which is a commutative operation.

    • S: number
      Rotation Direction
      90°↻ South
    • SE: number
      Rotation Direction
      45°↻ Southeast
    • sub: (rotationSecond: number, rotationFirst: number) => number

      Reverse of add.

    • SW: number
      Rotation Direction
      135°↻ Southwest
    • uX: (ind: number) => number
    • uY: (ind: number) => number
    • vX: (ind: number) => number
    • vY: (ind: number) => number
    • W: number
      Rotation Direction
      180° West

    Ivan: ivanpopelyshev