@adatechnology/game-vehicles-three 0.7.0 → 0.8.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/dist/{chunk-L63R2JQA.js → chunk-NPS4X64L.js} +335 -44
- package/dist/chunk-NPS4X64L.js.map +1 -0
- package/dist/index.d.ts +122 -12
- package/dist/index.global.js +782 -205
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +9 -1
- package/dist/{testing-DI0_R8dH.d.ts → testing-Cb10i9fm.d.ts} +19 -4
- package/dist/testing.d.ts +3 -1
- package/dist/testing.js +1 -1
- package/package.json +8 -8
- package/dist/chunk-L63R2JQA.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
ENGINE_PROFILES,
|
|
12
12
|
LAMP_RULES,
|
|
13
13
|
LITE_CLASSES,
|
|
14
|
+
MIST_RULES,
|
|
14
15
|
PAGE_ITEM_ALIASES,
|
|
15
16
|
PAGE_SCENARIO_ALIASES,
|
|
16
17
|
PROVING_AREA_ID,
|
|
@@ -21,6 +22,7 @@ import {
|
|
|
21
22
|
VEHICLE_LOD_DISTANCE,
|
|
22
23
|
VEHICLE_LOOPS,
|
|
23
24
|
VEHICLE_LOOP_FALLOFF,
|
|
25
|
+
VEHICLE_PRELOAD_SOUNDS,
|
|
24
26
|
VEHICLE_SAMPLE_ALIASES,
|
|
25
27
|
VEHICLE_SCENARIO_IDS,
|
|
26
28
|
VEHICLE_SOUNDS,
|
|
@@ -28,6 +30,7 @@ import {
|
|
|
28
30
|
classColor,
|
|
29
31
|
classify,
|
|
30
32
|
createCabinSmoke,
|
|
33
|
+
createEngineBudget,
|
|
31
34
|
createGearGuess,
|
|
32
35
|
createProvingModule,
|
|
33
36
|
createVehicleBody,
|
|
@@ -38,6 +41,7 @@ import {
|
|
|
38
41
|
createVehiclesTestModule,
|
|
39
42
|
createVehiclesThree,
|
|
40
43
|
createWheelRoll,
|
|
44
|
+
createWindshieldMist,
|
|
41
45
|
defaultEffectIds,
|
|
42
46
|
defaultSoundIds,
|
|
43
47
|
engineMix,
|
|
@@ -49,7 +53,7 @@ import {
|
|
|
49
53
|
loadProvingModule,
|
|
50
54
|
loadVehiclesTestModule,
|
|
51
55
|
rpmShare
|
|
52
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-NPS4X64L.js";
|
|
53
57
|
export {
|
|
54
58
|
BIKE_ENGINE,
|
|
55
59
|
CAR_ENGINE,
|
|
@@ -63,6 +67,7 @@ export {
|
|
|
63
67
|
ENGINE_PROFILES,
|
|
64
68
|
LAMP_RULES,
|
|
65
69
|
LITE_CLASSES,
|
|
70
|
+
MIST_RULES,
|
|
66
71
|
PAGE_ITEM_ALIASES,
|
|
67
72
|
PAGE_SCENARIO_ALIASES,
|
|
68
73
|
PROVING_AREA_ID,
|
|
@@ -73,6 +78,7 @@ export {
|
|
|
73
78
|
VEHICLE_LOD_DISTANCE,
|
|
74
79
|
VEHICLE_LOOPS,
|
|
75
80
|
VEHICLE_LOOP_FALLOFF,
|
|
81
|
+
VEHICLE_PRELOAD_SOUNDS,
|
|
76
82
|
VEHICLE_SAMPLE_ALIASES,
|
|
77
83
|
VEHICLE_SCENARIO_IDS,
|
|
78
84
|
VEHICLE_SOUNDS,
|
|
@@ -80,6 +86,7 @@ export {
|
|
|
80
86
|
classColor,
|
|
81
87
|
classify,
|
|
82
88
|
createCabinSmoke,
|
|
89
|
+
createEngineBudget,
|
|
83
90
|
createGearGuess,
|
|
84
91
|
createProvingModule,
|
|
85
92
|
createVehicleBody,
|
|
@@ -90,6 +97,7 @@ export {
|
|
|
90
97
|
createVehiclesTestModule,
|
|
91
98
|
createVehiclesThree,
|
|
92
99
|
createWheelRoll,
|
|
100
|
+
createWindshieldMist,
|
|
93
101
|
defaultEffectIds,
|
|
94
102
|
defaultSoundIds,
|
|
95
103
|
engineMix,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { EffectSink, Vec3, TestableModule } from '@adatechnology/game-contracts';
|
|
2
2
|
import { Damageable, VehicleContext, VehicleKit } from '@adatechnology/game-vehicles';
|
|
3
|
+
import * as THREE_NS from 'three';
|
|
4
|
+
import { Group } from 'three';
|
|
5
|
+
import { StorageStack } from '@adatechnology/game-vehicles-driving';
|
|
3
6
|
import { ProvingSubject, ProvingTestRegistry, ProvingCertificate } from '@adatechnology/game-vehicles-proving';
|
|
4
7
|
|
|
5
8
|
type VehicleQuality = 'high' | 'lite';
|
|
@@ -39,7 +42,7 @@ interface BuiltVehicle {
|
|
|
39
42
|
color: string | null;
|
|
40
43
|
seed: number | string | null;
|
|
41
44
|
/** Group in the game frame: front on +z, right on -x, centred on x and z, wheels on y = 0. */
|
|
42
|
-
group:
|
|
45
|
+
group: Group;
|
|
43
46
|
/** Damageable boxes in the game frame. */
|
|
44
47
|
damageables: Damageable[];
|
|
45
48
|
triangles: number;
|
|
@@ -62,7 +65,7 @@ interface BuiltVehicle {
|
|
|
62
65
|
dispose(): void;
|
|
63
66
|
}
|
|
64
67
|
interface VehiclesThree {
|
|
65
|
-
readonly THREE:
|
|
68
|
+
readonly THREE: typeof THREE_NS;
|
|
66
69
|
readonly kit: VehicleKit;
|
|
67
70
|
build(key: string, options?: BuildVehicleOptions): BuiltVehicle;
|
|
68
71
|
}
|
|
@@ -76,7 +79,7 @@ interface VehiclesThreeOptions {
|
|
|
76
79
|
/** Vehicle id to the group id whose palette paints it. Defaults to the fleet group of the vehicle (`military` for the military ones). */
|
|
77
80
|
groupOf?: (key: string) => string;
|
|
78
81
|
}
|
|
79
|
-
declare function createVehiclesThree(THREE:
|
|
82
|
+
declare function createVehiclesThree(THREE: typeof THREE_NS, options: VehiclesThreeOptions): VehiclesThree;
|
|
80
83
|
|
|
81
84
|
/**
|
|
82
85
|
* How a vehicle sounds, as data. An engine is a few loops crossfaded by RPM (idle, low/mid, high) plus a load layer (intake and exhaust roar) that
|
|
@@ -126,6 +129,14 @@ type VehicleSoundKeys = {
|
|
|
126
129
|
readonly skidAsphalt: string;
|
|
127
130
|
readonly skidDirt: string;
|
|
128
131
|
readonly roll: string;
|
|
132
|
+
/** Pads squealing on the discs as a car brakes to a stop (not a skid: the tyres still grip). */
|
|
133
|
+
readonly brakeSqueal: string;
|
|
134
|
+
/** A body hit by the vehicle; a game points it at its own (a zombie, an animal) through `sounds` or the `hit` call. */
|
|
135
|
+
readonly hitBody: string;
|
|
136
|
+
/** An emergency siren, its pitch swept by the vehicle (`frame.siren`). */
|
|
137
|
+
readonly siren: string;
|
|
138
|
+
/** A helicopter's blades (`frame.rotor`). */
|
|
139
|
+
readonly rotor: string;
|
|
129
140
|
};
|
|
130
141
|
declare const DEFAULT_VEHICLE_SOUND_KEYS: VehicleSoundKeys;
|
|
131
142
|
/** The speed of the hit, m/s, where a crash stops being light (≈ 22 km/h: dents and plastic) and where it turns heavy (≈ 50 km/h: metal folds, glass goes). */
|
|
@@ -283,7 +294,7 @@ declare const PAGE_SCENARIO_ALIASES: Readonly<Record<string, string>>;
|
|
|
283
294
|
declare const PAGE_ITEM_ALIASES: Readonly<Record<string, string>>;
|
|
284
295
|
|
|
285
296
|
declare const PROVING_AREA_ID = "vehicles_proving";
|
|
286
|
-
type Three =
|
|
297
|
+
type Three = typeof THREE_NS;
|
|
287
298
|
/** Content comes in by option (the adapter does not import a content pack): the example wires the kit's fleet, a game its own catalogue. */
|
|
288
299
|
interface ProvingModuleOptions {
|
|
289
300
|
locale?: string;
|
|
@@ -304,6 +315,10 @@ interface ProvingModuleOptions {
|
|
|
304
315
|
sounds?: Partial<VehicleSoundIds>;
|
|
305
316
|
/** Called whenever a certificate changes (a result in, a sign-off), so a page can keep or show them. */
|
|
306
317
|
onCertificate?(certificate: ProvingCertificate): void;
|
|
318
|
+
/** What the glovebox and the trunk of `vehicle` hold when someone gets in (items of the host's catalogue, as `game-items` finds them for a car). Default empty. */
|
|
319
|
+
stock?(compartment: string, vehicle: string): readonly StorageStack[];
|
|
320
|
+
/** The name of an item of the host's catalogue, for the log (default: its id). */
|
|
321
|
+
itemName?(id: string): string | undefined;
|
|
307
322
|
}
|
|
308
323
|
declare function createProvingModule(options: ProvingModuleOptions): TestableModule & {
|
|
309
324
|
certificates(): ProvingCertificate[];
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { D as DEFAULT_TEST_VEHICLES, d as DEFAULT_TEST_WRECKS, f as DocumentLike, h as EffectsLike, 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, q as VEHICLES_AREA_ID, r as VEHICLE_SCENARIO_IDS, s as VehicleEffectIds, v as VehicleSoundIds, w as VehicleWreck, x as VehiclesContext, y as VehiclesRoom, z as VehiclesTestFleet, A as VehiclesTestOptions, I as createProvingModule, J as createVehiclesTestModule, L as defaultEffectIds, N as defaultSoundIds, O as loadProvingModule, Q as loadVehiclesTestModule } from './testing-
|
|
1
|
+
export { D as DEFAULT_TEST_VEHICLES, d as DEFAULT_TEST_WRECKS, f as DocumentLike, h as EffectsLike, 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, q as VEHICLES_AREA_ID, r as VEHICLE_SCENARIO_IDS, s as VehicleEffectIds, v as VehicleSoundIds, w as VehicleWreck, x as VehiclesContext, y as VehiclesRoom, z as VehiclesTestFleet, A as VehiclesTestOptions, I as createProvingModule, J as createVehiclesTestModule, L as defaultEffectIds, N as defaultSoundIds, O as loadProvingModule, Q as loadVehiclesTestModule } from './testing-Cb10i9fm.js';
|
|
2
2
|
import '@adatechnology/game-contracts';
|
|
3
3
|
import '@adatechnology/game-vehicles';
|
|
4
|
+
import 'three';
|
|
5
|
+
import '@adatechnology/game-vehicles-driving';
|
|
4
6
|
import '@adatechnology/game-vehicles-proving';
|
package/dist/testing.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adatechnology/game-vehicles-three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "three.js output of the vehicles of @adatechnology/game-vehicles: a vehicle in a game frame (front on +z, centred, on the ground) at full detail or fused into six meshes (the team's Frota Leve light mode), coloured by seed, with its damageable boxes; and the vehicles test module.",
|
|
6
6
|
"keywords": [
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"dist"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@adatechnology/game-audio": "^0.
|
|
44
|
+
"@adatechnology/game-audio": "^0.9.1",
|
|
45
45
|
"@adatechnology/game-camera": "^0.2.0",
|
|
46
|
-
"@adatechnology/game-contracts": "^0.
|
|
46
|
+
"@adatechnology/game-contracts": "^0.27.0",
|
|
47
47
|
"@adatechnology/game-render-three": "^0.2.0",
|
|
48
48
|
"@adatechnology/game-shapes-three": "^0.3.1",
|
|
49
|
-
"@adatechnology/game-vehicles
|
|
50
|
-
"@adatechnology/game-vehicles": "^0.
|
|
49
|
+
"@adatechnology/game-vehicles": "^0.6.5",
|
|
50
|
+
"@adatechnology/game-vehicles-driving": "^0.2.14",
|
|
51
51
|
"@adatechnology/game-vehicles-fleet": "^6.0.0",
|
|
52
|
-
"@adatechnology/game-vehicles-proving": "^0.1.
|
|
52
|
+
"@adatechnology/game-vehicles-proving": "^0.1.5"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^22.10.7",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"typescript": "^5.7.3",
|
|
61
61
|
"vitest": "^3.2.4",
|
|
62
62
|
"@adatechnology/game-kit-defaults": "^0.2.0",
|
|
63
|
-
"@adatechnology/
|
|
64
|
-
"@adatechnology/
|
|
63
|
+
"@adatechnology/game-test-room": "^0.28.0",
|
|
64
|
+
"@adatechnology/golden-tool": "^0.0.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"three": "^0.160.0"
|