@adatechnology/game-weapons-three 0.17.1 → 0.18.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.
Files changed (46) hide show
  1. package/assets/weapon-references.json +1385 -0
  2. package/assets/weapon-svg/CREDITS.md +1 -1
  3. package/assets/weapon-svg/credits.html +1 -1
  4. package/assets/weapon-svg/generated/accuracy_l96a1.svg +1 -0
  5. package/assets/weapon-svg/generated/aks_74u.svg +1 -0
  6. package/assets/weapon-svg/generated/brass_knuckles.svg +1 -0
  7. package/assets/weapon-svg/generated/bt_mp9.svg +1 -0
  8. package/assets/weapon-svg/generated/colt_python.svg +1 -0
  9. package/assets/weapon-svg/generated/famas.svg +1 -0
  10. package/assets/weapon-svg/generated/fn_m240b.svg +1 -0
  11. package/assets/weapon-svg/generated/fn_ps90.svg +1 -0
  12. package/assets/weapon-svg/generated/fn_scar_l.svg +1 -0
  13. package/assets/weapon-svg/generated/hk_g36.svg +1 -1
  14. package/assets/weapon-svg/generated/hk_g36c.svg +1 -1
  15. package/assets/weapon-svg/generated/hk_g36k.svg +1 -1
  16. package/assets/weapon-svg/generated/hk_usp.svg +1 -0
  17. package/assets/weapon-svg/generated/iwi_tavor.svg +1 -0
  18. package/assets/weapon-svg/generated/kabar.svg +1 -0
  19. package/assets/weapon-svg/generated/katana.svg +1 -0
  20. package/assets/weapon-svg/generated/l85a2.svg +1 -0
  21. package/assets/weapon-svg/generated/m1_garand.svg +1 -0
  22. package/assets/weapon-svg/generated/m32_mgl.svg +1 -0
  23. package/assets/weapon-svg/generated/mauser_kar98k.svg +1 -0
  24. package/assets/weapon-svg/generated/mg42.svg +1 -0
  25. package/assets/weapon-svg/generated/mossberg_590.svg +1 -0
  26. package/assets/weapon-svg/generated/mp40.svg +1 -0
  27. package/assets/weapon-svg/generated/ppsh_41.svg +1 -0
  28. package/assets/weapon-svg/generated/semtex.svg +1 -0
  29. package/assets/weapon-svg/generated/sig_sauer_p320.svg +1 -0
  30. package/assets/weapon-svg/generated/smoke_grenade.svg +1 -0
  31. package/assets/weapon-svg/generated/vss_vintorez.svg +1 -0
  32. package/assets/weapon-svg/generated/walther_p99.svg +1 -0
  33. package/assets/weapon-svg/generated/winchester_1887.svg +1 -0
  34. package/assets/weapon-svg/manifest.json +108 -0
  35. package/dist/{chunk-BDYIF7JD.js → chunk-4HWHC6US.js} +9488 -5841
  36. package/dist/chunk-4HWHC6US.js.map +1 -0
  37. package/dist/index.d.ts +10 -6
  38. package/dist/index.global.js +24137 -18534
  39. package/dist/index.global.js.map +1 -1
  40. package/dist/index.js +9 -1
  41. package/dist/index.js.map +1 -1
  42. package/dist/{testing-BKDGK6cq.d.ts → testing-I8H8oNSD.d.ts} +50 -5
  43. package/dist/testing.d.ts +1 -1
  44. package/dist/testing.js +1 -1
  45. package/package.json +9 -9
  46. package/dist/chunk-BDYIF7JD.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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-BKDGK6cq.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 MECHANICAL_SOUNDS, N as MOUNTED_M134_ITEM_ID, O as MechanicalSoundId, P as ModelMaterials, Q as MountFrame, R as RELOAD_SAMPLE, S as RELOAD_SAMPLE_HITS, T as ShotExtras, U as ShotSound, V as ShotSoundClass, X as ShotSoundInput, Y as ShotSoundOptions, Z as SoundClassDef, _ as SoundStep, $ as WEAPON_ITEM_PREFIX, a0 as WEIGHT_INTENSITY, a1 as WeaponAudio, a2 as WeaponAudioOptions, a3 as WeaponFx, a4 as WeaponFxOptions, a5 as WeaponModelDef, a6 as WeaponSampleOptions, a7 as WeaponsTestModuleOptions, a8 as buildItemWeaponModel, a9 as buildThrowableModel, aa as buildWeaponModel, ab as computeCasingSound, ac as computeFlyby, ad as computeGunshot, ae as computeShotSound, af as createExplosivesTestModule, ag as createWeaponAudio, ah as createWeaponFx, ai as createWeaponsTestModule, aj as defaultWeaponProps, ak as deriveFrames, al as explosivesTextOf, am as hasThrowableModel, an as itemModelOfWeapon, ao as mechanicalSoundOf, ap as modelKit, aq as mountFrame, ar as registerWeaponItemModel, as as weaponSampleBank, at as weaponSampleDefaults, au as weaponsLayout } from './testing-BKDGK6cq.js';
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-I8H8oNSD.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 buildHandheldModel, ac as buildItemWeaponModel, ad as buildThrowableModel, ae as buildWeaponModel, af as computeCasingSound, ag as computeFlyby, ah as computeGunshot, ai as computeShotSound, aj as createExplosivesTestModule, ak as createWeaponAudio, al as createWeaponFx, am as createWeaponsTestModule, an as defaultWeaponProps, ao as deriveFrames, ap as explosivesTextOf, aq as hasHandheldModel, ar as hasThrowableModel, as as itemModelOfWeapon, at as mechanicalSoundOf, au as modelKit, av as mountFrame, aw as registerWeaponItemModel, ax as weaponSampleBank, ay as weaponSampleDefaults, az as weaponsLayout } from './testing-I8H8oNSD.js';
3
3
  import * as THREE_NS from 'three';
4
4
  import { TestableItem, Vec3, HostEvent, EffectSink, DestructibleSpec, DeepPartial, ToolClipSet } from '@adatechnology/game-contracts';
5
5
  import { ExplosiveDef, Arsenal, WeaponDef, CartridgeDims, CaliberDef, CaseType, ReloadFamily, FittedAttachment, AttachmentDef } from '@adatechnology/game-weapons';
@@ -129,7 +129,7 @@ declare function createWeaponProps(options?: WeaponPropsOptions): WeaponProps;
129
129
 
130
130
  /** One weapon of the gallery as `data/models.json` keeps it: the builder, the measures in mm and the builder's options. */
131
131
  interface ModelEntry {
132
- readonly builder: 'pistol' | 'revolver' | 'rifle' | 'bullpup' | 'p90' | 'break' | 'breakLauncher' | 'm2' | 'm134' | 'launcher';
132
+ readonly builder: 'pistol' | 'revolver' | 'rifle' | 'bullpup' | 'p90' | 'break' | 'breakLauncher' | 'm2' | 'm134' | 'launcher' | 'mp40' | 'mp9' | 'ps90' | 'ppsh' | 'kar98' | 'mg42' | 'vss' | 'mgl';
133
133
  readonly caliber: string;
134
134
  readonly length: number;
135
135
  readonly barrel: number;
@@ -139,7 +139,8 @@ interface ModelEntry {
139
139
  declare const MODEL_ENTRIES: Readonly<Record<string, ModelEntry>>;
140
140
  /**
141
141
  * The model each generic archetype wears: the one of the first brand weapon (lowest id) that points to it with `archetype` and fires the same way (a rocket launcher that points to
142
- * `shotgun_pump_12` does not lend its tube to the shotgun). An archetype nothing points to, the melee weapons and the bow keep their simple prop.
142
+ * `shotgun_pump_12` does not lend its tube to the shotgun), a weapon of its own before a variant of another (`variantOf`): a variant added later never changes what the generic looks like.
143
+ * An archetype nothing points to, the melee weapons and the bow keep their simple prop.
143
144
  */
144
145
  declare const ARCHETYPE_MODELS: Readonly<Record<string, string>>;
145
146
  declare const hasWeaponModel: (id: string) => boolean;
@@ -229,8 +230,11 @@ declare function rigUnderbarrel(THREE: typeof THREE_NS, model: WeaponModel, def:
229
230
  */
230
231
  declare function rigStock(THREE: typeof THREE_NS, model: WeaponModel, def: Pick<WeaponDef, 'stock' | 'dimensions'>): void;
231
232
 
232
- /** How a tool is held in the first-person view: a pistol or a revolver, a rocket launcher, a long gun, a tool in one hand (a blade, a bat, a grenade, a lighter), or a gun carried at the hip (a hand-held rotary gun). */
233
- type ViewHoldKind = 'handgun' | 'launcher' | 'long' | 'tool' | 'hip';
233
+ /**
234
+ * How a tool is held in the first-person view: a pistol or a revolver, a rocket launcher, a long gun, a tool in one hand (a blade, a bat, a grenade, a lighter), a gun carried
235
+ * at the hip (a hand-held rotary gun), or a gun in one hand with another in the other hand (`dual`, held out to its side; the left one is its mirror).
236
+ */
237
+ type ViewHoldKind = 'handgun' | 'launcher' | 'long' | 'tool' | 'hip' | 'dual';
234
238
  type Hold = {
235
239
  /** The right hand's grip at the hip, from the eye (x right, y up, -z ahead, metres). */
236
240
  readonly grip: readonly [number, number, number];