@adatechnology/game-weapons-three 0.22.1 → 0.24.0
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 +2 -0
- package/assets/weapon-svg/CREDITS.md +1 -1
- package/assets/weapon-svg/credits.html +1 -1
- package/assets/weapon-svg/generated/aa_12.svg +1 -1
- package/assets/weapon-svg/generated/ak_12.svg +1 -1
- package/assets/weapon-svg/generated/ak_47.svg +1 -1
- package/assets/weapon-svg/generated/ak_74.svg +1 -1
- package/assets/weapon-svg/generated/akm.svg +1 -1
- package/assets/weapon-svg/generated/aks_74u.svg +1 -1
- package/assets/weapon-svg/generated/anti_materiel_50.svg +1 -1
- package/assets/weapon-svg/generated/barrett_m82a1.svg +1 -1
- package/assets/weapon-svg/generated/barrett_mrad.svg +1 -1
- package/assets/weapon-svg/generated/benelli_m4.svg +1 -1
- package/assets/weapon-svg/generated/beretta_92fs.svg +1 -1
- package/assets/weapon-svg/generated/bt_mp9.svg +1 -1
- package/assets/weapon-svg/generated/carbine_22.svg +1 -1
- package/assets/weapon-svg/generated/cbc_122.svg +1 -1
- package/assets/weapon-svg/generated/cbc_7022.svg +1 -1
- package/assets/weapon-svg/generated/cbc_pump_military_3_0.svg +1 -1
- package/assets/weapon-svg/generated/colt_m16a2.svg +1 -1
- package/assets/weapon-svg/generated/colt_m1911.svg +1 -1
- package/assets/weapon-svg/generated/colt_m4a1.svg +1 -1
- package/assets/weapon-svg/generated/cz_75.svg +1 -1
- package/assets/weapon-svg/generated/cz_scorpion_evo_3.svg +1 -1
- package/assets/weapon-svg/generated/desert_eagle_mark_xix.svg +1 -1
- package/assets/weapon-svg/generated/famas.svg +1 -1
- package/assets/weapon-svg/generated/fn_fal.svg +1 -1
- package/assets/weapon-svg/generated/fn_five_seven.svg +1 -1
- package/assets/weapon-svg/generated/fn_m240b.svg +1 -1
- package/assets/weapon-svg/generated/fn_m249.svg +1 -1
- package/assets/weapon-svg/generated/fn_mag.svg +1 -1
- package/assets/weapon-svg/generated/fn_minimi.svg +1 -1
- package/assets/weapon-svg/generated/fn_minimi_para.svg +1 -1
- package/assets/weapon-svg/generated/fn_p90.svg +1 -1
- package/assets/weapon-svg/generated/fn_parafal.svg +1 -1
- package/assets/weapon-svg/generated/fn_scar_h.svg +1 -1
- package/assets/weapon-svg/generated/fn_scar_l.svg +1 -1
- package/assets/weapon-svg/generated/franchi_spas_12.svg +1 -1
- package/assets/weapon-svg/generated/glock_17.svg +1 -1
- package/assets/weapon-svg/generated/glock_18.svg +1 -1
- package/assets/weapon-svg/generated/glock_19.svg +1 -1
- package/assets/weapon-svg/generated/hk416.svg +1 -1
- package/assets/weapon-svg/generated/hk_g36.svg +1 -1
- package/assets/weapon-svg/generated/hk_g36c.svg +1 -1
- package/assets/weapon-svg/generated/hk_g36k.svg +1 -1
- package/assets/weapon-svg/generated/hk_g3a3.svg +1 -1
- package/assets/weapon-svg/generated/hk_mp5a3.svg +1 -1
- package/assets/weapon-svg/generated/hk_mp5k.svg +1 -1
- package/assets/weapon-svg/generated/hk_mp5sd3.svg +1 -1
- package/assets/weapon-svg/generated/hk_mp7a1.svg +1 -1
- package/assets/weapon-svg/generated/hk_psg_1.svg +1 -1
- package/assets/weapon-svg/generated/hk_ump9.svg +1 -1
- package/assets/weapon-svg/generated/hk_ump_45.svg +1 -1
- package/assets/weapon-svg/generated/hk_usp.svg +1 -1
- package/assets/weapon-svg/generated/imbel_ia2.svg +1 -1
- package/assets/weapon-svg/generated/iwi_tavor.svg +1 -1
- package/assets/weapon-svg/generated/kel_tec_ksg.svg +1 -1
- package/assets/weapon-svg/generated/knights_sr_25_mk11.svg +1 -1
- package/assets/weapon-svg/generated/kriss_vector.svg +1 -1
- package/assets/weapon-svg/generated/l85a2.svg +1 -1
- package/assets/weapon-svg/generated/m134.svg +1 -1
- package/assets/weapon-svg/generated/m14_ebr.svg +1 -1
- package/assets/weapon-svg/generated/m1_garand.svg +1 -1
- package/assets/weapon-svg/generated/m32_mgl.svg +1 -1
- package/assets/weapon-svg/generated/m60.svg +1 -1
- package/assets/weapon-svg/generated/m72_law.svg +1 -1
- package/assets/weapon-svg/generated/m79.svg +1 -1
- package/assets/weapon-svg/generated/mac_10.svg +1 -1
- package/assets/weapon-svg/generated/makarov_pm.svg +1 -1
- package/assets/weapon-svg/generated/mg3.svg +1 -1
- package/assets/weapon-svg/generated/mg42.svg +1 -1
- package/assets/weapon-svg/generated/mini_uzi.svg +1 -1
- package/assets/weapon-svg/generated/mosin_nagant_91_30.svg +1 -1
- package/assets/weapon-svg/generated/mossberg_500.svg +1 -1
- package/assets/weapon-svg/generated/mossberg_500_cruiser.svg +1 -1
- package/assets/weapon-svg/generated/mossberg_590.svg +1 -1
- package/assets/weapon-svg/generated/pistol_45.svg +1 -1
- package/assets/weapon-svg/generated/pistol_9mm.svg +1 -1
- package/assets/weapon-svg/generated/pkm.svg +1 -1
- package/assets/weapon-svg/generated/pp19_bizon.svg +1 -1
- package/assets/weapon-svg/generated/ppsh_41.svg +1 -1
- package/assets/weapon-svg/generated/remington_870.svg +1 -1
- package/assets/weapon-svg/generated/rifle_5_56.svg +1 -1
- package/assets/weapon-svg/generated/rifle_7_62x39.svg +1 -1
- package/assets/weapon-svg/generated/rifle_bolt_308.svg +1 -1
- package/assets/weapon-svg/generated/rossi_puma.svg +1 -1
- package/assets/weapon-svg/generated/rpk.svg +1 -1
- package/assets/weapon-svg/generated/ruger_10_22.svg +1 -1
- package/assets/weapon-svg/generated/saiga_12.svg +1 -1
- package/assets/weapon-svg/generated/shotgun_pump_12.svg +1 -1
- package/assets/weapon-svg/generated/shotgun_semi_12.svg +1 -1
- package/assets/weapon-svg/generated/shovel.svg +1 -0
- package/assets/weapon-svg/generated/sig_mpx.svg +1 -1
- package/assets/weapon-svg/generated/sig_sauer_p226.svg +1 -1
- package/assets/weapon-svg/generated/sig_sauer_p320.svg +1 -1
- package/assets/weapon-svg/generated/sks.svg +1 -1
- package/assets/weapon-svg/generated/smg_9mm.svg +1 -1
- package/assets/weapon-svg/generated/steyr_aug_a1.svg +1 -1
- package/assets/weapon-svg/generated/svd_dragunov.svg +1 -1
- package/assets/weapon-svg/generated/taurus_g2c.svg +1 -1
- package/assets/weapon-svg/generated/taurus_pt100.svg +1 -1
- package/assets/weapon-svg/generated/taurus_smt9.svg +1 -1
- package/assets/weapon-svg/generated/taurus_t4.svg +1 -1
- package/assets/weapon-svg/generated/taurus_t4_civil.svg +1 -1
- package/assets/weapon-svg/generated/taurus_th380.svg +1 -1
- package/assets/weapon-svg/generated/taurus_ts9.svg +1 -1
- package/assets/weapon-svg/generated/thompson_m1a1.svg +1 -1
- package/assets/weapon-svg/generated/uzi.svg +1 -1
- package/assets/weapon-svg/generated/vss_vintorez.svg +1 -1
- package/assets/weapon-svg/generated/vz61.svg +1 -1
- package/assets/weapon-svg/generated/walther_p99.svg +1 -1
- package/assets/weapon-svg/generated/winchester_1887.svg +1 -1
- package/assets/weapon-svg/generated/winchester_1894.svg +1 -1
- package/assets/weapon-svg/manifest.json +4 -0
- package/dist/{chunk-5M3ANYC5.js → chunk-UUBO6H5O.js} +367 -223
- package/dist/chunk-UUBO6H5O.js.map +1 -0
- package/dist/index.d.ts +64 -6
- package/dist/index.global.js +32398 -5668
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/{testing-CocgzbYC.d.ts → testing-eyLz_C6A.d.ts} +13 -5
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/package.json +14 -13
- package/dist/chunk-5M3ANYC5.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as ItemModels, W as WeaponProps, a as WeaponItemModel, M as ModelOptions, b as WeaponModel, c as ModelKit, d as ModelParts, e as ModelFamily, A as AttachmentModelRegistry, L as LaserRaycast } from './testing-
|
|
2
|
-
export { f as AttachmentBuildContext, g as AttachmentModel, h as AttachmentModelBuilder, C as CLASS_REFERENCE_ENERGY, i as COUNTER_ITEM_ID, j as CUES_IN_SAMPLE, k as CasingSound, l as CuePlayed, D as DEFAULT_ENERGY_CURVE, m as DEFAULT_EXPLOSIVES_SCENE, n as DistanceCurve, E as EXPLOSIVES_AREA_ID, o as EXPLOSIVES_TEXT, p as EnergyCurve, q as ExplosivesRoom, r as ExplosivesScene, s as ExplosivesTestModuleOptions, t as ExplosivesText, F as FlybySound, u as FxLayers, G as GAME_DISTANCE_CURVE, v as GAME_SOUND_CLASSES, w as GUNSHOT_PROFILES, x as GUNSHOT_SAMPLE, y as GUNSHOT_SAMPLE_IDS, z as Gunshot, B as GunshotInput, H as GunshotPlayed, J as ItemModelRequest, K as LAUNCH_SAMPLE, N as LAUNCH_SOUND_IDS, O as LaunchKind, P as MECHANICAL_SOUNDS, Q as MOUNTED_M134_ITEM_ID, R as MechanicalSoundId, S as ModelMaterials, T as MountFrame, U as RELOAD_SAMPLE, V as RELOAD_SAMPLE_HITS, X as ShotExtras, Y as ShotSound, Z as ShotSoundClass, _ as ShotSoundInput, $ as ShotSoundOptions, a0 as SoundClassDef, a1 as SoundStep, a2 as WEAPON_ITEM_PREFIX, a3 as WEIGHT_INTENSITY, a4 as WeaponAudio, a5 as WeaponAudioOptions, a6 as WeaponFx, a7 as WeaponFxOptions, a8 as WeaponModelDef, a9 as WeaponSampleOptions, aa as WeaponsTestModuleOptions, ab as
|
|
1
|
+
import { I as ItemModels, W as WeaponProps, a as WeaponItemModel, M as ModelOptions, b as WeaponModel, c as ModelKit, d as ModelParts, e as ModelFamily, A as AttachmentModelRegistry, L as LaserRaycast } from './testing-eyLz_C6A.js';
|
|
2
|
+
export { f as AttachmentBuildContext, g as AttachmentModel, h as AttachmentModelBuilder, C as CLASS_REFERENCE_ENERGY, i as COUNTER_ITEM_ID, j as CUES_IN_SAMPLE, k as CasingSound, l as CuePlayed, D as DEFAULT_ENERGY_CURVE, m as DEFAULT_EXPLOSIVES_SCENE, n as DistanceCurve, E as EXPLOSIVES_AREA_ID, o as EXPLOSIVES_TEXT, p as EnergyCurve, q as ExplosivesRoom, r as ExplosivesScene, s as ExplosivesTestModuleOptions, t as ExplosivesText, F as FlybySound, u as FxLayers, G as GAME_DISTANCE_CURVE, v as GAME_SOUND_CLASSES, w as GUNSHOT_PROFILES, x as GUNSHOT_SAMPLE, y as GUNSHOT_SAMPLE_IDS, z as Gunshot, B as GunshotInput, H as GunshotPlayed, J as ItemModelRequest, K as LAUNCH_SAMPLE, N as LAUNCH_SOUND_IDS, O as LaunchKind, P as MECHANICAL_SOUNDS, Q as MOUNTED_M134_ITEM_ID, R as MechanicalSoundId, S as ModelMaterials, T as MountFrame, U as RELOAD_SAMPLE, V as RELOAD_SAMPLE_HITS, X as ShotExtras, Y as ShotSound, Z as ShotSoundClass, _ as ShotSoundInput, $ as ShotSoundOptions, a0 as SoundClassDef, a1 as SoundStep, a2 as WEAPON_ITEM_PREFIX, a3 as WEIGHT_INTENSITY, a4 as WeaponAudio, a5 as WeaponAudioOptions, a6 as WeaponFx, a7 as WeaponFxOptions, a8 as WeaponModelDef, a9 as WeaponSampleOptions, aa as WeaponsTestModuleOptions, ab as buildItemWeaponModel, ac as buildThrowableModel, ad as buildWeaponModel, ae as computeCasingSound, af as computeFlyby, ag as computeGunshot, ah as computeShotSound, ai as createExplosivesTestModule, aj as createWeaponAudio, ak as createWeaponFx, al as createWeaponsTestModule, am as defaultWeaponProps, an as deriveFrames, ao as explosivesTextOf, ap as hasThrowableModel, aq as itemModelOfWeapon, ar as mechanicalSoundOf, as as modelKit, at as mountFrame, au as registerWeaponItemModel, av as weaponSampleBank, aw as weaponSampleDefaults, ax as weaponsLayout } from './testing-eyLz_C6A.js';
|
|
3
3
|
import * as THREE_NS from 'three';
|
|
4
|
-
import { TestableItem, Vec3, HostEvent, EffectSink, DestructibleSpec, DeepPartial, ToolClipSet } from '@adatechnology/game-contracts';
|
|
4
|
+
import { TestableItem, Vec3, HostEvent, EffectSink, DestructibleSpec, DeepPartial, ToolClipSet, HandPose } from '@adatechnology/game-contracts';
|
|
5
5
|
import { ExplosiveDef, Arsenal, WeaponDef, CartridgeDims, CaliberDef, CaseType, ReloadFamily, FittedAttachment, AttachmentDef } from '@adatechnology/game-weapons';
|
|
6
6
|
import { LightBudget } from '@adatechnology/game-render-three';
|
|
7
7
|
import '@adatechnology/game-audio';
|
|
@@ -125,8 +125,8 @@ declare function buildExplosiveModel(THREE: typeof THREE_NS, explosiveId: string
|
|
|
125
125
|
declare function buildModeledProp(THREE: typeof THREE_NS, def: Pick<WeaponDef, 'id'> & Partial<Pick<WeaponDef, 'action'>>, name: string, decorate?: (root: THREE_NS.Object3D) => void, items?: ItemModels, props?: WeaponProps): THREE_NS.Group | undefined;
|
|
126
126
|
/** A modeled weapon on a tripod of three steel legs under its middle (the same legs the `tripod` accessory draws in the hands). */
|
|
127
127
|
declare function buildTripodMountedProp(THREE: typeof THREE_NS, def: Pick<WeaponDef, 'id'>, name: string, items?: ItemModels, props?: WeaponProps): THREE_NS.Group | undefined;
|
|
128
|
-
/** The destruction spec of a modeled prop: one steel box of its measures, with the real mass of the weapon. */
|
|
129
|
-
declare function modeledPropSpec(root: unknown, def: Pick<WeaponDef, 'mass'
|
|
128
|
+
/** The destruction spec of a modeled prop: the make-up of its item model when it has one (`itemMakeup`), else one steel box of its measures, with the real mass of the weapon. */
|
|
129
|
+
declare function modeledPropSpec(root: unknown, def: Pick<WeaponDef, 'mass'> & Partial<Pick<WeaponDef, 'id'>>, name: string): DestructibleSpec;
|
|
130
130
|
|
|
131
131
|
interface WeaponPropsOptions {
|
|
132
132
|
/** Item model overrides by weapon id, added to the shipped ones (`null` keeps the low-poly prop); later packs replace earlier ones. */
|
|
@@ -287,4 +287,62 @@ declare const VIEW_MOTION: {
|
|
|
287
287
|
readonly frequency: 3.2;
|
|
288
288
|
};
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
/**
|
|
291
|
+
* The motions a tool in hand makes (a shovel's shovelful, its swing): keyframes of where it goes from where it is held, in the frame of the view (x to the
|
|
292
|
+
* right, y up, z back towards the eye) and turned about its own grip. The hands close on the tool's grips, so they follow it: one motion moves the tool and
|
|
293
|
+
* the arms alike, in the first-person view and on the body.
|
|
294
|
+
*/
|
|
295
|
+
/** One key of a motion: the share of its time (0..1), the offset from the hold (metres) and the turn about the grip (radians, x then y then z). */
|
|
296
|
+
interface ToolMotionKey {
|
|
297
|
+
readonly at: number;
|
|
298
|
+
readonly offset: readonly [number, number, number];
|
|
299
|
+
readonly turn: readonly [number, number, number];
|
|
300
|
+
}
|
|
301
|
+
/** A motion of a tool: its keys, from the hold back to the hold. */
|
|
302
|
+
interface ToolMotion {
|
|
303
|
+
readonly keys: readonly ToolMotionKey[];
|
|
304
|
+
}
|
|
305
|
+
/** The motions of each tool by weapon id, then by motion name. A game adds its own tools' motions to this map. */
|
|
306
|
+
declare const TOOL_MOTIONS: ReadonlyMap<string, ReadonlyMap<string, ToolMotion>>;
|
|
307
|
+
/** Where a motion has the tool at a share of its time (0..1): its offset and turn, eased between the keys. */
|
|
308
|
+
declare function sampleToolMotion(motion: ToolMotion, at: number): Omit<ToolMotionKey, 'at'>;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* The weapons put away on the body (`HostEvent` `holster`): each is drawn at the place of the body that took it (`ModuleHost.bodySlot`: `hip` a holster, `back` a sling) for as long
|
|
312
|
+
* as it is away, the pistol muzzle down against the hip, the long gun across the back with the muzzle over the off shoulder; drawn back in hand, it is hidden. The model is the
|
|
313
|
+
* weapon's own (the gallery's, or the item model), at its real size; one per weapon, kept for the next time.
|
|
314
|
+
*/
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* How a weapon lies in each place, in the frame of the body's socket (+z the body's front, -x the weapon side, y up): `muzzle` the way the barrel points, `out` the way off the body
|
|
318
|
+
* the weapon's side faces. The model's muzzle is its +x, its top +y, its side z.
|
|
319
|
+
*/
|
|
320
|
+
declare const HOLSTER_PLACEMENT: Readonly<Record<string, {
|
|
321
|
+
readonly muzzle: Vec3;
|
|
322
|
+
readonly out: Vec3;
|
|
323
|
+
}>>;
|
|
324
|
+
/** A weapon's model laid in a place of the body: its side on the socket, its middle over it. Undefined for a place this does not know or a weapon with no model. */
|
|
325
|
+
declare const holsteredModel: (THREE: typeof THREE_NS, weapon: string, slot: string, items?: ItemModels) => THREE_NS.Group | undefined;
|
|
326
|
+
interface HolsteredWeaponsOptions {
|
|
327
|
+
readonly THREE: typeof THREE_NS;
|
|
328
|
+
readonly scene: THREE_NS.Object3D;
|
|
329
|
+
readonly arsenal: Pick<Arsenal, 'weapons'>;
|
|
330
|
+
readonly items?: ItemModels;
|
|
331
|
+
/** The host's places of the body (`ModuleHost.bodySlot`). */
|
|
332
|
+
readonly bodySlot: (slot: string) => HandPose | null;
|
|
333
|
+
}
|
|
334
|
+
interface HolsteredWeapons {
|
|
335
|
+
handle(event: {
|
|
336
|
+
readonly weapon: string;
|
|
337
|
+
readonly slot: string;
|
|
338
|
+
readonly on: boolean;
|
|
339
|
+
}): void;
|
|
340
|
+
/** Puts each weapon away where its place of the body is now. */
|
|
341
|
+
update(): void;
|
|
342
|
+
/** The weapons drawn on the body now. */
|
|
343
|
+
readonly drawn: readonly string[];
|
|
344
|
+
dispose(): void;
|
|
345
|
+
}
|
|
346
|
+
declare const createHolsteredWeapons: (options: HolsteredWeaponsOptions) => HolsteredWeapons;
|
|
347
|
+
|
|
348
|
+
export { ARCHETYPE_MODELS, ATTACHMENT_MODELS, AttachmentModelRegistry, type AttachmentRig, BODY_ACTIONS, type CartridgeShape, type ClipContext, DEFAULT_THUMBNAIL_BASE, EXPLOSIVE_MODEL_IDS, type FitAttachmentOptions, HOLSTER_PLACEMENT, type HolsteredWeapons, type HolsteredWeaponsOptions, ItemModels, LaserRaycast, MODEL_ENTRIES, type ModelEntry, ModelFamily, ModelKit, ModelOptions, ModelParts, P13_VALVE_MESH, type ProjectileModel, type ProjectileQuery, TOOL_MOTIONS, type ToolMotion, type ToolMotionKey, VIEW_HOLD, VIEW_MOTION, type ViewHoldKind, WEAPON_THUMBNAILS, WORLD_EFFECTS, WORLD_EXPLOSIVE_IDS, WORLD_EXPLOSIVE_PREFIX, WeaponItemModel, WeaponModel, type WeaponProp, WeaponProps, type WeaponPropsOptions, type WeaponThumbnailEntry, type WorldEffectIds, type WorldEffectsOptions, type WorldExplosiveOptions, type WorldExplosiveShells, applyCondition, buildCartridge, buildCasing, buildExplosiveModel, buildModeledProp, buildProp, buildRound, buildToolClips, buildTripodMountedProp, buildWeaponModelById, cartridgeShape, createHolsteredWeapons, createWeaponProps, createWorldEffects, createWorldExplosiveShells, fitAttachmentModels, hasExplosiveModel, hasWeaponModel, holsteredModel, modeledPropSpec, partRegistry, projectileModel, rigStock, rigUnderbarrel, sampleToolMotion, toWorldLens, weaponProp, weaponThumbnailCredit, weaponThumbnailUrl, worldExplosiveItem, worldExplosiveShell, worldExplosiveValve };
|