@laplace.live/persona-sdk 0.18.0 → 0.18.1
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/curve.d.ts +2 -0
- package/dist/values/curve.js +2 -1
- package/dist/values/limits.d.ts +6 -0
- package/dist/values/limits.js +6 -0
- package/dist/wire/types.d.ts +10 -0
- package/package.json +1 -1
package/dist/values/curve.d.ts
CHANGED
|
@@ -140,6 +140,8 @@ export declare function insertAnchor(keyframes: Keyframe[], at: Point): {
|
|
|
140
140
|
keyframes: Keyframe[];
|
|
141
141
|
index: number;
|
|
142
142
|
};
|
|
143
|
+
/** Every {@link Interpolation}, in the order an editor lists them. */
|
|
144
|
+
export declare const INTERPOLATIONS: readonly Interpolation[];
|
|
143
145
|
/**
|
|
144
146
|
* A curve from an untrusted document — a config file or an IPC caller — or null when it
|
|
145
147
|
* cannot be made into one. Anchors are clamped into the unit square and sorted by x, which is
|
package/dist/values/curve.js
CHANGED
|
@@ -274,7 +274,8 @@ function point(v, clampToUnit) {
|
|
|
274
274
|
return null;
|
|
275
275
|
return clampToUnit ? { x: clamp(v.x, 0, 1), y: clamp(v.y, 0, 1) } : { x: v.x, y: v.y };
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
/** Every {@link Interpolation}, in the order an editor lists them. */
|
|
278
|
+
export const INTERPOLATIONS = ['linear', 'step', 'invertStep', 'bezier'];
|
|
278
279
|
/**
|
|
279
280
|
* A curve from an untrusted document — a config file or an IPC caller — or null when it
|
|
280
281
|
* cannot be made into one. Anchors are clamped into the unit square and sorted by x, which is
|
package/dist/values/limits.d.ts
CHANGED
|
@@ -109,6 +109,12 @@ export declare const PLACE_2D_SCALE_MIN = 0.01;
|
|
|
109
109
|
export declare const PLACE_2D_SCALE_MAX = 50;
|
|
110
110
|
export declare const PLACE_3D_SCALE_MIN = 0.01;
|
|
111
111
|
export declare const PLACE_3D_SCALE_MAX = 100;
|
|
112
|
+
/** Web object viewport bounds, CSS px per side. */
|
|
113
|
+
export declare const WEB_SIZE_MIN = 16;
|
|
114
|
+
export declare const WEB_SIZE_MAX = 7680;
|
|
115
|
+
/** Web object paint-rate bounds, frames per second. */
|
|
116
|
+
export declare const WEB_FPS_MIN = 1;
|
|
117
|
+
export declare const WEB_FPS_MAX = 60;
|
|
112
118
|
/** A prop is a mesh, so it only exists in the three.js scene; every other kind renders in both. */
|
|
113
119
|
export declare function objectSupportsSpace(kind: ObjectContent['kind'], space: ObjectSpace): boolean;
|
|
114
120
|
/** The asset an object streams from, or null for kinds that carry their source inline (web, capture). */
|
package/dist/values/limits.js
CHANGED
|
@@ -193,6 +193,12 @@ export const PLACE_2D_SCALE_MIN = 0.01;
|
|
|
193
193
|
export const PLACE_2D_SCALE_MAX = 50;
|
|
194
194
|
export const PLACE_3D_SCALE_MIN = 0.01;
|
|
195
195
|
export const PLACE_3D_SCALE_MAX = 100;
|
|
196
|
+
/** Web object viewport bounds, CSS px per side. */
|
|
197
|
+
export const WEB_SIZE_MIN = 16;
|
|
198
|
+
export const WEB_SIZE_MAX = 7680;
|
|
199
|
+
/** Web object paint-rate bounds, frames per second. */
|
|
200
|
+
export const WEB_FPS_MIN = 1;
|
|
201
|
+
export const WEB_FPS_MAX = 60;
|
|
196
202
|
/** A prop is a mesh, so it only exists in the three.js scene; every other kind renders in both. */
|
|
197
203
|
export function objectSupportsSpace(kind, space) {
|
|
198
204
|
return kind === 'prop' ? space === '3d' : true;
|
package/dist/wire/types.d.ts
CHANGED
|
@@ -175,12 +175,18 @@ export type ObjectContent = {
|
|
|
175
175
|
assetId: string;
|
|
176
176
|
} | {
|
|
177
177
|
kind: 'web';
|
|
178
|
+
/** http(s) only; anything else is dropped on load. Rendered in an isolated in-memory browser session. */
|
|
178
179
|
url: string;
|
|
180
|
+
/** Browser viewport, CSS px. A change reloads the page. */
|
|
179
181
|
width: number;
|
|
180
182
|
height: number;
|
|
183
|
+
/** Paint-rate cap; a static page paints only when it changes regardless. */
|
|
181
184
|
fps: number;
|
|
185
|
+
/** Transparent page background (else white), as an OBS browser source. */
|
|
182
186
|
transparent: boolean;
|
|
187
|
+
/** Stylesheet injected into every page the object loads; empty for none. */
|
|
183
188
|
css: string;
|
|
189
|
+
/** 2D only: composited behind or in front of the whole stage, not interleaved with other layers. */
|
|
184
190
|
layer: WebLayer;
|
|
185
191
|
} | {
|
|
186
192
|
kind: 'capture';
|
|
@@ -188,6 +194,10 @@ export type ObjectContent = {
|
|
|
188
194
|
sourceId: string;
|
|
189
195
|
label: string;
|
|
190
196
|
};
|
|
197
|
+
/** The webpage variant of {@link ObjectContent}. */
|
|
198
|
+
export type WebContent = Extract<ObjectContent, {
|
|
199
|
+
kind: 'web';
|
|
200
|
+
}>;
|
|
191
201
|
/** Where on a parent model an object rides. `root` is the model's own transform. */
|
|
192
202
|
export type AttachAnchor = {
|
|
193
203
|
kind: 'root';
|