This commit is contained in:
33333-33333 2026-09-29 23:45:12 +09:00
commit f5fc9b76ce
73 changed files with 32628 additions and 376 deletions

View file

@ -1,6 +1,6 @@
// Continuous circles and rotated fallen-log rectangles.
// A uniform spatial index limits swept collision checks to nearby obstacles.
import {W as WIDTH,H as HEIGHT} from './world-size.js';
import {W as WIDTH,H as HEIGHT} from './world-size.js?v=45';
const SIZE=120,EPS=.0001;
const clamp=(v,a,b)=>Math.max(a,Math.min(b,v));
const local=(c,x,y)=>{const co=Math.cos(c.angle||0),si=Math.sin(c.angle||0),dx=x-c.x,dy=y-c.y;return {x:co*dx+si*dy,y:-si*dx+co*dy}};