@adatechnology/game-items-three 0.11.1 → 0.11.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 +31 -9
- package/dist/index.global.js.map +1 -1
- package/package.json +15 -15
package/dist/index.global.js
CHANGED
|
@@ -16246,6 +16246,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
16246
16246
|
var THIN_SHEET_CRUSH = 5e-4;
|
|
16247
16247
|
var THIN_SHEET_CONTACT = 0.025;
|
|
16248
16248
|
var DMG_PER_J = 0.02;
|
|
16249
|
+
var THROW_SPREAD = 0.6;
|
|
16249
16250
|
var FRAGMENT_RAYS = 256;
|
|
16250
16251
|
var FRAGMENT_MAX_WEIGHT = 8;
|
|
16251
16252
|
var SHELTER_DEFAULTS = { k: 2800, brokenTransmission: 0.5, minPath: 5e-3 };
|
|
@@ -16289,6 +16290,12 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
16289
16290
|
var MASONRY_CRUMBLE_SPEED = 0.6;
|
|
16290
16291
|
var MASONRY_TOPPLE = 0.4;
|
|
16291
16292
|
var MASONRY_TOPPLE_MIN_HEIGHT = 0.5;
|
|
16293
|
+
var SPIN_REACH = 0.1;
|
|
16294
|
+
var bornSpin = (size, chipSpin, rnd) => {
|
|
16295
|
+
const reach2 = Math.hypot(size[0] ?? 0, size[1] ?? 0, size[2] ?? 0) / 2;
|
|
16296
|
+
const scale = reach2 <= SPIN_REACH ? 1 : SPIN_REACH / reach2;
|
|
16297
|
+
return [(rnd() - 0.5) * chipSpin * scale, (rnd() - 0.5) * chipSpin * scale, (rnd() - 0.5) * chipSpin * scale];
|
|
16298
|
+
};
|
|
16292
16299
|
var TILE_CLUMPS = 160;
|
|
16293
16300
|
var TILE_THICKNESS = 0.018;
|
|
16294
16301
|
var PANEL_EDGE_PILLAR = 2;
|
|
@@ -18904,7 +18911,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
18904
18911
|
size: [cell.size[0], cell.size[1], cell.size[2]],
|
|
18905
18912
|
rotation: q,
|
|
18906
18913
|
velocity: [dv[0] * k, dv[1] * k + 0.5 * rnd(), dv[2] * k],
|
|
18907
|
-
angularVelocity:
|
|
18914
|
+
angularVelocity: bornSpin(cell.size, 8, rnd),
|
|
18908
18915
|
mass: mass * faceArea(cell) / total,
|
|
18909
18916
|
...marks.length > 0 ? { marks } : {},
|
|
18910
18917
|
...inner && laid ? { unit: true } : inner ? { inner } : {}
|
|
@@ -18943,7 +18950,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
18943
18950
|
size,
|
|
18944
18951
|
rotation: q,
|
|
18945
18952
|
velocity: [out0[0] * k, out0[1] * k + 0.5 * rnd(), out0[2] * k],
|
|
18946
|
-
angularVelocity:
|
|
18953
|
+
angularVelocity: bornSpin(size, 12, rnd),
|
|
18947
18954
|
mass: layer.mat.density * size[0] * size[1] * size[2]
|
|
18948
18955
|
});
|
|
18949
18956
|
}
|
|
@@ -19269,7 +19276,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
19269
19276
|
size,
|
|
19270
19277
|
rotation: q,
|
|
19271
19278
|
velocity: [vdir[0] * k, vdir[1] * k + 0.5 * rnd(), vdir[2] * k],
|
|
19272
|
-
angularVelocity:
|
|
19279
|
+
angularVelocity: bornSpin(size, 20, rnd),
|
|
19273
19280
|
mass: mass / n,
|
|
19274
19281
|
inner: true
|
|
19275
19282
|
});
|
|
@@ -19616,6 +19623,10 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
19616
19623
|
loosened(o, opened, "break", src);
|
|
19617
19624
|
collapseCheck(o, src);
|
|
19618
19625
|
};
|
|
19626
|
+
const thrownAlong = (out, dir) => {
|
|
19627
|
+
const across2 = vec.madd(out, dir, -vec.dot(out, dir));
|
|
19628
|
+
return vec.normalize(vec.madd(dir, [across2[0], 0, across2[2]], THROW_SPREAD), dir);
|
|
19629
|
+
};
|
|
19619
19630
|
const failPart = (o, p, origin, dir, fragEnergy, cap, src, force) => {
|
|
19620
19631
|
if (isLost(p)) return;
|
|
19621
19632
|
if (p.st.stripped) {
|
|
@@ -19663,7 +19674,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
19663
19674
|
const fragments = plan.map((f, i) => {
|
|
19664
19675
|
const cw = toWorld(c, q, f.center);
|
|
19665
19676
|
const out = vec.normalize(vec.sub(cw, hitW), [0, 1, 0]);
|
|
19666
|
-
const dv = dir ?
|
|
19677
|
+
const dv = dir ? thrownAlong(out, dir) : out;
|
|
19667
19678
|
const k = speed * (0.6 + 0.8 * rnd());
|
|
19668
19679
|
const marks = marksInBox(f.center, f.size, f.q, holes);
|
|
19669
19680
|
return {
|
|
@@ -19675,7 +19686,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
19675
19686
|
size: f.size,
|
|
19676
19687
|
rotation: quat.mul(q, f.q),
|
|
19677
19688
|
velocity: [dv[0] * k, dv[1] * k + 0.5 * rnd(), dv[2] * k],
|
|
19678
|
-
angularVelocity:
|
|
19689
|
+
angularVelocity: bornSpin(f.size, 12, rnd),
|
|
19679
19690
|
mass: mass * f.weight / totW,
|
|
19680
19691
|
...marks.length > 0 ? { marks } : {},
|
|
19681
19692
|
...f.inner ? { inner: true } : {}
|
|
@@ -19814,7 +19825,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
19814
19825
|
rotation: q,
|
|
19815
19826
|
velocity: v,
|
|
19816
19827
|
inner: true,
|
|
19817
|
-
angularVelocity:
|
|
19828
|
+
angularVelocity: bornSpin(size, 30, rnd),
|
|
19818
19829
|
mass
|
|
19819
19830
|
});
|
|
19820
19831
|
}
|
|
@@ -43280,6 +43291,11 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
43280
43291
|
"prompt.glass_door.open": "Close the glass door",
|
|
43281
43292
|
"prompt.glass_door.closed": "Open the glass door",
|
|
43282
43293
|
"prompt.flush": "Flush",
|
|
43294
|
+
"prompt.flush.off": "Flush",
|
|
43295
|
+
"prompt.flush.on": "Flushing",
|
|
43296
|
+
"program.wash": "Wash",
|
|
43297
|
+
"program.dry": "Spin-dry",
|
|
43298
|
+
"use.grill": "Put {item} on the grill",
|
|
43283
43299
|
"prompt.toilet_lid": "Toilet lid",
|
|
43284
43300
|
"prompt.toilet_lid.open": "Close the lid",
|
|
43285
43301
|
"prompt.toilet_lid.closed": "Lift the lid",
|
|
@@ -43523,6 +43539,11 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
43523
43539
|
"prompt.glass_door.open": "Fechar a porta de vidro",
|
|
43524
43540
|
"prompt.glass_door.closed": "Abrir a porta de vidro",
|
|
43525
43541
|
"prompt.flush": "Descarga",
|
|
43542
|
+
"prompt.flush.off": "Dar a descarga",
|
|
43543
|
+
"prompt.flush.on": "Descarga correndo",
|
|
43544
|
+
"program.wash": "Lavar",
|
|
43545
|
+
"program.dry": "Secar",
|
|
43546
|
+
"use.grill": "P\xF4r {item} na grelha",
|
|
43526
43547
|
"prompt.toilet_lid": "Tampa do vaso",
|
|
43527
43548
|
"prompt.toilet_lid.open": "Fechar a tampa",
|
|
43528
43549
|
"prompt.toilet_lid.closed": "Levantar a tampa",
|
|
@@ -44017,7 +44038,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
44017
44038
|
d: 0.38,
|
|
44018
44039
|
h: 0.3,
|
|
44019
44040
|
y: 0.9,
|
|
44020
|
-
solid:
|
|
44041
|
+
solid: true,
|
|
44021
44042
|
massKg: 14,
|
|
44022
44043
|
sounds: {
|
|
44023
44044
|
leaves: {
|
|
@@ -44150,7 +44171,8 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
44150
44171
|
h: 1.3,
|
|
44151
44172
|
y: 0,
|
|
44152
44173
|
solid: true,
|
|
44153
|
-
massKg: 6
|
|
44174
|
+
massKg: 6,
|
|
44175
|
+
fixed: true
|
|
44154
44176
|
},
|
|
44155
44177
|
{
|
|
44156
44178
|
id: "dog_house",
|
|
@@ -46909,7 +46931,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
|
|
|
46909
46931
|
}
|
|
46910
46932
|
var residentialTower = residentialTowerTemplate();
|
|
46911
46933
|
|
|
46912
|
-
// ../game-floorplan-three/dist/chunk-
|
|
46934
|
+
// ../game-floorplan-three/dist/chunk-OGYLJ4F7.js
|
|
46913
46935
|
var __defProp3 = Object.defineProperty;
|
|
46914
46936
|
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp3(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
|
46915
46937
|
var __publicField = (obj, key2, value) => __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
|