@laplace.live/persona-sdk 0.15.0 → 0.17.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 +3 -0
- package/dist/values/limits.js +3 -0
- package/dist/wire/schemas.d.ts +2 -0
- package/dist/wire/schemas.js +4 -1
- package/dist/wire/types.d.ts +14 -4
- package/dist/wire/types.js +9 -3
- package/package.json +2 -2
package/dist/values/limits.d.ts
CHANGED
|
@@ -37,6 +37,9 @@ export declare function sceneLightShadowRadiusMax(type: SceneLightType): number;
|
|
|
37
37
|
export declare const SCENE_FOG_DENSITY_MAX = 0.5;
|
|
38
38
|
/** ×4 is +2 stops — enough to rescue an AgX-dimmed avatar without turning the slider to mush. */
|
|
39
39
|
export declare const SCENE_EXPOSURE_MAX = 4;
|
|
40
|
+
/** Vertical field of view in degrees; the band either side of a portrait lens, before the framing distorts. */
|
|
41
|
+
export declare const SCENE_FOV_MIN = 10;
|
|
42
|
+
export declare const SCENE_FOV_MAX = 90;
|
|
40
43
|
export declare const MTOON_NORMAL_SCALE_MAX = 2;
|
|
41
44
|
export declare const MTOON_RIM_MAX = 2;
|
|
42
45
|
/** ×0 flattens the Fresnel to a flood fill, ×4 tightens a default power-5 rim to a hairline. */
|
package/dist/values/limits.js
CHANGED
|
@@ -52,6 +52,9 @@ export function sceneLightShadowRadiusMax(type) {
|
|
|
52
52
|
export const SCENE_FOG_DENSITY_MAX = 0.5;
|
|
53
53
|
/** ×4 is +2 stops — enough to rescue an AgX-dimmed avatar without turning the slider to mush. */
|
|
54
54
|
export const SCENE_EXPOSURE_MAX = 4;
|
|
55
|
+
/** Vertical field of view in degrees; the band either side of a portrait lens, before the framing distorts. */
|
|
56
|
+
export const SCENE_FOV_MIN = 10;
|
|
57
|
+
export const SCENE_FOV_MAX = 90;
|
|
55
58
|
export const MTOON_NORMAL_SCALE_MAX = 2;
|
|
56
59
|
export const MTOON_RIM_MAX = 2;
|
|
57
60
|
/** ×0 flattens the Fresnel to a flood fill, ×4 tightens a default power-5 rim to a hairline. */
|
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
|
/**
|
|
@@ -848,6 +857,7 @@ export type EffectsQuality = (typeof EFFECTS_QUALITY_LEVELS)[number];
|
|
|
848
857
|
export declare const FPS_LIMIT_PRESETS: readonly [0, 15, 30, 60, 90];
|
|
849
858
|
/** The curated settings surface the API exposes — never the raw store shape. */
|
|
850
859
|
export interface Settings {
|
|
860
|
+
/** `alwaysOnTop` floats the control-panel window, never the stage. */
|
|
851
861
|
window: {
|
|
852
862
|
alwaysOnTop: boolean;
|
|
853
863
|
};
|
|
@@ -887,8 +897,8 @@ export interface SettingsPatch {
|
|
|
887
897
|
effectsQuality?: EffectsQuality;
|
|
888
898
|
};
|
|
889
899
|
}
|
|
890
|
-
/** VTS's input vocabulary — the valid `id`s for `input` inject targets (and the names a model's `.vtube.json` references). */
|
|
891
|
-
export declare const INPUT_NAMES: readonly ["FaceAngleX", "FaceAngleY", "FaceAngleZ", "FacePositionX", "FacePositionY", "FacePositionZ", "EyeOpenLeft", "EyeOpenRight", "EyeLeftX", "EyeLeftY", "EyeRightX", "EyeRightY", "Brows", "BrowLeftY", "BrowRightY", "MouthSmile", "MouthOpen", "MouthX", "CheekPuff", "JawOpen", "TongueOut", "MouthPucker", "MouthFunnel", "MouthShrug", "MouthPress"];
|
|
900
|
+
/** VTS's input vocabulary plus the VBridger-standard extras — the valid `id`s for `input` inject targets (and the names a model's `.vtube.json` references). */
|
|
901
|
+
export declare const INPUT_NAMES: readonly ["FaceAngleX", "FaceAngleY", "FaceAngleZ", "FacePositionX", "FacePositionY", "FacePositionZ", "EyeOpenLeft", "EyeOpenRight", "EyeLeftX", "EyeLeftY", "EyeRightX", "EyeRightY", "Brows", "BrowLeftY", "BrowRightY", "MouthSmile", "MouthOpen", "MouthX", "CheekPuff", "JawOpen", "JawX", "TongueOut", "MouthPucker", "MouthFunnel", "MouthShrug", "MouthPress", "MouthPressLipOpen"];
|
|
892
902
|
export type InputName = (typeof INPUT_NAMES)[number];
|
|
893
903
|
/**
|
|
894
904
|
* What an injected value drives:
|
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);
|
|
@@ -42,7 +46,7 @@ export const EFFECTS_QUALITY_LEVELS = ['low', 'medium', 'high'];
|
|
|
42
46
|
*/
|
|
43
47
|
export const FPS_LIMIT_PRESETS = [0, 15, 30, 60, 90];
|
|
44
48
|
// ---- Injection -----------------------------------------------------------------
|
|
45
|
-
/** VTS's input vocabulary — the valid `id`s for `input` inject targets (and the names a model's `.vtube.json` references). */
|
|
49
|
+
/** VTS's input vocabulary plus the VBridger-standard extras — the valid `id`s for `input` inject targets (and the names a model's `.vtube.json` references). */
|
|
46
50
|
export const INPUT_NAMES = [
|
|
47
51
|
'FaceAngleX',
|
|
48
52
|
'FaceAngleY',
|
|
@@ -64,9 +68,11 @@ export const INPUT_NAMES = [
|
|
|
64
68
|
'MouthX',
|
|
65
69
|
'CheekPuff',
|
|
66
70
|
'JawOpen',
|
|
71
|
+
'JawX',
|
|
67
72
|
'TongueOut',
|
|
68
73
|
'MouthPucker',
|
|
69
74
|
'MouthFunnel',
|
|
70
75
|
'MouthShrug',
|
|
71
76
|
'MouthPress',
|
|
77
|
+
'MouthPressLipOpen',
|
|
72
78
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@laplace.live/persona-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "TypeScript SDK and wire schema for the LAPLACE Persona plugin API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"node": ">=22"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"zod": "^4.
|
|
51
|
+
"zod": "^4.5.2"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "rimraf dist && tsc -p tsconfig.build.json",
|