static 폴더 및 하위 파일 업로드

This commit is contained in:
sotam0316
2026-04-22 12:05:03 +09:00
commit 514b209a5a
203 changed files with 29494 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
/**
* Snap a position to the nearest grid interval, accounting for the object's dimension
* to ensure its edges or center align properly with the grid.
*/
export function snapPosition(pos, dimension, spacing) {
const offset = (dimension / 2) % spacing;
return Math.round((pos - offset) / spacing) * spacing + offset;
}