@laplace.live/persona-sdk 0.15.0 → 0.16.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/wire/schemas.d.ts +2 -0
- package/dist/wire/schemas.js +4 -1
- package/dist/wire/types.d.ts +11 -2
- package/dist/wire/types.js +6 -2
- package/package.json +1 -1
package/dist/wire/schemas.d.ts
CHANGED
package/dist/wire/schemas.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import { isRecord } from "../values/guards.js";
|
|
3
3
|
import { SPEECH_URL_MAX_LENGTH, STORAGE_KEY_MAX_LENGTH, STORAGE_VALUE_MAX_LENGTH } from "../values/limits.js";
|
|
4
|
+
import { ASSET_KINDS } from "./types.js";
|
|
4
5
|
// Runtime validation for the request side of the wire. Schemas exist for the
|
|
5
6
|
// methods whose params the app's main process consumes directly; methods without
|
|
6
7
|
// one are stage-owned — the renderer validates and heals them (same rules as the
|
|
@@ -91,7 +92,9 @@ export const requestSchemas = {
|
|
|
91
92
|
}),
|
|
92
93
|
'tracking.removeSource': z.object({ id: nonEmpty }),
|
|
93
94
|
'model.register': z.object({ path: nonEmpty }),
|
|
94
|
-
|
|
95
|
+
// Straight off ASSET_KINDS: a kind added there has to reach the wire gate too, or
|
|
96
|
+
// `want` answers invalid-params for a kind the registry already knows how to take.
|
|
97
|
+
'asset.register': z.object({ path: nonEmpty, want: z.enum(ASSET_KINDS).optional() }),
|
|
95
98
|
'settings.patch': z.object({ settings: SettingsPatchSchema }),
|
|
96
99
|
'tracking.setEnabled': z.object({ enabled: z.boolean() }),
|
|
97
100
|
'tracking.setSource': z.object({ source: z.enum(['vts-ios', 'vts-ios-native', 'ifacialmocap']) }),
|
package/dist/wire/types.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export type ModelFormat = 'live2d' | 'vrm';
|
|
2
2
|
/** Where an item came from: shipped with the app, or added by the user. */
|
|
3
3
|
export type ContentOrigin = 'bundled' | 'user';
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* How a registered file is labelled. Wider than an object's content kinds: `.hdr` is only
|
|
6
|
+
* ever an environment map, and a `.vmd` splits by content — `cameraMotion` for one that
|
|
7
|
+
* frames a shot, `animation` for one that drives a rig.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ASSET_KINDS: readonly ["image", "video", "prop", "ibl", "lut", "animation", "cameraMotion"];
|
|
6
10
|
export type AssetKind = (typeof ASSET_KINDS)[number];
|
|
7
11
|
/** Narrow a kind string to the set the asset registry owns — models and effects have their own. */
|
|
8
12
|
export declare function isAssetKind(v: unknown): v is AssetKind;
|
|
@@ -266,6 +270,11 @@ export interface OrbitTransform {
|
|
|
266
270
|
export interface SceneCamera {
|
|
267
271
|
orbit: OrbitTransform | null;
|
|
268
272
|
fov: number;
|
|
273
|
+
/**
|
|
274
|
+
* A `cameraMotion` asset driving the camera, or null for the user's own orbit. While one
|
|
275
|
+
* is set it overrides `orbit` and `fov` every frame; neither field is written back.
|
|
276
|
+
*/
|
|
277
|
+
clipAssetId: string | null;
|
|
269
278
|
}
|
|
270
279
|
export type SceneLightType = 'directional' | 'point' | 'ambient';
|
|
271
280
|
/**
|
package/dist/wire/types.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
// The API's data model: the entity shapes that requests, responses, and events
|
|
2
2
|
// carry. Structural mirrors of the app's scene/settings models, minus anything
|
|
3
3
|
// filesystem-shaped — model refs are sanitized to ids, never directories.
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* How a registered file is labelled. Wider than an object's content kinds: `.hdr` is only
|
|
6
|
+
* ever an environment map, and a `.vmd` splits by content — `cameraMotion` for one that
|
|
7
|
+
* frames a shot, `animation` for one that drives a rig.
|
|
8
|
+
*/
|
|
9
|
+
export const ASSET_KINDS = ['image', 'video', 'prop', 'ibl', 'lut', 'animation', 'cameraMotion'];
|
|
6
10
|
/** Narrow a kind string to the set the asset registry owns — models and effects have their own. */
|
|
7
11
|
export function isAssetKind(v) {
|
|
8
12
|
return typeof v === 'string' && ASSET_KINDS.includes(v);
|