three-live 1.2.1 → 1.2.2
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 +65 -2
- package/dist/three-author-engine.js +66 -41
- package/dist/three-author.cjs +63 -39
- package/dist/three-author.d.ts +65 -2
- package/dist/three-author.js +63 -39
- package/dist/three-convert.cjs +61 -37
- package/dist/three-convert.d.ts +65 -2
- package/dist/three-convert.js +61 -37
- package/dist/three-live-animation.cjs +7 -7
- package/dist/three-live-animation.d.ts +65 -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} +65 -2
- package/dist/three-live-cad.js +18 -0
- package/dist/three-live-cad.min.js +18 -0
- package/dist/three-live-element.cjs +29 -5
- package/dist/three-live-element.d.ts +65 -2
- package/dist/three-live-element.js +29 -5
- package/dist/three-live-full.cjs +159 -56
- package/dist/three-live-full.js +159 -56
- package/dist/three-live-full.min.js +159 -56
- package/dist/three-live-studio.cjs +120 -0
- package/dist/three-live-studio.d.ts +509 -0
- package/dist/three-live-studio.js +120 -0
- package/dist/three-live-studio.min.js +120 -0
- package/dist/three-live-viewer.cjs +29 -5
- package/dist/three-live-viewer.d.ts +65 -2
- package/dist/three-live-viewer.js +29 -5
- package/dist/three-live-viewer.min.js +29 -5
- package/dist/three-live.cjs +66 -42
- package/dist/three-live.js +66 -42
- package/dist/three-live.min.js +66 -42
- package/dist/three-view.cjs +29 -5
- package/dist/three-view.d.ts +65 -2
- package/dist/three-view.js +29 -5
- package/dist/three-xr.cjs +65 -41
- package/dist/three-xr.d.ts +65 -2
- package/dist/three-xr.js +65 -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, Hershey `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,29 @@ 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_TEXT_GEOMETRY_CHARS,
|
|
57
|
+
type ExtrudeGeometryOptions,
|
|
58
|
+
type TextGeometryOptions,
|
|
59
|
+
} from './three-live/src/plugins/cad';
|
|
60
|
+
export {
|
|
61
|
+
ikPlugin,
|
|
62
|
+
IKSolver,
|
|
63
|
+
quatFromUnitVectors,
|
|
64
|
+
solveFABRIK,
|
|
65
|
+
solveTwoBoneIK,
|
|
66
|
+
type FABRIKSolution,
|
|
67
|
+
type IKQuat,
|
|
68
|
+
type TwoBoneIKSolution,
|
|
69
|
+
} from './three-live/src/plugins/ik';
|
|
70
|
+
export {
|
|
71
|
+
extractNodeInstancing,
|
|
72
|
+
instancingPlugin,
|
|
73
|
+
} from './three-live/src/plugins/instancing';
|
|
51
74
|
export {
|
|
52
75
|
getInteractivityVM,
|
|
53
76
|
interactivityPlugin,
|
|
@@ -63,6 +86,30 @@ export {
|
|
|
63
86
|
type InteractivityValueSocket,
|
|
64
87
|
type InteractivityVariableDef,
|
|
65
88
|
} from './three-live/src/plugins/interactivity';
|
|
89
|
+
export {
|
|
90
|
+
applyMeshoptFilter,
|
|
91
|
+
decodeMeshoptBuffer,
|
|
92
|
+
decodeMeshoptGLB,
|
|
93
|
+
encodeMeshoptBuffer,
|
|
94
|
+
meshoptDecoder,
|
|
95
|
+
meshoptPlugin,
|
|
96
|
+
type MeshoptFilter,
|
|
97
|
+
type MeshoptMode,
|
|
98
|
+
} from './three-live/src/plugins/meshopt';
|
|
99
|
+
export {
|
|
100
|
+
computeOutlineClipOffset,
|
|
101
|
+
evaluateKawaseBloom,
|
|
102
|
+
parseHexRgb,
|
|
103
|
+
postprocessingPlugin,
|
|
104
|
+
resolveViewerBloom,
|
|
105
|
+
} from './three-live/src/plugins/postprocessing';
|
|
106
|
+
export {
|
|
107
|
+
extractMaterialVariants,
|
|
108
|
+
extractPrimitiveVariantMappings,
|
|
109
|
+
selectMaterialVariant,
|
|
110
|
+
variantsPlugin,
|
|
111
|
+
type VariantMapping,
|
|
112
|
+
} from './three-live/src/plugins/variants';
|
|
66
113
|
export {
|
|
67
114
|
ThreeLiveElement,
|
|
68
115
|
type ARLaunchOptions,
|
|
@@ -80,7 +127,7 @@ export {
|
|
|
80
127
|
type XRProfile,
|
|
81
128
|
type XRSimulatorRoom,
|
|
82
129
|
} from './xr-live/src/xr-live-element';
|
|
83
|
-
/** Optional spatial plugins (`xr-live/
|
|
130
|
+
/** Optional spatial plugins (`xr-live/spatial`, `xr-live-spatial.min.js`). */
|
|
84
131
|
export * from './xr-live/src/plugins/index';
|
|
85
132
|
|
|
86
133
|
/**
|
|
@@ -119,7 +166,7 @@ export interface ThreeLiveAttributes {
|
|
|
119
166
|
'shadow-intensity'?: number | string;
|
|
120
167
|
/** Radial Gaussian blur falloff of contact shadow (0.0 to 1.0). */
|
|
121
168
|
'shadow-softness'?: number | string;
|
|
122
|
-
/** Tone mapping mode ("neutral", "reinhard", "none"). */
|
|
169
|
+
/** Tone mapping mode ("neutral", "aces", "agx", "reinhard", "none"). */
|
|
123
170
|
'tone-mapping'?: string;
|
|
124
171
|
/** Enable or disable interactive camera orbit/pan/zoom controls (default: true). */
|
|
125
172
|
'camera-controls'?: boolean | string;
|
|
@@ -127,6 +174,8 @@ export interface ThreeLiveAttributes {
|
|
|
127
174
|
'autoplay'?: boolean | string;
|
|
128
175
|
/** Name of specific glTF animation clip to play. */
|
|
129
176
|
'animation-name'?: string;
|
|
177
|
+
/** Name of the active KHR_materials_variants material variant. */
|
|
178
|
+
'variant-name'?: string;
|
|
130
179
|
/** Automatically rotate scene around the Y-axis when user is idle. */
|
|
131
180
|
'auto-rotate'?: boolean | string;
|
|
132
181
|
/** Delay in milliseconds before auto-rotation resumes after user interaction (default: 3000). */
|
|
@@ -162,6 +211,7 @@ export interface ThreeLiveAttributes {
|
|
|
162
211
|
onerror?: (e: CustomEvent<{error: any}>) => void;
|
|
163
212
|
onmeshclick?: (e: CustomEvent<HitDetail>) => void;
|
|
164
213
|
'oncamera-change'?: (e: CustomEvent<CameraDetail>) => void;
|
|
214
|
+
'onvariant-applied'?: (e: CustomEvent<{variantName: string | null}>) => void;
|
|
165
215
|
'onar-status'?: (
|
|
166
216
|
e: CustomEvent<{
|
|
167
217
|
status: 'session-started' | 'not-presenting' | 'failed';
|
|
@@ -248,6 +298,8 @@ export interface XRLiveAttributes extends ThreeLiveAttributes {
|
|
|
248
298
|
'peer-name'?: string;
|
|
249
299
|
/** Local avatar visor & laser color (`#rrggbb`) in `shared-room`. */
|
|
250
300
|
'peer-color'?: string;
|
|
301
|
+
/** Opt-in WebRTC spatial voice chat signaling and HRTF distance attenuation in `shared-room`. */
|
|
302
|
+
'shared-room-voice'?: boolean | string;
|
|
251
303
|
/** xr-live-sim: character camera mode, or `none` to disable the character. */
|
|
252
304
|
'character-controller'?:
|
|
253
305
|
| 'third-person'
|
|
@@ -363,6 +415,17 @@ export interface XRLiveAttributes extends ThreeLiveAttributes {
|
|
|
363
415
|
onpeergrabconflict?: (
|
|
364
416
|
e: CustomEvent<{peerId: string; nodeId: string}>,
|
|
365
417
|
) => void;
|
|
418
|
+
onpeerrtcsignal?: (
|
|
419
|
+
e: CustomEvent<{
|
|
420
|
+
peerId: string;
|
|
421
|
+
targetPeerId: string;
|
|
422
|
+
signalType: 'offer' | 'answer' | 'ice';
|
|
423
|
+
sdp: string | null;
|
|
424
|
+
candidate: string | null;
|
|
425
|
+
sdpMid: string | null;
|
|
426
|
+
sdpMLineIndex: number | null;
|
|
427
|
+
}>,
|
|
428
|
+
) => void;
|
|
366
429
|
/** xr-live-sim events. */
|
|
367
430
|
oncharacterjump?: (
|
|
368
431
|
e: CustomEvent<{nodeId: string; position: [number, number, number]}>,
|