three-live 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/index.d.ts +66 -2
- package/dist/three-author-engine.js +85 -42
- package/dist/three-author.cjs +84 -42
- package/dist/three-author.d.ts +66 -2
- package/dist/three-author.js +84 -42
- package/dist/three-convert.cjs +84 -42
- package/dist/three-convert.d.ts +66 -2
- package/dist/three-convert.js +84 -42
- package/dist/three-live-animation.cjs +7 -7
- package/dist/three-live-animation.d.ts +66 -2
- package/dist/three-live-animation.js +7 -7
- package/dist/three-live-animation.min.js +7 -7
- package/dist/three-live-cad.cjs +18 -0
- package/dist/{three-live-extras.d.ts → three-live-cad.d.ts} +66 -2
- package/dist/three-live-cad.js +18 -0
- package/dist/three-live-cad.min.js +18 -0
- package/dist/three-live-element.cjs +48 -6
- package/dist/three-live-element.d.ts +66 -2
- package/dist/three-live-element.js +48 -6
- package/dist/three-live-full.cjs +176 -55
- package/dist/three-live-full.js +176 -55
- package/dist/three-live-full.min.js +176 -55
- package/dist/three-live-studio.cjs +120 -0
- package/dist/three-live-studio.d.ts +510 -0
- package/dist/three-live-studio.js +120 -0
- package/dist/three-live-studio.min.js +120 -0
- package/dist/three-live-viewer.cjs +48 -6
- package/dist/three-live-viewer.d.ts +66 -2
- package/dist/three-live-viewer.js +48 -6
- package/dist/three-live-viewer.min.js +48 -6
- package/dist/three-live.cjs +86 -44
- package/dist/three-live.js +86 -44
- package/dist/three-live.min.js +86 -44
- package/dist/three-view.cjs +48 -6
- package/dist/three-view.d.ts +66 -2
- package/dist/three-view.js +48 -6
- package/dist/three-xr.cjs +83 -41
- package/dist/three-xr.d.ts +66 -2
- package/dist/three-xr.js +83 -41
- package/package.json +10 -5
- package/dist/three-live-extras.cjs +0 -42
- package/dist/three-live-extras.js +0 -42
- package/dist/three-live-extras.min.js +0 -42
package/README.md
CHANGED
|
@@ -41,11 +41,16 @@ display existing models only, use the viewer-only build:
|
|
|
41
41
|
|
|
42
42
|
## Bundles
|
|
43
43
|
|
|
44
|
+
<!-- mdformat off(reason: preserve GFM single-line pipe tables for GitHub) -->
|
|
44
45
|
| File | Contents |
|
|
45
46
|
| :--- | :--- |
|
|
46
47
|
| `dist/three-live-viewer.min.js` | Viewer only: `.glb` display, PBR, orbit controls, animation |
|
|
47
48
|
| `dist/three-live.min.js` | Standard: viewer + sandboxed `<script type="text/three">` + AR handoff |
|
|
48
|
-
| `dist/three-live-
|
|
49
|
+
| `dist/three-live-studio.min.js` | Add-on: PBR Next, HDRI/SH, `bloom`/`outline`, `KHR_materials_variants`, `EXT_meshopt_compression`, `KHR_interactivity` VM, hotspots |
|
|
50
|
+
| `dist/three-live-cad.min.js` | Add-on: 2D `Path`/`Shape`, `ExtrudeGeometry`, 3D `CSG` Booleans, stroke-font `TextGeometry` |
|
|
51
|
+
| `dist/three-live-animation.min.js` | Add-on: 64-joint skinning, morph targets, keyframe cross-fading, 2-bone/FABRIK `IKSolver` |
|
|
52
|
+
| `dist/three-live-full.min.js` | Standard + all plugins (`studio`, `cad`, `animation`) |
|
|
53
|
+
<!-- mdformat on -->
|
|
49
54
|
|
|
50
55
|
ES module and CommonJS builds are available through the package `exports`.
|
|
51
56
|
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,30 @@ import type {
|
|
|
48
48
|
} from './xr-live/src/xr-live-element';
|
|
49
49
|
|
|
50
50
|
export * from './three-live/src/core';
|
|
51
|
+
export {
|
|
52
|
+
cadPlugin,
|
|
53
|
+
installCadExtension,
|
|
54
|
+
MAX_BSP_DEPTH,
|
|
55
|
+
MAX_CSG_TRIANGLES,
|
|
56
|
+
MAX_SHAPE_POINTS,
|
|
57
|
+
MAX_TEXT_GEOMETRY_CHARS,
|
|
58
|
+
type ExtrudeGeometryOptions,
|
|
59
|
+
type TextGeometryOptions,
|
|
60
|
+
} from './three-live/src/plugins/cad';
|
|
61
|
+
export {
|
|
62
|
+
ikPlugin,
|
|
63
|
+
IKSolver,
|
|
64
|
+
quatFromUnitVectors,
|
|
65
|
+
solveFABRIK,
|
|
66
|
+
solveTwoBoneIK,
|
|
67
|
+
type FABRIKSolution,
|
|
68
|
+
type IKQuat,
|
|
69
|
+
type TwoBoneIKSolution,
|
|
70
|
+
} from './three-live/src/plugins/ik';
|
|
71
|
+
export {
|
|
72
|
+
extractNodeInstancing,
|
|
73
|
+
instancingPlugin,
|
|
74
|
+
} from './three-live/src/plugins/instancing';
|
|
51
75
|
export {
|
|
52
76
|
getInteractivityVM,
|
|
53
77
|
interactivityPlugin,
|
|
@@ -63,6 +87,30 @@ export {
|
|
|
63
87
|
type InteractivityValueSocket,
|
|
64
88
|
type InteractivityVariableDef,
|
|
65
89
|
} from './three-live/src/plugins/interactivity';
|
|
90
|
+
export {
|
|
91
|
+
applyMeshoptFilter,
|
|
92
|
+
decodeMeshoptBuffer,
|
|
93
|
+
decodeMeshoptGLB,
|
|
94
|
+
encodeMeshoptBuffer,
|
|
95
|
+
meshoptDecoder,
|
|
96
|
+
meshoptPlugin,
|
|
97
|
+
type MeshoptFilter,
|
|
98
|
+
type MeshoptMode,
|
|
99
|
+
} from './three-live/src/plugins/meshopt';
|
|
100
|
+
export {
|
|
101
|
+
computeOutlineClipOffset,
|
|
102
|
+
evaluateKawaseBloom,
|
|
103
|
+
parseHexRgb,
|
|
104
|
+
postprocessingPlugin,
|
|
105
|
+
resolveViewerBloom,
|
|
106
|
+
} from './three-live/src/plugins/postprocessing';
|
|
107
|
+
export {
|
|
108
|
+
extractMaterialVariants,
|
|
109
|
+
extractPrimitiveVariantMappings,
|
|
110
|
+
selectMaterialVariant,
|
|
111
|
+
variantsPlugin,
|
|
112
|
+
type VariantMapping,
|
|
113
|
+
} from './three-live/src/plugins/variants';
|
|
66
114
|
export {
|
|
67
115
|
ThreeLiveElement,
|
|
68
116
|
type ARLaunchOptions,
|
|
@@ -80,7 +128,7 @@ export {
|
|
|
80
128
|
type XRProfile,
|
|
81
129
|
type XRSimulatorRoom,
|
|
82
130
|
} from './xr-live/src/xr-live-element';
|
|
83
|
-
/** Optional spatial plugins (`xr-live/
|
|
131
|
+
/** Optional spatial plugins (`xr-live/spatial`, `xr-live-spatial.min.js`). */
|
|
84
132
|
export * from './xr-live/src/plugins/index';
|
|
85
133
|
|
|
86
134
|
/**
|
|
@@ -119,7 +167,7 @@ export interface ThreeLiveAttributes {
|
|
|
119
167
|
'shadow-intensity'?: number | string;
|
|
120
168
|
/** Radial Gaussian blur falloff of contact shadow (0.0 to 1.0). */
|
|
121
169
|
'shadow-softness'?: number | string;
|
|
122
|
-
/** Tone mapping mode ("neutral", "reinhard", "none"). */
|
|
170
|
+
/** Tone mapping mode ("neutral", "aces", "agx", "reinhard", "none"). */
|
|
123
171
|
'tone-mapping'?: string;
|
|
124
172
|
/** Enable or disable interactive camera orbit/pan/zoom controls (default: true). */
|
|
125
173
|
'camera-controls'?: boolean | string;
|
|
@@ -127,6 +175,8 @@ export interface ThreeLiveAttributes {
|
|
|
127
175
|
'autoplay'?: boolean | string;
|
|
128
176
|
/** Name of specific glTF animation clip to play. */
|
|
129
177
|
'animation-name'?: string;
|
|
178
|
+
/** Name of the active KHR_materials_variants material variant. */
|
|
179
|
+
'variant-name'?: string;
|
|
130
180
|
/** Automatically rotate scene around the Y-axis when user is idle. */
|
|
131
181
|
'auto-rotate'?: boolean | string;
|
|
132
182
|
/** Delay in milliseconds before auto-rotation resumes after user interaction (default: 3000). */
|
|
@@ -162,6 +212,7 @@ export interface ThreeLiveAttributes {
|
|
|
162
212
|
onerror?: (e: CustomEvent<{error: any}>) => void;
|
|
163
213
|
onmeshclick?: (e: CustomEvent<HitDetail>) => void;
|
|
164
214
|
'oncamera-change'?: (e: CustomEvent<CameraDetail>) => void;
|
|
215
|
+
'onvariant-applied'?: (e: CustomEvent<{variantName: string | null}>) => void;
|
|
165
216
|
'onar-status'?: (
|
|
166
217
|
e: CustomEvent<{
|
|
167
218
|
status: 'session-started' | 'not-presenting' | 'failed';
|
|
@@ -248,6 +299,8 @@ export interface XRLiveAttributes extends ThreeLiveAttributes {
|
|
|
248
299
|
'peer-name'?: string;
|
|
249
300
|
/** Local avatar visor & laser color (`#rrggbb`) in `shared-room`. */
|
|
250
301
|
'peer-color'?: string;
|
|
302
|
+
/** Opt-in WebRTC voice signaling relay (offer/answer/ICE) and `voiceGain` helpers in `shared-room`. Apps own `RTCPeerConnection` and audio. */
|
|
303
|
+
'shared-room-voice'?: boolean | string;
|
|
251
304
|
/** xr-live-sim: character camera mode, or `none` to disable the character. */
|
|
252
305
|
'character-controller'?:
|
|
253
306
|
| 'third-person'
|
|
@@ -363,6 +416,17 @@ export interface XRLiveAttributes extends ThreeLiveAttributes {
|
|
|
363
416
|
onpeergrabconflict?: (
|
|
364
417
|
e: CustomEvent<{peerId: string; nodeId: string}>,
|
|
365
418
|
) => void;
|
|
419
|
+
onpeerrtcsignal?: (
|
|
420
|
+
e: CustomEvent<{
|
|
421
|
+
peerId: string;
|
|
422
|
+
targetPeerId: string;
|
|
423
|
+
signalType: 'offer' | 'answer' | 'ice';
|
|
424
|
+
sdp: string | null;
|
|
425
|
+
candidate: string | null;
|
|
426
|
+
sdpMid: string | null;
|
|
427
|
+
sdpMLineIndex: number | null;
|
|
428
|
+
}>,
|
|
429
|
+
) => void;
|
|
366
430
|
/** xr-live-sim events. */
|
|
367
431
|
oncharacterjump?: (
|
|
368
432
|
e: CustomEvent<{nodeId: string; position: [number, number, number]}>,
|