setVertex method

void setVertex(
  1. int vertex,
  2. num x,
  3. num y,
  4. num u,
  5. num v,
)

Set the XY and UV values of a vertex.

The XY values define the position of the vertex in the local coordinate system of the Display Object. The UV values define the pixel location in a 0.0 to 1.0 coordinate system of the BitmapData.

Implementation

void setVertex(int vertex, num x, num y, num u, num v) {
  final offset = vertex << 2;
  vxList[offset + 0] = x.toDouble();
  vxList[offset + 1] = y.toDouble();
  vxList[offset + 2] = u.toDouble();
  vxList[offset + 3] = v.toDouble();
}