updateVector2 method

dynamic updateVector2(
  1. dynamic uniform
)

Implementation

updateVector2(uniform) {
  var updated = false;

  var a = this.buffer;
  var v = uniform.getValue();
  var offset = uniform.offset;

  if (a[offset + 0] != v.x || a[offset + 1] != v.y) {
    a[offset + 0] = v.x;
    a[offset + 1] = v.y;

    updated = true;
  }

  return updated;
}