@bendyline/molen-client 0.0.11 → 0.0.13
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 +1 -0
- package/dist/aircraft.d.mts +9 -31
- package/dist/aircraft.mjs +279 -219
- package/dist/audio.d.mts +10 -1
- package/dist/audio.mjs +131 -6
- package/dist/camera-track.d.mts +1 -1
- package/dist/clouds-DmASLVoe.mjs +862 -0
- package/dist/glass.d.mts +19 -0
- package/dist/glass.mjs +250 -0
- package/dist/index.d.mts +14 -3
- package/dist/index.mjs +577 -147
- package/dist/{livery-C0abgthY.mjs → livery-qcDLzbU9.mjs} +7 -2
- package/dist/navigation.d.mts +19 -6
- package/dist/navigation.mjs +133 -83
- package/dist/{renderer-Dzus24ZF.d.mts → renderer-DAk7C8jH.d.mts} +234 -17
- package/dist/vehicle-interior-B8TpzTAx.d.mts +56 -0
- package/dist/vehicle-interior-DJ4cXTsQ.mjs +468 -0
- package/dist/vehicles.d.mts +25 -20
- package/dist/vehicles.mjs +271 -66
- package/dist/webgpu-clouds-H03g7ID1.mjs +186 -0
- package/package.json +7 -3
- package/dist/vehicle-interior-BgcC750p.d.mts +0 -31
- package/dist/vehicle-interior-DfpZwWEh.mjs +0 -15
package/README.md
CHANGED
|
@@ -66,6 +66,7 @@ probe — a pinned backend is what makes a captured frame reproducible.
|
|
|
66
66
|
| `./camera-track` | `molen/cameratrack@1`: `registerCameraTrackSchema` + `evaluateCameraTrack` for scripted camera moves |
|
|
67
67
|
| `./vite` | `molenScripts()` — a Vite plugin that type-strips `*.ts?raw` scene scripts so the browser never sees TypeScript |
|
|
68
68
|
| `./vehicles` | `createVehicleVisual`, `createParkedVehicleBatch`, `vehicleCameraPose` — car visuals and cockpit/chase views, the render half of `@bendyline/molen-kernel/vehicles` |
|
|
69
|
+
| `./glass` | `createGlassVisual` — retained laminate cracks, released sheets and bounded glass fragments |
|
|
69
70
|
| `./aircraft` | `createAircraftVisual`, `aircraftCameraPose` — animated airframe and instrumented cockpit, the render half of `@bendyline/molen-kernel/aircraft` |
|
|
70
71
|
| `./instruments` | Named signal expressions and reusable wiring for calibrated dials, altimeters, attitude indicators, annunciators and seven-segment readouts; geometry stays in each model |
|
|
71
72
|
| `./navigation` | `OrbitController`, `FlyController`, `WalkController` + `WalkCollision`, `FollowController`, `NavigationInputSource` (keys, gamepad, pointer gestures) and `createTouchJoystick` — camera navigation for `createViewer` hosts |
|
package/dist/aircraft.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { a as VehicleCameraPose, c as aircraftObstacleContacts, i as VehicleCameraOptions, n as VehicleInteriorVisual, s as AircraftObstacleScene } from "./vehicle-interior-B8TpzTAx.mjs";
|
|
1
2
|
import { n as ModelSignals, t as ModelSignalVisual } from "./model-signals-BpeXhsim.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { AircraftCollisionProbe, AircraftContact, AircraftInputData, AircraftSpec, AircraftStateData, LiveryData, VehicleSpec } from "@bendyline/molen-schema";
|
|
3
|
+
import { AircraftInputData, AircraftSpec, AircraftStateData, LiveryData } from "@bendyline/molen-schema";
|
|
4
4
|
import * as THREE from "three";
|
|
5
5
|
|
|
6
6
|
//#region src/aircraft-controls.d.ts
|
|
7
|
-
type AircraftControlAction = "power" | "mixture" | "propeller" | "stick" | "yaw" | "gear" | "flaps" | "engine" | "brake" | "thrustVector";
|
|
7
|
+
type AircraftControlAction = "speedBrake" | "tailHook" | "canopy" | "wipers" | "headlights" | "power" | "mixture" | "propeller" | "stick" | "yaw" | "gear" | "flaps" | "engine" | "brake" | "thrustVector";
|
|
8
8
|
interface AircraftCockpitControl {
|
|
9
9
|
id: string;
|
|
10
10
|
label: string;
|
|
@@ -79,30 +79,6 @@ interface AircraftCockpitPointerOptions {
|
|
|
79
79
|
}
|
|
80
80
|
declare function bindAircraftCockpitPointer(options: AircraftCockpitPointerOptions): AircraftCockpitPointer;
|
|
81
81
|
//#endregion
|
|
82
|
-
//#region src/aircraft-collision.d.ts
|
|
83
|
-
interface AircraftObstacleScene {
|
|
84
|
-
/** Collision tree origin and query, e.g. WalkCollision. */
|
|
85
|
-
origin: THREE.Vector3;
|
|
86
|
-
octree: {
|
|
87
|
-
sphereIntersect(sphere: THREE.Sphere): false | {
|
|
88
|
-
normal: THREE.Vector3;
|
|
89
|
-
depth: number;
|
|
90
|
-
};
|
|
91
|
-
getSphereTriangles?(sphere: THREE.Sphere, triangles: THREE.Triangle[]): unknown;
|
|
92
|
-
};
|
|
93
|
-
cars: ReadonlyArray<{
|
|
94
|
-
transform: {
|
|
95
|
-
pos: [number, number, number];
|
|
96
|
-
rot: [number, number, number, number];
|
|
97
|
-
};
|
|
98
|
-
spec: VehicleSpec;
|
|
99
|
-
}>;
|
|
100
|
-
/** Other aircraft body centers. The host excludes the queried aircraft. */
|
|
101
|
-
aircraft: ReadonlyArray<[number, number, number]>;
|
|
102
|
-
}
|
|
103
|
-
/** Contact normals from streamed geometry and nearby parked vehicles, in absolute coordinates. */
|
|
104
|
-
declare function aircraftObstacleContacts(probes: readonly AircraftCollisionProbe[], scene: AircraftObstacleScene): AircraftContact[];
|
|
105
|
-
//#endregion
|
|
106
82
|
//#region src/aircraft.d.ts
|
|
107
83
|
interface AircraftVisual {
|
|
108
84
|
setLivery(data: LiveryData | undefined): void;
|
|
@@ -113,10 +89,12 @@ interface AircraftVisual {
|
|
|
113
89
|
animation?: ModelSignalVisual;
|
|
114
90
|
update(state: AircraftStateData, input: AircraftInputData, altitude: number, signals?: ModelSignals, timeSeconds?: number): void;
|
|
115
91
|
/**
|
|
116
|
-
* The camera, in the coordinates of `object.position`. Cabin nodes (the spec's interior
|
|
117
|
-
* drawn only near it: from farther away a cockpit is a few pixels
|
|
118
|
-
* most of an aircraft's draw calls, and as many again in the
|
|
119
|
-
* views are always near enough
|
|
92
|
+
* The camera, in the coordinates of `object.position`. Cabin nodes (the spec's interior and the
|
|
93
|
+
* generated flight controls) are drawn only near it: from farther away a cockpit is a few pixels
|
|
94
|
+
* behind the canopy, yet it held most of an aircraft's draw calls, and as many again in the
|
|
95
|
+
* shadow pass. Boarded and chase views are always near enough, but within the cabin a part too
|
|
96
|
+
* small to see from the camera (CABIN_DETAIL_ANGLE) leaves the frame through its render layers,
|
|
97
|
+
* so a binding's or damage's own `visible` is never overridden.
|
|
120
98
|
*/
|
|
121
99
|
updateView(camera: readonly [number, number, number]): void;
|
|
122
100
|
dispose(): void;
|