This commit is contained in:
2025-11-24 20:42:43 +01:00
parent 4c8ff39305
commit 46fa63af8a
16 changed files with 595 additions and 345 deletions
+8
View File
@@ -8,6 +8,14 @@ export const clamp = (value: number, min: number, max: number): number => {
return value;
};
export const formatTransform = (
x: number,
y: number,
rotation = 0,
scale = 1,
): string => `translate3d(${x}px, ${y}px, 0) rotate(${rotation}deg) scale(${scale})`;
export default {
clamp,
formatTransform,
};
-3
View File
@@ -5,6 +5,3 @@ export const isPlainObject = (value: unknown): value is Record<string, unknown>
export const isStringValue = (value: unknown): value is string =>
objectToString.call(value) === '[object String]';
export const isFunctionValue = <T extends (...args: unknown[]) => unknown>(value: unknown): value is T =>
objectToString.call(value) === '[object Function]';