@adatechnology/game-terrain 0.9.2 → 0.9.4
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/README.md +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.global.js +7 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -280,6 +280,8 @@ var TERRAIN_PROFILES = [
|
|
|
280
280
|
{ id: "dirt", strata: [{ material: "soil", thickness: 1.8 }, { material: "stone", thickness: 0.5 }] },
|
|
281
281
|
{ id: "sand", strata: [{ material: "sand", thickness: 2.5 }] },
|
|
282
282
|
{ id: "road", strata: [{ material: "asphalt", thickness: 0.05 }, { material: "gravel", thickness: 0.25 }, { material: "soil", thickness: 1.5 }] },
|
|
283
|
+
// a pavement for walking: concrete over its gravel bed over the soil, as the road's layers (a blast digs down to the pipes under it)
|
|
284
|
+
{ id: "sidewalk", strata: [{ material: "concrete", thickness: 0.08 }, { material: "gravel", thickness: 0.22 }, { material: "soil", thickness: 1.5 }] },
|
|
283
285
|
{ id: "concrete_slab", strata: [{ material: "concrete", thickness: 0.12, reinforcement: { material: "steel", cover: 0.03, spacing: 0.15, resistance: 4 } }] },
|
|
284
286
|
{ id: "suspended_slab", drop: 3, strata: [{ material: "concrete", thickness: 0.12, reinforcement: { material: "steel", cover: 0.03, spacing: 0.15, resistance: 4 } }] },
|
|
285
287
|
{ id: "tile_floor", strata: [{ material: "ceramic", thickness: 8e-3 }, { material: "mortar", thickness: 0.03 }, { material: "concrete", thickness: 0.1, reinforcement: { material: "steel", cover: 0.03, spacing: 0.15, resistance: 4 } }] },
|
|
@@ -1883,6 +1885,11 @@ function createTerrain(options) {
|
|
|
1883
1885
|
raycast,
|
|
1884
1886
|
strike,
|
|
1885
1887
|
burn,
|
|
1888
|
+
open(excavation) {
|
|
1889
|
+
excavate(excavation);
|
|
1890
|
+
const [ex0, ez0, ex1, ez1] = excavation.rect;
|
|
1891
|
+
emitDeform((ex0 + ex1) / 2, (ez0 + ez1) / 2, Math.hypot(ex1 - ex0, ez1 - ez0) / 2 + cellSize * 2);
|
|
1892
|
+
},
|
|
1886
1893
|
dig,
|
|
1887
1894
|
fill,
|
|
1888
1895
|
applyHit,
|