@adatechnology/game-vehicles-three 0.9.12 → 0.10.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,6 +1,6 @@
1
- import { E as EngineProfile, V as VehicleSoundKeys, B as BuiltVehicle } from './testing-CY8IYz1H.js';
2
- export { a as BIKE_ENGINE, b as BuildVehicleOptions, C as CAR_ENGINE, c as CRASH_SPEEDS, D as DEFAULT_TEST_VEHICLES, d as DEFAULT_TEST_WRECKS, e as DEFAULT_VEHICLE_SOUND_KEYS, f as DocumentLike, g as ENGINE_PROFILES, h as EffectsLike, i as EngineLayer, j as EngineLoadLayer, F as FleetDims, M as ModuleRoomLike, P as PAGE_ITEM_ALIASES, k as PAGE_SCENARIO_ALIASES, l as PROVING_AREA_ID, m as PROVING_TEXT, n as ProvingModuleOptions, o as ProvingRoomLike, p as ProvingText, T as TRUCK_ENGINE, q as VEHICLES_AREA_ID, r as VEHICLE_SCENARIO_IDS, s as VehicleEffectIds, t as VehicleFleetContent, u as VehicleQuality, v as VehicleSoundIds, w as VehicleWreck, x as VehiclesContext, y as VehiclesRoom, z as VehiclesTestFleet, A as VehiclesTestOptions, G as VehiclesThree, H as VehiclesThreeOptions, I as createProvingModule, J as createVehiclesTestModule, K as createVehiclesThree, L as defaultEffectIds, N as defaultSoundIds, O as engineProfileOfGroup, Q as hornOfGroup, R as loadProvingModule, S as loadVehiclesTestModule } from './testing-CY8IYz1H.js';
3
- import { EffectSink, Vec3, AudioSink, AnimationClipSpec, DrawnCollider } from '@adatechnology/game-contracts';
1
+ import { E as EngineProfile, V as VehicleSoundKeys, B as BuiltVehicle } from './testing-CRVetKNa.js';
2
+ export { a as BIKE_ENGINE, b as BuildVehicleOptions, C as CAR_ENGINE, c as CRASH_SPEEDS, D as DEFAULT_TEST_VEHICLES, d as DEFAULT_TEST_WRECKS, e as DEFAULT_VEHICLE_SOUND_KEYS, f as DocumentLike, g as ENGINE_PROFILES, h as EffectsLike, i as EngineLayer, j as EngineLoadLayer, F as FleetDims, M as ModuleRoomLike, P as PAGE_ITEM_ALIASES, k as PAGE_SCENARIO_ALIASES, l as PROVING_AREA_ID, m as PROVING_TEXT, n as ProvingModuleOptions, o as ProvingRoomLike, p as ProvingText, T as TRUCK_ENGINE, q as VEHICLES_AREA_ID, r as VEHICLE_SCENARIO_IDS, s as VehicleEffectIds, t as VehicleFleetContent, u as VehicleQuality, v as VehicleSoundIds, w as VehicleWreck, x as VehiclesContext, y as VehiclesRoom, z as VehiclesTestFleet, A as VehiclesTestOptions, G as VehiclesThree, H as VehiclesThreeOptions, I as createProvingModule, J as createVehiclesTestModule, K as createVehiclesThree, L as defaultEffectIds, N as defaultSoundIds, O as engineProfileOfGroup, Q as hornOfGroup, R as loadProvingModule, S as loadVehiclesTestModule } from './testing-CRVetKNa.js';
3
+ import { EffectSink, RainCover, Vec3, AudioSink, AnimationClipSpec, DrawnCollider } from '@adatechnology/game-contracts';
4
4
  import { CabinSource, VehicleContext, VehicleDestructible } from '@adatechnology/game-vehicles';
5
5
  import { LoopRecipe, Falloff, SampleAlias, SoundRecipe, SoundBank } from '@adatechnology/game-audio';
6
6
  import * as THREE_NS from 'three';
@@ -30,6 +30,26 @@ interface CabinSmoke {
30
30
  }
31
31
  declare function createCabinSmoke(): CabinSmoke;
32
32
 
33
+ /** How often a vehicle's damage state is read for the roof and the panes it has left, seconds: a hit shows within this; moving costs nothing of it. */
34
+ declare const RAIN_SHELL_INTERVAL = 0.4;
35
+ /**
36
+ * Keeps the host's rain told what the cars roof over (`ModuleHost.rainCover`): the cabin of each vehicle in the scene is a cover that follows it, and a broken
37
+ * roof or windshield opens it. `sync` every frame; a vehicle that left the scene is taken out. A host without a rain cover keeps the old rain.
38
+ */
39
+ interface VehicleRainCovers {
40
+ /** Follows the cabin of a vehicle by its object id; `frame` is the object the host placed it in (the destructible's `frame`). */
41
+ track(id: string, source: CabinSource, frame: {
42
+ readonly parent: unknown | null;
43
+ }): void;
44
+ untrack(id: string): void;
45
+ sync(cover: RainCover | undefined, dt: number): void;
46
+ /** Takes every cover out (the module leaves). */
47
+ clear(): void;
48
+ /** The ids followed now. */
49
+ ids(): string[];
50
+ }
51
+ declare function createVehicleRainCovers(): VehicleRainCovers;
52
+
33
53
  /** How a vehicle loop falls off: `1 / (1 + d² × 0.004)`, the game's one-shot curve, with the cutoff muffled by `1 + d × 0.01` (a car far away is dull). */
34
54
  declare const VEHICLE_LOOP_FALLOFF: Falloff;
35
55
  /** The engines (car, truck, bike) and the tyres, as loops. */
@@ -623,4 +643,4 @@ declare const createVehicleColliders: (THREE: Three, vehicle: VehicleDestructibl
623
643
  /** The pieces of a vehicle once, all at once (`createVehicleColliders` keeps them between calls). */
624
644
  declare const vehicleColliders: (THREE: Three, vehicle: VehicleDestructible, frame: THREE_NS.Object3D) => DrawnCollider[];
625
645
 
626
- export { type BodyEvent, type BodyThree, BuiltVehicle, CAR_RECORDED_RPM, CAR_START_RUN_STOP, type CabinSmoke, DASHBOARD_LOOK, type DashboardOptions, type DashboardReading, type EngineBudget, type EngineBudgetOptions, type EngineLayerSetting, type EngineMixInput, EngineProfile, LAMP_RULES, LITE_CLASSES, type LampSwitch, type LiteClass, type LiteFusion, MIST_RULES, type MistThree, PRUNE_BELOW, VEHICLE_LOD_DISTANCE, VEHICLE_LOOPS, VEHICLE_LOOP_FALLOFF, VEHICLE_PRELOAD_SOUNDS, VEHICLE_SAMPLE_ALIASES, VEHICLE_SOUNDS, VEHICLE_SOUND_BANK, type VehicleBody, type VehicleBodyOptions, type VehicleColliders, type VehicleCollidersOptions, type VehicleDashboard, type VehicleLamps, type VehicleLod, type VehicleLodKit, type VehicleSound, type VehicleSoundFrame, VehicleSoundKeys, type VehicleSoundOptions, type VehicleSoundReading, type WheelRoll, type WheelRollThree, type WindowId, type WindshieldMist, classColor, classify, createCabinSmoke, createEngineBudget, createGearGuess, createVehicleBody, createVehicleColliders, createVehicleDashboard, createVehicleLamps, createVehicleLod, createVehicleLodQueue, createVehicleSound, createWheelRoll, createWindshieldMist, engineMix, firingHz, fuse, layerWeight, liteMaterials, liteMeshes, rpmShare, slideOfGrip, vehicleColliders };
646
+ export { type BodyEvent, type BodyThree, BuiltVehicle, CAR_RECORDED_RPM, CAR_START_RUN_STOP, type CabinSmoke, DASHBOARD_LOOK, type DashboardOptions, type DashboardReading, type EngineBudget, type EngineBudgetOptions, type EngineLayerSetting, type EngineMixInput, EngineProfile, LAMP_RULES, LITE_CLASSES, type LampSwitch, type LiteClass, type LiteFusion, MIST_RULES, type MistThree, PRUNE_BELOW, RAIN_SHELL_INTERVAL, VEHICLE_LOD_DISTANCE, VEHICLE_LOOPS, VEHICLE_LOOP_FALLOFF, VEHICLE_PRELOAD_SOUNDS, VEHICLE_SAMPLE_ALIASES, VEHICLE_SOUNDS, VEHICLE_SOUND_BANK, type VehicleBody, type VehicleBodyOptions, type VehicleColliders, type VehicleCollidersOptions, type VehicleDashboard, type VehicleLamps, type VehicleLod, type VehicleLodKit, type VehicleRainCovers, type VehicleSound, type VehicleSoundFrame, VehicleSoundKeys, type VehicleSoundOptions, type VehicleSoundReading, type WheelRoll, type WheelRollThree, type WindowId, type WindshieldMist, classColor, classify, createCabinSmoke, createEngineBudget, createGearGuess, createVehicleBody, createVehicleColliders, createVehicleDashboard, createVehicleLamps, createVehicleLod, createVehicleLodQueue, createVehicleRainCovers, createVehicleSound, createWheelRoll, createWindshieldMist, engineMix, firingHz, fuse, layerWeight, liteMaterials, liteMeshes, rpmShare, slideOfGrip, vehicleColliders };