@adatechnology/game-floorplan 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -559,7 +559,7 @@ function createGrid(plan, room, ignored, radius = plan.playerRadius) {
559
559
  const nz = Math.ceil((v1 - v0) / gs);
560
560
  const insideCells = new Uint8Array(nx * nz);
561
561
  const insets = room.outdoor ? usableParts(room, 0.08) : room.parts;
562
- const bodies = room.outdoor ? null : wallBodies(plan, room.floor);
562
+ const bodies = room.outdoor ? null : wallBodies(plan, room.floor).filter((r) => r[0] - radius <= u1 && r[2] + radius >= u0 && r[1] - radius <= v1 && r[3] + radius >= v0);
563
563
  const tooClose = (u, v) => bodies.some((r) => {
564
564
  const dx = Math.max(r[0] - u, 0, u - r[2]);
565
565
  const dz = Math.max(r[1] - v, 0, v - r[3]);
@@ -2687,6 +2687,7 @@ var engine = {
2687
2687
  };
2688
2688
  export {
2689
2689
  blocksWindow,
2690
+ boxRadius,
2690
2691
  checkLot,
2691
2692
  createChalet,
2692
2693
  createCityBuilding,