(q,r)
| 6880 | const DIRS=[[1,0],[0,1],[-1,1],[-1,0],[0,-1],[1,-1]]; // ordered by bearing |
| 6881 | const hexXZ=(q,r)=>[1.5*HC*q, Math.sqrt(3)*HC*(r+q/2)]; |
| 6882 | const hexKey=(q,r)=>q+','+r; |
| 6883 | const hexCorner=k=>[Math.cos(k*Math.PI/3)*HC, Math.sin(k*Math.PI/3)*HC]; |
| 6884 | /* World point -> the cell that contains it. Cube rounding, the standard trick; |
| 6885 | this is the whole of the picking system — no raycast, no colliders. */ |
no outgoing calls
no test coverage detected