Function createXYQuadVertices

  • Creates XY quad vertices

    The default with no parameters will return a 2x2 quad with values from -1 to +1. If you want a unit quad with that goes from 0 to 1 you'd call it with

    createXYQuadVertices(1, 0.5, 0.5);
    

    If you want a unit quad centered above 0,0 you'd call it with

    primitives.createXYQuadVertices(1, 0, 0.5);
    

    Parameters

    • params: {
          size: undefined | number;
          xOffset: undefined | number;
          yOffset: undefined | number;
      } = {}
      • size: undefined | number

        the size across the quad. Defaults to 2 which means vertices will go from -1 to +1

      • xOffset: undefined | number

        the amount to offset the quad in X. Default = 0

      • yOffset: undefined | number

        the amount to offset the quad in Y. Default = 0

    Returns Arrays

    the created XY Quad vertices

Generated using TypeDoc