@adatechnology/game-weapons-three 0.29.10 → 0.30.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-svg/CREDITS.md +1 -1
  2. package/assets/weapon-svg/credits.html +1 -1
  3. package/assets/weapon-svg/generated/beretta_92fs.svg +1 -1
  4. package/assets/weapon-svg/generated/colt_m1911.svg +1 -1
  5. package/assets/weapon-svg/generated/colt_python.svg +1 -1
  6. package/assets/weapon-svg/generated/cz_75.svg +1 -1
  7. package/assets/weapon-svg/generated/desert_eagle_mark_xix.svg +1 -1
  8. package/assets/weapon-svg/generated/fists.svg +1 -0
  9. package/assets/weapon-svg/generated/fn_five_seven.svg +1 -1
  10. package/assets/weapon-svg/generated/glock_17.svg +1 -1
  11. package/assets/weapon-svg/generated/glock_18.svg +1 -1
  12. package/assets/weapon-svg/generated/glock_19.svg +1 -1
  13. package/assets/weapon-svg/generated/hand.svg +1 -0
  14. package/assets/weapon-svg/generated/hk_usp.svg +1 -1
  15. package/assets/weapon-svg/generated/kel_tec_ksg.svg +1 -1
  16. package/assets/weapon-svg/generated/kick.svg +1 -0
  17. package/assets/weapon-svg/generated/kriss_vector.svg +1 -1
  18. package/assets/weapon-svg/generated/makarov_pm.svg +1 -1
  19. package/assets/weapon-svg/generated/pistol_45.svg +1 -1
  20. package/assets/weapon-svg/generated/pistol_9mm.svg +1 -1
  21. package/assets/weapon-svg/generated/revolver_357.svg +1 -1
  22. package/assets/weapon-svg/generated/revolver_38.svg +1 -1
  23. package/assets/weapon-svg/generated/shove.svg +1 -0
  24. package/assets/weapon-svg/generated/sig_sauer_p226.svg +1 -1
  25. package/assets/weapon-svg/generated/sig_sauer_p320.svg +1 -1
  26. package/assets/weapon-svg/generated/sw_686.svg +1 -1
  27. package/assets/weapon-svg/generated/sw_model_29.svg +1 -1
  28. package/assets/weapon-svg/generated/taurus_82.svg +1 -1
  29. package/assets/weapon-svg/generated/taurus_g2c.svg +1 -1
  30. package/assets/weapon-svg/generated/taurus_pt100.svg +1 -1
  31. package/assets/weapon-svg/generated/taurus_th380.svg +1 -1
  32. package/assets/weapon-svg/generated/taurus_ts9.svg +1 -1
  33. package/assets/weapon-svg/generated/walther_p99.svg +1 -1
  34. package/assets/weapon-svg/manifest.json +16 -0
  35. package/dist/{chunk-WAZHNY5J.js → chunk-RAWW6JTZ.js} +333 -95
  36. package/dist/chunk-RAWW6JTZ.js.map +1 -0
  37. package/dist/index.d.ts +17 -4
  38. package/dist/index.global.js +1582 -834
  39. package/dist/index.global.js.map +1 -1
  40. package/dist/index.js +47 -1
  41. package/dist/index.js.map +1 -1
  42. package/dist/{testing-Bk34V-6X.d.ts → testing-44lDo2Cx.d.ts} +34 -1
  43. package/dist/testing.d.ts +1 -1
  44. package/dist/testing.js +1 -1
  45. package/package.json +15 -14
  46. package/dist/chunk-WAZHNY5J.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-Bk34V-6X.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-Bk34V-6X.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-44lDo2Cx.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-44lDo2Cx.js';
3
3
  import * as THREE_NS from 'three';
4
4
  import { TestableItem, Vec3, HostEvent, EffectSink, DestructibleSpec, DeepPartial, ToolClipSet, HandPose, HandTargets } from '@adatechnology/game-contracts';
5
5
  import { ExplosiveDef, Arsenal, WeaponDef, CartridgeDims, CaliberDef, CaseType, ReloadFamily, FittedAttachment, AttachmentDef } from '@adatechnology/game-weapons';
@@ -153,6 +153,15 @@ declare function weaponProp(def: Pick<WeaponDef, 'id' | 'category' | 'mass'>, na
153
153
  /** One mesh per box part, named after the part (what destruction renderers bind to), in a group with its origin on the floor. */
154
154
  declare function buildProp(THREE: typeof THREE_NS, prop: WeaponProp): THREE_NS.Group;
155
155
 
156
+ /**
157
+ * What the player does with the body instead of a gun (`BODY_ACTIONS`): the open hand, the fists, the shove and the kick, drawn the way a hotbar shows a tool, as one low-poly piece lying
158
+ * along x (the reaching end to the right) so the thumbnail tool traces it like any weapon. They are pictures, not what the hands hold: the body already has arms and legs.
159
+ */
160
+
161
+ type Three = typeof THREE_NS;
162
+ /** The picture of a body action, or undefined for an id that is not one. */
163
+ declare function buildBodyActionModel(THREE: Three, id: string): THREE_NS.Group | undefined;
164
+
156
165
  /** The explosive ids of game-weapons the gallery drew (`m67`, `molotov`, `pipe_bomb`, `dynamite`, `c4`, `claymore`, `flashbang`). */
157
166
  declare const EXPLOSIVE_MODEL_IDS: readonly string[];
158
167
  declare const hasExplosiveModel: (explosiveId: string) => boolean;
@@ -198,8 +207,12 @@ declare const MODEL_ENTRIES: Readonly<Record<string, ModelEntry>>;
198
207
  */
199
208
  declare const ARCHETYPE_MODELS: Readonly<Record<string, string>>;
200
209
  declare const hasWeaponModel: (id: string) => boolean;
210
+ /** `worn: 'separate'` leaves the pack a body wears (the tanks of a flamethrower) out of the model, for the hands to hold the gun alone; the default hangs it on the gun. */
211
+ interface BuildWeaponModelOptions {
212
+ readonly worn?: 'attached' | 'separate';
213
+ }
201
214
  /** The gallery model of a weapon (or of the brand weapon an archetype wears, see `ARCHETYPE_MODELS`), long axis along +x, rear at the origin; undefined for melee, throwables and what nothing drew. */
202
- declare function buildWeaponModelById(THREE: typeof THREE_NS, id: string): WeaponModel | undefined;
215
+ declare function buildWeaponModelById(THREE: typeof THREE_NS, id: string, options?: BuildWeaponModelOptions): WeaponModel | undefined;
203
216
 
204
217
  /** The shapes the gallery draws: rimfire, straight rimless (`p`), straight rimmed (`rimp`), bottleneck rimless (`r`), bottleneck rimmed (`rr`) and shotgun shell. */
205
218
  type CartridgeShape = 'shell' | 'rim' | 'p' | 'rimp' | 'r' | 'rr';
@@ -444,4 +457,4 @@ interface HolsteredWeapons {
444
457
  }
445
458
  declare const createHolsteredWeapons: (options: HolsteredWeaponsOptions) => HolsteredWeapons;
446
459
 
447
- export { ARCHETYPE_MODELS, ATTACHMENT_MODELS, AttachmentModelRegistry, type AttachmentRig, BODY_ACTIONS, type CartridgeShape, type ClipContext, DEFAULT_THUMBNAIL_BASE, EXPLOSIVE_MODEL_IDS, FAMILY_MOTIONS, type FitAttachmentOptions, GROUND_SLOT, HOLSTER_PLACEMENT, HOLSTER_TOSS, type HolsterRig, type HolsteredWeapons, type HolsteredWeaponsOptions, ItemModels, LOOSE_ROLLING_RESISTANCE, LaserRaycast, type LooseBody, type LooseCollider, type LooseLaunch, type LooseReading, MODEL_ENTRIES, type ModelEntry, ModelFamily, ModelKit, ModelOptions, ModelParts, P13_VALVE_MESH, type ProjectileModel, type ProjectileQuery, SLING_HANG, 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, buildHolsterRig, buildModeledProp, buildProp, buildRound, buildToolClips, buildTripodMountedProp, buildWeaponModelById, cartridgeShape, casingCollider, createHolsteredWeapons, createWeaponProps, createWorldEffects, createWorldExplosiveShells, dropLoose, explosiveCollider, fitAttachmentModels, hasExplosiveModel, hasWeaponModel, holsteredModel, modeledPropSpec, partRegistry, projectileModel, rigStock, rigUnderbarrel, sampleToolMotion, spawnLoose, syncLoose, toWorldLens, weaponProp, weaponThumbnailCredit, weaponThumbnailUrl, worldExplosiveItem, worldExplosiveShell, worldExplosiveValve };
460
+ export { ARCHETYPE_MODELS, ATTACHMENT_MODELS, AttachmentModelRegistry, type AttachmentRig, BODY_ACTIONS, type CartridgeShape, type ClipContext, DEFAULT_THUMBNAIL_BASE, EXPLOSIVE_MODEL_IDS, FAMILY_MOTIONS, type FitAttachmentOptions, GROUND_SLOT, HOLSTER_PLACEMENT, HOLSTER_TOSS, type HolsterRig, type HolsteredWeapons, type HolsteredWeaponsOptions, ItemModels, LOOSE_ROLLING_RESISTANCE, LaserRaycast, type LooseBody, type LooseCollider, type LooseLaunch, type LooseReading, MODEL_ENTRIES, type ModelEntry, ModelFamily, ModelKit, ModelOptions, ModelParts, P13_VALVE_MESH, type ProjectileModel, type ProjectileQuery, SLING_HANG, 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, buildBodyActionModel, buildCartridge, buildCasing, buildExplosiveModel, buildHolsterRig, buildModeledProp, buildProp, buildRound, buildToolClips, buildTripodMountedProp, buildWeaponModelById, cartridgeShape, casingCollider, createHolsteredWeapons, createWeaponProps, createWorldEffects, createWorldExplosiveShells, dropLoose, explosiveCollider, fitAttachmentModels, hasExplosiveModel, hasWeaponModel, holsteredModel, modeledPropSpec, partRegistry, projectileModel, rigStock, rigUnderbarrel, sampleToolMotion, spawnLoose, syncLoose, toWorldLens, weaponProp, weaponThumbnailCredit, weaponThumbnailUrl, worldExplosiveItem, worldExplosiveShell, worldExplosiveValve };