@adatechnology/game-weapons-three 0.24.1 → 0.24.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 +220 -39
- package/dist/index.global.js.map +1 -1
- package/package.json +11 -11
package/dist/index.global.js
CHANGED
|
@@ -28322,6 +28322,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
28322
28322
|
if (mat.ductility >= 0.5 && p.thickness <= THIN_SHEET_DISHING) addDent(o, p, entry2, n, Math.max(caliber * 3 / 1e3, 0.012), clamp2(E * 2e-5, 1e-3, 0.03), src);
|
|
28323
28323
|
if (brittle && mat.fracture === "shatter") addCrack(o, p, entry2, n, crackLen, src);
|
|
28324
28324
|
if (p.spec.contains && (p.st.liters ?? 0) > 1e-4) {
|
|
28325
|
+
o.active = true;
|
|
28325
28326
|
emit2({
|
|
28326
28327
|
...base(o, src),
|
|
28327
28328
|
type: "leak",
|
|
@@ -38854,7 +38855,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
38854
38855
|
kind: "material",
|
|
38855
38856
|
size: [
|
|
38856
38857
|
0.13,
|
|
38857
|
-
0.
|
|
38858
|
+
0.0335,
|
|
38858
38859
|
0.05
|
|
38859
38860
|
],
|
|
38860
38861
|
weight: 0.5,
|
|
@@ -54846,7 +54847,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
54846
54847
|
}
|
|
54847
54848
|
var residentialTower = residentialTowerTemplate();
|
|
54848
54849
|
|
|
54849
|
-
// ../game-floorplan-three/dist/chunk-
|
|
54850
|
+
// ../game-floorplan-three/dist/chunk-ZVCG4IGR.js
|
|
54850
54851
|
var __defProp4 = Object.defineProperty;
|
|
54851
54852
|
var __defNormalProp2 = (obj, key2, value) => key2 in obj ? __defProp4(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
|
54852
54853
|
var __publicField2 = (obj, key2, value) => __defNormalProp2(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
|
|
@@ -63581,11 +63582,13 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63581
63582
|
}
|
|
63582
63583
|
return seats;
|
|
63583
63584
|
}
|
|
63585
|
+
var MAX_INTERIOR = 32;
|
|
63586
|
+
var INTERIOR_INSET = 0.01;
|
|
63584
63587
|
var newGroup = (k, house, exterior) => ({ k, house, ls: [], exterior, pos: [0, 0, 0], color: 0, n: 0, range: 0, rects: [], y: [0, 0], exclusion: null, lumens: 0, dist: 0, decay: 0, floor: 0, roomId: null, dm: 0, d: 0 });
|
|
63585
63588
|
function installLightsRoomLight(K, shared3) {
|
|
63586
63589
|
const { THREE, rectsOf: rectsOf2, cfg } = K;
|
|
63587
63590
|
const MAX_LIGHTS = 12, EMPTY = [1e9, 1e9, -1e9, -1e9];
|
|
63588
|
-
const LZU = { uRB0: { value: new Float32Array(MAX_LIGHTS * 4) }, uRB1: { value: new Float32Array(MAX_LIGHTS * 4) }, uRB2: { value: new Float32Array(MAX_LIGHTS * 4) }, uRBY: { value: new Float32Array(MAX_LIGHTS * 2) }, uREx: { value: new Float32Array(MAX_LIGHTS * 4) }, uIndK: { value: 0.06 } };
|
|
63591
|
+
const LZU = { uRB0: { value: new Float32Array(MAX_LIGHTS * 4) }, uRB1: { value: new Float32Array(MAX_LIGHTS * 4) }, uRB2: { value: new Float32Array(MAX_LIGHTS * 4) }, uRBY: { value: new Float32Array(MAX_LIGHTS * 2) }, uREx: { value: new Float32Array(MAX_LIGHTS * 4) }, uROut: { value: new Float32Array(MAX_LIGHTS) }, uRIn: { value: new Float32Array(MAX_INTERIOR * 4) }, uRInY: { value: new Float32Array(MAX_INTERIOR * 2) }, uRInN: { value: 0 }, uIndK: { value: 0.06 } };
|
|
63589
63592
|
for (let i = 0; i < MAX_LIGHTS; i++) for (const k of ["uRB0", "uRB1", "uRB2", "uREx"]) LZU[k].value.set(EMPTY, i * 4);
|
|
63590
63593
|
function roomLightMask(material) {
|
|
63591
63594
|
const m = material;
|
|
@@ -63598,23 +63601,31 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63598
63601
|
if (!sh || !sh.fragmentShader) return;
|
|
63599
63602
|
if (sh.uniforms) Object.assign(sh.uniforms, LZU);
|
|
63600
63603
|
if (sh.vertexShader) sh.vertexShader = sh.vertexShader.replace("void main() {", "varying vec3 vRoomW;\nvoid main() {").replace("#include <begin_vertex>", "#include <begin_vertex>\n vRoomW = ( modelMatrix * vec4( transformed, 1.0 ) ).xyz;");
|
|
63604
|
+
const lightsBegin = THREE.ShaderChunk?.lights_fragment_begin;
|
|
63605
|
+
if (lightsBegin) sh.fragmentShader = sh.fragmentShader.replace("#include <lights_fragment_begin>", lightsBegin);
|
|
63601
63606
|
sh.fragmentShader = sh.fragmentShader.replace("void main() {", `varying vec3 vRoomW;
|
|
63602
63607
|
#if NUM_POINT_LIGHTS > 0
|
|
63603
|
-
uniform vec4 uRB0[ NUM_POINT_LIGHTS ]; uniform vec4 uRB1[ NUM_POINT_LIGHTS ]; uniform vec4 uRB2[ NUM_POINT_LIGHTS ]; uniform vec2 uRBY[ NUM_POINT_LIGHTS ]; uniform vec4 uREx[ NUM_POINT_LIGHTS ];
|
|
63608
|
+
uniform vec4 uRB0[ NUM_POINT_LIGHTS ]; uniform vec4 uRB1[ NUM_POINT_LIGHTS ]; uniform vec4 uRB2[ NUM_POINT_LIGHTS ]; uniform vec2 uRBY[ NUM_POINT_LIGHTS ]; uniform vec4 uREx[ NUM_POINT_LIGHTS ]; uniform float uROut[ NUM_POINT_LIGHTS ];
|
|
63604
63609
|
#endif
|
|
63610
|
+
uniform vec4 uRIn[ ${MAX_INTERIOR} ]; uniform vec2 uRInY[ ${MAX_INTERIOR} ]; uniform int uRInN;
|
|
63605
63611
|
uniform float uIndK;
|
|
63606
63612
|
bool inRoomR( vec4 r, vec3 p ) { return p.x >= r.x && p.x <= r.z && p.z >= r.y && p.z <= r.w; }
|
|
63607
|
-
|
|
63608
|
-
|
|
63613
|
+
bool roomInside( vec3 p ) {
|
|
63614
|
+
for ( int j = 0; j < ${MAX_INTERIOR}; j ++ ) { if ( j >= uRInN ) break; if ( inRoomR( uRIn[ j ], p ) && p.y >= uRInY[ j ].x && p.y <= uRInY[ j ].y ) return true; }
|
|
63615
|
+
return false;
|
|
63616
|
+
}
|
|
63617
|
+
float roomMask( vec4 a, vec4 b, vec4 c, vec2 yy, vec4 ex, float outdoor, bool inside ) {
|
|
63618
|
+
vec3 p = vRoomW; if ( outdoor > 0.5 && outdoor < 1.5 && !inside ) return 1.0; float k = ( inRoomR( a, p ) || inRoomR( b, p ) || inRoomR( c, p ) ) ? 1.0 : 0.0;
|
|
63609
63619
|
k *= ( p.y >= yy.x && p.y <= yy.y ) ? 1.0 : 0.0; if ( inRoomR( ex, p ) ) k = 0.0; return k;
|
|
63610
63620
|
}
|
|
63611
|
-
void main() {
|
|
63612
|
-
|
|
63621
|
+
void main() {
|
|
63622
|
+
bool rInside = roomInside( vRoomW ); float rmk = 1.0;`).replace("getPointLightInfo( pointLight, geometryPosition, directLight );", `getPointLightInfo( pointLight, geometryPosition, directLight );
|
|
63623
|
+
rmk = roomMask( uRB0[ i ], uRB1[ i ], uRB2[ i ], uRBY[ i ], uREx[ i ], uROut[ i ], rInside );
|
|
63613
63624
|
directLight.color *= rmk;
|
|
63614
|
-
reflectedLight.indirectDiffuse += BRDF_Lambert( material.diffuseColor ) * pointLight.color * ( rmk * uIndK * ( 1.0 - smoothstep( 0.0, max( pointLight.distance, 0.1 ), length( pointLight.position - geometryPosition ) ) ) );`);
|
|
63625
|
+
reflectedLight.indirectDiffuse += BRDF_Lambert( material.diffuseColor ) * pointLight.color * ( rmk * step( uROut[ i ], 0.5 ) * uIndK * ( 1.0 - smoothstep( 0.0, max( pointLight.distance, 0.1 ), length( pointLight.position - geometryPosition ) ) ) );`);
|
|
63615
63626
|
};
|
|
63616
63627
|
m.customProgramCacheKey = function() {
|
|
63617
|
-
return (pk ? pk.call(this) : "") + "|
|
|
63628
|
+
return (pk ? pk.call(this) : "") + "|rm3";
|
|
63618
63629
|
};
|
|
63619
63630
|
m.needsUpdate = true;
|
|
63620
63631
|
return material;
|
|
@@ -63626,7 +63637,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63626
63637
|
for (const k of Object.keys(mats)) roomLightMask(mats[k]);
|
|
63627
63638
|
const budget = o.budget, lease = budget ? budget.lease({ owner: "floorplan.rooms", point: N, shadows: NS }) : null;
|
|
63628
63639
|
if (budget && !lease) throw new Error("lighting: the LightBudget has no " + N + " free point slots (" + NS + " with shadow) for the rooms");
|
|
63629
|
-
if (budget) for (const [key2, width] of [["uRB0", 4], ["uRB1", 4], ["uRB2", 4], ["uRBY", 2], ["uREx", 4]]) {
|
|
63640
|
+
if (budget) for (const [key2, width] of [["uRB0", 4], ["uRB1", 4], ["uRB2", 4], ["uRBY", 2], ["uREx", 4], ["uROut", 1]]) {
|
|
63630
63641
|
const next = new Float32Array(budget.sizes.point * width);
|
|
63631
63642
|
if (width === 4) for (let i = 0; i < budget.sizes.point; i++) next.set(EMPTY, i * 4);
|
|
63632
63643
|
LZU[key2].value = next;
|
|
@@ -63783,7 +63794,9 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63783
63794
|
A.stats.external = Ne;
|
|
63784
63795
|
let shadows = 0;
|
|
63785
63796
|
for (let i = 0; i < N; i++) {
|
|
63786
|
-
const g = asg[i], at4 = slotOf(i)
|
|
63797
|
+
const g = asg[i], at4 = slotOf(i);
|
|
63798
|
+
LZU.uROut.value[at4] = 0;
|
|
63799
|
+
const b0 = LZU.uRB0.value, b1 = LZU.uRB1.value, b2 = LZU.uRB2.value, by = LZU.uRBY.value, ex = LZU.uREx.value;
|
|
63787
63800
|
A.crates[i] = g ? { k: g.k, rects: g.rects, y: g.y, exterior: !!g.exterior, exclusion: g.exclusion || null, d: g.d } : null;
|
|
63788
63801
|
if (!g) {
|
|
63789
63802
|
put(i, { intensity: 0 });
|
|
@@ -63812,7 +63825,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63812
63825
|
if (!lease) PL[i].shadow.camera.far = Math.max(4, lamp.distance);
|
|
63813
63826
|
}
|
|
63814
63827
|
}
|
|
63815
|
-
if (effects) effects.update(houses);
|
|
63828
|
+
if (effects) effects.update(houses, _f);
|
|
63816
63829
|
A.stats.shadows = shadows;
|
|
63817
63830
|
return A.stats;
|
|
63818
63831
|
};
|
|
@@ -63829,7 +63842,13 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63829
63842
|
return A;
|
|
63830
63843
|
}
|
|
63831
63844
|
const effectsByBudget = /* @__PURE__ */ new WeakMap();
|
|
63832
|
-
const OPENING_REACH = 2.5, OPENING_SIDE = 0.6;
|
|
63845
|
+
const OPENING_REACH = 2.5, OPENING_SIDE = 0.6, OUTDOOR_REACH = 30;
|
|
63846
|
+
const EFFECT_OUTDOORS = 1, EFFECT_INDOORS = 2;
|
|
63847
|
+
const boxesByHouse = /* @__PURE__ */ new WeakMap();
|
|
63848
|
+
const sameBoxMatrix = (a, b) => {
|
|
63849
|
+
for (let i = 0; i < 16; i++) if (a[i] !== b[i]) return false;
|
|
63850
|
+
return true;
|
|
63851
|
+
};
|
|
63833
63852
|
function effectLights(options) {
|
|
63834
63853
|
const o = options || {};
|
|
63835
63854
|
const budget = o.budget;
|
|
@@ -63837,7 +63856,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63837
63856
|
const known = effectsByBudget.get(budget);
|
|
63838
63857
|
if (known && !o.ours) return known;
|
|
63839
63858
|
const ours = new Set(o.ours || []), size = budget.sizes.point, _p = new THREE.Vector3(), P0 = new THREE.Vector3();
|
|
63840
|
-
for (const [key2, width] of [["uRB0", 4], ["uRB1", 4], ["uRB2", 4], ["uRBY", 2], ["uREx", 4]]) {
|
|
63859
|
+
for (const [key2, width] of [["uRB0", 4], ["uRB1", 4], ["uRB2", 4], ["uRBY", 2], ["uREx", 4], ["uROut", 1]]) {
|
|
63841
63860
|
const had = LZU[key2].value;
|
|
63842
63861
|
if (had.length >= size * width) continue;
|
|
63843
63862
|
const next = new Float32Array(size * width);
|
|
@@ -63845,11 +63864,16 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63845
63864
|
next.set(had);
|
|
63846
63865
|
LZU[key2].value = next;
|
|
63847
63866
|
}
|
|
63867
|
+
const maskHouseMaterials = () => {
|
|
63868
|
+
const mats = shared3.mats;
|
|
63869
|
+
for (const k in mats) roomLightMask(mats[k]);
|
|
63870
|
+
};
|
|
63871
|
+
maskHouseMaterials();
|
|
63848
63872
|
const roomBoxes = (house, M) => {
|
|
63849
63873
|
const list2 = [];
|
|
63850
63874
|
for (const c of house.r.rooms) {
|
|
63851
63875
|
if (c.type === "void") continue;
|
|
63852
|
-
const rs = [];
|
|
63876
|
+
const rs = [], inner = [];
|
|
63853
63877
|
for (const [a, b, c2, d] of rectsOf2(c)) {
|
|
63854
63878
|
let x0 = 1e9, z0 = 1e9, x1 = -1e9, z1 = -1e9;
|
|
63855
63879
|
for (const [u, v] of [[a, b], [c2, b], [a, d], [c2, d]]) {
|
|
@@ -63860,9 +63884,11 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63860
63884
|
z1 = Math.max(z1, _p.z);
|
|
63861
63885
|
}
|
|
63862
63886
|
rs.push([x0 - 0.08, z0 - 0.08, x1 + 0.08, z1 + 0.08]);
|
|
63887
|
+
inner.push([x0 + INTERIOR_INSET, z0 + INTERIOR_INSET, x1 - INTERIOR_INSET, z1 - INTERIOR_INSET]);
|
|
63863
63888
|
}
|
|
63864
63889
|
_p.set(0, house.y0(c.floor), 0).applyMatrix4(M);
|
|
63865
|
-
|
|
63890
|
+
const ceiling = c.ceiling || 2.8;
|
|
63891
|
+
list2.push({ c, rs, y: [_p.y - 0.06, _p.y + ceiling + 0.3], inner, innerY: [_p.y - 0.06, _p.y + ceiling + 0.05] });
|
|
63866
63892
|
}
|
|
63867
63893
|
return list2;
|
|
63868
63894
|
};
|
|
@@ -63884,9 +63910,28 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63884
63910
|
reach2(house.r.doors, true);
|
|
63885
63911
|
reach2(house.r.windows, false);
|
|
63886
63912
|
};
|
|
63913
|
+
const openingsFacing = (house, M, boxes, into, reach2) => {
|
|
63914
|
+
const open = house.internal && house.internal.doorState || /* @__PURE__ */ new Map();
|
|
63915
|
+
const through = (list2, isDoor) => {
|
|
63916
|
+
for (const p of list2 || []) {
|
|
63917
|
+
if (isDoor && !(open.has(p.id) ? open.get(p.id) : !!p.open)) continue;
|
|
63918
|
+
const alongU = p.axis === "u", y = house.y0(p.floor) + (isDoor ? 1 : ((p.y0 != null ? p.y0 : 0.9) + (p.y1 != null ? p.y1 : 2)) / 2);
|
|
63919
|
+
const at4 = (side) => _p.set(alongU ? p.at : p.pos + side, y, alongU ? p.pos + side : p.at).applyMatrix4(M).clone();
|
|
63920
|
+
const centre = at4(0);
|
|
63921
|
+
if (centre.distanceTo(P0) > reach2) continue;
|
|
63922
|
+
const low = at4(-OPENING_SIDE), high = at4(OPENING_SIDE), lowRoom = boxAt(boxes, low.x, low.y, low.z), highRoom = boxAt(boxes, high.x, high.y, high.z);
|
|
63923
|
+
if (!lowRoom === !highRoom) continue;
|
|
63924
|
+
const room = lowRoom || highRoom, outside = lowRoom ? high : low;
|
|
63925
|
+
if ((P0.x - centre.x) * (outside.x - centre.x) + (P0.z - centre.z) * (outside.z - centre.z) > 0) into.set(room.c, room);
|
|
63926
|
+
}
|
|
63927
|
+
};
|
|
63928
|
+
through(house.r.doors, true);
|
|
63929
|
+
through(house.r.windows, false);
|
|
63930
|
+
};
|
|
63887
63931
|
const clear = (at4) => {
|
|
63888
63932
|
for (const key2 of ["uRB0", "uRB1", "uRB2", "uREx"]) LZU[key2].value.set(EMPTY, at4 * 4);
|
|
63889
63933
|
LZU.uRBY.value.set([0, 0], at4 * 2);
|
|
63934
|
+
LZU.uROut.value[at4] = 0;
|
|
63890
63935
|
};
|
|
63891
63936
|
const write = (at4, into) => {
|
|
63892
63937
|
const rs = [];
|
|
@@ -63903,13 +63948,55 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63903
63948
|
LZU.uRB0.value.set(rs[0] || EMPTY, at4 * 4);
|
|
63904
63949
|
LZU.uRB1.value.set(rs[1] || EMPTY, at4 * 4);
|
|
63905
63950
|
LZU.uRB2.value.set(rs[2] || EMPTY, at4 * 4);
|
|
63906
|
-
LZU.uRBY.value.set([lo, hi], at4 * 2);
|
|
63951
|
+
LZU.uRBY.value.set(rs.length ? [lo, hi] : [0, 0], at4 * 2);
|
|
63907
63952
|
LZU.uREx.value.set(EMPTY, at4 * 4);
|
|
63908
63953
|
};
|
|
63954
|
+
const nearHouses = [];
|
|
63955
|
+
const writeInteriors = (focus) => {
|
|
63956
|
+
if (focus) for (const h of nearHouses) {
|
|
63957
|
+
const b = h.entry.bounds;
|
|
63958
|
+
h.d = Math.hypot(Math.max(b[0] - focus.x, 0, focus.x - b[2]), Math.max(b[1] - focus.z, 0, focus.z - b[3]));
|
|
63959
|
+
}
|
|
63960
|
+
if (focus) nearHouses.sort((a, b) => a.d - b.d);
|
|
63961
|
+
const rects = LZU.uRIn.value, ys = LZU.uRInY.value;
|
|
63962
|
+
let n = 0;
|
|
63963
|
+
for (const { entry: entry2 } of nearHouses) for (const q of entry2.boxes) for (const r of q.inner) {
|
|
63964
|
+
if (n >= MAX_INTERIOR) break;
|
|
63965
|
+
rects.set(r, n * 4);
|
|
63966
|
+
ys.set(q.innerY, n * 2);
|
|
63967
|
+
n++;
|
|
63968
|
+
}
|
|
63969
|
+
LZU.uRInN.value = n;
|
|
63970
|
+
};
|
|
63909
63971
|
const A = {
|
|
63910
63972
|
/** Once per frame, after the budget's `present`: points the mask of every lit slot that is not the house's at the rooms its light reaches. */
|
|
63911
|
-
update(houses) {
|
|
63912
|
-
|
|
63973
|
+
update(houses, focus) {
|
|
63974
|
+
maskHouseMaterials();
|
|
63975
|
+
const indoors = cfg.effectLightsIndoors !== false, list2 = (Array.isArray(houses) ? houses : [houses]).filter((h) => !!h);
|
|
63976
|
+
const entries2 = list2.map((house) => {
|
|
63977
|
+
if (house.group && !house.group.visible) return void 0;
|
|
63978
|
+
let entry2 = boxesByHouse.get(house);
|
|
63979
|
+
if (!entry2 || !sameBoxMatrix(entry2.matrix, house.house.matrixWorld.elements)) {
|
|
63980
|
+
house.house.updateMatrixWorld(true);
|
|
63981
|
+
const M = house.house.matrixWorld, boxes = roomBoxes(house, M);
|
|
63982
|
+
let x0 = 1e9, z0 = 1e9, x1 = -1e9, z1 = -1e9, y0 = 1e9, y1 = -1e9;
|
|
63983
|
+
for (const q of boxes) {
|
|
63984
|
+
for (const r of q.rs) {
|
|
63985
|
+
x0 = Math.min(x0, r[0]);
|
|
63986
|
+
z0 = Math.min(z0, r[1]);
|
|
63987
|
+
x1 = Math.max(x1, r[2]);
|
|
63988
|
+
z1 = Math.max(z1, r[3]);
|
|
63989
|
+
}
|
|
63990
|
+
y0 = Math.min(y0, q.y[0]);
|
|
63991
|
+
y1 = Math.max(y1, q.y[1]);
|
|
63992
|
+
}
|
|
63993
|
+
entry2 = { matrix: Float64Array.from(M.elements), boxes, bounds: [x0, z0, x1, z1, y0, y1] };
|
|
63994
|
+
boxesByHouse.set(house, entry2);
|
|
63995
|
+
}
|
|
63996
|
+
return entry2;
|
|
63997
|
+
});
|
|
63998
|
+
const reach2 = OPENING_REACH + OPENING_SIDE;
|
|
63999
|
+
nearHouses.length = 0;
|
|
63913
64000
|
for (let at4 = 0; at4 < size; at4++) {
|
|
63914
64001
|
if (ours.has(at4)) continue;
|
|
63915
64002
|
const light = budget.group.children[at4];
|
|
@@ -63917,21 +64004,36 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
63917
64004
|
clear(at4);
|
|
63918
64005
|
continue;
|
|
63919
64006
|
}
|
|
63920
|
-
const into = /* @__PURE__ */ new Map();
|
|
63921
64007
|
P0.set(light.position.x, light.position.y, light.position.z);
|
|
63922
|
-
|
|
63923
|
-
|
|
63924
|
-
|
|
63925
|
-
|
|
63926
|
-
|
|
63927
|
-
|
|
63928
|
-
|
|
64008
|
+
let into, isIndoor = false;
|
|
64009
|
+
for (let i = 0; i < list2.length; i++) {
|
|
64010
|
+
const entry2 = entries2[i];
|
|
64011
|
+
if (entry2 && boxAt(entry2.boxes, P0.x, P0.y, P0.z)) {
|
|
64012
|
+
isIndoor = true;
|
|
64013
|
+
break;
|
|
64014
|
+
}
|
|
64015
|
+
}
|
|
64016
|
+
const lightReach = isIndoor ? reach2 : light.distance > 0 ? Math.min(light.distance, OUTDOOR_REACH) : OUTDOOR_REACH;
|
|
64017
|
+
for (let i = 0; i < list2.length; i++) {
|
|
64018
|
+
const entry2 = entries2[i], house = list2[i];
|
|
64019
|
+
if (!entry2) continue;
|
|
64020
|
+
const b = entry2.bounds;
|
|
64021
|
+
if (P0.x < b[0] - lightReach || P0.x > b[2] + lightReach || P0.z < b[1] - lightReach || P0.z > b[3] + lightReach || P0.y < b[4] - lightReach || P0.y > b[5] + lightReach) continue;
|
|
64022
|
+
into = into || /* @__PURE__ */ new Map();
|
|
64023
|
+
if (!isIndoor) {
|
|
64024
|
+
if (!nearHouses.some((h) => h.entry === entry2)) nearHouses.push({ entry: entry2, d: 0 });
|
|
64025
|
+
openingsFacing(house, house.house.matrixWorld, entry2.boxes, into, lightReach);
|
|
64026
|
+
continue;
|
|
64027
|
+
}
|
|
64028
|
+
const here = boxAt(entry2.boxes, P0.x, P0.y, P0.z);
|
|
63929
64029
|
if (here) into.set(here.c, here);
|
|
63930
|
-
openingSides(house,
|
|
64030
|
+
openingSides(house, house.house.matrixWorld, entry2.boxes, into);
|
|
63931
64031
|
}
|
|
63932
|
-
if (into.size) write(at4, into);
|
|
64032
|
+
if (into && into.size) write(at4, into);
|
|
63933
64033
|
else clear(at4);
|
|
64034
|
+
LZU.uROut.value[at4] = isIndoor ? EFFECT_INDOORS : EFFECT_OUTDOORS;
|
|
63934
64035
|
}
|
|
64036
|
+
writeInteriors(focus);
|
|
63935
64037
|
}
|
|
63936
64038
|
};
|
|
63937
64039
|
if (!o.ours) effectsByBudget.set(budget, A);
|
|
@@ -81700,6 +81802,28 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
81700
81802
|
"corrosive"
|
|
81701
81803
|
]
|
|
81702
81804
|
},
|
|
81805
|
+
{
|
|
81806
|
+
id: "sewage",
|
|
81807
|
+
color: 5921582,
|
|
81808
|
+
opacity: 0.92,
|
|
81809
|
+
stainColor: 3093273,
|
|
81810
|
+
viscosity: 4,
|
|
81811
|
+
density: 1010,
|
|
81812
|
+
dryTime: 1800,
|
|
81813
|
+
gloss: 0.8,
|
|
81814
|
+
leavesMark: true,
|
|
81815
|
+
drink: {
|
|
81816
|
+
thirst: 0,
|
|
81817
|
+
effects: [
|
|
81818
|
+
"disgust",
|
|
81819
|
+
"poison"
|
|
81820
|
+
]
|
|
81821
|
+
},
|
|
81822
|
+
tags: [
|
|
81823
|
+
"organic",
|
|
81824
|
+
"waste"
|
|
81825
|
+
]
|
|
81826
|
+
},
|
|
81703
81827
|
{
|
|
81704
81828
|
id: "honey",
|
|
81705
81829
|
color: 14193162,
|
|
@@ -81731,6 +81855,46 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
81731
81855
|
tags: [
|
|
81732
81856
|
"dirty"
|
|
81733
81857
|
]
|
|
81858
|
+
},
|
|
81859
|
+
{
|
|
81860
|
+
id: "coolant",
|
|
81861
|
+
color: 3455050,
|
|
81862
|
+
opacity: 0.7,
|
|
81863
|
+
stainColor: 2783796,
|
|
81864
|
+
viscosity: 4,
|
|
81865
|
+
density: 1070,
|
|
81866
|
+
dryTime: 1200,
|
|
81867
|
+
gloss: 0.85,
|
|
81868
|
+
leavesMark: true,
|
|
81869
|
+
drink: {
|
|
81870
|
+
thirst: 0,
|
|
81871
|
+
effects: [
|
|
81872
|
+
"poison"
|
|
81873
|
+
]
|
|
81874
|
+
},
|
|
81875
|
+
tags: [
|
|
81876
|
+
"coolant"
|
|
81877
|
+
]
|
|
81878
|
+
},
|
|
81879
|
+
{
|
|
81880
|
+
id: "brake_fluid",
|
|
81881
|
+
color: 13145646,
|
|
81882
|
+
opacity: 0.8,
|
|
81883
|
+
stainColor: 9069600,
|
|
81884
|
+
viscosity: 8,
|
|
81885
|
+
density: 1050,
|
|
81886
|
+
dryTime: 3600,
|
|
81887
|
+
gloss: 0.9,
|
|
81888
|
+
leavesMark: true,
|
|
81889
|
+
drink: {
|
|
81890
|
+
thirst: 0,
|
|
81891
|
+
effects: [
|
|
81892
|
+
"poison"
|
|
81893
|
+
]
|
|
81894
|
+
},
|
|
81895
|
+
tags: [
|
|
81896
|
+
"brake_fluid"
|
|
81897
|
+
]
|
|
81734
81898
|
}
|
|
81735
81899
|
];
|
|
81736
81900
|
var LIQUIDS = liquids_default;
|
|
@@ -81922,7 +82086,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
81922
82086
|
rules: { dropCapacity: 400, curbCatch: false, guardBehindWall: false, clipRoadEnd: false, dripStyle: "workshop" }
|
|
81923
82087
|
});
|
|
81924
82088
|
|
|
81925
|
-
// ../game-items-three/dist/chunk-
|
|
82089
|
+
// ../game-items-three/dist/chunk-S4UUQQOL.js
|
|
81926
82090
|
var destruction_default = {
|
|
81927
82091
|
families: {
|
|
81928
82092
|
drink_can: {
|
|
@@ -83898,7 +84062,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
83898
84062
|
teamId: "pregos",
|
|
83899
84063
|
teamBox: [
|
|
83900
84064
|
1.3,
|
|
83901
|
-
0.
|
|
84065
|
+
0.335,
|
|
83902
84066
|
0.5
|
|
83903
84067
|
],
|
|
83904
84068
|
scale: 0.1
|
|
@@ -86542,7 +86706,9 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
86542
86706
|
mesh3(cyl(0.035, 0.035, 1.1, 6), steel, [direction * 0.06, y, z], [0, 0, R]),
|
|
86543
86707
|
mesh3(new T2.ConeGeometry(0.035, 0.16, 6), steel, [-direction * 0.57, y, z], [0, 0, direction * R])
|
|
86544
86708
|
];
|
|
86545
|
-
|
|
86709
|
+
const LOW = -0.0675;
|
|
86710
|
+
const HIGH = LOW + 0.135;
|
|
86711
|
+
return G(...nail(LOW, -0.15, 1), ...nail(LOW, 0.15, -1), ...nail(HIGH, -0.15, -1), ...nail(HIGH, 0.15, 1));
|
|
86546
86712
|
};
|
|
86547
86713
|
var raffiaSack = ({ mesh: mesh3, bx, G, cloth: cloth2 }) => {
|
|
86548
86714
|
return G(
|
|
@@ -93097,6 +93263,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
93097
93263
|
__publicField3(this, "centerZ", 0);
|
|
93098
93264
|
__publicField3(this, "puddles", WORKSHOP_PUDDLES);
|
|
93099
93265
|
__publicField3(this, "puddleAt");
|
|
93266
|
+
__publicField3(this, "coverTopAt");
|
|
93100
93267
|
}
|
|
93101
93268
|
/** `initRain` (W321): `count` streaks (thinned by the quality), each drawn at a random place in the box. */
|
|
93102
93269
|
init(count, wind) {
|
|
@@ -93142,6 +93309,13 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
93142
93309
|
positions2[o + 3] += slant;
|
|
93143
93310
|
positions2[o + 1] -= fall;
|
|
93144
93311
|
positions2[o + 4] -= fall;
|
|
93312
|
+
if (this.coverTopAt) {
|
|
93313
|
+
const top = this.coverTopAt(positions2[o], positions2[o + 2]);
|
|
93314
|
+
if (top !== void 0 && positions2[o + 4] < top) {
|
|
93315
|
+
this.restart(o);
|
|
93316
|
+
continue;
|
|
93317
|
+
}
|
|
93318
|
+
}
|
|
93145
93319
|
const ground = context.groundAt(positions2[o], positions2[o + 2]);
|
|
93146
93320
|
if (positions2[o + 4] < ground) {
|
|
93147
93321
|
const x = positions2[o];
|
|
@@ -93157,10 +93331,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
93157
93331
|
}
|
|
93158
93332
|
}
|
|
93159
93333
|
}
|
|
93160
|
-
|
|
93161
|
-
const ny = random.between(REENTRY_HEIGHT[0], REENTRY_HEIGHT[1]);
|
|
93162
|
-
const nz = random.between(BOX_Z[0], BOX_Z[1]) + this.centerZ;
|
|
93163
|
-
this.set(o, nx, ny, nz);
|
|
93334
|
+
this.restart(o);
|
|
93164
93335
|
}
|
|
93165
93336
|
}
|
|
93166
93337
|
}
|
|
@@ -93168,6 +93339,13 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
93168
93339
|
clear() {
|
|
93169
93340
|
this.on = false;
|
|
93170
93341
|
}
|
|
93342
|
+
restart(offset) {
|
|
93343
|
+
const { random } = this.engine;
|
|
93344
|
+
const nx = random.between(BOX_X[0], BOX_X[1]) + this.centerX;
|
|
93345
|
+
const ny = random.between(REENTRY_HEIGHT[0], REENTRY_HEIGHT[1]);
|
|
93346
|
+
const nz = random.between(BOX_Z[0], BOX_Z[1]) + this.centerZ;
|
|
93347
|
+
this.set(offset, nx, ny, nz);
|
|
93348
|
+
}
|
|
93171
93349
|
set(offset, x, y, z) {
|
|
93172
93350
|
const positions2 = this.positions;
|
|
93173
93351
|
positions2[offset] = x;
|
|
@@ -93960,8 +94138,11 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
93960
94138
|
aliasOf(ENGINE_SMOKE, "vehicle_fire", { params: { id: "condition", options: ["100", "60", "30", "10"], default: 3 }, loop: 12 }),
|
|
93961
94139
|
/** The exhaust of a car under way: `engine_smoke` in the best condition, for half a second so a moving car asks again. */
|
|
93962
94140
|
aliasOf(ENGINE_SMOKE, "vehicle_exhaust", { params: { id: "condition", options: ["100", "60", "30", "10"], default: 0 }, loop: 0.5 }),
|
|
93963
|
-
/**
|
|
93964
|
-
|
|
94141
|
+
/**
|
|
94142
|
+
* 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
|
|
94143
|
+
* 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.
|
|
94144
|
+
*/
|
|
94145
|
+
aliasOf(FUEL_LEAK_ONLY, "vehicle_leak", { anchor: TANK, timeline: [] }),
|
|
93965
94146
|
/** 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. */
|
|
93966
94147
|
aliasOf(FUEL_LEAK, "vehicle_leak_ignited", {})
|
|
93967
94148
|
];
|