@adatechnology/game-weapons-three 0.24.4 → 0.25.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/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
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';
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-C9yn3tJI.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-C9yn3tJI.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';
6
+ import { BodyId, ShapeDesc, Material, Rolling, SeamWorld } from '@adatechnology/game-physics';
6
7
  import { LightBudget } from '@adatechnology/game-render-three';
7
8
  import '@adatechnology/game-audio';
8
9
 
@@ -78,6 +79,41 @@ interface ProjectileModel {
78
79
  */
79
80
  declare function projectileModel(THREE: typeof THREE_NS, query: ProjectileQuery): ProjectileModel | null;
80
81
 
82
+ /** Rolling resistance of the kit's round loose pieces (a casing) on a hard floor: the C_rr the gate-0 B2 run settled on. */
83
+ declare const LOOSE_ROLLING_RESISTANCE = 0.015;
84
+ /** What the engine needs to make a loose body from what the gallery drew. */
85
+ interface LooseCollider {
86
+ readonly shape: ShapeDesc;
87
+ readonly mass: number;
88
+ readonly material: Material;
89
+ readonly rolling: Rolling;
90
+ readonly user: number;
91
+ }
92
+ /** A casing lying along x as `buildCasing` draws it (the engine's cylinder stands on y, so its child is turned a quarter about z), rolling on its own radius. */
93
+ declare function casingCollider(radius: number, length: number): LooseCollider;
94
+ /** A loose body in the engine: what the costura keeps between frames. */
95
+ interface LooseBody {
96
+ readonly id: BodyId;
97
+ bounces: number;
98
+ fallSpeed: number;
99
+ }
100
+ interface LooseLaunch {
101
+ readonly position: THREE_NS.Vector3;
102
+ readonly rotation: THREE_NS.Quaternion;
103
+ readonly velocity: THREE_NS.Vector3;
104
+ readonly spin: THREE_NS.Vector3;
105
+ }
106
+ /** Puts a loose piece in the world, swept (it is small and fast) and with the rolling resistance of its collider. */
107
+ declare function spawnLoose(world: SeamWorld, collider: LooseCollider, launch: LooseLaunch): LooseBody;
108
+ /** What a frame of a loose body told: it is asleep, and the speed of a bounce it made (m/s, vertical) or undefined. */
109
+ interface LooseReading {
110
+ readonly asleep: boolean;
111
+ readonly bounceSpeed: number | undefined;
112
+ }
113
+ /** Copies the engine's pose of a loose body onto its object and reports whether it bounced or fell asleep. */
114
+ declare function syncLoose(world: SeamWorld, body: LooseBody, object: THREE_NS.Object3D): LooseReading;
115
+ declare function dropLoose(world: SeamWorld, body: LooseBody): void;
116
+
81
117
  /** The effect ids a weapon of a case type shows when it is seen from outside: its muzzle flash and its ejected case (the host's catalogue names them). */
82
118
  interface WorldEffectIds {
83
119
  readonly muzzle: string;
@@ -396,4 +432,4 @@ interface HolsteredWeapons {
396
432
  }
397
433
  declare const createHolsteredWeapons: (options: HolsteredWeaponsOptions) => HolsteredWeapons;
398
434
 
399
- export { ARCHETYPE_MODELS, ATTACHMENT_MODELS, AttachmentModelRegistry, type AttachmentRig, BODY_ACTIONS, type CartridgeShape, type ClipContext, DEFAULT_THUMBNAIL_BASE, EXPLOSIVE_MODEL_IDS, type FitAttachmentOptions, GROUND_SLOT, HOLSTER_PLACEMENT, HOLSTER_TOSS, type HolsterRig, type HolsteredWeapons, type HolsteredWeaponsOptions, ItemModels, LaserRaycast, 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, createHolsteredWeapons, createWeaponProps, createWorldEffects, createWorldExplosiveShells, fitAttachmentModels, hasExplosiveModel, hasWeaponModel, holsteredModel, modeledPropSpec, partRegistry, projectileModel, rigStock, rigUnderbarrel, sampleToolMotion, toWorldLens, weaponProp, weaponThumbnailCredit, weaponThumbnailUrl, worldExplosiveItem, worldExplosiveShell, worldExplosiveValve };
435
+ export { ARCHETYPE_MODELS, ATTACHMENT_MODELS, AttachmentModelRegistry, type AttachmentRig, BODY_ACTIONS, type CartridgeShape, type ClipContext, DEFAULT_THUMBNAIL_BASE, EXPLOSIVE_MODEL_IDS, 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, fitAttachmentModels, hasExplosiveModel, hasWeaponModel, holsteredModel, modeledPropSpec, partRegistry, projectileModel, rigStock, rigUnderbarrel, sampleToolMotion, spawnLoose, syncLoose, toWorldLens, weaponProp, weaponThumbnailCredit, weaponThumbnailUrl, worldExplosiveItem, worldExplosiveShell, worldExplosiveValve };