UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

20 lines (17 loc) 349 B
/** * * @param {number[]|Float32Array} result * @param {number} tX * @param {number} tY */ export function m3_cm_from_translation(result, tX, tY) { result[0] = 1; result[1] = 0; result[2] = tX; result[3] = 0; result[4] = 1; result[5] = tY; result[6] = 0; result[7] = 0; result[8] = 1; }