@blcklab/anyo-player 0.5.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/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/README.md +304 -0
- package/dist/createAnyoPlayer.d.ts +3 -0
- package/dist/createAnyoPlayer.d.ts.map +1 -0
- package/dist/createAnyoPlayer.js +5 -0
- package/dist/createAnyoPlayer.js.map +1 -0
- package/dist/element-define.d.ts +2 -0
- package/dist/element-define.d.ts.map +1 -0
- package/dist/element-define.js +4 -0
- package/dist/element-define.js.map +1 -0
- package/dist/element.d.ts +66 -0
- package/dist/element.d.ts.map +1 -0
- package/dist/element.js +363 -0
- package/dist/element.js.map +1 -0
- package/dist/errors.d.ts +11 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +21 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/inputBindings.d.ts +3 -0
- package/dist/inputBindings.d.ts.map +1 -0
- package/dist/inputBindings.js +3 -0
- package/dist/inputBindings.js.map +1 -0
- package/dist/internal/AccessibilityController.d.ts +50 -0
- package/dist/internal/AccessibilityController.d.ts.map +1 -0
- package/dist/internal/AccessibilityController.js +212 -0
- package/dist/internal/AccessibilityController.js.map +1 -0
- package/dist/internal/AnyoPlayerCore.d.ts +357 -0
- package/dist/internal/AnyoPlayerCore.d.ts.map +1 -0
- package/dist/internal/AnyoPlayerCore.js +3880 -0
- package/dist/internal/AnyoPlayerCore.js.map +1 -0
- package/dist/internal/AudioController.d.ts +37 -0
- package/dist/internal/AudioController.d.ts.map +1 -0
- package/dist/internal/AudioController.js +167 -0
- package/dist/internal/AudioController.js.map +1 -0
- package/dist/internal/CaptionController.d.ts +16 -0
- package/dist/internal/CaptionController.d.ts.map +1 -0
- package/dist/internal/CaptionController.js +83 -0
- package/dist/internal/CaptionController.js.map +1 -0
- package/dist/internal/ContainerHost.d.ts +17 -0
- package/dist/internal/ContainerHost.d.ts.map +1 -0
- package/dist/internal/ContainerHost.js +110 -0
- package/dist/internal/ContainerHost.js.map +1 -0
- package/dist/internal/DesktopInputController.d.ts +80 -0
- package/dist/internal/DesktopInputController.d.ts.map +1 -0
- package/dist/internal/DesktopInputController.js +367 -0
- package/dist/internal/DesktopInputController.js.map +1 -0
- package/dist/internal/EmbeddingController.d.ts +33 -0
- package/dist/internal/EmbeddingController.d.ts.map +1 -0
- package/dist/internal/EmbeddingController.js +161 -0
- package/dist/internal/EmbeddingController.js.map +1 -0
- package/dist/internal/EventHub.d.ts +7 -0
- package/dist/internal/EventHub.d.ts.map +1 -0
- package/dist/internal/EventHub.js +27 -0
- package/dist/internal/EventHub.js.map +1 -0
- package/dist/internal/FrameworkAdapterController.d.ts +46 -0
- package/dist/internal/FrameworkAdapterController.d.ts.map +1 -0
- package/dist/internal/FrameworkAdapterController.js +165 -0
- package/dist/internal/FrameworkAdapterController.js.map +1 -0
- package/dist/internal/FullscreenController.d.ts +29 -0
- package/dist/internal/FullscreenController.d.ts.map +1 -0
- package/dist/internal/FullscreenController.js +122 -0
- package/dist/internal/FullscreenController.js.map +1 -0
- package/dist/internal/GamepadController.d.ts +54 -0
- package/dist/internal/GamepadController.d.ts.map +1 -0
- package/dist/internal/GamepadController.js +276 -0
- package/dist/internal/GamepadController.js.map +1 -0
- package/dist/internal/InputBindingsController.d.ts +34 -0
- package/dist/internal/InputBindingsController.d.ts.map +1 -0
- package/dist/internal/InputBindingsController.js +223 -0
- package/dist/internal/InputBindingsController.js.map +1 -0
- package/dist/internal/InteractionPresentationController.d.ts +38 -0
- package/dist/internal/InteractionPresentationController.d.ts.map +1 -0
- package/dist/internal/InteractionPresentationController.js +208 -0
- package/dist/internal/InteractionPresentationController.js.map +1 -0
- package/dist/internal/MapController.d.ts +16 -0
- package/dist/internal/MapController.d.ts.map +1 -0
- package/dist/internal/MapController.js +68 -0
- package/dist/internal/MapController.js.map +1 -0
- package/dist/internal/PerformanceController.d.ts +94 -0
- package/dist/internal/PerformanceController.d.ts.map +1 -0
- package/dist/internal/PerformanceController.js +455 -0
- package/dist/internal/PerformanceController.js.map +1 -0
- package/dist/internal/PlayerCameraController.d.ts +79 -0
- package/dist/internal/PlayerCameraController.d.ts.map +1 -0
- package/dist/internal/PlayerCameraController.js +551 -0
- package/dist/internal/PlayerCameraController.js.map +1 -0
- package/dist/internal/ResponsiveController.d.ts +37 -0
- package/dist/internal/ResponsiveController.d.ts.map +1 -0
- package/dist/internal/ResponsiveController.js +143 -0
- package/dist/internal/ResponsiveController.js.map +1 -0
- package/dist/internal/RuntimeFactory.d.ts +42 -0
- package/dist/internal/RuntimeFactory.d.ts.map +1 -0
- package/dist/internal/RuntimeFactory.js +93 -0
- package/dist/internal/RuntimeFactory.js.map +1 -0
- package/dist/internal/ScreenshotController.d.ts +8 -0
- package/dist/internal/ScreenshotController.d.ts.map +1 -0
- package/dist/internal/ScreenshotController.js +47 -0
- package/dist/internal/ScreenshotController.js.map +1 -0
- package/dist/internal/SessionController.d.ts +44 -0
- package/dist/internal/SessionController.d.ts.map +1 -0
- package/dist/internal/SessionController.js +411 -0
- package/dist/internal/SessionController.js.map +1 -0
- package/dist/internal/SourceResolver.d.ts +31 -0
- package/dist/internal/SourceResolver.d.ts.map +1 -0
- package/dist/internal/SourceResolver.js +362 -0
- package/dist/internal/SourceResolver.js.map +1 -0
- package/dist/internal/StateMachine.d.ts +10 -0
- package/dist/internal/StateMachine.d.ts.map +1 -0
- package/dist/internal/StateMachine.js +35 -0
- package/dist/internal/StateMachine.js.map +1 -0
- package/dist/internal/StyleController.d.ts +14 -0
- package/dist/internal/StyleController.d.ts.map +1 -0
- package/dist/internal/StyleController.js +116 -0
- package/dist/internal/StyleController.js.map +1 -0
- package/dist/internal/TelemetryController.d.ts +28 -0
- package/dist/internal/TelemetryController.d.ts.map +1 -0
- package/dist/internal/TelemetryController.js +113 -0
- package/dist/internal/TelemetryController.js.map +1 -0
- package/dist/internal/TouchInputController.d.ts +73 -0
- package/dist/internal/TouchInputController.d.ts.map +1 -0
- package/dist/internal/TouchInputController.js +379 -0
- package/dist/internal/TouchInputController.js.map +1 -0
- package/dist/internal/VfxController.d.ts +11 -0
- package/dist/internal/VfxController.d.ts.map +1 -0
- package/dist/internal/VfxController.js +23 -0
- package/dist/internal/VfxController.js.map +1 -0
- package/dist/internal/ViewPreferenceController.d.ts +40 -0
- package/dist/internal/ViewPreferenceController.d.ts.map +1 -0
- package/dist/internal/ViewPreferenceController.js +132 -0
- package/dist/internal/ViewPreferenceController.js.map +1 -0
- package/dist/internal/VisibilityController.d.ts +26 -0
- package/dist/internal/VisibilityController.d.ts.map +1 -0
- package/dist/internal/VisibilityController.js +62 -0
- package/dist/internal/VisibilityController.js.map +1 -0
- package/dist/internal/XRController.d.ts +42 -0
- package/dist/internal/XRController.d.ts.map +1 -0
- package/dist/internal/XRController.js +169 -0
- package/dist/internal/XRController.js.map +1 -0
- package/dist/internal/sourceUrls.d.ts +6 -0
- package/dist/internal/sourceUrls.d.ts.map +1 -0
- package/dist/internal/sourceUrls.js +79 -0
- package/dist/internal/sourceUrls.js.map +1 -0
- package/dist/react.d.ts +44 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +115 -0
- package/dist/react.js.map +1 -0
- package/dist/session.d.ts +3 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +3 -0
- package/dist/session.js.map +1 -0
- package/dist/styleText.d.ts +2 -0
- package/dist/styleText.d.ts.map +1 -0
- package/dist/styleText.js +2 -0
- package/dist/styleText.js.map +1 -0
- package/dist/styles.css +573 -0
- package/dist/types.d.ts +1476 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/PlayerUI.d.ts +193 -0
- package/dist/ui/PlayerUI.d.ts.map +1 -0
- package/dist/ui/PlayerUI.js +1201 -0
- package/dist/ui/PlayerUI.js.map +1 -0
- package/dist/vue.d.ts +97 -0
- package/dist/vue.d.ts.map +1 -0
- package/dist/vue.js +126 -0
- package/dist/vue.js.map +1 -0
- package/dist/worldCache.d.ts +16 -0
- package/dist/worldCache.d.ts.map +1 -0
- package/dist/worldCache.js +46 -0
- package/dist/worldCache.js.map +1 -0
- package/dist/worldSources.d.ts +19 -0
- package/dist/worldSources.d.ts.map +1 -0
- package/dist/worldSources.js +51 -0
- package/dist/worldSources.js.map +1 -0
- package/package.json +114 -0
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
import { CollisionWorld, FirstPersonController, } from '@blcklab/anyo';
|
|
2
|
+
const clamp = (value, minimum, maximum) => Math.max(minimum, Math.min(maximum, value));
|
|
3
|
+
const copy = (value) => [value[0], value[1], value[2]];
|
|
4
|
+
function centerAndRadius(options) {
|
|
5
|
+
if (options.bounds) {
|
|
6
|
+
const { min, max } = options.bounds;
|
|
7
|
+
const width = Math.max(.1, max[0] - min[0]);
|
|
8
|
+
const height = Math.max(.1, max[1] - min[1]);
|
|
9
|
+
const depth = Math.max(.1, max[2] - min[2]);
|
|
10
|
+
const center = [(min[0] + max[0]) / 2, (min[1] + max[1]) / 2, (min[2] + max[2]) / 2];
|
|
11
|
+
const radius = Math.max(1, Math.hypot(width, height, depth) / 2);
|
|
12
|
+
return { center, radius, width, height, depth, minimumY: min[1], maximumY: max[1] };
|
|
13
|
+
}
|
|
14
|
+
const radius = Math.max(1, options.radius ?? 10);
|
|
15
|
+
const center = copy(options.target ?? [0, 0, 0]);
|
|
16
|
+
return { center, radius, width: radius * 2, height: radius * 2, depth: radius * 2, minimumY: center[1] - radius, maximumY: center[1] + radius };
|
|
17
|
+
}
|
|
18
|
+
function forwardFromRotation(yaw, pitch) {
|
|
19
|
+
const cosine = Math.cos(pitch);
|
|
20
|
+
return [-Math.sin(yaw) * cosine, Math.sin(pitch), -Math.cos(yaw) * cosine];
|
|
21
|
+
}
|
|
22
|
+
function rotationToTarget(position, target) {
|
|
23
|
+
const dx = target[0] - position[0], dy = target[1] - position[1], dz = target[2] - position[2];
|
|
24
|
+
const length = Math.hypot(dx, dy, dz) || 1;
|
|
25
|
+
const x = dx / length, y = dy / length, z = dz / length;
|
|
26
|
+
return [Math.atan2(-x, -z), Math.asin(clamp(y, -1, 1))];
|
|
27
|
+
}
|
|
28
|
+
export class PlayerCameraController {
|
|
29
|
+
firstPersonOptions;
|
|
30
|
+
recoveryOptions;
|
|
31
|
+
callbacks;
|
|
32
|
+
plugin;
|
|
33
|
+
context = null;
|
|
34
|
+
firstPerson = null;
|
|
35
|
+
collisions = null;
|
|
36
|
+
unbind = null;
|
|
37
|
+
modeValue = 'explore';
|
|
38
|
+
enabledValue = true;
|
|
39
|
+
inputEnabledValue = false;
|
|
40
|
+
explorePose = null;
|
|
41
|
+
spawnPose = null;
|
|
42
|
+
target = [0, 0, 0];
|
|
43
|
+
orbitDistance = 20;
|
|
44
|
+
orbitYaw = .7;
|
|
45
|
+
orbitPitch = -.45;
|
|
46
|
+
topHeight = 40;
|
|
47
|
+
topVerticalSize = 40;
|
|
48
|
+
savedProjection = null;
|
|
49
|
+
freeSpeed = 12;
|
|
50
|
+
dragging = false;
|
|
51
|
+
activePointerId = null;
|
|
52
|
+
inspectionFocused = false;
|
|
53
|
+
canvas = null;
|
|
54
|
+
originalTabIndex = null;
|
|
55
|
+
lastPointer = [0, 0];
|
|
56
|
+
pressed = new Set();
|
|
57
|
+
cleanups = [];
|
|
58
|
+
lastGroundedPose = null;
|
|
59
|
+
groundedSeconds = 0;
|
|
60
|
+
recoveryAttempts = 0;
|
|
61
|
+
recoveryDisabled = false;
|
|
62
|
+
lastRecoveryAt = -Infinity;
|
|
63
|
+
constructor(firstPersonOptions, recoveryOptions, callbacks = {}) {
|
|
64
|
+
this.firstPersonOptions = firstPersonOptions;
|
|
65
|
+
this.recoveryOptions = recoveryOptions;
|
|
66
|
+
this.callbacks = callbacks;
|
|
67
|
+
this.plugin = {
|
|
68
|
+
name: 'anyo:player-camera',
|
|
69
|
+
setup: context => this.setup(context),
|
|
70
|
+
update: delta => this.update(delta),
|
|
71
|
+
applyChanges: (changes, context) => {
|
|
72
|
+
if (changes.some(change => change.type === 'collider-state'))
|
|
73
|
+
this.setColliders(context.compiled.colliders);
|
|
74
|
+
},
|
|
75
|
+
teardown: () => this.teardown(),
|
|
76
|
+
dispose: () => this.teardown(),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
get mode() { return this.modeValue; }
|
|
80
|
+
get enabled() { return this.enabledValue; }
|
|
81
|
+
get inputEnabled() { return this.inputEnabledValue; }
|
|
82
|
+
setEnabled(enabled) {
|
|
83
|
+
this.enabledValue = Boolean(enabled);
|
|
84
|
+
this.syncFirstPersonState();
|
|
85
|
+
}
|
|
86
|
+
setInputEnabled(enabled) {
|
|
87
|
+
this.inputEnabledValue = Boolean(enabled);
|
|
88
|
+
this.syncFirstPersonState();
|
|
89
|
+
}
|
|
90
|
+
clearInput() {
|
|
91
|
+
this.firstPerson?.clearInput();
|
|
92
|
+
this.pressed.clear();
|
|
93
|
+
this.dragging = false;
|
|
94
|
+
this.releaseActivePointer();
|
|
95
|
+
}
|
|
96
|
+
releasePointerLock() { this.firstPerson?.releasePointerLock(); }
|
|
97
|
+
setMoveAxes(right, forward) {
|
|
98
|
+
if (this.modeValue === 'explore')
|
|
99
|
+
this.firstPerson?.setMoveAxes(right, forward);
|
|
100
|
+
}
|
|
101
|
+
setRun(running) {
|
|
102
|
+
if (this.modeValue === 'explore')
|
|
103
|
+
this.firstPerson?.setRun(running);
|
|
104
|
+
}
|
|
105
|
+
addLookDelta(deltaX, deltaY) {
|
|
106
|
+
if (this.modeValue === 'explore')
|
|
107
|
+
this.firstPerson?.addLookDelta(deltaX, deltaY);
|
|
108
|
+
else if (this.modeValue === 'free')
|
|
109
|
+
this.rotateFree(deltaX, deltaY);
|
|
110
|
+
}
|
|
111
|
+
requestJump() { }
|
|
112
|
+
setFieldOfView(fieldOfView) {
|
|
113
|
+
if (!Number.isFinite(fieldOfView))
|
|
114
|
+
throw new TypeError('Anyo Player field of view must be finite.');
|
|
115
|
+
const context = this.requireContext();
|
|
116
|
+
const projection = context.renderer.camera.getProjection?.();
|
|
117
|
+
if (projection?.type === 'orthographic')
|
|
118
|
+
return;
|
|
119
|
+
context.renderer.camera.setProjection?.({
|
|
120
|
+
type: 'perspective',
|
|
121
|
+
fieldOfView: Math.max(20, Math.min(140, fieldOfView)),
|
|
122
|
+
...(projection?.near === undefined ? {} : { near: projection.near }),
|
|
123
|
+
...(projection?.far === undefined ? {} : { far: projection.far }),
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
setMode(mode, options = {}) {
|
|
127
|
+
const context = this.requireContext();
|
|
128
|
+
if (mode === this.modeValue && Object.keys(options).length === 0)
|
|
129
|
+
return;
|
|
130
|
+
const previous = this.modeValue;
|
|
131
|
+
if (previous === 'explore')
|
|
132
|
+
this.explorePose = {
|
|
133
|
+
position: copy(context.renderer.camera.getPosition()),
|
|
134
|
+
rotation: [...context.renderer.camera.getRotation()],
|
|
135
|
+
};
|
|
136
|
+
if (previous === 'top' && mode !== 'top')
|
|
137
|
+
this.restoreSavedProjection();
|
|
138
|
+
if (mode === 'top' && previous !== 'top')
|
|
139
|
+
this.savedProjection = context.renderer.camera.getProjection?.() ?? null;
|
|
140
|
+
this.modeValue = mode;
|
|
141
|
+
this.clearInput();
|
|
142
|
+
this.releasePointerLock();
|
|
143
|
+
this.inspectionFocused = mode !== 'explore';
|
|
144
|
+
this.applyModeOptions(options);
|
|
145
|
+
this.syncFirstPersonState();
|
|
146
|
+
if (mode === 'explore') {
|
|
147
|
+
const pose = options.restoreExplorePose === false ? null : this.explorePose;
|
|
148
|
+
if (pose)
|
|
149
|
+
this.teleport({ ...pose, resetMotion: true });
|
|
150
|
+
}
|
|
151
|
+
else if (options.bounds || options.target) {
|
|
152
|
+
this.frame(options);
|
|
153
|
+
}
|
|
154
|
+
else if (mode === 'orbit' || mode === 'top') {
|
|
155
|
+
this.frame({ target: this.target, radius: Math.max(5, this.orbitDistance / 2) });
|
|
156
|
+
}
|
|
157
|
+
if (mode !== 'explore')
|
|
158
|
+
this.focusInspectionCanvas();
|
|
159
|
+
this.callbacks.onModeChange?.(previous, mode);
|
|
160
|
+
}
|
|
161
|
+
frame(options = {}) {
|
|
162
|
+
const context = this.requireContext();
|
|
163
|
+
const framed = centerAndRadius(options);
|
|
164
|
+
this.target = framed.center;
|
|
165
|
+
if (this.modeValue === 'top') {
|
|
166
|
+
const canvas = context.renderer.canvas;
|
|
167
|
+
const aspect = Math.max(.1, (canvas.clientWidth || canvas.width || 1) / Math.max(1, canvas.clientHeight || canvas.height || 1));
|
|
168
|
+
const padding = Math.max(1, options.padding ?? 1.14);
|
|
169
|
+
this.topVerticalSize = Math.max(6, Math.max(framed.depth, framed.width / aspect) * padding);
|
|
170
|
+
this.topHeight = Math.max(options.distance ?? this.topVerticalSize * .65, framed.height + 16, 24);
|
|
171
|
+
const cameraY = framed.maximumY + this.topHeight;
|
|
172
|
+
context.renderer.camera.setProjection?.({
|
|
173
|
+
type: 'orthographic',
|
|
174
|
+
verticalSize: this.topVerticalSize,
|
|
175
|
+
near: .05,
|
|
176
|
+
far: Math.max(1_000, this.topHeight + framed.height + 500),
|
|
177
|
+
});
|
|
178
|
+
context.renderer.camera.setPosition([this.target[0], cameraY, this.target[2] + .001]);
|
|
179
|
+
context.renderer.camera.setRotation(options.northUp === false ? this.orbitYaw : 0, -Math.PI / 2 + .00001);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
if (this.modeValue === 'orbit') {
|
|
183
|
+
this.orbitDistance = Math.max(options.distance ?? framed.radius * 2.2, 4);
|
|
184
|
+
this.applyOrbitCamera();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (this.modeValue === 'free') {
|
|
188
|
+
const distance = Math.max(options.distance ?? framed.radius * 2.2, 4);
|
|
189
|
+
const forward = forwardFromRotation(this.orbitYaw, this.orbitPitch);
|
|
190
|
+
const position = [this.target[0] - forward[0] * distance, this.target[1] - forward[1] * distance, this.target[2] - forward[2] * distance];
|
|
191
|
+
const rotation = rotationToTarget(position, this.target);
|
|
192
|
+
context.renderer.camera.setPosition(position);
|
|
193
|
+
context.renderer.camera.setRotation(rotation[0], rotation[1]);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
teleport(options) {
|
|
197
|
+
const context = this.requireContext();
|
|
198
|
+
const position = copy(options.position);
|
|
199
|
+
if (!position.every(Number.isFinite))
|
|
200
|
+
throw new TypeError('Anyo Player teleport position must contain finite numbers.');
|
|
201
|
+
if (options.resetMotion !== false)
|
|
202
|
+
this.recreateFirstPerson();
|
|
203
|
+
context.renderer.camera.setPosition(position);
|
|
204
|
+
if (options.rotation)
|
|
205
|
+
context.renderer.camera.setRotation(options.rotation[0], options.rotation[1]);
|
|
206
|
+
if (options.clearInput !== false)
|
|
207
|
+
this.clearInput();
|
|
208
|
+
this.recoveryDisabled = false;
|
|
209
|
+
this.recoveryAttempts = 0;
|
|
210
|
+
this.groundedSeconds = 0;
|
|
211
|
+
}
|
|
212
|
+
setup(context) {
|
|
213
|
+
this.teardown();
|
|
214
|
+
this.context = context;
|
|
215
|
+
this.collisions = new CollisionWorld(context.compiled.colliders);
|
|
216
|
+
this.spawnPose = { position: copy(context.renderer.camera.getPosition()), rotation: [...context.renderer.camera.getRotation()] };
|
|
217
|
+
this.savedProjection = context.renderer.camera.getProjection?.() ?? null;
|
|
218
|
+
this.lastGroundedPose = this.resolveSupportedPose(this.spawnPose.position, this.spawnPose.rotation);
|
|
219
|
+
this.recreateFirstPerson();
|
|
220
|
+
this.unbind = context.world.exploration.bind(this);
|
|
221
|
+
this.installInspectionInput(context.renderer.canvas);
|
|
222
|
+
}
|
|
223
|
+
teardown() {
|
|
224
|
+
this.unbind?.();
|
|
225
|
+
this.unbind = null;
|
|
226
|
+
this.firstPerson?.dispose();
|
|
227
|
+
this.firstPerson = null;
|
|
228
|
+
for (const cleanup of this.cleanups.splice(0))
|
|
229
|
+
cleanup();
|
|
230
|
+
if (this.canvas && this.originalTabIndex !== null)
|
|
231
|
+
this.canvas.tabIndex = this.originalTabIndex;
|
|
232
|
+
this.canvas = null;
|
|
233
|
+
this.originalTabIndex = null;
|
|
234
|
+
this.context = null;
|
|
235
|
+
this.collisions = null;
|
|
236
|
+
this.pressed.clear();
|
|
237
|
+
this.dragging = false;
|
|
238
|
+
this.activePointerId = null;
|
|
239
|
+
this.inspectionFocused = false;
|
|
240
|
+
this.savedProjection = null;
|
|
241
|
+
}
|
|
242
|
+
recreateFirstPerson() {
|
|
243
|
+
if (!this.context)
|
|
244
|
+
return;
|
|
245
|
+
this.firstPerson?.dispose();
|
|
246
|
+
this.firstPerson = new FirstPersonController(this.context, this.firstPersonOptions);
|
|
247
|
+
this.syncFirstPersonState();
|
|
248
|
+
}
|
|
249
|
+
syncFirstPersonState() {
|
|
250
|
+
this.firstPerson?.setEnabled(this.enabledValue && this.modeValue === 'explore');
|
|
251
|
+
this.firstPerson?.setInputEnabled(this.inputEnabledValue && this.modeValue === 'explore');
|
|
252
|
+
}
|
|
253
|
+
update(deltaSeconds) {
|
|
254
|
+
if (!this.context || !this.enabledValue)
|
|
255
|
+
return;
|
|
256
|
+
if (this.modeValue === 'explore') {
|
|
257
|
+
this.firstPerson?.update(deltaSeconds);
|
|
258
|
+
this.updateFallRecovery(deltaSeconds);
|
|
259
|
+
}
|
|
260
|
+
else if (this.modeValue === 'free' && this.inspectionFocused)
|
|
261
|
+
this.updateFree(deltaSeconds);
|
|
262
|
+
}
|
|
263
|
+
setColliders(colliders) {
|
|
264
|
+
this.collisions?.setColliders(colliders);
|
|
265
|
+
this.firstPerson?.setColliders(colliders);
|
|
266
|
+
}
|
|
267
|
+
restoreSavedProjection() {
|
|
268
|
+
if (!this.context?.renderer.camera.setProjection)
|
|
269
|
+
return;
|
|
270
|
+
const projection = this.savedProjection ?? { type: 'perspective', fieldOfView: 70, near: .05, far: 2_000 };
|
|
271
|
+
this.context.renderer.camera.setProjection(projection);
|
|
272
|
+
}
|
|
273
|
+
applyModeOptions(options) {
|
|
274
|
+
if (options.target)
|
|
275
|
+
this.target = copy(options.target);
|
|
276
|
+
if (Number.isFinite(options.distance))
|
|
277
|
+
this.orbitDistance = Math.max(1, options.distance);
|
|
278
|
+
if (Number.isFinite(options.yaw))
|
|
279
|
+
this.orbitYaw = options.yaw;
|
|
280
|
+
if (Number.isFinite(options.pitch))
|
|
281
|
+
this.orbitPitch = clamp(options.pitch, -Math.PI / 2 + .02, Math.PI / 2 - .02);
|
|
282
|
+
if (Number.isFinite(options.speed))
|
|
283
|
+
this.freeSpeed = Math.max(.1, options.speed);
|
|
284
|
+
}
|
|
285
|
+
applyOrbitCamera() {
|
|
286
|
+
if (!this.context)
|
|
287
|
+
return;
|
|
288
|
+
const forward = forwardFromRotation(this.orbitYaw, this.orbitPitch);
|
|
289
|
+
const position = [this.target[0] - forward[0] * this.orbitDistance, this.target[1] - forward[1] * this.orbitDistance, this.target[2] - forward[2] * this.orbitDistance];
|
|
290
|
+
this.context.renderer.camera.setPosition(position);
|
|
291
|
+
this.context.renderer.camera.setRotation(this.orbitYaw, this.orbitPitch);
|
|
292
|
+
}
|
|
293
|
+
rotateFree(deltaX, deltaY) {
|
|
294
|
+
if (!this.context)
|
|
295
|
+
return;
|
|
296
|
+
const rotation = this.context.renderer.camera.getRotation();
|
|
297
|
+
this.context.renderer.camera.setRotation(rotation[0] - deltaX * .004, clamp(rotation[1] - deltaY * .004, -Math.PI / 2 + .02, Math.PI / 2 - .02));
|
|
298
|
+
}
|
|
299
|
+
updateFree(deltaSeconds) {
|
|
300
|
+
if (!this.context)
|
|
301
|
+
return;
|
|
302
|
+
const camera = this.context.renderer.camera;
|
|
303
|
+
const forward = camera.getForward(), right = camera.getRight();
|
|
304
|
+
const forwardAxis = Number(this.pressed.has('KeyW') || this.pressed.has('ArrowUp')) - Number(this.pressed.has('KeyS') || this.pressed.has('ArrowDown'));
|
|
305
|
+
const rightAxis = Number(this.pressed.has('KeyD') || this.pressed.has('ArrowRight')) - Number(this.pressed.has('KeyA') || this.pressed.has('ArrowLeft'));
|
|
306
|
+
const verticalAxis = Number(this.pressed.has('KeyE') || this.pressed.has('Space')) - Number(this.pressed.has('KeyQ') || this.pressed.has('ShiftLeft'));
|
|
307
|
+
const length = Math.hypot(forwardAxis, rightAxis, verticalAxis) || 1;
|
|
308
|
+
const speed = this.freeSpeed * deltaSeconds / length;
|
|
309
|
+
const position = camera.getPosition();
|
|
310
|
+
camera.setPosition([
|
|
311
|
+
position[0] + (forward[0] * forwardAxis + right[0] * rightAxis) * speed,
|
|
312
|
+
position[1] + (forward[1] * forwardAxis + right[1] * rightAxis + verticalAxis) * speed,
|
|
313
|
+
position[2] + (forward[2] * forwardAxis + right[2] * rightAxis) * speed,
|
|
314
|
+
]);
|
|
315
|
+
}
|
|
316
|
+
installInspectionInput(canvas) {
|
|
317
|
+
this.canvas = canvas;
|
|
318
|
+
this.originalTabIndex = canvas.tabIndex;
|
|
319
|
+
if (canvas.tabIndex < 0)
|
|
320
|
+
canvas.tabIndex = 0;
|
|
321
|
+
const onPointerDown = (event) => {
|
|
322
|
+
if (this.modeValue === 'explore')
|
|
323
|
+
return;
|
|
324
|
+
if (event.pointerType === 'mouse' && event.button !== 0)
|
|
325
|
+
return;
|
|
326
|
+
event.preventDefault();
|
|
327
|
+
event.stopImmediatePropagation();
|
|
328
|
+
this.inspectionFocused = true;
|
|
329
|
+
this.focusInspectionCanvas();
|
|
330
|
+
this.dragging = true;
|
|
331
|
+
this.activePointerId = event.pointerId;
|
|
332
|
+
this.lastPointer = [event.clientX, event.clientY];
|
|
333
|
+
this.capturePointer(event.pointerId);
|
|
334
|
+
};
|
|
335
|
+
const onPointerMove = (event) => {
|
|
336
|
+
if (!this.dragging || this.modeValue === 'explore')
|
|
337
|
+
return;
|
|
338
|
+
if (this.activePointerId !== null && event.pointerId !== this.activePointerId)
|
|
339
|
+
return;
|
|
340
|
+
event.preventDefault();
|
|
341
|
+
event.stopImmediatePropagation();
|
|
342
|
+
const dx = event.clientX - this.lastPointer[0], dy = event.clientY - this.lastPointer[1];
|
|
343
|
+
this.lastPointer = [event.clientX, event.clientY];
|
|
344
|
+
if (this.modeValue === 'orbit') {
|
|
345
|
+
this.orbitYaw -= dx * .006;
|
|
346
|
+
this.orbitPitch = clamp(this.orbitPitch - dy * .006, -Math.PI / 2 + .03, Math.PI / 2 - .03);
|
|
347
|
+
this.applyOrbitCamera();
|
|
348
|
+
}
|
|
349
|
+
else if (this.modeValue === 'top' && this.context) {
|
|
350
|
+
const camera = this.context.renderer.camera;
|
|
351
|
+
const viewportHeight = Math.max(1, this.canvas?.clientHeight || this.canvas?.height || 1);
|
|
352
|
+
const scale = this.topVerticalSize / viewportHeight;
|
|
353
|
+
this.target = [this.target[0] - dx * scale, this.target[1], this.target[2] - dy * scale];
|
|
354
|
+
const current = camera.getPosition();
|
|
355
|
+
camera.setPosition([this.target[0], current[1], this.target[2] + .001]);
|
|
356
|
+
}
|
|
357
|
+
else if (this.modeValue === 'free')
|
|
358
|
+
this.rotateFree(dx, dy);
|
|
359
|
+
};
|
|
360
|
+
const onPointerUp = (event) => {
|
|
361
|
+
if (!this.dragging || this.modeValue === 'explore')
|
|
362
|
+
return;
|
|
363
|
+
if (this.activePointerId !== null && event.pointerId !== this.activePointerId)
|
|
364
|
+
return;
|
|
365
|
+
event.preventDefault();
|
|
366
|
+
event.stopImmediatePropagation();
|
|
367
|
+
this.dragging = false;
|
|
368
|
+
this.releaseActivePointer();
|
|
369
|
+
};
|
|
370
|
+
const onLostPointerCapture = (event) => {
|
|
371
|
+
if (this.activePointerId === event.pointerId) {
|
|
372
|
+
this.activePointerId = null;
|
|
373
|
+
this.dragging = false;
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
const onWheel = (event) => {
|
|
377
|
+
if (this.modeValue === 'explore')
|
|
378
|
+
return;
|
|
379
|
+
event.preventDefault();
|
|
380
|
+
event.stopImmediatePropagation();
|
|
381
|
+
this.inspectionFocused = true;
|
|
382
|
+
this.focusInspectionCanvas();
|
|
383
|
+
const factor = Math.exp(event.deltaY * .001);
|
|
384
|
+
if (this.modeValue === 'orbit') {
|
|
385
|
+
this.orbitDistance = clamp(this.orbitDistance * factor, 1, 10_000);
|
|
386
|
+
this.applyOrbitCamera();
|
|
387
|
+
}
|
|
388
|
+
else if (this.modeValue === 'top' && this.context) {
|
|
389
|
+
this.topVerticalSize = clamp(this.topVerticalSize * factor, 2, 50_000);
|
|
390
|
+
if (this.context.renderer.camera.setProjection) {
|
|
391
|
+
const current = this.context.renderer.camera.getProjection?.();
|
|
392
|
+
this.context.renderer.camera.setProjection({
|
|
393
|
+
type: 'orthographic',
|
|
394
|
+
verticalSize: this.topVerticalSize,
|
|
395
|
+
near: current?.near ?? .05,
|
|
396
|
+
far: current?.far ?? 2_000,
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
this.topHeight = clamp(this.topHeight * factor, 3, 20_000);
|
|
401
|
+
this.context.renderer.camera.setPosition([this.target[0], this.target[1] + this.topHeight, this.target[2] + .001]);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
else if (this.modeValue === 'free') {
|
|
405
|
+
this.freeSpeed = clamp(this.freeSpeed * factor, .5, 500);
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
const onKeyDown = (event) => {
|
|
409
|
+
if (this.modeValue !== 'free' || !this.inspectionFocused)
|
|
410
|
+
return;
|
|
411
|
+
this.pressed.add(event.code);
|
|
412
|
+
if (['KeyW', 'KeyA', 'KeyS', 'KeyD', 'KeyQ', 'KeyE', 'Space', 'ShiftLeft', 'ShiftRight', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.code))
|
|
413
|
+
event.preventDefault();
|
|
414
|
+
};
|
|
415
|
+
const onKeyUp = (event) => { this.pressed.delete(event.code); };
|
|
416
|
+
const onBlur = () => {
|
|
417
|
+
this.pressed.clear();
|
|
418
|
+
this.dragging = false;
|
|
419
|
+
this.releaseActivePointer();
|
|
420
|
+
this.inspectionFocused = false;
|
|
421
|
+
};
|
|
422
|
+
const onFocus = () => { if (this.modeValue !== 'explore')
|
|
423
|
+
this.inspectionFocused = true; };
|
|
424
|
+
canvas.addEventListener('pointerdown', onPointerDown, true);
|
|
425
|
+
canvas.addEventListener('pointermove', onPointerMove, true);
|
|
426
|
+
canvas.addEventListener('pointerup', onPointerUp, true);
|
|
427
|
+
canvas.addEventListener('pointercancel', onPointerUp, true);
|
|
428
|
+
canvas.addEventListener('lostpointercapture', onLostPointerCapture, true);
|
|
429
|
+
canvas.addEventListener('wheel', onWheel, { capture: true, passive: false });
|
|
430
|
+
canvas.addEventListener('keydown', onKeyDown, true);
|
|
431
|
+
canvas.addEventListener('keyup', onKeyUp, true);
|
|
432
|
+
canvas.addEventListener('blur', onBlur, true);
|
|
433
|
+
canvas.addEventListener('focus', onFocus, true);
|
|
434
|
+
this.cleanups.push(() => canvas.removeEventListener('pointerdown', onPointerDown, true), () => canvas.removeEventListener('pointermove', onPointerMove, true), () => canvas.removeEventListener('pointerup', onPointerUp, true), () => canvas.removeEventListener('pointercancel', onPointerUp, true), () => canvas.removeEventListener('lostpointercapture', onLostPointerCapture, true), () => canvas.removeEventListener('wheel', onWheel, true), () => canvas.removeEventListener('keydown', onKeyDown, true), () => canvas.removeEventListener('keyup', onKeyUp, true), () => canvas.removeEventListener('blur', onBlur, true), () => canvas.removeEventListener('focus', onFocus, true));
|
|
435
|
+
}
|
|
436
|
+
focusInspectionCanvas() {
|
|
437
|
+
if (!this.canvas)
|
|
438
|
+
return;
|
|
439
|
+
try {
|
|
440
|
+
this.canvas.focus({ preventScroll: true });
|
|
441
|
+
}
|
|
442
|
+
catch {
|
|
443
|
+
try {
|
|
444
|
+
this.canvas.focus();
|
|
445
|
+
}
|
|
446
|
+
catch { }
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
capturePointer(pointerId) {
|
|
450
|
+
if (!this.canvas?.setPointerCapture)
|
|
451
|
+
return;
|
|
452
|
+
try {
|
|
453
|
+
this.canvas.setPointerCapture(pointerId);
|
|
454
|
+
}
|
|
455
|
+
catch { /* Browsers may reject capture when the pointer is no longer active. Dragging still works inside the canvas. */ }
|
|
456
|
+
}
|
|
457
|
+
releaseActivePointer() {
|
|
458
|
+
if (!this.canvas || this.activePointerId === null)
|
|
459
|
+
return;
|
|
460
|
+
const pointerId = this.activePointerId;
|
|
461
|
+
this.activePointerId = null;
|
|
462
|
+
if (!this.canvas.releasePointerCapture)
|
|
463
|
+
return;
|
|
464
|
+
try {
|
|
465
|
+
if (!this.canvas.hasPointerCapture || this.canvas.hasPointerCapture(pointerId))
|
|
466
|
+
this.canvas.releasePointerCapture(pointerId);
|
|
467
|
+
}
|
|
468
|
+
catch { /* Pointer capture can already be gone after cancellation or DOM replacement. */ }
|
|
469
|
+
}
|
|
470
|
+
updateFallRecovery(deltaSeconds) {
|
|
471
|
+
if (!this.context || !this.collisions || this.recoveryOptions === false || this.recoveryDisabled)
|
|
472
|
+
return;
|
|
473
|
+
const options = this.recoveryOptions;
|
|
474
|
+
const camera = this.context.renderer.camera;
|
|
475
|
+
const position = camera.getPosition();
|
|
476
|
+
const rotation = camera.getRotation();
|
|
477
|
+
const supported = this.resolveSupportedPose(position, rotation);
|
|
478
|
+
if (supported && Math.abs(supported.position[1] - position[1]) <= Math.max(.12, options.supportTolerance ?? .18)) {
|
|
479
|
+
this.groundedSeconds += deltaSeconds;
|
|
480
|
+
if (this.groundedSeconds >= .25)
|
|
481
|
+
this.lastGroundedPose = supported;
|
|
482
|
+
if (this.groundedSeconds >= Math.max(1, options.resetAttemptsAfterSeconds ?? 4))
|
|
483
|
+
this.recoveryAttempts = 0;
|
|
484
|
+
}
|
|
485
|
+
else
|
|
486
|
+
this.groundedSeconds = 0;
|
|
487
|
+
const minimumY = options.minimumY ?? -12;
|
|
488
|
+
if (position[1] >= minimumY)
|
|
489
|
+
return;
|
|
490
|
+
const now = Date.now();
|
|
491
|
+
const cooldown = Math.max(250, options.cooldownMs ?? 1_200);
|
|
492
|
+
if (now - this.lastRecoveryAt < cooldown)
|
|
493
|
+
return;
|
|
494
|
+
const maximum = Math.max(1, Math.floor(options.maxAttempts ?? 3));
|
|
495
|
+
if (this.recoveryAttempts >= maximum) {
|
|
496
|
+
this.recoveryDisabled = true;
|
|
497
|
+
this.callbacks.onRecoveryChange?.({ state: 'failed', attempt: this.recoveryAttempts, maxAttempts: maximum, position: copy(position), message: 'Automatic fall recovery stopped after the maximum number of attempts.' });
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
this.lastRecoveryAt = now;
|
|
501
|
+
this.recoveryAttempts += 1;
|
|
502
|
+
const candidate = this.findRecoveryPose();
|
|
503
|
+
if (!candidate) {
|
|
504
|
+
this.recoveryDisabled = true;
|
|
505
|
+
this.callbacks.onRecoveryChange?.({ state: 'failed', attempt: this.recoveryAttempts, maxAttempts: maximum, position: copy(position), message: 'No collision-safe recovery surface was found.' });
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
const attempt = this.recoveryAttempts;
|
|
509
|
+
this.callbacks.onRecoveryChange?.({ state: 'recovering', attempt, maxAttempts: maximum, position: copy(position), message: 'Recovering from a fall.' });
|
|
510
|
+
this.teleport({ ...candidate, resetMotion: true });
|
|
511
|
+
this.recoveryAttempts = attempt;
|
|
512
|
+
this.callbacks.onRecoveryChange?.({ state: 'recovered', attempt, maxAttempts: maximum, position: copy(candidate.position), message: 'Recovered to verified walkable ground.' });
|
|
513
|
+
}
|
|
514
|
+
resolveSupportedPose(position, rotation) {
|
|
515
|
+
if (!this.context || !this.collisions)
|
|
516
|
+
return null;
|
|
517
|
+
const document = this.context.document.exploration ?? {};
|
|
518
|
+
const eyeHeight = document.eyeHeight ?? 1.65;
|
|
519
|
+
const height = document.height ?? 1.75;
|
|
520
|
+
const radius = document.radius ?? .3;
|
|
521
|
+
const support = this.collisions.findSupportAt(position, position[1] + Math.max(1, document.stepHeight ?? .32));
|
|
522
|
+
if (support === null)
|
|
523
|
+
return null;
|
|
524
|
+
const candidate = [position[0], support + eyeHeight, position[2]];
|
|
525
|
+
if (!this.collisions.canOccupy(candidate, { height, eyeHeight, radius, stepHeight: document.stepHeight ?? .32 }))
|
|
526
|
+
return null;
|
|
527
|
+
return { position: candidate, rotation };
|
|
528
|
+
}
|
|
529
|
+
findRecoveryPose() {
|
|
530
|
+
const seeds = [this.lastGroundedPose, this.spawnPose].filter((value) => Boolean(value));
|
|
531
|
+
for (const seed of seeds) {
|
|
532
|
+
for (const radius of [0, .75, 1.5, 3, 6]) {
|
|
533
|
+
const count = radius === 0 ? 1 : 12;
|
|
534
|
+
for (let index = 0; index < count; index += 1) {
|
|
535
|
+
const angle = count === 1 ? 0 : index / count * Math.PI * 2;
|
|
536
|
+
const position = [seed.position[0] + Math.cos(angle) * radius, seed.position[1] + 4, seed.position[2] + Math.sin(angle) * radius];
|
|
537
|
+
const supported = this.resolveSupportedPose(position, seed.rotation);
|
|
538
|
+
if (supported)
|
|
539
|
+
return supported;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
return null;
|
|
544
|
+
}
|
|
545
|
+
requireContext() {
|
|
546
|
+
if (!this.context)
|
|
547
|
+
throw new Error('Anyo Player camera controls require a loaded world.');
|
|
548
|
+
return this.context;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
//# sourceMappingURL=PlayerCameraController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlayerCameraController.js","sourceRoot":"","sources":["../../src/internal/PlayerCameraController.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,qBAAqB,GAOtB,MAAM,eAAe,CAAA;AAetB,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,OAAe,EAAE,OAAe,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,G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,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAA;oBACvI,MAAM,SAAS,GAAG,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;oBACpE,IAAI,SAAS;wBAAE,OAAO,SAAS,CAAA;gBACjC,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAEO,cAAc;QACpB,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;QACzF,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RendererAdapter } from '@blcklab/anyo';
|
|
2
|
+
import type { AnyoPlayerResizeEvent, AnyoPlayerResizeOptions } from '../types.js';
|
|
3
|
+
export interface ResponsiveControllerCallbacks {
|
|
4
|
+
onResize(event: AnyoPlayerResizeEvent): void;
|
|
5
|
+
onWarning(message: string): void;
|
|
6
|
+
}
|
|
7
|
+
export declare class ResponsiveController {
|
|
8
|
+
private readonly container;
|
|
9
|
+
private readonly document;
|
|
10
|
+
private readonly window;
|
|
11
|
+
private readonly enabled;
|
|
12
|
+
private readonly fixedPixelRatio;
|
|
13
|
+
private readonly maxPixelRatio;
|
|
14
|
+
private readonly callbacks;
|
|
15
|
+
private renderer;
|
|
16
|
+
private observer;
|
|
17
|
+
private mediaQuery;
|
|
18
|
+
private current;
|
|
19
|
+
private started;
|
|
20
|
+
private disposed;
|
|
21
|
+
constructor(container: HTMLElement, options: false | AnyoPlayerResizeOptions | undefined, rendererPixelRatio: number | undefined, rendererMaxPixelRatio: number | undefined, callbacks: ResponsiveControllerCallbacks);
|
|
22
|
+
get viewport(): AnyoPlayerResizeEvent;
|
|
23
|
+
start(): void;
|
|
24
|
+
attach(renderer: RendererAdapter): void;
|
|
25
|
+
detach(renderer?: RendererAdapter): void;
|
|
26
|
+
resizeNow(force?: boolean): AnyoPlayerResizeEvent;
|
|
27
|
+
dispose(): void;
|
|
28
|
+
private measure;
|
|
29
|
+
private rawDevicePixelRatio;
|
|
30
|
+
private resolvePixelRatio;
|
|
31
|
+
private installDprWatcher;
|
|
32
|
+
private removeDprWatcher;
|
|
33
|
+
private readonly handleWindowResize;
|
|
34
|
+
private readonly handleDprChange;
|
|
35
|
+
private readonly handleLegacyDprChange;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=ResponsiveController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsiveController.d.ts","sourceRoot":"","sources":["../../src/internal/ResponsiveController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,aAAa,CAAA;AAcpB,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,KAAK,EAAE,qBAAqB,GAAG,IAAI,CAAA;IAC5C,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CACjC;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAa;IACvC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAe;IAC/C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAQ;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA+B;IACzD,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,QAAQ,CAAkC;IAClD,OA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