@adatechnology/game-weapons 0.15.0 → 0.15.1
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.d.ts +36 -23
- package/dist/index.global.js +20 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -16698,7 +16698,8 @@ var melee_families_default = {
|
|
|
16698
16698
|
seconds: 0.7
|
|
16699
16699
|
}
|
|
16700
16700
|
],
|
|
16701
|
-
reset: 1.2
|
|
16701
|
+
reset: 1.2,
|
|
16702
|
+
contactLength: 0.3
|
|
16702
16703
|
},
|
|
16703
16704
|
{
|
|
16704
16705
|
id: "two_hand_swing",
|
|
@@ -16737,6 +16738,22 @@ var createMeleeBlowCycle = (families = MELEE_FAMILIES) => {
|
|
|
16737
16738
|
}
|
|
16738
16739
|
};
|
|
16739
16740
|
};
|
|
16741
|
+
var MOTION_SWEEPS = {
|
|
16742
|
+
slash: { right: -0.7, up: -0.7 },
|
|
16743
|
+
chop: { right: -0.15, up: -1 },
|
|
16744
|
+
bat_swing: { right: -1, up: 0 },
|
|
16745
|
+
swing: { right: -0.95, up: -0.3 }
|
|
16746
|
+
};
|
|
16747
|
+
var sweepOf = (motion, forward) => {
|
|
16748
|
+
const share = motion ? MOTION_SWEEPS[motion] : void 0;
|
|
16749
|
+
if (!share) return void 0;
|
|
16750
|
+
const right = [-forward[2], 0, forward[0]];
|
|
16751
|
+
const flat = Math.hypot(right[0], right[2]);
|
|
16752
|
+
if (flat < 1e-6) return void 0;
|
|
16753
|
+
const v = [right[0] / flat * share.right, share.up, right[2] / flat * share.right];
|
|
16754
|
+
const length2 = Math.hypot(v[0], v[1], v[2]);
|
|
16755
|
+
return [v[0] / length2, v[1] / length2, v[2] / length2];
|
|
16756
|
+
};
|
|
16740
16757
|
export {
|
|
16741
16758
|
AMMO,
|
|
16742
16759
|
ARCHETYPE_IDS,
|
|
@@ -16748,6 +16765,7 @@ export {
|
|
|
16748
16765
|
ExplosiveBody,
|
|
16749
16766
|
GALLERY_HEAT,
|
|
16750
16767
|
MELEE_FAMILIES,
|
|
16768
|
+
MOTION_SWEEPS,
|
|
16751
16769
|
MUZZLE_SMOKE,
|
|
16752
16770
|
RELOAD_STAGES,
|
|
16753
16771
|
SLING_SWING_DEFAULTS,
|
|
@@ -16785,6 +16803,7 @@ export {
|
|
|
16785
16803
|
roundsToWarningOf,
|
|
16786
16804
|
sampleFuse,
|
|
16787
16805
|
sweepGround,
|
|
16806
|
+
sweepOf,
|
|
16788
16807
|
tripwireSegment,
|
|
16789
16808
|
weaponHandsOf,
|
|
16790
16809
|
weaponMenu
|