Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
model: ({model}, {scale = 1, translate = 0}) => (
mat4.scale([], mat4.translate([], model, [0, translate, 0]), [scale, scale, scale])
)
},
function createModel (position, scale) {
var m = mat4.identity([])
mat4.translate(m, m, position)
var s = scale
mat4.scale(m, m, [s, s, s])
return m
}
function fromRotationTranslationScale2 (out, q, v, s) {
mat4.identity(out)
var quatMat = mat4.create()
mat4.fromQuat(quatMat, q)
mat4.translate(out, out, v)
mat4.multiply(out, out, quatMat)
mat4.scale(out, out, s)
return out
}
bunnyPositions.forEach(function iteratee (pos, i) {
mat4.translate(modelMatrix, bunnyModelMatrix, pos)
mat4.rotateY(modelMatrix, modelMatrix, bunnyRotations[i])
bunnyShader.uniforms.uModel = modelMatrix
bunnyGeo.draw()
})