폴더 및 하위 파일 업로드

This commit is contained in:
sotam0316
2026-04-22 21:11:57 +09:00
commit 484b1d2a44
209 changed files with 29552 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;
}