Zoomable Canvas
This commit is contained in:
2
timing/EaseInOut.ts
Normal file
2
timing/EaseInOut.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export const easeInOut = (x: number) =>
|
||||
x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2;
|
2
timing/Map.ts
Normal file
2
timing/Map.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export const map = (value: number, x1: number, y1: number, x2: number, y2: number) =>
|
||||
(value - x1) * (y2 - x2) / (y1 - x1) + x2;
|
Reference in New Issue
Block a user