@adatechnology/game-weapons-three 0.23.0 → 0.24.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.
- package/README.md +2 -0
- package/dist/{chunk-7BPQ2GZM.js → chunk-UUBO6H5O.js} +89 -7
- package/dist/chunk-UUBO6H5O.js.map +1 -0
- package/dist/index.d.ts +40 -2
- package/dist/index.global.js +745 -220
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/testing.js +1 -1
- package/package.json +10 -9
- package/dist/chunk-7BPQ2GZM.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
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
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';
|
|
@@ -307,4 +307,42 @@ declare const TOOL_MOTIONS: ReadonlyMap<string, ReadonlyMap<string, ToolMotion>>
|
|
|
307
307
|
/** Where a motion has the tool at a share of its time (0..1): its offset and turn, eased between the keys. */
|
|
308
308
|
declare function sampleToolMotion(motion: ToolMotion, at: number): Omit<ToolMotionKey, 'at'>;
|
|
309
309
|
|
|
310
|
-
|
|
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 };
|