@adatechnology/game-destruction-three 0.26.1 → 0.26.3
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.global.js
CHANGED
|
@@ -3449,6 +3449,7 @@ var GameDestructionThree = (() => {
|
|
|
3449
3449
|
__publicField2(this, "centerZ", 0);
|
|
3450
3450
|
__publicField2(this, "puddles", WORKSHOP_PUDDLES);
|
|
3451
3451
|
__publicField2(this, "puddleAt");
|
|
3452
|
+
__publicField2(this, "coverTopAt");
|
|
3452
3453
|
}
|
|
3453
3454
|
/** `initRain` (W321): `count` streaks (thinned by the quality), each drawn at a random place in the box. */
|
|
3454
3455
|
init(count, wind) {
|
|
@@ -3494,6 +3495,13 @@ var GameDestructionThree = (() => {
|
|
|
3494
3495
|
positions[o + 3] += slant;
|
|
3495
3496
|
positions[o + 1] -= fall;
|
|
3496
3497
|
positions[o + 4] -= fall;
|
|
3498
|
+
if (this.coverTopAt) {
|
|
3499
|
+
const top = this.coverTopAt(positions[o], positions[o + 2]);
|
|
3500
|
+
if (top !== void 0 && positions[o + 4] < top) {
|
|
3501
|
+
this.restart(o);
|
|
3502
|
+
continue;
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3497
3505
|
const ground = context.groundAt(positions[o], positions[o + 2]);
|
|
3498
3506
|
if (positions[o + 4] < ground) {
|
|
3499
3507
|
const x = positions[o];
|
|
@@ -3509,10 +3517,7 @@ var GameDestructionThree = (() => {
|
|
|
3509
3517
|
}
|
|
3510
3518
|
}
|
|
3511
3519
|
}
|
|
3512
|
-
|
|
3513
|
-
const ny = random.between(REENTRY_HEIGHT[0], REENTRY_HEIGHT[1]);
|
|
3514
|
-
const nz = random.between(BOX_Z[0], BOX_Z[1]) + this.centerZ;
|
|
3515
|
-
this.set(o, nx, ny, nz);
|
|
3520
|
+
this.restart(o);
|
|
3516
3521
|
}
|
|
3517
3522
|
}
|
|
3518
3523
|
}
|
|
@@ -3520,6 +3525,13 @@ var GameDestructionThree = (() => {
|
|
|
3520
3525
|
clear() {
|
|
3521
3526
|
this.on = false;
|
|
3522
3527
|
}
|
|
3528
|
+
restart(offset) {
|
|
3529
|
+
const { random } = this.engine;
|
|
3530
|
+
const nx = random.between(BOX_X[0], BOX_X[1]) + this.centerX;
|
|
3531
|
+
const ny = random.between(REENTRY_HEIGHT[0], REENTRY_HEIGHT[1]);
|
|
3532
|
+
const nz = random.between(BOX_Z[0], BOX_Z[1]) + this.centerZ;
|
|
3533
|
+
this.set(offset, nx, ny, nz);
|
|
3534
|
+
}
|
|
3523
3535
|
set(offset, x, y, z) {
|
|
3524
3536
|
const positions = this.positions;
|
|
3525
3537
|
positions[offset] = x;
|
|
@@ -4312,8 +4324,11 @@ var GameDestructionThree = (() => {
|
|
|
4312
4324
|
aliasOf(ENGINE_SMOKE, "vehicle_fire", { params: { id: "condition", options: ["100", "60", "30", "10"], default: 3 }, loop: 12 }),
|
|
4313
4325
|
/** The exhaust of a car under way: `engine_smoke` in the best condition, for half a second so a moving car asks again. */
|
|
4314
4326
|
aliasOf(ENGINE_SMOKE, "vehicle_exhaust", { params: { id: "condition", options: ["100", "60", "30", "10"], default: 0 }, loop: 0.5 }),
|
|
4315
|
-
/**
|
|
4316
|
-
|
|
4327
|
+
/**
|
|
4328
|
+
* A hole in a tank: the page's drips, falling from the point it is played at (the hole). No pool of its own: the pool is the liquid that came out, laid by the
|
|
4329
|
+
* host's fluid world as it leaks (it grows with the volume and spreads by the liquid's own kind), not a drawing of a size the page chose.
|
|
4330
|
+
*/
|
|
4331
|
+
aliasOf(FUEL_LEAK_ONLY, "vehicle_leak", { anchor: TANK, timeline: [] }),
|
|
4317
4332
|
/** The leak caught fire (an incendiary or tracer round, a spark, a fire near): the page's whole sequence, the fire running along the pool to the tank and the blast. */
|
|
4318
4333
|
aliasOf(FUEL_LEAK, "vehicle_leak_ignited", {})
|
|
4319
4334
|
];
|
|
@@ -24532,6 +24547,7 @@ vec3 c=mix(uDeep,uFoam,dome>.5?.8:.65+.35*vY);float alpha=body*vA;if(alpha<.004)
|
|
|
24532
24547
|
if (mat.ductility >= 0.5 && p.thickness <= THIN_SHEET_DISHING) addDent(o, p, entry, n, Math.max(caliber * 3 / 1e3, 0.012), clamp23(E * 2e-5, 1e-3, 0.03), src);
|
|
24533
24548
|
if (brittle && mat.fracture === "shatter") addCrack(o, p, entry, n, crackLen, src);
|
|
24534
24549
|
if (p.spec.contains && (p.st.liters ?? 0) > 1e-4) {
|
|
24550
|
+
o.active = true;
|
|
24535
24551
|
emit2({
|
|
24536
24552
|
...base(o, src),
|
|
24537
24553
|
type: "leak",
|