@bendyline/molen-client 0.0.2 → 0.0.4

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.
@@ -0,0 +1,557 @@
1
+ import { n as InputGamepad, r as InputMap } from "./input-CD-dHuv0.mjs";
2
+ import { InputProfile } from "@bendyline/molen-schema";
3
+ import * as THREE from "three";
4
+ import { Octree } from "three/addons/math/Octree.js";
5
+
6
+ //#region src/navigation/camera-math.d.ts
7
+ type NavigationVector = [number, number, number];
8
+ interface CameraOrientation {
9
+ yaw: number;
10
+ pitch: number;
11
+ }
12
+ /** Pitch limit shared by look controls: just short of straight up/down. */
13
+ declare const MAX_LOOK_PITCH = 1.5;
14
+ declare function cameraForward(yaw: number, pitch: number): NavigationVector;
15
+ declare function cameraRight(yaw: number): NavigationVector;
16
+ declare function cameraPlanarForward(yaw: number): NavigationVector;
17
+ /** Apply a pointer delta (pixels) to a yaw/pitch pair; moving right turns right. */
18
+ declare function applyCameraLookDelta(yaw: number, pitch: number, deltaX: number, deltaY: number, sensitivity?: number): CameraOrientation;
19
+ /** Yaw/pitch of a direction vector (the inverse of `cameraForward`). */
20
+ declare function orientationFromDirection(direction: NavigationVector): CameraOrientation;
21
+ /**
22
+ * Detect camera changes that can outrun a throttled terrain-selection update. Terrain selectors
23
+ * have a view guard band, so tiny per-frame changes can wait for their normal cadence; larger
24
+ * turns or translations need coverage replanned before the next render.
25
+ */
26
+ declare function viewNeedsImmediateUpdate(previousPosition: NavigationVector, previousDirection: NavigationVector, position: NavigationVector, direction: NavigationVector, movementThreshold: number, turnThresholdRadians: number): boolean;
27
+ //#endregion
28
+ //#region src/navigation/collision-tree.d.ts
29
+ /** Keep Three's collision queries, but partition triangles without duplicating them.
30
+ * Rendered roads, walls and portal covers can overlap. An octree copies each triangle into
31
+ * every intersecting cell and repeatedly splits those copies, causing long rebuild stalls.
32
+ * A balanced bounding-volume tree stores each triangle once, even for coincident surfaces.
33
+ */
34
+ declare class CollisionTree extends Octree {
35
+ override build(): this;
36
+ }
37
+ //#endregion
38
+ //#region src/navigation/pointer.d.ts
39
+ /** The slice of a DOM element the gesture tracker needs; tests pass a fake. */
40
+ interface NavigationPointerSurface {
41
+ addEventListener(type: string, listener: (event: Event) => void, options?: boolean | AddEventListenerOptions): void;
42
+ removeEventListener(type: string, listener: (event: Event) => void): void;
43
+ setPointerCapture?(pointerId: number): void;
44
+ releasePointerCapture?(pointerId: number): void;
45
+ hasPointerCapture?(pointerId: number): boolean;
46
+ getBoundingClientRect?(): {
47
+ left: number;
48
+ top: number;
49
+ width: number;
50
+ height: number;
51
+ };
52
+ requestPointerLock?(): unknown;
53
+ focus?(options?: {
54
+ preventScroll?: boolean;
55
+ }): void;
56
+ ownerDocument?: {
57
+ pointerLockElement?: unknown;
58
+ exitPointerLock?(): void;
59
+ } | null;
60
+ }
61
+ /** The pointer-event fields the tracker reads. */
62
+ interface NavigationPointerEvent {
63
+ pointerId: number;
64
+ pointerType?: string;
65
+ button?: number;
66
+ buttons?: number;
67
+ clientX: number;
68
+ clientY: number;
69
+ movementX?: number;
70
+ movementY?: number;
71
+ shiftKey?: boolean;
72
+ ctrlKey?: boolean;
73
+ preventDefault?(): void;
74
+ }
75
+ interface NavigationWheelEvent {
76
+ deltaY: number;
77
+ /** 0 pixels, 1 lines, 2 pages. */
78
+ deltaMode?: number;
79
+ clientX?: number;
80
+ clientY?: number;
81
+ preventDefault?(): void;
82
+ }
83
+ /** Gestures accumulated since the previous `consume()`. */
84
+ interface NavigationGestures {
85
+ /** Drag or pointer-lock movement, in CSS pixels (right/down positive). */
86
+ look: [number, number];
87
+ /** Secondary-button, shift-drag or two-finger movement, in CSS pixels. */
88
+ pan: [number, number];
89
+ /** Log-scale zoom: positive zooms in (wheel up, pinch out). */
90
+ zoom: number;
91
+ /** Two-finger rotation in radians, clockwise positive. */
92
+ twist: number;
93
+ /** Clicks/taps that did not become drags, in element-relative CSS pixels. */
94
+ taps: Array<{
95
+ x: number;
96
+ y: number;
97
+ }>;
98
+ }
99
+ interface NavigationPointerOptions {
100
+ /** Movement (CSS px) before a press becomes a drag instead of a tap (default 6). */
101
+ tapSlop?: number;
102
+ /** Longest press (ms) still counted as a tap (default 350). */
103
+ tapMilliseconds?: number;
104
+ /** Wheel pixels per e-fold of zoom (default 400). */
105
+ wheelScale?: number;
106
+ /** Clock for tap timing; injectable for tests (default performance.now). */
107
+ now?: () => number;
108
+ }
109
+ /**
110
+ * Tracks pointer gestures on a surface. One mouse button or finger drags to look; the secondary
111
+ * or middle button, shift-drag, or two fingers pan; the wheel or a two-finger pinch zooms; two
112
+ * fingers rotating twist. Enable pointer lock for mouse-look (walk mode) with `setPointerLock`.
113
+ */
114
+ declare class NavigationPointer {
115
+ private readonly surface;
116
+ private readonly pointers;
117
+ private pending;
118
+ private pointerLock;
119
+ private readonly listeners;
120
+ private readonly tapSlop;
121
+ private readonly tapMilliseconds;
122
+ private readonly wheelScale;
123
+ private readonly now;
124
+ constructor(surface: NavigationPointerSurface, options?: NavigationPointerOptions);
125
+ /** Drop the accumulated gestures and return them. Call once per frame. */
126
+ consume(): NavigationGestures;
127
+ /** Request pointer lock on the next press (mouse-look); releasing unlocks immediately. */
128
+ setPointerLock(enabled: boolean): void;
129
+ /** Forget held pointers and pending gestures (e.g. on blur or a mode change). */
130
+ reset(): void;
131
+ dispose(): void;
132
+ private listen;
133
+ private locked;
134
+ private down;
135
+ private move;
136
+ private twoFinger;
137
+ private up;
138
+ private wheel;
139
+ }
140
+ //#endregion
141
+ //#region src/navigation/input-source.d.ts
142
+ /** Named actions the navigation profiles bind; software controls drive the same names. */
143
+ declare const NAVIGATION_ACTIONS: {
144
+ readonly forward: "nav-forward";
145
+ readonly back: "nav-back";
146
+ readonly left: "nav-left";
147
+ readonly right: "nav-right";
148
+ readonly up: "nav-up";
149
+ readonly down: "nav-down";
150
+ readonly lookLeft: "nav-look-left";
151
+ readonly lookRight: "nav-look-right";
152
+ readonly lookUp: "nav-look-up";
153
+ readonly lookDown: "nav-look-down";
154
+ readonly sprint: "nav-sprint";
155
+ readonly jump: "nav-jump";
156
+ readonly interact: "nav-interact";
157
+ readonly view: "nav-view";
158
+ readonly throttleUp: "nav-throttle-up";
159
+ readonly throttleDown: "nav-throttle-down";
160
+ readonly yawLeft: "nav-yaw-left";
161
+ readonly yawRight: "nav-yaw-right";
162
+ readonly engine: "nav-engine";
163
+ readonly gear: "nav-gear";
164
+ readonly flaps: "nav-flaps";
165
+ readonly recover: "nav-recover";
166
+ };
167
+ /** The navigation modes with a default input profile. */
168
+ type NavigationProfileName = "orbit" | "fly" | "walk" | "drive" | "pilot";
169
+ /**
170
+ * Default key/gamepad bindings per navigation mode. Orbit and fly use Q/E for down/up; walk and
171
+ * drive use E to interact (board or leave a vehicle), Space to jump or brake, and V to switch
172
+ * the vehicle view. Pilot flies an aircraft: W/S (or ↑/↓) pitch the nose down/up, A/D (or ←/→)
173
+ * bank, Q/Z work the rudder or pedals, Shift/Ctrl (or +/−, Page Up/Down) set throttle or
174
+ * collective, I toggles the engine, G the gear, F the flaps, R recovers after an impact, Space
175
+ * brakes, V switches the view and E leaves. Hosts may replace any profile through
176
+ * `InputMap.defineProfile`.
177
+ */
178
+ declare function navigationInputProfiles(): Record<NavigationProfileName, InputProfile>;
179
+ /** Flight controls beyond pitch (`-move.forward`) and roll (`move.right`), in the pilot profile. */
180
+ interface PilotInput {
181
+ /** Held throttle or collective change, -1..1 (more power positive). */
182
+ throttle: number;
183
+ /** Held rudder or pedals, -1..1 (right positive). */
184
+ yaw: number;
185
+ /** Presses since the previous frame (edge-triggered). */
186
+ engine: number;
187
+ gear: number;
188
+ flaps: number;
189
+ recover: number;
190
+ }
191
+ /** Everything a navigation controller reads in one frame. */
192
+ interface NavigationInput {
193
+ /** Movement intent, each -1..1 (forward, right, up). */
194
+ move: {
195
+ forward: number;
196
+ right: number;
197
+ up: number;
198
+ };
199
+ /** Look delta in CSS-pixel equivalents (pointer drag plus scaled gamepad stick). */
200
+ look: [number, number];
201
+ /** Pan delta in CSS pixels (secondary-button, shift or two-finger drag). */
202
+ pan: [number, number];
203
+ /** Log-scale zoom; positive zooms in. */
204
+ zoom: number;
205
+ /** Two-finger twist in radians, clockwise positive. */
206
+ twist: number;
207
+ sprint: boolean;
208
+ /** Held jump / brake. */
209
+ jump: boolean;
210
+ /** Presses of interact since the previous frame (edge-triggered). */
211
+ interact: number;
212
+ /** Presses of the view toggle since the previous frame (edge-triggered). */
213
+ view: number;
214
+ /** Clicks/taps in element-relative CSS pixels. */
215
+ taps: Array<{
216
+ x: number;
217
+ y: number;
218
+ }>;
219
+ /** Flight controls, present while the `pilot` profile is active. */
220
+ pilot?: PilotInput;
221
+ }
222
+ /** An input with no intent; controllers treat it as "hold still". */
223
+ declare function idleNavigationInput(): NavigationInput;
224
+ /** Structural event target for keyboard and focus events (a canvas, a document, a fake). */
225
+ interface NavigationKeyTarget {
226
+ addEventListener(type: string, listener: (event: unknown) => void): void;
227
+ removeEventListener(type: string, listener: (event: unknown) => void): void;
228
+ }
229
+ interface NavigationInputSourceOptions extends NavigationPointerOptions {
230
+ /** Element receiving pointer gestures, usually the canvas. */
231
+ element: NavigationPointerSurface;
232
+ /**
233
+ * Keyboard/focus event target. Defaults to `element`, which then needs to be focusable
234
+ * (`tabindex="0"` on a canvas); presses focus it automatically.
235
+ */
236
+ keyTarget?: NavigationKeyTarget;
237
+ /** Starting profile (default `'orbit'`). */
238
+ profile?: NavigationProfileName;
239
+ /** Gamepad look speed, CSS-pixel equivalents per second at full deflection (default 900). */
240
+ gamepadLookSpeed?: number;
241
+ /** Gamepad source; injectable for tests. */
242
+ getGamepads?: () => readonly (InputGamepad | null)[];
243
+ }
244
+ /**
245
+ * Combines an InputMap (keys, gamepad, software controls) with pointer gestures into one
246
+ * `NavigationInput` per frame. Switch profiles with `setProfile(mode)` when navigation changes.
247
+ */
248
+ declare class NavigationInputSource {
249
+ readonly map: InputMap;
250
+ readonly pointer: NavigationPointer;
251
+ private interactPresses;
252
+ private viewPresses;
253
+ private profile;
254
+ private readonly pilotPresses;
255
+ private readonly lookSpeed;
256
+ private readonly unsubscribe;
257
+ constructor(options: NavigationInputSourceOptions);
258
+ setProfile(profile: NavigationProfileName): void;
259
+ /** Poll devices and drain this frame's gestures and presses. `dt` is in seconds. */
260
+ read(dt: number): NavigationInput;
261
+ dispose(): void;
262
+ }
263
+ //#endregion
264
+ //#region src/navigation/orbit.d.ts
265
+ /** The orbit camera's framing. */
266
+ interface OrbitState {
267
+ /** Ground point the camera looks at (world meters). */
268
+ target: NavigationVector;
269
+ /** Camera distance from the target in meters. */
270
+ range: number;
271
+ /** Compass bearing of the view in radians: 0 looks north, PI/2 east. */
272
+ heading: number;
273
+ /** Downward tilt from the horizon in radians: small is oblique, PI/2 looks straight down. */
274
+ pitch: number;
275
+ }
276
+ /** A camera placement: position, the point it looks at, and its unit view direction. */
277
+ interface NavigationPose {
278
+ position: NavigationVector;
279
+ lookAt: NavigationVector;
280
+ direction: NavigationVector;
281
+ }
282
+ /** World facts a controller may query. */
283
+ interface NavigationEnvironment {
284
+ /** Ground height at world X/Z, or undefined while that terrain is not loaded. */
285
+ groundHeight(x: number, z: number): number | undefined;
286
+ }
287
+ interface OrbitControllerOptions {
288
+ minRange?: number;
289
+ maxRange?: number;
290
+ minPitch?: number;
291
+ maxPitch?: number;
292
+ /** Radians per CSS pixel of drag (default 0.005). */
293
+ rotateSensitivity?: number;
294
+ /** Seconds to close ~63% of the gap to the goal (default 0.12; 0 disables smoothing). */
295
+ smoothing?: number;
296
+ /** Minimum camera height above the ground under it, meters (default 3). */
297
+ minClearance?: number;
298
+ }
299
+ interface OrbitFlyToOptions {
300
+ /** Animation length (default scales with distance, 0.6-3 s). */
301
+ durationMs?: number;
302
+ }
303
+ declare class OrbitController {
304
+ private goal;
305
+ private current;
306
+ private flight;
307
+ private clock;
308
+ private readonly minRange;
309
+ private readonly maxRange;
310
+ private readonly minPitch;
311
+ private readonly maxPitch;
312
+ private readonly rotateSensitivity;
313
+ private readonly smoothing;
314
+ private readonly minClearance;
315
+ constructor(initial: OrbitState, options?: OrbitControllerOptions);
316
+ /** The state the camera is currently showing. */
317
+ get state(): OrbitState;
318
+ /** Whether a fly-to animation is running. */
319
+ get flying(): boolean;
320
+ /** Jump to a framing immediately (fields omitted keep their values). */
321
+ set(state: Partial<OrbitState>): void;
322
+ /** Animate to a framing; direct input during the flight cancels it. */
323
+ flyTo(state: Partial<OrbitState>, options?: OrbitFlyToOptions): void;
324
+ /**
325
+ * Advance by `dt` seconds under `input` and return the pose to render. The target settles onto
326
+ * the ground as terrain streams in, and the camera never dips below `minClearance`.
327
+ */
328
+ update(dt: number, input: NavigationInput, environment: NavigationEnvironment): NavigationPose;
329
+ private hasManipulation;
330
+ private applyInput;
331
+ private advanceFlight;
332
+ private interpolate;
333
+ private clamp;
334
+ private pose;
335
+ }
336
+ //#endregion
337
+ //#region src/navigation/fly.d.ts
338
+ interface FlyControllerOptions {
339
+ /** Slowest speed in m/s, used near the ground (default 12). */
340
+ minSpeed?: number;
341
+ /** Speed per meter of height above ground, in 1/s (default 1.2). */
342
+ speedPerMeter?: number;
343
+ /** Multiplier while sprinting (default 4). */
344
+ sprintFactor?: number;
345
+ /** Minimum height above the ground under the camera, meters (default 2). */
346
+ minClearance?: number;
347
+ /** Radians per CSS pixel of look (default 0.003). */
348
+ lookSensitivity?: number;
349
+ }
350
+ declare class FlyController {
351
+ readonly position: NavigationVector;
352
+ /** Engine yaw: 0 faces +X (east), -PI/2 faces north. */
353
+ yaw: number;
354
+ /** Radians above the horizon (negative looks down). */
355
+ pitch: number;
356
+ private readonly minSpeed;
357
+ private readonly speedPerMeter;
358
+ private readonly sprintFactor;
359
+ private readonly minClearance;
360
+ private readonly lookSensitivity;
361
+ constructor(position: NavigationVector, orientation: {
362
+ yaw: number;
363
+ pitch: number;
364
+ }, options?: FlyControllerOptions);
365
+ update(dt: number, input: NavigationInput, environment: NavigationEnvironment): NavigationPose;
366
+ }
367
+ //#endregion
368
+ //#region src/navigation/follow.d.ts
369
+ /** Where the followed subject is and which way it faces. */
370
+ interface FollowSubject {
371
+ position: NavigationVector;
372
+ /** Compass bearing in radians the subject faces: 0 north, PI/2 east. */
373
+ heading: number;
374
+ }
375
+ interface FollowControllerOptions {
376
+ /** Horizontal distance behind the subject, meters (default 6). */
377
+ distance?: number;
378
+ /** Camera height above the subject, meters (default 2.2). */
379
+ height?: number;
380
+ /** Height above the subject's origin the camera looks at, meters (default 1.2). */
381
+ lookHeight?: number;
382
+ /** Seconds to close ~63% of the gap to the ideal placement (default 0.18). */
383
+ smoothing?: number;
384
+ /** Seconds for look offsets to return behind the subject (default 1.5). */
385
+ recenter?: number;
386
+ /** Minimum height above the ground under the camera, meters (default 0.6). */
387
+ minClearance?: number;
388
+ }
389
+ declare class FollowController {
390
+ private position;
391
+ private yawOffset;
392
+ private pitchOffset;
393
+ private readonly distance;
394
+ private readonly height;
395
+ private readonly lookHeight;
396
+ private readonly smoothing;
397
+ private readonly recenter;
398
+ private readonly minClearance;
399
+ constructor(options?: FollowControllerOptions);
400
+ /** Snap next frame instead of easing (after a teleport or a subject change). */
401
+ reset(): void;
402
+ update(dt: number, subject: FollowSubject, input: NavigationInput, environment: NavigationEnvironment): NavigationPose;
403
+ }
404
+ //#endregion
405
+ //#region src/navigation/touch-joystick.d.ts
406
+ interface TouchStickOptions {
407
+ /** Knob travel radius in CSS pixels (default 56). */
408
+ radius?: number;
409
+ /** Fraction of the radius ignored around the center (default 0.12). */
410
+ deadZone?: number;
411
+ }
412
+ /** Stick geometry without a DOM: feed it pointer positions, read axes. */
413
+ declare class TouchStick {
414
+ private center;
415
+ private offset;
416
+ readonly radius: number;
417
+ private readonly deadZone;
418
+ constructor(options?: TouchStickOptions);
419
+ get active(): boolean;
420
+ /** Knob displacement from the center in CSS pixels, clamped to the radius. */
421
+ get knob(): {
422
+ x: number;
423
+ y: number;
424
+ };
425
+ press(x: number, y: number): void;
426
+ drag(x: number, y: number): void;
427
+ release(): void;
428
+ /** Movement intent: forward is up the screen, both in -1..1 after the dead zone. */
429
+ axes(): {
430
+ forward: number;
431
+ right: number;
432
+ };
433
+ }
434
+ interface TouchJoystickOptions extends TouchStickOptions {
435
+ /** Software-device name in the InputMap (default `'touch-joystick'`). */
436
+ source?: string;
437
+ /** Extra class names for styling the root element. */
438
+ className?: string;
439
+ }
440
+ interface TouchJoystick {
441
+ readonly element: HTMLElement;
442
+ readonly stick: TouchStick;
443
+ setVisible(visible: boolean): void;
444
+ dispose(): void;
445
+ }
446
+ /**
447
+ * Add a movement stick to `container` (bottom-left by default styling). The stick captures its
448
+ * own pointer, so the rest of the canvas keeps handling look/zoom gestures.
449
+ */
450
+ declare function createTouchJoystick(container: HTMLElement, input: Pick<InputMap, "setVirtual" | "clearVirtual">, options?: TouchJoystickOptions): TouchJoystick;
451
+ //#endregion
452
+ //#region src/navigation/walk-collision.d.ts
453
+ interface WalkCollisionOptions {
454
+ /** Skip car and aircraft geometry; the vehicle systems collide with those themselves. */
455
+ ignoreVehicles?: boolean;
456
+ /** Horizontal half-size of the neighborhood around the tracked point, meters (default 24). */
457
+ radius?: number;
458
+ /**
459
+ * How far the tracked point moves from the neighborhood's center before the tree is rebuilt
460
+ * around it (default 6). Queries reach at most `radius - rebuildDistance` from the point.
461
+ */
462
+ rebuildDistance?: number;
463
+ /**
464
+ * Vertical half-size of the neighborhood, meters, applied when `update` receives a `y`. Fast
465
+ * or airborne subjects use it so ground far below (or roofs far above) never enters the tree;
466
+ * leave it unset to include the whole column, which a walker's placement ray needs.
467
+ */
468
+ verticalRadius?: number;
469
+ /**
470
+ * Minimum time between scans of the visible scene for streaming changes while the tracked
471
+ * point stays inside the neighborhood, ms (default 0: every `update` scans). A scan visits
472
+ * every visible mesh under the root, so a per-frame host should pass something like 200;
473
+ * `invalidate()` forces the next `update` to scan.
474
+ */
475
+ rescanIntervalMs?: number;
476
+ /** Clock for the rescan interval, ms (default `performance.now`). */
477
+ now?: () => number;
478
+ }
479
+ /**
480
+ * A small collision neighborhood in metric coordinates, independent of floating-origin shifts.
481
+ * Only visible, resident geometry under `root` participates; evicted tiles and hidden layers
482
+ * disappear on the next scan, and instance transforms are expanded only inside the
483
+ * neighborhood. Large geometries (terrain tiles, building cells) are walked through a per-geometry
484
+ * spatial index, so a rebuild costs the triangles near the subject rather than the whole tile.
485
+ * Meshes opt out with `userData.walkIgnore`, and water materials (`userData.terrainWaterMaterial`)
486
+ * and `semantic:landcover` overlays are never solid.
487
+ */
488
+ declare class WalkCollision {
489
+ readonly origin: THREE.Vector3;
490
+ readonly octree: CollisionTree;
491
+ private readonly ignoreVehicles;
492
+ private readonly radius;
493
+ private readonly rebuildDistance;
494
+ private readonly verticalRadius;
495
+ private readonly rescanIntervalMs;
496
+ private readonly now;
497
+ private meshes;
498
+ private initialized;
499
+ /** Vertical center of the current neighborhood, or undefined when it spans the whole column. */
500
+ private centerY;
501
+ private scannedAt;
502
+ private stale;
503
+ constructor(options?: boolean | WalkCollisionOptions);
504
+ /**
505
+ * Track the subject at (x, z). With a `verticalRadius`, `y` bounds the neighborhood vertically.
506
+ * Scans the visible scene when the subject leaves the neighborhood, when the rescan interval
507
+ * has passed, or after `invalidate()`; rebuilds the tree only when nearby geometry changed.
508
+ */
509
+ update(root: THREE.Object3D, x: number, z: number, y?: number): void;
510
+ /**
511
+ * Scan the scene on the next `update` regardless of the rescan interval: call it before a
512
+ * query that must see geometry published this frame, such as placing a walker.
513
+ */
514
+ invalidate(): void;
515
+ clear(): void;
516
+ private rebuild;
517
+ }
518
+ //#endregion
519
+ //#region src/navigation/walk-controller.d.ts
520
+ declare const WALK_EYE_HEIGHT: number;
521
+ declare const WALK_SPEED: number;
522
+ declare const RUN_SPEED: number;
523
+ /**
524
+ * How far from the requested spot `place` may land the body, including its radius: the ground a
525
+ * host should have loaded (terrain and anything built on it) before calling `place`.
526
+ */
527
+ declare const WALK_PLACEMENT_RADIUS: number;
528
+ interface WalkInput {
529
+ forward: number;
530
+ right: number;
531
+ yaw: number;
532
+ sprint: boolean;
533
+ jump: boolean;
534
+ }
535
+ /**
536
+ * First-person walking over streamed geometry: a 1.8 m capsule with gravity, jumping, wall
537
+ * sliding and a 50° walkable-slope limit, integrated at a fixed 120 Hz so results agree across
538
+ * frame rates. `feet` is the world position; put the camera `WALK_EYE_HEIGHT` above it. Missing
539
+ * terrain pauses movement (it is never a bottomless pit) until coverage arrives.
540
+ */
541
+ declare class WalkController {
542
+ readonly feet: THREE.Vector3;
543
+ readonly velocity: THREE.Vector3;
544
+ grounded: boolean;
545
+ ready: boolean;
546
+ waitingForTerrain: boolean;
547
+ private accumulator;
548
+ private jumpHeld;
549
+ private readonly capsule;
550
+ reset(x: number, z: number): void;
551
+ /** Find open ground near the fly camera, rather than dropping through a building's roof. */
552
+ place(collision: WalkCollision, sampleHeight: (x: number, z: number) => number | undefined): boolean;
553
+ update(dt: number, input: WalkInput, collision: WalkCollision, sampleHeight: (x: number, z: number) => number | undefined): void;
554
+ private setCapsule;
555
+ }
556
+ //#endregion
557
+ export { type CameraOrientation, CollisionTree, FlyController, type FlyControllerOptions, FollowController, type FollowControllerOptions, type FollowSubject, MAX_LOOK_PITCH, NAVIGATION_ACTIONS, type NavigationEnvironment, type NavigationGestures, type NavigationInput, NavigationInputSource, type NavigationInputSourceOptions, type NavigationKeyTarget, NavigationPointer, type NavigationPointerEvent, type NavigationPointerOptions, type NavigationPointerSurface, type NavigationPose, type NavigationProfileName, type NavigationVector, type NavigationWheelEvent, OrbitController, type OrbitControllerOptions, type OrbitFlyToOptions, type OrbitState, type PilotInput, RUN_SPEED, type TouchJoystick, type TouchJoystickOptions, TouchStick, type TouchStickOptions, WALK_EYE_HEIGHT, WALK_PLACEMENT_RADIUS, WALK_SPEED, WalkCollision, type WalkCollisionOptions, WalkController, type WalkInput, applyCameraLookDelta, cameraForward, cameraPlanarForward, cameraRight, createTouchJoystick, idleNavigationInput, navigationInputProfiles, orientationFromDirection, viewNeedsImmediateUpdate };