three-live 1.1.1 → 1.2.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/dist/index.d.ts +112 -3
- package/dist/three-author-engine.js +40 -54
- package/dist/three-author.cjs +30 -44
- package/dist/three-author.d.ts +112 -3
- package/dist/three-author.js +30 -44
- package/dist/three-convert.cjs +39 -53
- package/dist/three-convert.d.ts +112 -3
- package/dist/three-convert.js +39 -53
- package/dist/three-live-animation.cjs +5 -5
- package/dist/three-live-animation.d.ts +112 -3
- package/dist/three-live-animation.js +5 -5
- package/dist/three-live-animation.min.js +5 -5
- package/dist/three-live-element.cjs +13 -27
- package/dist/three-live-element.d.ts +112 -3
- package/dist/three-live-element.js +13 -27
- package/dist/three-live-extras.cjs +12 -12
- package/dist/three-live-extras.d.ts +112 -3
- package/dist/three-live-extras.js +12 -12
- package/dist/three-live-extras.min.js +12 -12
- package/dist/three-live-full.cjs +59 -73
- package/dist/three-live-full.js +59 -73
- package/dist/three-live-full.min.js +59 -73
- package/dist/three-live-viewer.cjs +13 -27
- package/dist/three-live-viewer.d.ts +112 -3
- package/dist/three-live-viewer.js +13 -27
- package/dist/three-live-viewer.min.js +13 -27
- package/dist/three-live.cjs +34 -48
- package/dist/three-live.js +34 -48
- package/dist/three-live.min.js +34 -48
- package/dist/three-view.cjs +13 -27
- package/dist/three-view.d.ts +112 -3
- package/dist/three-view.js +13 -27
- package/dist/three-xr.cjs +41 -55
- package/dist/three-xr.d.ts +112 -3
- package/dist/three-xr.js +41 -55
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -29,8 +29,14 @@ import type {
|
|
|
29
29
|
ThreeView,
|
|
30
30
|
} from './three-live/src/three-view';
|
|
31
31
|
import type {ARLaunchResult, ARMode} from './three-live/src/three-xr';
|
|
32
|
-
import type {
|
|
33
|
-
|
|
32
|
+
import type {
|
|
33
|
+
DimensionUnit,
|
|
34
|
+
ExplodeMode,
|
|
35
|
+
RemotePeerState,
|
|
36
|
+
SnapSurfaceMode,
|
|
37
|
+
TranscriptEvent,
|
|
38
|
+
Detection3D,
|
|
39
|
+
} from './xr-live/src/plugins/index';
|
|
34
40
|
import type {
|
|
35
41
|
XRAnchorElement,
|
|
36
42
|
XRDepthMode,
|
|
@@ -191,21 +197,124 @@ export interface XRLiveAttributes extends ThreeLiveAttributes {
|
|
|
191
197
|
'xr-simulator'?: XRSimulatorRoom;
|
|
192
198
|
/** Spatial UI profile ("quest3", "android-xr", "visionos", "auto"). */
|
|
193
199
|
'xr-profile'?: XRProfile;
|
|
200
|
+
/** Play procedural Web Audio earcons and haptics on spatial interactions. */
|
|
201
|
+
'sound-feedback'?: boolean | string;
|
|
194
202
|
/** Spatial plugin: enables plane/mesh detection; include "reticle" for a gaze reticle. */
|
|
195
203
|
'world-understanding'?: boolean | string;
|
|
196
204
|
/** Spatial plugin: pinch in empty space to paint 3D tubes (optional `#rrggbb` color). */
|
|
197
205
|
'spatial-paint'?: boolean | string;
|
|
206
|
+
/** Spatial plugin: 3D dimension callouts and AR tape measure ("bounds", "tape", "all", "none"). */
|
|
207
|
+
'spatial-measure'?: boolean | 'bounds' | 'tape' | 'all' | 'none' | string;
|
|
208
|
+
/** Default display unit for `spatial-measure` ("auto", "m", "cm", "mm", "in", "ft-in"). */
|
|
209
|
+
'measure-unit'?: DimensionUnit;
|
|
210
|
+
/** Spatial plugin: socket, grid, surface, and angle snapping ("grid", "surface", "sockets", "all", "none"). */
|
|
211
|
+
'magnetic-snap'?: boolean | 'grid' | 'surface' | 'sockets' | 'all' | 'none' | string;
|
|
212
|
+
/** Cartesian snap grid step in meters ("0.05" or "0.05 0.05 0.05"). */
|
|
213
|
+
'snap-grid'?: number | string;
|
|
214
|
+
/** Rotational yaw snap increment in degrees (0 to 180). */
|
|
215
|
+
'snap-angle'?: number | string;
|
|
216
|
+
/** Spatial plugin: hands-free eye/head gaze reticle and dwell selection ("auto", "none", or boolean). */
|
|
217
|
+
'gaze-dwell'?: boolean | 'auto' | 'none' | string;
|
|
218
|
+
/** Default dwell duration in milliseconds for `gaze-dwell` (250 to 10000, default: 1200). */
|
|
219
|
+
'dwell-time'?: number | string;
|
|
220
|
+
/** Spatial plugin: normalized [0..1] multi-part exploded-view factor. */
|
|
221
|
+
'explode'?: number | string;
|
|
222
|
+
/** Multi-part explosion vector strategy ("radial", "axial-x", "axial-y", "axial-z", "hierarchical"). */
|
|
223
|
+
'explode-mode'?: ExplodeMode;
|
|
224
|
+
/** Multiplier applied to per-part explosion distances (default: 1.0). */
|
|
225
|
+
'explode-scale'?: number | string;
|
|
226
|
+
/** Real-time cross-section clipping plane ("none", "x:0", "y:0.2", "-z:0", "interactive"). */
|
|
227
|
+
'section-plane'?: string;
|
|
228
|
+
/** Spatial plugin: persist manipulated anchor transforms under an optional storage namespace. */
|
|
229
|
+
'persistent-anchors'?: boolean | string;
|
|
230
|
+
/** Sync persisted anchor transforms into `#xr-state=<base64url>` for zero-backend link sharing. */
|
|
231
|
+
'persist-url-hash'?: boolean | string;
|
|
232
|
+
/** Spatial plugin: XR locomotion mode ("teleport", "snap-turn", "smooth", "teleport snap-turn", "none"). */
|
|
233
|
+
'locomotion'?: boolean | string;
|
|
234
|
+
/** Thumbstick snap-turn increment in degrees (default: 30). */
|
|
235
|
+
'snap-turn-deg'?: number | string;
|
|
236
|
+
/** Show a 120ms peripheral FOV comfort vignette on teleport/turn (default: true). */
|
|
237
|
+
'comfort-vignette'?: boolean | string;
|
|
238
|
+
/** Spatial plugin: join a multi-user room via BroadcastChannel ID or `wss://` relay URL. */
|
|
239
|
+
'shared-room'?: string;
|
|
240
|
+
/** Local display name broadcast to peers in `shared-room` (max 32 chars). */
|
|
241
|
+
'peer-name'?: string;
|
|
242
|
+
/** Local avatar visor & laser color (`#rrggbb`) in `shared-room`. */
|
|
243
|
+
'peer-color'?: string;
|
|
244
|
+
/** Register WebMCP browser AI tools on `navigator.modelContext`. */
|
|
245
|
+
'webmcp'?: boolean | string;
|
|
246
|
+
/** Opt-in gate allowing WebMCP `capture_xr_view` to include the 8x8 depth grid. */
|
|
247
|
+
'webmcp-allow-depth'?: boolean | string;
|
|
248
|
+
/** Omit `headPosition` from WebMCP `inspect_xr_scene` responses. */
|
|
249
|
+
'webmcp-omit-pose'?: boolean | string;
|
|
250
|
+
|
|
198
251
|
'onxr-object-detected'?: (e: CustomEvent<Detection3D>) => void;
|
|
199
252
|
'onxr-transcription'?: (e: CustomEvent<TranscriptEvent>) => void;
|
|
200
253
|
'onxr-hold-to-ask'?: (
|
|
201
254
|
e: CustomEvent<{mesh: string; transcript: string; prompt: string}>,
|
|
202
255
|
) => void;
|
|
203
256
|
'onxr-handles-change'?: (
|
|
204
|
-
e: CustomEvent<{mesh:
|
|
257
|
+
e: CustomEvent<{mesh: any; scale: number; yawDeg: number}>,
|
|
205
258
|
) => void;
|
|
206
259
|
'onxr-paint-stroke'?: (
|
|
207
260
|
e: CustomEvent<{index: number; points: number; lengthMeters: number}>,
|
|
208
261
|
) => void;
|
|
262
|
+
onmeasurecomplete?: (
|
|
263
|
+
e: CustomEvent<{
|
|
264
|
+
start: [number, number, number];
|
|
265
|
+
end: [number, number, number];
|
|
266
|
+
distanceMeters: number;
|
|
267
|
+
formatted: string;
|
|
268
|
+
}>,
|
|
269
|
+
) => void;
|
|
270
|
+
onxrsnap?: (
|
|
271
|
+
e: CustomEvent<{
|
|
272
|
+
node: any;
|
|
273
|
+
socket: any;
|
|
274
|
+
position: [number, number, number];
|
|
275
|
+
quaternion: [number, number, number, number];
|
|
276
|
+
mode: 'socket' | 'grid' | 'surface' | 'angle';
|
|
277
|
+
}>,
|
|
278
|
+
) => void;
|
|
279
|
+
onxrunsnap?: (e: CustomEvent<{node: any; socket: any}>) => void;
|
|
280
|
+
ongazeenter?: (
|
|
281
|
+
e: CustomEvent<{node: any; point: [number, number, number]}>,
|
|
282
|
+
) => void;
|
|
283
|
+
ongazeleave?: (e: CustomEvent<{node: any}>) => void;
|
|
284
|
+
ongazedwell?: (
|
|
285
|
+
e: CustomEvent<{
|
|
286
|
+
node: any;
|
|
287
|
+
point: [number, number, number];
|
|
288
|
+
action: 'select' | 'ask';
|
|
289
|
+
}>,
|
|
290
|
+
) => void;
|
|
291
|
+
onexplodechange?: (
|
|
292
|
+
e: CustomEvent<{
|
|
293
|
+
factor: number;
|
|
294
|
+
source: 'attribute' | 'gesture' | 'api' | 'peer';
|
|
295
|
+
}>,
|
|
296
|
+
) => void;
|
|
297
|
+
onanchorsrestored?: (
|
|
298
|
+
e: CustomEvent<{
|
|
299
|
+
count: number;
|
|
300
|
+
source: 'xr-anchor' | 'storage' | 'url-hash';
|
|
301
|
+
}>,
|
|
302
|
+
) => void;
|
|
303
|
+
onxrteleport?: (
|
|
304
|
+
e: CustomEvent<{
|
|
305
|
+
from: [number, number, number];
|
|
306
|
+
to: [number, number, number];
|
|
307
|
+
yawDeg: number;
|
|
308
|
+
}>,
|
|
309
|
+
) => void;
|
|
310
|
+
onpeerjoin?: (
|
|
311
|
+
e: CustomEvent<Pick<RemotePeerState, 'peerId' | 'name' | 'color'>>,
|
|
312
|
+
) => void;
|
|
313
|
+
onpeerleave?: (
|
|
314
|
+
e: CustomEvent<Pick<RemotePeerState, 'peerId' | 'name' | 'color'>>,
|
|
315
|
+
) => void;
|
|
316
|
+
onpeersync?: (e: CustomEvent<{peerId: string; nodeId: string}>) => void;
|
|
317
|
+
onpeergrabconflict?: (e: CustomEvent<{peerId: string; nodeId: string}>) => void;
|
|
209
318
|
}
|
|
210
319
|
|
|
211
320
|
declare global {
|