publish
This commit is contained in:
parent
01204dfa2f
commit
f5fc9b76ce
73 changed files with 32628 additions and 376 deletions
|
|
@ -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}};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue