Skip to content

Instantly share code, notes, and snippets.

@milansav
milansav / matrix.js
Created July 26, 2022 09:05
CSS Clip path scale & transformation matrix
const translationMatrix = (x, y) => {
return [
[1, 0, x],
[0, 1, y],
[0, 0, 1]
];
};
const scalingMatrix = (sx, sy) => {
return [