demos/assets/g2.js
function multiplyScalarAndAdd(out, a, b, scale) {
  out[0] = a[0] + b[0] * scale;
  out[1] = a[1] + b[1] * scale;
  out[2] = a[2] + b[2] * scale;
  out[3] = a[3] + b[3] * scale;
  out[4] = a[4] + b[4] * scale;
  out[5] = a[5] + b[5] * scale;
  out[6] = a[6] + b[6] * scale;
  out[7] = a[7] + b[7] * scale;
  out[8] = a[8] + b[8] * scale;
  return out;
}
function multiplyScalarAndAdd(out, a, b, scale) {
  out[0] = a[0] + b[0] * scale;
  out[1] = a[1] + b[1] * scale;
  out[2] = a[2] + b[2] * scale;
  out[3] = a[3] + b[3] * scale;
  out[4] = a[4] + b[4] * scale;
  out[5] = a[5] + b[5] * scale;
  out[6] = a[6] + b[6] * scale;
  out[7] = a[7] + b[7] * scale;
  out[8] = a[8] + b[8] * scale;
  return out;
}
function multiplyScalarAndAdd ( out , a , b , scale ) { out [ 0 ] = a [ 0 ] + b [ 0 ] * scale ; out [ 1 ] = a [ 1 ] + b [ 1 ] * scale ; out [ 2 ] = a [ 2 ] + b [ 2 ] * scale ; out [ 3 ] = a [ 3 ] + b [ 3 ] * scale ; out [ 4 ] = a [ 4 ] + b [ 4 ] * scale ; out [ 5 ] = a [ 5 ] + b [ 5 ] * scale ; out [ 6 ] = a [ 6 ] + b [ 6 ] * scale ; out [ 7 ] = a [ 7 ] + b [ 7 ] * scale ; out [ 8 ] = a [ 8 ] + b [ 8 ] * scale ; return out ; }
Adds two mat3's after multiplying each element of the second operand by a scalar value.

@param {mat3} out the receiving vector
@param {mat3} a the first operand
@param {mat3} b the second operand
@param {Number} scale the amount to scale b's elements by before adding
@returns {mat3} out
Adds two mat3 s after multiplying each element of the second operand by a scalar value .