@laplace.live/persona-sdk 1.16.0 → 1.18.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/values/limits.d.ts +6 -3
- package/dist/values/limits.js +6 -3
- package/dist/wire/methods.d.ts +21 -0
- package/dist/wire/methods.js +109 -1
- package/dist/wire/protocol.d.ts +4 -3
- package/dist/wire/protocol.js +4 -3
- package/dist/wire/schemas/requests.d.ts +3 -4
- package/dist/wire/schemas/requests.js +4 -1
- package/dist/wire/schemas/settings.d.ts +0 -16
- package/dist/wire/schemas/settings.js +2 -4
- package/dist/wire/types.d.ts +8 -7
- package/dist/wire/types.js +2 -1
- package/package.json +1 -1
package/dist/values/limits.d.ts
CHANGED
|
@@ -162,6 +162,10 @@ export declare const SPAWN_ALIVE_MAX = 500;
|
|
|
162
162
|
export declare const SPAWN_SPREAD_MAX = 20;
|
|
163
163
|
export declare const SPAWN_SPEED_MAX = 50;
|
|
164
164
|
export declare const SPAWN_TTL_MAX_MS = 600000;
|
|
165
|
+
/** `stage.capture` longest-edge bounds and default, px. */
|
|
166
|
+
export declare const STAGE_CAPTURE_EDGE_MIN = 64;
|
|
167
|
+
export declare const STAGE_CAPTURE_EDGE_MAX = 2048;
|
|
168
|
+
export declare const STAGE_CAPTURE_EDGE_DEFAULT = 1024;
|
|
165
169
|
/** Web object viewport bounds, CSS px per side. */
|
|
166
170
|
export declare const WEB_SIZE_MIN = 16;
|
|
167
171
|
export declare const WEB_SIZE_MAX = 7680;
|
|
@@ -173,9 +177,8 @@ export declare function objectSupportsSpace(kind: ObjectContent['kind'], space:
|
|
|
173
177
|
/** The asset an object streams from, or null for kinds that carry their source inline (web, capture). */
|
|
174
178
|
export declare function contentAssetId(content: ObjectContent): string | null;
|
|
175
179
|
/**
|
|
176
|
-
* The one model format a space's objects can ride: the
|
|
177
|
-
*
|
|
178
|
-
* would z-fight by construction.
|
|
180
|
+
* The one model format a space's objects can ride: the screen layer always composites
|
|
181
|
+
* over the world scene, so a cross-space pin would z-fight by construction.
|
|
179
182
|
*/
|
|
180
183
|
export declare function attachableParentFormat(space: ObjectSpace): ModelFormat;
|
|
181
184
|
/**
|
package/dist/values/limits.js
CHANGED
|
@@ -282,6 +282,10 @@ export const SPAWN_ALIVE_MAX = 500;
|
|
|
282
282
|
export const SPAWN_SPREAD_MAX = 20;
|
|
283
283
|
export const SPAWN_SPEED_MAX = 50;
|
|
284
284
|
export const SPAWN_TTL_MAX_MS = 600_000;
|
|
285
|
+
/** `stage.capture` longest-edge bounds and default, px. */
|
|
286
|
+
export const STAGE_CAPTURE_EDGE_MIN = 64;
|
|
287
|
+
export const STAGE_CAPTURE_EDGE_MAX = 2048;
|
|
288
|
+
export const STAGE_CAPTURE_EDGE_DEFAULT = 1024;
|
|
285
289
|
/** Web object viewport bounds, CSS px per side. */
|
|
286
290
|
export const WEB_SIZE_MIN = 16;
|
|
287
291
|
export const WEB_SIZE_MAX = 7680;
|
|
@@ -297,9 +301,8 @@ export function contentAssetId(content) {
|
|
|
297
301
|
return content.kind === 'image' || content.kind === 'video' || content.kind === 'prop' ? content.assetId : null;
|
|
298
302
|
}
|
|
299
303
|
/**
|
|
300
|
-
* The one model format a space's objects can ride: the
|
|
301
|
-
*
|
|
302
|
-
* would z-fight by construction.
|
|
304
|
+
* The one model format a space's objects can ride: the screen layer always composites
|
|
305
|
+
* over the world scene, so a cross-space pin would z-fight by construction.
|
|
303
306
|
*/
|
|
304
307
|
export function attachableParentFormat(space) {
|
|
305
308
|
return space === '2d' ? 'live2d' : 'vrm';
|
package/dist/wire/methods.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export interface SceneActivateRequest {
|
|
|
23
23
|
}
|
|
24
24
|
export type SceneActivateResponse = SceneState;
|
|
25
25
|
export type SceneCreateRequest = EmptyRequest;
|
|
26
|
+
/** The create activates the scene it adds: `activeSceneId` is the new scene's id. */
|
|
26
27
|
export type SceneCreateResponse = SceneState;
|
|
27
28
|
export interface SceneDuplicateRequest {
|
|
28
29
|
sceneId: string;
|
|
@@ -493,6 +494,20 @@ export type StageClearSpawnedRequest = EmptyRequest;
|
|
|
493
494
|
export interface StageClearSpawnedResponse {
|
|
494
495
|
cleared: number;
|
|
495
496
|
}
|
|
497
|
+
/**
|
|
498
|
+
* A PNG of the stage window as it is displayed — what a client that cannot see the screen
|
|
499
|
+
* checks its edits against. Each capture costs the stage a frame, so read on demand, never poll.
|
|
500
|
+
*/
|
|
501
|
+
export interface StageCaptureRequest {
|
|
502
|
+
/** Longest edge in px, `STAGE_CAPTURE_EDGE_MIN`–`STAGE_CAPTURE_EDGE_MAX`; default `STAGE_CAPTURE_EDGE_DEFAULT`. */
|
|
503
|
+
maxEdge?: number;
|
|
504
|
+
}
|
|
505
|
+
export interface StageCaptureResponse {
|
|
506
|
+
/** `data:image/png;base64,…`, alpha preserved. */
|
|
507
|
+
dataUrl: string;
|
|
508
|
+
width: number;
|
|
509
|
+
height: number;
|
|
510
|
+
}
|
|
496
511
|
export type AppInfoRequest = EmptyRequest;
|
|
497
512
|
export interface AppInfoResponse {
|
|
498
513
|
name: string;
|
|
@@ -1024,6 +1039,11 @@ export interface MethodMap {
|
|
|
1024
1039
|
request: StageClearSpawnedRequest;
|
|
1025
1040
|
response: StageClearSpawnedResponse;
|
|
1026
1041
|
};
|
|
1042
|
+
/** Needs the `stage-capture` app capability. */
|
|
1043
|
+
'stage.capture': {
|
|
1044
|
+
request: StageCaptureRequest;
|
|
1045
|
+
response: StageCaptureResponse;
|
|
1046
|
+
};
|
|
1027
1047
|
'app.info': {
|
|
1028
1048
|
request: AppInfoRequest;
|
|
1029
1049
|
response: AppInfoResponse;
|
|
@@ -1089,3 +1109,4 @@ export interface MethodMap {
|
|
|
1089
1109
|
export type MethodName = keyof MethodMap;
|
|
1090
1110
|
export type MethodRequest<M extends MethodName> = MethodMap[M]['request'];
|
|
1091
1111
|
export type MethodResponse<M extends MethodName> = MethodMap[M]['response'];
|
|
1112
|
+
export declare const METHOD_NAMES: readonly MethodName[];
|
package/dist/wire/methods.js
CHANGED
|
@@ -1 +1,109 @@
|
|
|
1
|
-
|
|
1
|
+
// Built from a `Record<MethodName, …>` so a new MethodMap key that is missing
|
|
2
|
+
// here fails the build instead of silently dropping out of the runtime list.
|
|
3
|
+
export const METHOD_NAMES = Object.keys({
|
|
4
|
+
'scene.list': true,
|
|
5
|
+
'scene.get': true,
|
|
6
|
+
'scene.activate': true,
|
|
7
|
+
'scene.create': true,
|
|
8
|
+
'scene.duplicate': true,
|
|
9
|
+
'scene.rename': true,
|
|
10
|
+
'scene.delete': true,
|
|
11
|
+
'scene.patch': true,
|
|
12
|
+
'scene.setLightFollowCamera': true,
|
|
13
|
+
'scene.inspect': true,
|
|
14
|
+
'instance.list': true,
|
|
15
|
+
'instance.get': true,
|
|
16
|
+
'instance.add': true,
|
|
17
|
+
'instance.setModel': true,
|
|
18
|
+
'instance.remove': true,
|
|
19
|
+
'instance.setVisible': true,
|
|
20
|
+
'instance.setEffects': true,
|
|
21
|
+
'instance.setTrackingSources': true,
|
|
22
|
+
'instance.setControllerMovement': true,
|
|
23
|
+
'instance.reorder': true,
|
|
24
|
+
'instance.setPrimary': true,
|
|
25
|
+
'instance.setPlacement': true,
|
|
26
|
+
'instance.attach': true,
|
|
27
|
+
'instance.setMToon': true,
|
|
28
|
+
'instance.setIdle': true,
|
|
29
|
+
'instance.setBreath': true,
|
|
30
|
+
'instance.setLipSync': true,
|
|
31
|
+
'instance.info': true,
|
|
32
|
+
'selection.set': true,
|
|
33
|
+
'selection.get': true,
|
|
34
|
+
'object.add': true,
|
|
35
|
+
'object.addMany': true,
|
|
36
|
+
'object.rename': true,
|
|
37
|
+
'object.setContent': true,
|
|
38
|
+
'object.setSpace': true,
|
|
39
|
+
'object.setPlacement': true,
|
|
40
|
+
'object.attach': true,
|
|
41
|
+
'object.setLightOverrides': true,
|
|
42
|
+
'object.anchors': true,
|
|
43
|
+
'expression.list': true,
|
|
44
|
+
'expression.active': true,
|
|
45
|
+
'expression.toggle': true,
|
|
46
|
+
'expression.setWeight': true,
|
|
47
|
+
'expression.getPersistence': true,
|
|
48
|
+
'expression.setPersistence': true,
|
|
49
|
+
'motion.list': true,
|
|
50
|
+
'motion.play': true,
|
|
51
|
+
'motion.playAsset': true,
|
|
52
|
+
'motion.playing': true,
|
|
53
|
+
'motion.stop': true,
|
|
54
|
+
'speech.play': true,
|
|
55
|
+
'speech.stop': true,
|
|
56
|
+
'hotkey.list': true,
|
|
57
|
+
'hotkey.set': true,
|
|
58
|
+
'hotkey.trigger': true,
|
|
59
|
+
'automation.list': true,
|
|
60
|
+
'automation.run': true,
|
|
61
|
+
'model.list': true,
|
|
62
|
+
'model.register': true,
|
|
63
|
+
'asset.list': true,
|
|
64
|
+
'asset.register': true,
|
|
65
|
+
'registry.thumbnail': true,
|
|
66
|
+
'settings.get': true,
|
|
67
|
+
'settings.patch': true,
|
|
68
|
+
'tracking.status': true,
|
|
69
|
+
'tracking.setEnabled': true,
|
|
70
|
+
'tracking.setSource': true,
|
|
71
|
+
'tracking.addSource': true,
|
|
72
|
+
'tracking.updateSource': true,
|
|
73
|
+
'tracking.removeSource': true,
|
|
74
|
+
'pose.setEnabled': true,
|
|
75
|
+
'pose.setSource': true,
|
|
76
|
+
'pose.setPort': true,
|
|
77
|
+
'lipSync.state': true,
|
|
78
|
+
'lipSync.configure': true,
|
|
79
|
+
'lipSync.restart': true,
|
|
80
|
+
'lipSync.calibrate': true,
|
|
81
|
+
'binding.get': true,
|
|
82
|
+
'binding.preview': true,
|
|
83
|
+
'binding.set': true,
|
|
84
|
+
'binding.release': true,
|
|
85
|
+
'binding.inputs': true,
|
|
86
|
+
'binding.override': true,
|
|
87
|
+
'controller.state': true,
|
|
88
|
+
'controller.rename': true,
|
|
89
|
+
'controller.setDeadZone': true,
|
|
90
|
+
'controller.remove': true,
|
|
91
|
+
'controller.assign': true,
|
|
92
|
+
'stage.resetTransform': true,
|
|
93
|
+
'stage.resetCamera': true,
|
|
94
|
+
'stage.spawn': true,
|
|
95
|
+
'stage.clearSpawned': true,
|
|
96
|
+
'stage.capture': true,
|
|
97
|
+
'app.info': true,
|
|
98
|
+
'app.localAddresses': true,
|
|
99
|
+
'app.stats': true,
|
|
100
|
+
'session.identify': true,
|
|
101
|
+
'storage.get': true,
|
|
102
|
+
'storage.set': true,
|
|
103
|
+
'storage.delete': true,
|
|
104
|
+
'storage.list': true,
|
|
105
|
+
'events.subscribe': true,
|
|
106
|
+
'events.unsubscribe': true,
|
|
107
|
+
'param.inject': true,
|
|
108
|
+
'param.release': true,
|
|
109
|
+
});
|
package/dist/wire/protocol.d.ts
CHANGED
|
@@ -18,9 +18,10 @@ export declare const INJECT_LEASE_TTL_MS = 1000;
|
|
|
18
18
|
/** How often {@link PersonaClient.driveParameter} re-sends held leases to keep them alive. */
|
|
19
19
|
export declare const INJECT_HEARTBEAT_MS = 100;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* Least gap between the stage's refreshes of the tracking inputs behind the binding editor's live
|
|
22
|
+
* indicators (~20/s at most). The refresh rides the stage's frames, so a capped frame rate
|
|
23
|
+
* stretches it. Fast enough to read as live, slow enough that the worker port carries no
|
|
24
|
+
* per-frame traffic.
|
|
24
25
|
*/
|
|
25
26
|
export declare const TRACKING_INPUTS_MS = 50;
|
|
26
27
|
/**
|
package/dist/wire/protocol.js
CHANGED
|
@@ -17,9 +17,10 @@ export const INJECT_LEASE_TTL_MS = 1000;
|
|
|
17
17
|
/** How often {@link PersonaClient.driveParameter} re-sends held leases to keep them alive. */
|
|
18
18
|
export const INJECT_HEARTBEAT_MS = 100;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* Least gap between the stage's refreshes of the tracking inputs behind the binding editor's live
|
|
21
|
+
* indicators (~20/s at most). The refresh rides the stage's frames, so a capped frame rate
|
|
22
|
+
* stretches it. Fast enough to read as live, slow enough that the worker port carries no
|
|
23
|
+
* per-frame traffic.
|
|
23
24
|
*/
|
|
24
25
|
export const TRACKING_INPUTS_MS = 50;
|
|
25
26
|
/**
|
|
@@ -255,10 +255,6 @@ export declare const requestSchemas: {
|
|
|
255
255
|
medium: "medium";
|
|
256
256
|
}>>;
|
|
257
257
|
renderScale: z.ZodOptional<z.ZodNumber>;
|
|
258
|
-
live2dEngine: z.ZodOptional<z.ZodEnum<{
|
|
259
|
-
pixi: "pixi";
|
|
260
|
-
three: "three";
|
|
261
|
-
}>>;
|
|
262
258
|
}, z.core.$strip>>;
|
|
263
259
|
}, z.core.$strip>;
|
|
264
260
|
}, z.core.$strip>;
|
|
@@ -334,6 +330,9 @@ export declare const requestSchemas: {
|
|
|
334
330
|
outMs: z.ZodOptional<z.ZodNumber>;
|
|
335
331
|
}, z.core.$strip>>;
|
|
336
332
|
}, z.core.$strip>;
|
|
333
|
+
'stage.capture': z.ZodObject<{
|
|
334
|
+
maxEdge: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
}, z.core.$strip>;
|
|
337
336
|
'events.subscribe': z.ZodObject<{
|
|
338
337
|
events: z.ZodArray<z.ZodCustom<keyof import("../events.ts").EventMap, keyof import("../events.ts").EventMap>>;
|
|
339
338
|
}, z.core.$strip>;
|
|
@@ -2,7 +2,7 @@ import * as z from 'zod';
|
|
|
2
2
|
import { CONTROLLER_DEAD_ZONE_MAX } from "../../values/controller.js";
|
|
3
3
|
import { isRecord } from "../../values/guards.js";
|
|
4
4
|
import { ITEM_TRANSITION_STYLES } from "../../values/item-transition.js";
|
|
5
|
-
import { OBJECT_ADD_MANY_MAX, SCENE_COLOR_RE, SPEECH_URL_MAX_LENGTH, STORAGE_KEY_MAX_LENGTH, STORAGE_VALUE_MAX_LENGTH, } from "../../values/limits.js";
|
|
5
|
+
import { OBJECT_ADD_MANY_MAX, SCENE_COLOR_RE, SPEECH_URL_MAX_LENGTH, STAGE_CAPTURE_EDGE_MAX, STAGE_CAPTURE_EDGE_MIN, STORAGE_KEY_MAX_LENGTH, STORAGE_VALUE_MAX_LENGTH, } from "../../values/limits.js";
|
|
6
6
|
import { LIP_SYNC_CALIBRATION_ACTIONS, LIP_SYNC_MODES, LIP_SYNC_PHONEMES, } from "../../values/lipsync.js";
|
|
7
7
|
import { SCENE_TRANSITION_DURATION_MAX_MS, SCENE_TRANSITION_DURATION_MIN_MS, SCENE_TRANSITION_FADE_DEFAULT_MS, SCENE_TRANSITION_SWITCH_POINT_MAX, SCENE_TRANSITION_SWITCH_POINT_MIN, SCENE_TRANSITION_TYPES, } from "../../values/scene-transition.js";
|
|
8
8
|
import { ASSET_KINDS, INJECT_TARGET_TYPES, POSE_SOURCE_IDS, TRACKING_SOURCE_IDS, TRACKING_SOURCE_KINDS, } from "../types.js";
|
|
@@ -168,6 +168,9 @@ export const requestSchemas = {
|
|
|
168
168
|
})
|
|
169
169
|
.optional(),
|
|
170
170
|
}),
|
|
171
|
+
'stage.capture': z.object({
|
|
172
|
+
maxEdge: z.number().int().min(STAGE_CAPTURE_EDGE_MIN).max(STAGE_CAPTURE_EDGE_MAX).optional(),
|
|
173
|
+
}),
|
|
171
174
|
'events.subscribe': z.object({ events: z.array(lenientEventNameSchema).min(1) }),
|
|
172
175
|
'events.unsubscribe': z.object({ events: z.array(lenientEventNameSchema).optional() }),
|
|
173
176
|
'param.inject': z.object({ entries: z.array(InjectEntrySchema).min(1) }),
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
/** Shared field definitions; parsing validates values without adding defaults or healing them. */
|
|
3
3
|
export declare const PortSchema: z.ZodNumber;
|
|
4
|
-
export declare const Live2DEngineSchema: z.ZodEnum<{
|
|
5
|
-
pixi: "pixi";
|
|
6
|
-
three: "three";
|
|
7
|
-
}>;
|
|
8
4
|
export declare const EffectsQualitySchema: z.ZodEnum<{
|
|
9
5
|
high: "high";
|
|
10
6
|
low: "low";
|
|
@@ -110,10 +106,6 @@ export declare const PerformanceSettingsSchema: z.ZodObject<{
|
|
|
110
106
|
medium: "medium";
|
|
111
107
|
}>;
|
|
112
108
|
renderScale: z.ZodNumber;
|
|
113
|
-
live2dEngine: z.ZodEnum<{
|
|
114
|
-
pixi: "pixi";
|
|
115
|
-
three: "three";
|
|
116
|
-
}>;
|
|
117
109
|
}, z.core.$strip>;
|
|
118
110
|
/** Stage content dimensions in device-independent pixels. */
|
|
119
111
|
export declare const StageSizeSchema: z.ZodObject<{
|
|
@@ -201,10 +193,6 @@ export declare const SettingsSchema: z.ZodObject<{
|
|
|
201
193
|
medium: "medium";
|
|
202
194
|
}>;
|
|
203
195
|
renderScale: z.ZodOptional<z.ZodNumber>;
|
|
204
|
-
live2dEngine: z.ZodOptional<z.ZodEnum<{
|
|
205
|
-
pixi: "pixi";
|
|
206
|
-
three: "three";
|
|
207
|
-
}>>;
|
|
208
196
|
}, z.core.$strip>;
|
|
209
197
|
tracking: z.ZodObject<{
|
|
210
198
|
enabled: z.ZodBoolean;
|
|
@@ -276,9 +264,5 @@ export declare const SettingsPatchSchema: z.ZodObject<{
|
|
|
276
264
|
medium: "medium";
|
|
277
265
|
}>>;
|
|
278
266
|
renderScale: z.ZodOptional<z.ZodNumber>;
|
|
279
|
-
live2dEngine: z.ZodOptional<z.ZodEnum<{
|
|
280
|
-
pixi: "pixi";
|
|
281
|
-
three: "three";
|
|
282
|
-
}>>;
|
|
283
267
|
}, z.core.$strip>>;
|
|
284
268
|
}, z.core.$strip>;
|
|
@@ -2,10 +2,9 @@ import * as z from 'zod';
|
|
|
2
2
|
import { CONTROLLER_DEAD_ZONE_MAX } from "../../values/controller.js";
|
|
3
3
|
import { LIP_SYNC_GAIN_MAX, LIP_SYNC_MAX_SAMPLES, LIP_SYNC_MFCC_COEFFICIENTS, LIP_SYNC_MIN_SAMPLES, LIP_SYNC_NOISE_GATE_MIN, LIP_SYNC_PHONEMES, LIP_SYNC_SMOOTHING_MAX, } from "../../values/lipsync.js";
|
|
4
4
|
import { LOCALES } from "../../values/locale.js";
|
|
5
|
-
import { EFFECTS_QUALITY_LEVELS,
|
|
5
|
+
import { EFFECTS_QUALITY_LEVELS, MEDIAPIPE_DELEGATES, POSE_SOURCE_IDS, TRACKING_SOURCE_IDS, TRACKING_SOURCE_KINDS, } from "../types.js";
|
|
6
6
|
/** Shared field definitions; parsing validates values without adding defaults or healing them. */
|
|
7
7
|
export const PortSchema = z.number().int().min(1).max(65535).describe('Network port, from 1 through 65535.');
|
|
8
|
-
export const Live2DEngineSchema = z.enum(LIVE2D_ENGINES).describe('Engine used to render Live2D models.');
|
|
9
8
|
export const EffectsQualitySchema = z.enum(EFFECTS_QUALITY_LEVELS).describe('Scene and layer effects quality tier.');
|
|
10
9
|
export const LanguageSettingSchema = z
|
|
11
10
|
.enum(['system', ...LOCALES])
|
|
@@ -75,7 +74,6 @@ export const PerformanceSettingsSchema = z.object({
|
|
|
75
74
|
fpsLimit: z.number().describe('Frame-rate cap; zero is unlimited. The desktop snaps changes to supported presets.'),
|
|
76
75
|
effectsQuality: EffectsQualitySchema,
|
|
77
76
|
renderScale: z.number().describe('Render resolution multiplier. The desktop snaps changes to supported presets.'),
|
|
78
|
-
live2dEngine: Live2DEngineSchema,
|
|
79
77
|
});
|
|
80
78
|
/** Stage content dimensions in device-independent pixels. */
|
|
81
79
|
export const StageSizeSchema = z.object({
|
|
@@ -107,7 +105,7 @@ export const SettingsSchema = z.object({
|
|
|
107
105
|
ui: z
|
|
108
106
|
.object({ trayVisible: z.boolean().describe('Show the tray or menu bar icon.') })
|
|
109
107
|
.describe('Public interface preferences.'),
|
|
110
|
-
performance: PerformanceSettingsSchema.partial({ renderScale: true
|
|
108
|
+
performance: PerformanceSettingsSchema.partial({ renderScale: true }).describe('Renderer settings; renderScale is absent on older hosts.'),
|
|
111
109
|
tracking: TrackingSettingsSchema.describe('Network face master switch and all configured tracking sources.'),
|
|
112
110
|
pose: PoseSettingsSchema.describe('Network body master switch and legacy source mirrors.'),
|
|
113
111
|
});
|
package/dist/wire/types.d.ts
CHANGED
|
@@ -286,7 +286,7 @@ export interface AttachElasticity {
|
|
|
286
286
|
* value: the two ends clear the parent's whole stack, and `artMesh` slots the item in directly
|
|
287
287
|
* above that ArtMesh, so every parent mesh over it paints on top. Ids rather than positions,
|
|
288
288
|
* because Cubism re-sorts the stack as motions play, and an id carries to any rig that has it.
|
|
289
|
-
* Live2D parents on
|
|
289
|
+
* Live2D parents only: on a VRM an item always paints in front.
|
|
290
290
|
*/
|
|
291
291
|
export type AttachDepth = {
|
|
292
292
|
kind: 'front';
|
|
@@ -1041,7 +1041,7 @@ export interface ScenePatch {
|
|
|
1041
1041
|
* App-level features a client gates on (never version-sniff): `hello` and
|
|
1042
1042
|
* `app.info` report them — the per-app mirror of {@link InstanceRuntime.capabilities}.
|
|
1043
1043
|
*/
|
|
1044
|
-
export declare const APP_CAPABILITIES: readonly ["storage", "speech", "automations", "controllers", "model-editing", "asset-inspection", "layer-effects", "scene-transitions", "area-lights", "spot-lights", "camera-follow-lights", "shadow-filters", "environment-map-model", "spawn", "tracking-lost", "motion-stop"];
|
|
1044
|
+
export declare const APP_CAPABILITIES: readonly ["storage", "speech", "automations", "controllers", "model-editing", "asset-inspection", "layer-effects", "scene-transitions", "area-lights", "spot-lights", "camera-follow-lights", "shadow-filters", "environment-map-model", "spawn", "tracking-lost", "motion-stop", "stage-capture"];
|
|
1045
1045
|
export type AppCapability = (typeof APP_CAPABILITIES)[number];
|
|
1046
1046
|
export declare function isAppCapability(v: unknown): v is AppCapability;
|
|
1047
1047
|
/** What a loaded model instance can do; absent capabilities answer `unsupported-for-format`. */
|
|
@@ -1052,12 +1052,15 @@ export type InstanceCapability = 'motions' | 'expressions' | 'placement-2d' | 'p
|
|
|
1052
1052
|
| 'breath'
|
|
1053
1053
|
/** `expression.setWeight`; Cubism expressions carry no user-settable weight, so Live2D lacks it. */
|
|
1054
1054
|
| 'expression-weights'
|
|
1055
|
-
/**
|
|
1055
|
+
/**
|
|
1056
|
+
* `speech.play` lip-sync. Loaded Live2D models only; 0.53 and earlier hosts also omit it under
|
|
1057
|
+
* the Pixi engine, so gate on the runtime, not the format.
|
|
1058
|
+
*/
|
|
1056
1059
|
| 'speech'
|
|
1057
1060
|
/**
|
|
1058
1061
|
* Draws through the 3D post chain, so the scene's look rows (tone mapping, exposure, LUT)
|
|
1059
|
-
* reach it.
|
|
1060
|
-
* runtime rather than the format.
|
|
1062
|
+
* reach it. Every model; 0.53 and earlier hosts omit it on Pixi-engine Live2D, so read it off
|
|
1063
|
+
* the runtime rather than the format.
|
|
1061
1064
|
*/
|
|
1062
1065
|
| 'post-fx';
|
|
1063
1066
|
export interface InstanceRuntime {
|
|
@@ -1157,8 +1160,6 @@ export interface ExpressionPersistence {
|
|
|
1157
1160
|
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
1158
1161
|
[key: string]: JsonValue;
|
|
1159
1162
|
};
|
|
1160
|
-
export declare const LIVE2D_ENGINES: readonly ["pixi", "three"];
|
|
1161
|
-
export type Live2DEngine = (typeof LIVE2D_ENGINES)[number];
|
|
1162
1163
|
export declare const TRACKING_SOURCE_IDS: readonly ["persona-ios", "ifacialmocap", "vts-ios"];
|
|
1163
1164
|
export type TrackingSourceId = (typeof TRACKING_SOURCE_IDS)[number];
|
|
1164
1165
|
/** Body-pose protocols. Every one so far is UDP with a configurable port. */
|
package/dist/wire/types.js
CHANGED
|
@@ -51,6 +51,8 @@ export const APP_CAPABILITIES = [
|
|
|
51
51
|
'tracking-lost',
|
|
52
52
|
/** `motion.stop`; `motion.playing` and `motion.started` carry `oneShot`. */
|
|
53
53
|
'motion-stop',
|
|
54
|
+
/** `stage.capture`. */
|
|
55
|
+
'stage-capture',
|
|
54
56
|
];
|
|
55
57
|
export function isAppCapability(v) {
|
|
56
58
|
return isOneOf(v, APP_CAPABILITIES);
|
|
@@ -82,7 +84,6 @@ export const AUTOMATION_BOUNDARY_KINDS = [
|
|
|
82
84
|
'load-model',
|
|
83
85
|
];
|
|
84
86
|
// ---- Settings ------------------------------------------------------------------
|
|
85
|
-
export const LIVE2D_ENGINES = ['pixi', 'three'];
|
|
86
87
|
export const TRACKING_SOURCE_IDS = ['persona-ios', 'ifacialmocap', 'vts-ios'];
|
|
87
88
|
/** Body-pose protocols. Every one so far is UDP with a configurable port. */
|
|
88
89
|
export const POSE_SOURCE_IDS = ['vmc', 'mocopi'];
|