Skip to content

Commit

Permalink
✨ add z coordinate to translate api
Browse files Browse the repository at this point in the history
  • Loading branch information
slooi committed Sep 17, 2024
1 parent 4cbc772 commit 78fddfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webgl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function createWebglRenderer(canvas: HTMLCanvasElement) {
transformMatrix = m4.identity()
},
scale: (sx: number, sy: number) => transformMatrix = m4.dot(m4.scale(sx, sy, 1), transformMatrix),
translate: (tx: number, ty: number) => transformMatrix = m4.dot(m4.translation(tx, ty, 0), transformMatrix),
translate: (tx: number, ty: number, tz: number) => transformMatrix = m4.dot(m4.translation(tx, ty, tz), transformMatrix),
rotateX: (degreeX: number) => transformMatrix = m4.dot(m4.rotationX(degreeX), transformMatrix),
rotateY: (degreeY: number) => transformMatrix = m4.dot(m4.rotationY(degreeY), transformMatrix),
rotateZ: (degreeZ: number) => transformMatrix = m4.dot(m4.rotationZ(degreeZ), transformMatrix)
Expand Down

0 comments on commit 78fddfc

Please sign in to comment.