updateMatrix3 method

dynamic updateMatrix3(
  1. dynamic uniform
)

Implementation

updateMatrix3(uniform) {
  var updated = false;

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

  if (a[offset + 0] != e[0] ||
      a[offset + 1] != e[1] ||
      a[offset + 2] != e[2] ||
      a[offset + 4] != e[3] ||
      a[offset + 5] != e[4] ||
      a[offset + 6] != e[5] ||
      a[offset + 8] != e[6] ||
      a[offset + 9] != e[7] ||
      a[offset + 10] != e[8]) {
    a[offset + 0] = e[0];
    a[offset + 1] = e[1];
    a[offset + 2] = e[2];
    a[offset + 4] = e[3];
    a[offset + 5] = e[4];
    a[offset + 6] = e[5];
    a[offset + 8] = e[6];
    a[offset + 9] = e[7];
    a[offset + 10] = e[8];

    updated = true;
  }

  return updated;
}