@realitycollective/iwsdk-uiextensions 0.1.0-preview.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.
- package/CHANGELOG.md +40 -0
- package/Examples/README.md +13 -0
- package/Examples/basic-window/main.ts +32 -0
- package/Examples/basic-window/window.uikitml +58 -0
- package/Examples/controls/controls.uikitml +49 -0
- package/Examples/controls/main.ts +48 -0
- package/Examples/dock-regions/main.ts +55 -0
- package/LICENSE +21 -0
- package/README.md +155 -0
- package/dist/component-set.d.ts +28 -0
- package/dist/component-set.js +108 -0
- package/dist/component-set.js.map +1 -0
- package/dist/components.d.ts +189 -0
- package/dist/components.js +97 -0
- package/dist/components.js.map +1 -0
- package/dist/factory.d.ts +44 -0
- package/dist/factory.js +63 -0
- package/dist/factory.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/manager-registry.d.ts +8 -0
- package/dist/manager-registry.js +11 -0
- package/dist/manager-registry.js.map +1 -0
- package/dist/region-registry-store.d.ts +7 -0
- package/dist/region-registry-store.js +11 -0
- package/dist/region-registry-store.js.map +1 -0
- package/dist/register.d.ts +19 -0
- package/dist/register.js +20 -0
- package/dist/register.js.map +1 -0
- package/dist/scene-host.d.ts +44 -0
- package/dist/scene-host.js +190 -0
- package/dist/scene-host.js.map +1 -0
- package/dist/systems/controls-system.d.ts +24 -0
- package/dist/systems/controls-system.js +24 -0
- package/dist/systems/controls-system.js.map +1 -0
- package/dist/systems/dock-region-system.d.ts +230 -0
- package/dist/systems/dock-region-system.js +102 -0
- package/dist/systems/dock-region-system.js.map +1 -0
- package/dist/systems/dock-system.d.ts +205 -0
- package/dist/systems/dock-system.js +135 -0
- package/dist/systems/dock-system.js.map +1 -0
- package/dist/systems/drag-system.d.ts +280 -0
- package/dist/systems/drag-system.js +167 -0
- package/dist/systems/drag-system.js.map +1 -0
- package/dist/systems/window-system.d.ts +439 -0
- package/dist/systems/window-system.js +244 -0
- package/dist/systems/window-system.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
declare const UIDockSystem_base: import("elics").SystemConstructor<import("elics").SystemSchema, {
|
|
2
|
+
windows: {
|
|
3
|
+
required: (import("elics").Component<{
|
|
4
|
+
windowId: {
|
|
5
|
+
type: import("@iwsdk/core").Types.String;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
title: {
|
|
9
|
+
type: import("@iwsdk/core").Types.String;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
dockMode: {
|
|
13
|
+
type: import("@iwsdk/core").Types.Enum;
|
|
14
|
+
enum: {
|
|
15
|
+
readonly WorldLocked: "world-locked";
|
|
16
|
+
readonly BodyFollow: "body-follow";
|
|
17
|
+
readonly HeadLocked: "head-locked";
|
|
18
|
+
};
|
|
19
|
+
default: "world-locked";
|
|
20
|
+
};
|
|
21
|
+
movable: {
|
|
22
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
23
|
+
default: true;
|
|
24
|
+
};
|
|
25
|
+
closable: {
|
|
26
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
27
|
+
default: true;
|
|
28
|
+
};
|
|
29
|
+
minimizable: {
|
|
30
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
31
|
+
default: true;
|
|
32
|
+
};
|
|
33
|
+
pinnable: {
|
|
34
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
35
|
+
default: true;
|
|
36
|
+
};
|
|
37
|
+
billboardWhileDragging: {
|
|
38
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
39
|
+
default: true;
|
|
40
|
+
};
|
|
41
|
+
dragDelay: {
|
|
42
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
followOffset: {
|
|
46
|
+
type: import("@iwsdk/core").Types.Vec3;
|
|
47
|
+
default: [number, number, number];
|
|
48
|
+
};
|
|
49
|
+
followSpeed: {
|
|
50
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
51
|
+
default: number;
|
|
52
|
+
};
|
|
53
|
+
followTolerance: {
|
|
54
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
55
|
+
default: number;
|
|
56
|
+
};
|
|
57
|
+
focusBias: {
|
|
58
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
59
|
+
default: number;
|
|
60
|
+
};
|
|
61
|
+
targetWidth: {
|
|
62
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
63
|
+
default: number;
|
|
64
|
+
};
|
|
65
|
+
targetHeight: {
|
|
66
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
67
|
+
default: number;
|
|
68
|
+
};
|
|
69
|
+
}> | import("elics").Component<{
|
|
70
|
+
appliedDockMode: {
|
|
71
|
+
type: import("@iwsdk/core").Types.String;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
chromeWired: {
|
|
75
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
76
|
+
default: false;
|
|
77
|
+
};
|
|
78
|
+
homeDockMode: {
|
|
79
|
+
type: import("@iwsdk/core").Types.String;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
homeRegion: {
|
|
83
|
+
type: import("@iwsdk/core").Types.String;
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
homePosition: {
|
|
87
|
+
type: import("@iwsdk/core").Types.Vec3;
|
|
88
|
+
default: [number, number, number];
|
|
89
|
+
};
|
|
90
|
+
homeYaw: {
|
|
91
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
92
|
+
default: number;
|
|
93
|
+
};
|
|
94
|
+
}>)[];
|
|
95
|
+
};
|
|
96
|
+
}, World, import("@iwsdk/core").System<import("elics").SystemSchema, {
|
|
97
|
+
windows: {
|
|
98
|
+
required: (import("elics").Component<{
|
|
99
|
+
windowId: {
|
|
100
|
+
type: import("@iwsdk/core").Types.String;
|
|
101
|
+
default: string;
|
|
102
|
+
};
|
|
103
|
+
title: {
|
|
104
|
+
type: import("@iwsdk/core").Types.String;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
dockMode: {
|
|
108
|
+
type: import("@iwsdk/core").Types.Enum;
|
|
109
|
+
enum: {
|
|
110
|
+
readonly WorldLocked: "world-locked";
|
|
111
|
+
readonly BodyFollow: "body-follow";
|
|
112
|
+
readonly HeadLocked: "head-locked";
|
|
113
|
+
};
|
|
114
|
+
default: "world-locked";
|
|
115
|
+
};
|
|
116
|
+
movable: {
|
|
117
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
118
|
+
default: true;
|
|
119
|
+
};
|
|
120
|
+
closable: {
|
|
121
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
122
|
+
default: true;
|
|
123
|
+
};
|
|
124
|
+
minimizable: {
|
|
125
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
126
|
+
default: true;
|
|
127
|
+
};
|
|
128
|
+
pinnable: {
|
|
129
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
130
|
+
default: true;
|
|
131
|
+
};
|
|
132
|
+
billboardWhileDragging: {
|
|
133
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
134
|
+
default: true;
|
|
135
|
+
};
|
|
136
|
+
dragDelay: {
|
|
137
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
138
|
+
default: number;
|
|
139
|
+
};
|
|
140
|
+
followOffset: {
|
|
141
|
+
type: import("@iwsdk/core").Types.Vec3;
|
|
142
|
+
default: [number, number, number];
|
|
143
|
+
};
|
|
144
|
+
followSpeed: {
|
|
145
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
146
|
+
default: number;
|
|
147
|
+
};
|
|
148
|
+
followTolerance: {
|
|
149
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
150
|
+
default: number;
|
|
151
|
+
};
|
|
152
|
+
focusBias: {
|
|
153
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
154
|
+
default: number;
|
|
155
|
+
};
|
|
156
|
+
targetWidth: {
|
|
157
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
158
|
+
default: number;
|
|
159
|
+
};
|
|
160
|
+
targetHeight: {
|
|
161
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
162
|
+
default: number;
|
|
163
|
+
};
|
|
164
|
+
}> | import("elics").Component<{
|
|
165
|
+
appliedDockMode: {
|
|
166
|
+
type: import("@iwsdk/core").Types.String;
|
|
167
|
+
default: string;
|
|
168
|
+
};
|
|
169
|
+
chromeWired: {
|
|
170
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
171
|
+
default: false;
|
|
172
|
+
};
|
|
173
|
+
homeDockMode: {
|
|
174
|
+
type: import("@iwsdk/core").Types.String;
|
|
175
|
+
default: string;
|
|
176
|
+
};
|
|
177
|
+
homeRegion: {
|
|
178
|
+
type: import("@iwsdk/core").Types.String;
|
|
179
|
+
default: string;
|
|
180
|
+
};
|
|
181
|
+
homePosition: {
|
|
182
|
+
type: import("@iwsdk/core").Types.Vec3;
|
|
183
|
+
default: [number, number, number];
|
|
184
|
+
};
|
|
185
|
+
homeYaw: {
|
|
186
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
187
|
+
default: number;
|
|
188
|
+
};
|
|
189
|
+
}>)[];
|
|
190
|
+
};
|
|
191
|
+
}>>;
|
|
192
|
+
export declare class UIDockSystem extends UIDockSystem_base {
|
|
193
|
+
private manager;
|
|
194
|
+
private windowPosition;
|
|
195
|
+
private viewerPosition;
|
|
196
|
+
init(): void;
|
|
197
|
+
update(): void;
|
|
198
|
+
private apply;
|
|
199
|
+
private faceViewer;
|
|
200
|
+
private offsetHelper;
|
|
201
|
+
private yawQuaternion;
|
|
202
|
+
private yawEuler;
|
|
203
|
+
private addFollower;
|
|
204
|
+
}
|
|
205
|
+
export {};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UIDockSystem - realises dock modes by composing IWSDK components.
|
|
3
|
+
*
|
|
4
|
+
* `body-follow` and `head-locked` are implemented with the IWSDK's own
|
|
5
|
+
* `Follower` / `ScreenSpace` components (reuse, not recreation); this system
|
|
6
|
+
* only plans and applies transitions with the pure dock state machine.
|
|
7
|
+
*/
|
|
8
|
+
import { Euler, Follower, FollowBehavior, Quaternion, ScreenSpace, Vector3, createSystem, } from '@iwsdk/core';
|
|
9
|
+
import { UIWindow, UIWindowState } from '../components.js';
|
|
10
|
+
import { DockMode, isDockMode, planTransition, recipeFor, } from '@realitycollective/webxr-uiextensions';
|
|
11
|
+
import { faceViewerYaw } from '@realitycollective/webxr-uiextensions';
|
|
12
|
+
import { windowManagerFor } from '../manager-registry.js';
|
|
13
|
+
export class UIDockSystem extends createSystem({
|
|
14
|
+
windows: { required: [UIWindow, UIWindowState] },
|
|
15
|
+
}) {
|
|
16
|
+
manager;
|
|
17
|
+
windowPosition = new Vector3();
|
|
18
|
+
viewerPosition = new Vector3();
|
|
19
|
+
init() {
|
|
20
|
+
this.manager = windowManagerFor(this.world);
|
|
21
|
+
}
|
|
22
|
+
update() {
|
|
23
|
+
for (const entity of this.queries.windows.entities) {
|
|
24
|
+
const requested = entity.getValue(UIWindow, 'dockMode');
|
|
25
|
+
const applied = entity.getValue(UIWindowState, 'appliedDockMode');
|
|
26
|
+
if (!isDockMode(requested) || applied === requested) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
this.apply(entity, applied, requested);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
apply(entity, applied, requested) {
|
|
33
|
+
if (isDockMode(applied)) {
|
|
34
|
+
const plan = planTransition(applied, requested);
|
|
35
|
+
if (!plan) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (plan.removeFollower && entity.hasComponent(Follower)) {
|
|
39
|
+
entity.removeComponent(Follower);
|
|
40
|
+
}
|
|
41
|
+
if (plan.removeFollower && requested === DockMode.WorldLocked) {
|
|
42
|
+
// Pinning in place: leave the window facing the user at the spot it
|
|
43
|
+
// was pinned, instead of freezing whatever lagging follow rotation
|
|
44
|
+
// it happened to have this frame.
|
|
45
|
+
this.faceViewer(entity);
|
|
46
|
+
}
|
|
47
|
+
if (plan.removeScreenSpace && entity.hasComponent(ScreenSpace)) {
|
|
48
|
+
entity.removeComponent(ScreenSpace);
|
|
49
|
+
}
|
|
50
|
+
if (plan.addFollower) {
|
|
51
|
+
// Unpinning: keep the window where the user left it, expressed
|
|
52
|
+
// relative to their head, instead of snapping to the default offset.
|
|
53
|
+
this.addFollower(entity, { fromCurrentPose: true });
|
|
54
|
+
}
|
|
55
|
+
if (plan.addScreenSpace) {
|
|
56
|
+
entity.addComponent(ScreenSpace);
|
|
57
|
+
}
|
|
58
|
+
if (plan.snap && entity.hasComponent(Follower)) {
|
|
59
|
+
entity.setValue(Follower, 'needsPositionSync', true);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
// First application after adoption: build the requested recipe from
|
|
64
|
+
// scratch (the entity carries no dock components we own yet).
|
|
65
|
+
const recipe = recipeFor(requested);
|
|
66
|
+
if (recipe.follower && !entity.hasComponent(Follower)) {
|
|
67
|
+
this.addFollower(entity);
|
|
68
|
+
}
|
|
69
|
+
if (!recipe.follower && entity.hasComponent(Follower)) {
|
|
70
|
+
entity.removeComponent(Follower);
|
|
71
|
+
}
|
|
72
|
+
if (recipe.screenSpace && !entity.hasComponent(ScreenSpace)) {
|
|
73
|
+
entity.addComponent(ScreenSpace);
|
|
74
|
+
}
|
|
75
|
+
if (!recipe.screenSpace && entity.hasComponent(ScreenSpace)) {
|
|
76
|
+
entity.removeComponent(ScreenSpace);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
entity.setValue(UIWindowState, 'appliedDockMode', requested);
|
|
80
|
+
const id = entity.getValue(UIWindow, 'windowId');
|
|
81
|
+
if (id && this.manager.has(id)) {
|
|
82
|
+
this.manager.setDockMode(id, requested);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
faceViewer(entity) {
|
|
86
|
+
const object = entity.object3D;
|
|
87
|
+
if (!object) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
object.getWorldPosition(this.windowPosition);
|
|
91
|
+
this.camera.getWorldPosition(this.viewerPosition);
|
|
92
|
+
const yaw = faceViewerYaw([this.windowPosition.x, this.windowPosition.y, this.windowPosition.z], [this.viewerPosition.x, this.viewerPosition.y, this.viewerPosition.z], object.rotation.y);
|
|
93
|
+
object.rotation.set(0, yaw, 0);
|
|
94
|
+
}
|
|
95
|
+
offsetHelper = new Vector3();
|
|
96
|
+
yawQuaternion = new Quaternion();
|
|
97
|
+
yawEuler = new Euler();
|
|
98
|
+
addFollower(entity, options = {}) {
|
|
99
|
+
const configured = entity.getVectorView(UIWindow, 'followOffset');
|
|
100
|
+
let offset = [
|
|
101
|
+
configured[0] ?? 0,
|
|
102
|
+
configured[1] ?? 0,
|
|
103
|
+
configured[2] ?? 0,
|
|
104
|
+
];
|
|
105
|
+
const object = entity.object3D;
|
|
106
|
+
if (options.fromCurrentPose && object) {
|
|
107
|
+
// Current window position in the viewer's yaw-local frame (matching
|
|
108
|
+
// how Follower's PivotY applies offsets), so following resumes from
|
|
109
|
+
// the same bearing and distance the window was unpinned at.
|
|
110
|
+
object.getWorldPosition(this.offsetHelper);
|
|
111
|
+
this.camera.getWorldPosition(this.windowPosition);
|
|
112
|
+
this.camera.getWorldQuaternion(this.yawQuaternion);
|
|
113
|
+
this.yawEuler.setFromQuaternion(this.yawQuaternion, 'YXZ');
|
|
114
|
+
this.yawEuler.x = 0;
|
|
115
|
+
this.yawEuler.z = 0;
|
|
116
|
+
this.yawQuaternion.setFromEuler(this.yawEuler).conjugate();
|
|
117
|
+
this.offsetHelper.sub(this.windowPosition).applyQuaternion(this.yawQuaternion);
|
|
118
|
+
// Degenerate (window at the viewer): keep the configured offset.
|
|
119
|
+
if (this.offsetHelper.lengthSq() > 0.01) {
|
|
120
|
+
offset = [this.offsetHelper.x, this.offsetHelper.y, this.offsetHelper.z];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
entity.addComponent(Follower, {
|
|
124
|
+
// The camera, not player.head: three.js syncs the camera to the
|
|
125
|
+
// headset pose in-session, while the head rig sits at the origin
|
|
126
|
+
// outside XR (desktop) - following it would park windows at the floor.
|
|
127
|
+
target: this.camera,
|
|
128
|
+
offsetPosition: offset,
|
|
129
|
+
behavior: FollowBehavior.PivotY,
|
|
130
|
+
speed: entity.getValue(UIWindow, 'followSpeed'),
|
|
131
|
+
tolerance: entity.getValue(UIWindow, 'followTolerance'),
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=dock-system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dock-system.js","sourceRoot":"","sources":["../../src/systems/dock-system.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,KAAK,EACL,QAAQ,EACR,cAAc,EACd,UAAU,EACV,WAAW,EACX,OAAO,EACP,YAAY,GAEb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,QAAQ,EACR,UAAU,EACV,cAAc,EACd,SAAS,GAEV,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D,MAAM,OAAO,YAAa,SAAQ,YAAY,CAAC;IAC7C,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE;CACjD,CAAC;IACQ,OAAO,CAAiB;IACxB,cAAc,GAAG,IAAI,OAAO,EAAE,CAAC;IAC/B,cAAc,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,IAAI;QACX,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC,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ACvE,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,cAAc,EAAE,MAAM;YACtB,QAAQ,EAAE,cAAc,CAAC,MAAM;YAC/B,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAW;YACzD,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAW;SAClE,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/**\n * UIDockSystem - realises dock modes by composing IWSDK components.\n *\n * `body-follow` and `head-locked` are implemented with the IWSDK's own\n * `Follower` / `ScreenSpace` components (reuse, not recreation); this system\n * only plans and applies transitions with the pure dock state machine.\n */\nimport {\n Euler,\n Follower,\n FollowBehavior,\n Quaternion,\n ScreenSpace,\n Vector3,\n createSystem,\n type Entity,\n} from '@iwsdk/core';\nimport { UIWindow, UIWindowState } from '../components.js';\nimport {\n DockMode,\n isDockMode,\n planTransition,\n recipeFor,\n type DockModeValue,\n} from '@realitycollective/webxr-uiextensions';\nimport { faceViewerYaw } from '@realitycollective/webxr-uiextensions';\nimport { windowManagerFor } from '../manager-registry.js';\nimport type { WindowManager } from '@realitycollective/webxr-uiextensions';\n\nexport class UIDockSystem extends createSystem({\n windows: { required: [UIWindow, UIWindowState] },\n}) {\n private manager!: WindowManager;\n private windowPosition = new Vector3();\n private viewerPosition = new Vector3();\n\n override init(): void {\n this.manager = windowManagerFor(this.world);\n }\n\n override update(): void {\n for (const entity of this.queries.windows.entities) {\n const requested = entity.getValue(UIWindow, 'dockMode') as DockModeValue;\n const applied = entity.getValue(UIWindowState, 'appliedDockMode') as string;\n if (!isDockMode(requested) || applied === requested) {\n continue;\n }\n this.apply(entity, applied, requested);\n }\n }\n\n private apply(entity: Entity, applied: string, requested: DockModeValue): void {\n if (isDockMode(applied)) {\n const plan = planTransition(applied, requested);\n if (!plan) {\n return;\n }\n if (plan.removeFollower && entity.hasComponent(Follower)) {\n entity.removeComponent(Follower);\n }\n if (plan.removeFollower && requested === DockMode.WorldLocked) {\n // Pinning in place: leave the window facing the user at the spot it\n // was pinned, instead of freezing whatever lagging follow rotation\n // it happened to have this frame.\n this.faceViewer(entity);\n }\n if (plan.removeScreenSpace && entity.hasComponent(ScreenSpace)) {\n entity.removeComponent(ScreenSpace);\n }\n if (plan.addFollower) {\n // Unpinning: keep the window where the user left it, expressed\n // relative to their head, instead of snapping to the default offset.\n this.addFollower(entity, { fromCurrentPose: true });\n }\n if (plan.addScreenSpace) {\n entity.addComponent(ScreenSpace);\n }\n if (plan.snap && entity.hasComponent(Follower)) {\n entity.setValue(Follower, 'needsPositionSync', true);\n }\n } else {\n // First application after adoption: build the requested recipe from\n // scratch (the entity carries no dock components we own yet).\n const recipe = recipeFor(requested);\n if (recipe.follower && !entity.hasComponent(Follower)) {\n this.addFollower(entity);\n }\n if (!recipe.follower && entity.hasComponent(Follower)) {\n entity.removeComponent(Follower);\n }\n if (recipe.screenSpace && !entity.hasComponent(ScreenSpace)) {\n entity.addComponent(ScreenSpace);\n }\n if (!recipe.screenSpace && entity.hasComponent(ScreenSpace)) {\n entity.removeComponent(ScreenSpace);\n }\n }\n\n entity.setValue(UIWindowState, 'appliedDockMode', requested);\n\n const id = entity.getValue(UIWindow, 'windowId') as string;\n if (id && this.manager.has(id)) {\n this.manager.setDockMode(id, requested);\n }\n }\n\n private faceViewer(entity: Entity): void {\n const object = entity.object3D;\n if (!object) {\n return;\n }\n object.getWorldPosition(this.windowPosition);\n this.camera.getWorldPosition(this.viewerPosition);\n const yaw = faceViewerYaw(\n [this.windowPosition.x, this.windowPosition.y, this.windowPosition.z],\n [this.viewerPosition.x, this.viewerPosition.y, this.viewerPosition.z],\n object.rotation.y,\n );\n object.rotation.set(0, yaw, 0);\n }\n\n private offsetHelper = new Vector3();\n private yawQuaternion = new Quaternion();\n private yawEuler = new Euler();\n\n private addFollower(entity: Entity, options: { fromCurrentPose?: boolean } = {}): void {\n const configured = entity.getVectorView(UIWindow, 'followOffset');\n let offset: [number, number, number] = [\n configured[0] ?? 0,\n configured[1] ?? 0,\n configured[2] ?? 0,\n ];\n\n const object = entity.object3D;\n if (options.fromCurrentPose && object) {\n // Current window position in the viewer's yaw-local frame (matching\n // how Follower's PivotY applies offsets), so following resumes from\n // the same bearing and distance the window was unpinned at.\n object.getWorldPosition(this.offsetHelper);\n this.camera.getWorldPosition(this.windowPosition);\n this.camera.getWorldQuaternion(this.yawQuaternion);\n this.yawEuler.setFromQuaternion(this.yawQuaternion, 'YXZ');\n this.yawEuler.x = 0;\n this.yawEuler.z = 0;\n this.yawQuaternion.setFromEuler(this.yawEuler).conjugate();\n this.offsetHelper.sub(this.windowPosition).applyQuaternion(this.yawQuaternion);\n // Degenerate (window at the viewer): keep the configured offset.\n if (this.offsetHelper.lengthSq() > 0.01) {\n offset = [this.offsetHelper.x, this.offsetHelper.y, this.offsetHelper.z];\n }\n }\n\n entity.addComponent(Follower, {\n // The camera, not player.head: three.js syncs the camera to the\n // headset pose in-session, while the head rig sits at the origin\n // outside XR (desktop) - following it would park windows at the floor.\n target: this.camera,\n offsetPosition: offset,\n behavior: FollowBehavior.PivotY,\n speed: entity.getValue(UIWindow, 'followSpeed') as number,\n tolerance: entity.getValue(UIWindow, 'followTolerance') as number,\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
declare const UIDragSystem_base: import("elics").SystemConstructor<import("elics").SystemSchema, {
|
|
2
|
+
windows: {
|
|
3
|
+
required: (import("elics").Component<{
|
|
4
|
+
windowId: {
|
|
5
|
+
type: import("@iwsdk/core").Types.String;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
title: {
|
|
9
|
+
type: import("@iwsdk/core").Types.String;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
dockMode: {
|
|
13
|
+
type: import("@iwsdk/core").Types.Enum;
|
|
14
|
+
enum: {
|
|
15
|
+
readonly WorldLocked: "world-locked";
|
|
16
|
+
readonly BodyFollow: "body-follow";
|
|
17
|
+
readonly HeadLocked: "head-locked";
|
|
18
|
+
};
|
|
19
|
+
default: "world-locked";
|
|
20
|
+
};
|
|
21
|
+
movable: {
|
|
22
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
23
|
+
default: true;
|
|
24
|
+
};
|
|
25
|
+
closable: {
|
|
26
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
27
|
+
default: true;
|
|
28
|
+
};
|
|
29
|
+
minimizable: {
|
|
30
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
31
|
+
default: true;
|
|
32
|
+
};
|
|
33
|
+
pinnable: {
|
|
34
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
35
|
+
default: true;
|
|
36
|
+
};
|
|
37
|
+
billboardWhileDragging: {
|
|
38
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
39
|
+
default: true;
|
|
40
|
+
};
|
|
41
|
+
dragDelay: {
|
|
42
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
followOffset: {
|
|
46
|
+
type: import("@iwsdk/core").Types.Vec3;
|
|
47
|
+
default: [number, number, number];
|
|
48
|
+
};
|
|
49
|
+
followSpeed: {
|
|
50
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
51
|
+
default: number;
|
|
52
|
+
};
|
|
53
|
+
followTolerance: {
|
|
54
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
55
|
+
default: number;
|
|
56
|
+
};
|
|
57
|
+
focusBias: {
|
|
58
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
59
|
+
default: number;
|
|
60
|
+
};
|
|
61
|
+
targetWidth: {
|
|
62
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
63
|
+
default: number;
|
|
64
|
+
};
|
|
65
|
+
targetHeight: {
|
|
66
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
67
|
+
default: number;
|
|
68
|
+
};
|
|
69
|
+
}> | import("elics").Component<{
|
|
70
|
+
appliedDockMode: {
|
|
71
|
+
type: import("@iwsdk/core").Types.String;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
chromeWired: {
|
|
75
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
76
|
+
default: false;
|
|
77
|
+
};
|
|
78
|
+
homeDockMode: {
|
|
79
|
+
type: import("@iwsdk/core").Types.String;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
homeRegion: {
|
|
83
|
+
type: import("@iwsdk/core").Types.String;
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
homePosition: {
|
|
87
|
+
type: import("@iwsdk/core").Types.Vec3;
|
|
88
|
+
default: [number, number, number];
|
|
89
|
+
};
|
|
90
|
+
homeYaw: {
|
|
91
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
92
|
+
default: number;
|
|
93
|
+
};
|
|
94
|
+
}> | import("elics").Component<{
|
|
95
|
+
document: {
|
|
96
|
+
type: import("@iwsdk/core").Types.Object;
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
}>)[];
|
|
100
|
+
};
|
|
101
|
+
regions: {
|
|
102
|
+
required: import("elics").Component<{
|
|
103
|
+
regionId: {
|
|
104
|
+
type: import("@iwsdk/core").Types.String;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
flow: {
|
|
108
|
+
type: import("@iwsdk/core").Types.Enum;
|
|
109
|
+
enum: {
|
|
110
|
+
readonly Row: "row";
|
|
111
|
+
readonly Column: "column";
|
|
112
|
+
readonly Grid: "grid";
|
|
113
|
+
};
|
|
114
|
+
default: "column";
|
|
115
|
+
};
|
|
116
|
+
pitch: {
|
|
117
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
118
|
+
default: number;
|
|
119
|
+
};
|
|
120
|
+
columns: {
|
|
121
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
122
|
+
default: number;
|
|
123
|
+
};
|
|
124
|
+
capacity: {
|
|
125
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
126
|
+
default: number;
|
|
127
|
+
};
|
|
128
|
+
snapRadius: {
|
|
129
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
130
|
+
default: number;
|
|
131
|
+
};
|
|
132
|
+
}>[];
|
|
133
|
+
};
|
|
134
|
+
}, World, import("@iwsdk/core").System<import("elics").SystemSchema, {
|
|
135
|
+
windows: {
|
|
136
|
+
required: (import("elics").Component<{
|
|
137
|
+
windowId: {
|
|
138
|
+
type: import("@iwsdk/core").Types.String;
|
|
139
|
+
default: string;
|
|
140
|
+
};
|
|
141
|
+
title: {
|
|
142
|
+
type: import("@iwsdk/core").Types.String;
|
|
143
|
+
default: string;
|
|
144
|
+
};
|
|
145
|
+
dockMode: {
|
|
146
|
+
type: import("@iwsdk/core").Types.Enum;
|
|
147
|
+
enum: {
|
|
148
|
+
readonly WorldLocked: "world-locked";
|
|
149
|
+
readonly BodyFollow: "body-follow";
|
|
150
|
+
readonly HeadLocked: "head-locked";
|
|
151
|
+
};
|
|
152
|
+
default: "world-locked";
|
|
153
|
+
};
|
|
154
|
+
movable: {
|
|
155
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
156
|
+
default: true;
|
|
157
|
+
};
|
|
158
|
+
closable: {
|
|
159
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
160
|
+
default: true;
|
|
161
|
+
};
|
|
162
|
+
minimizable: {
|
|
163
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
164
|
+
default: true;
|
|
165
|
+
};
|
|
166
|
+
pinnable: {
|
|
167
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
168
|
+
default: true;
|
|
169
|
+
};
|
|
170
|
+
billboardWhileDragging: {
|
|
171
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
172
|
+
default: true;
|
|
173
|
+
};
|
|
174
|
+
dragDelay: {
|
|
175
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
176
|
+
default: number;
|
|
177
|
+
};
|
|
178
|
+
followOffset: {
|
|
179
|
+
type: import("@iwsdk/core").Types.Vec3;
|
|
180
|
+
default: [number, number, number];
|
|
181
|
+
};
|
|
182
|
+
followSpeed: {
|
|
183
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
184
|
+
default: number;
|
|
185
|
+
};
|
|
186
|
+
followTolerance: {
|
|
187
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
188
|
+
default: number;
|
|
189
|
+
};
|
|
190
|
+
focusBias: {
|
|
191
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
192
|
+
default: number;
|
|
193
|
+
};
|
|
194
|
+
targetWidth: {
|
|
195
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
196
|
+
default: number;
|
|
197
|
+
};
|
|
198
|
+
targetHeight: {
|
|
199
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
200
|
+
default: number;
|
|
201
|
+
};
|
|
202
|
+
}> | import("elics").Component<{
|
|
203
|
+
appliedDockMode: {
|
|
204
|
+
type: import("@iwsdk/core").Types.String;
|
|
205
|
+
default: string;
|
|
206
|
+
};
|
|
207
|
+
chromeWired: {
|
|
208
|
+
type: import("@iwsdk/core").Types.Boolean;
|
|
209
|
+
default: false;
|
|
210
|
+
};
|
|
211
|
+
homeDockMode: {
|
|
212
|
+
type: import("@iwsdk/core").Types.String;
|
|
213
|
+
default: string;
|
|
214
|
+
};
|
|
215
|
+
homeRegion: {
|
|
216
|
+
type: import("@iwsdk/core").Types.String;
|
|
217
|
+
default: string;
|
|
218
|
+
};
|
|
219
|
+
homePosition: {
|
|
220
|
+
type: import("@iwsdk/core").Types.Vec3;
|
|
221
|
+
default: [number, number, number];
|
|
222
|
+
};
|
|
223
|
+
homeYaw: {
|
|
224
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
225
|
+
default: number;
|
|
226
|
+
};
|
|
227
|
+
}> | import("elics").Component<{
|
|
228
|
+
document: {
|
|
229
|
+
type: import("@iwsdk/core").Types.Object;
|
|
230
|
+
default: undefined;
|
|
231
|
+
};
|
|
232
|
+
}>)[];
|
|
233
|
+
};
|
|
234
|
+
regions: {
|
|
235
|
+
required: import("elics").Component<{
|
|
236
|
+
regionId: {
|
|
237
|
+
type: import("@iwsdk/core").Types.String;
|
|
238
|
+
default: string;
|
|
239
|
+
};
|
|
240
|
+
flow: {
|
|
241
|
+
type: import("@iwsdk/core").Types.Enum;
|
|
242
|
+
enum: {
|
|
243
|
+
readonly Row: "row";
|
|
244
|
+
readonly Column: "column";
|
|
245
|
+
readonly Grid: "grid";
|
|
246
|
+
};
|
|
247
|
+
default: "column";
|
|
248
|
+
};
|
|
249
|
+
pitch: {
|
|
250
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
251
|
+
default: number;
|
|
252
|
+
};
|
|
253
|
+
columns: {
|
|
254
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
255
|
+
default: number;
|
|
256
|
+
};
|
|
257
|
+
capacity: {
|
|
258
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
259
|
+
default: number;
|
|
260
|
+
};
|
|
261
|
+
snapRadius: {
|
|
262
|
+
type: import("@iwsdk/core").Types.Float32;
|
|
263
|
+
default: number;
|
|
264
|
+
};
|
|
265
|
+
}>[];
|
|
266
|
+
};
|
|
267
|
+
}>>;
|
|
268
|
+
export declare class UIDragSystem extends UIDragSystem_base {
|
|
269
|
+
private states;
|
|
270
|
+
private worldPosition;
|
|
271
|
+
private viewerPosition;
|
|
272
|
+
init(): void;
|
|
273
|
+
update(delta: number): void;
|
|
274
|
+
private attach;
|
|
275
|
+
private detach;
|
|
276
|
+
private onDragStart;
|
|
277
|
+
private whileDragging;
|
|
278
|
+
private onDragEnd;
|
|
279
|
+
}
|
|
280
|
+
export {};
|