updateVector3 method

dynamic updateVector3(
  1. dynamic uniform
)

Implementation

updateVector3(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 + 2] != v.z) {
    a[offset + 0] = v.x;
    a[offset + 1] = v.y;
    a[offset + 2] = v.z;

    updated = true;
  }

  return updated;
}