@adatechnology/game-weapons-three 0.22.0 → 0.23.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.
Files changed (124) hide show
  1. package/assets/weapon-svg/CREDITS.md +1 -1
  2. package/assets/weapon-svg/credits.html +1 -1
  3. package/assets/weapon-svg/generated/aa_12.svg +1 -1
  4. package/assets/weapon-svg/generated/ak_12.svg +1 -1
  5. package/assets/weapon-svg/generated/ak_47.svg +1 -1
  6. package/assets/weapon-svg/generated/ak_74.svg +1 -1
  7. package/assets/weapon-svg/generated/akm.svg +1 -1
  8. package/assets/weapon-svg/generated/aks_74u.svg +1 -1
  9. package/assets/weapon-svg/generated/anti_materiel_50.svg +1 -1
  10. package/assets/weapon-svg/generated/barrett_m82a1.svg +1 -1
  11. package/assets/weapon-svg/generated/barrett_mrad.svg +1 -1
  12. package/assets/weapon-svg/generated/benelli_m4.svg +1 -1
  13. package/assets/weapon-svg/generated/beretta_92fs.svg +1 -1
  14. package/assets/weapon-svg/generated/bt_mp9.svg +1 -1
  15. package/assets/weapon-svg/generated/carbine_22.svg +1 -1
  16. package/assets/weapon-svg/generated/cbc_122.svg +1 -1
  17. package/assets/weapon-svg/generated/cbc_7022.svg +1 -1
  18. package/assets/weapon-svg/generated/cbc_pump_military_3_0.svg +1 -1
  19. package/assets/weapon-svg/generated/colt_m16a2.svg +1 -1
  20. package/assets/weapon-svg/generated/colt_m1911.svg +1 -1
  21. package/assets/weapon-svg/generated/colt_m4a1.svg +1 -1
  22. package/assets/weapon-svg/generated/cz_75.svg +1 -1
  23. package/assets/weapon-svg/generated/cz_scorpion_evo_3.svg +1 -1
  24. package/assets/weapon-svg/generated/desert_eagle_mark_xix.svg +1 -1
  25. package/assets/weapon-svg/generated/famas.svg +1 -1
  26. package/assets/weapon-svg/generated/fn_fal.svg +1 -1
  27. package/assets/weapon-svg/generated/fn_five_seven.svg +1 -1
  28. package/assets/weapon-svg/generated/fn_m240b.svg +1 -1
  29. package/assets/weapon-svg/generated/fn_m249.svg +1 -1
  30. package/assets/weapon-svg/generated/fn_mag.svg +1 -1
  31. package/assets/weapon-svg/generated/fn_minimi.svg +1 -1
  32. package/assets/weapon-svg/generated/fn_minimi_para.svg +1 -1
  33. package/assets/weapon-svg/generated/fn_p90.svg +1 -1
  34. package/assets/weapon-svg/generated/fn_parafal.svg +1 -1
  35. package/assets/weapon-svg/generated/fn_scar_h.svg +1 -1
  36. package/assets/weapon-svg/generated/fn_scar_l.svg +1 -1
  37. package/assets/weapon-svg/generated/franchi_spas_12.svg +1 -1
  38. package/assets/weapon-svg/generated/glock_17.svg +1 -1
  39. package/assets/weapon-svg/generated/glock_18.svg +1 -1
  40. package/assets/weapon-svg/generated/glock_19.svg +1 -1
  41. package/assets/weapon-svg/generated/hk416.svg +1 -1
  42. package/assets/weapon-svg/generated/hk_g36.svg +1 -1
  43. package/assets/weapon-svg/generated/hk_g36c.svg +1 -1
  44. package/assets/weapon-svg/generated/hk_g36k.svg +1 -1
  45. package/assets/weapon-svg/generated/hk_g3a3.svg +1 -1
  46. package/assets/weapon-svg/generated/hk_mp5a3.svg +1 -1
  47. package/assets/weapon-svg/generated/hk_mp5k.svg +1 -1
  48. package/assets/weapon-svg/generated/hk_mp5sd3.svg +1 -1
  49. package/assets/weapon-svg/generated/hk_mp7a1.svg +1 -1
  50. package/assets/weapon-svg/generated/hk_psg_1.svg +1 -1
  51. package/assets/weapon-svg/generated/hk_ump9.svg +1 -1
  52. package/assets/weapon-svg/generated/hk_ump_45.svg +1 -1
  53. package/assets/weapon-svg/generated/hk_usp.svg +1 -1
  54. package/assets/weapon-svg/generated/imbel_ia2.svg +1 -1
  55. package/assets/weapon-svg/generated/iwi_tavor.svg +1 -1
  56. package/assets/weapon-svg/generated/kel_tec_ksg.svg +1 -1
  57. package/assets/weapon-svg/generated/knights_sr_25_mk11.svg +1 -1
  58. package/assets/weapon-svg/generated/kriss_vector.svg +1 -1
  59. package/assets/weapon-svg/generated/l85a2.svg +1 -1
  60. package/assets/weapon-svg/generated/m134.svg +1 -1
  61. package/assets/weapon-svg/generated/m14_ebr.svg +1 -1
  62. package/assets/weapon-svg/generated/m1_garand.svg +1 -1
  63. package/assets/weapon-svg/generated/m32_mgl.svg +1 -1
  64. package/assets/weapon-svg/generated/m60.svg +1 -1
  65. package/assets/weapon-svg/generated/m72_law.svg +1 -1
  66. package/assets/weapon-svg/generated/m79.svg +1 -1
  67. package/assets/weapon-svg/generated/mac_10.svg +1 -1
  68. package/assets/weapon-svg/generated/makarov_pm.svg +1 -1
  69. package/assets/weapon-svg/generated/mg3.svg +1 -1
  70. package/assets/weapon-svg/generated/mg42.svg +1 -1
  71. package/assets/weapon-svg/generated/mini_uzi.svg +1 -1
  72. package/assets/weapon-svg/generated/mosin_nagant_91_30.svg +1 -1
  73. package/assets/weapon-svg/generated/mossberg_500.svg +1 -1
  74. package/assets/weapon-svg/generated/mossberg_500_cruiser.svg +1 -1
  75. package/assets/weapon-svg/generated/mossberg_590.svg +1 -1
  76. package/assets/weapon-svg/generated/pistol_45.svg +1 -1
  77. package/assets/weapon-svg/generated/pistol_9mm.svg +1 -1
  78. package/assets/weapon-svg/generated/pkm.svg +1 -1
  79. package/assets/weapon-svg/generated/pp19_bizon.svg +1 -1
  80. package/assets/weapon-svg/generated/ppsh_41.svg +1 -1
  81. package/assets/weapon-svg/generated/remington_870.svg +1 -1
  82. package/assets/weapon-svg/generated/rifle_5_56.svg +1 -1
  83. package/assets/weapon-svg/generated/rifle_7_62x39.svg +1 -1
  84. package/assets/weapon-svg/generated/rifle_bolt_308.svg +1 -1
  85. package/assets/weapon-svg/generated/rossi_puma.svg +1 -1
  86. package/assets/weapon-svg/generated/rpk.svg +1 -1
  87. package/assets/weapon-svg/generated/ruger_10_22.svg +1 -1
  88. package/assets/weapon-svg/generated/saiga_12.svg +1 -1
  89. package/assets/weapon-svg/generated/shotgun_pump_12.svg +1 -1
  90. package/assets/weapon-svg/generated/shotgun_semi_12.svg +1 -1
  91. package/assets/weapon-svg/generated/shovel.svg +1 -0
  92. package/assets/weapon-svg/generated/sig_mpx.svg +1 -1
  93. package/assets/weapon-svg/generated/sig_sauer_p226.svg +1 -1
  94. package/assets/weapon-svg/generated/sig_sauer_p320.svg +1 -1
  95. package/assets/weapon-svg/generated/sks.svg +1 -1
  96. package/assets/weapon-svg/generated/smg_9mm.svg +1 -1
  97. package/assets/weapon-svg/generated/steyr_aug_a1.svg +1 -1
  98. package/assets/weapon-svg/generated/svd_dragunov.svg +1 -1
  99. package/assets/weapon-svg/generated/taurus_g2c.svg +1 -1
  100. package/assets/weapon-svg/generated/taurus_pt100.svg +1 -1
  101. package/assets/weapon-svg/generated/taurus_smt9.svg +1 -1
  102. package/assets/weapon-svg/generated/taurus_t4.svg +1 -1
  103. package/assets/weapon-svg/generated/taurus_t4_civil.svg +1 -1
  104. package/assets/weapon-svg/generated/taurus_th380.svg +1 -1
  105. package/assets/weapon-svg/generated/taurus_ts9.svg +1 -1
  106. package/assets/weapon-svg/generated/thompson_m1a1.svg +1 -1
  107. package/assets/weapon-svg/generated/uzi.svg +1 -1
  108. package/assets/weapon-svg/generated/vss_vintorez.svg +1 -1
  109. package/assets/weapon-svg/generated/vz61.svg +1 -1
  110. package/assets/weapon-svg/generated/walther_p99.svg +1 -1
  111. package/assets/weapon-svg/generated/winchester_1887.svg +1 -1
  112. package/assets/weapon-svg/generated/winchester_1894.svg +1 -1
  113. package/assets/weapon-svg/manifest.json +4 -0
  114. package/dist/{chunk-5M3ANYC5.js → chunk-7BPQ2GZM.js} +279 -217
  115. package/dist/chunk-7BPQ2GZM.js.map +1 -0
  116. package/dist/index.d.ts +25 -5
  117. package/dist/index.global.js +31690 -5326
  118. package/dist/index.global.js.map +1 -1
  119. package/dist/index.js +5 -5
  120. package/dist/{testing-CocgzbYC.d.ts → testing-eyLz_C6A.d.ts} +13 -5
  121. package/dist/testing.d.ts +1 -1
  122. package/dist/testing.js +1 -1
  123. package/package.json +12 -12
  124. package/dist/chunk-5M3ANYC5.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-CocgzbYC.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-CocgzbYC.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-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
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';
@@ -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'>, name: string): DestructibleSpec;
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,24 @@ declare const VIEW_MOTION: {
287
287
  readonly frequency: 3.2;
288
288
  };
289
289
 
290
- export { ARCHETYPE_MODELS, ATTACHMENT_MODELS, AttachmentModelRegistry, type AttachmentRig, BODY_ACTIONS, type CartridgeShape, type ClipContext, DEFAULT_THUMBNAIL_BASE, EXPLOSIVE_MODEL_IDS, type FitAttachmentOptions, ItemModels, LaserRaycast, MODEL_ENTRIES, type ModelEntry, ModelFamily, ModelKit, ModelOptions, ModelParts, P13_VALVE_MESH, type ProjectileModel, type ProjectileQuery, 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, createWeaponProps, createWorldEffects, createWorldExplosiveShells, fitAttachmentModels, hasExplosiveModel, hasWeaponModel, modeledPropSpec, partRegistry, projectileModel, rigStock, rigUnderbarrel, toWorldLens, weaponProp, weaponThumbnailCredit, weaponThumbnailUrl, worldExplosiveItem, worldExplosiveShell, worldExplosiveValve };
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
+ export { ARCHETYPE_MODELS, ATTACHMENT_MODELS, AttachmentModelRegistry, type AttachmentRig, BODY_ACTIONS, type CartridgeShape, type ClipContext, DEFAULT_THUMBNAIL_BASE, EXPLOSIVE_MODEL_IDS, type FitAttachmentOptions, 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, createWeaponProps, createWorldEffects, createWorldExplosiveShells, fitAttachmentModels, hasExplosiveModel, hasWeaponModel, modeledPropSpec, partRegistry, projectileModel, rigStock, rigUnderbarrel, sampleToolMotion, toWorldLens, weaponProp, weaponThumbnailCredit, weaponThumbnailUrl, worldExplosiveItem, worldExplosiveShell, worldExplosiveValve };