@laplace.live/persona-sdk 0.4.0 → 0.6.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/types.d.ts +69 -12
- package/dist/types.js +6 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -235,6 +235,13 @@ export interface SceneCamera {
|
|
|
235
235
|
fov: number;
|
|
236
236
|
}
|
|
237
237
|
export type SceneLightType = 'directional' | 'point' | 'ambient';
|
|
238
|
+
/**
|
|
239
|
+
* Per-light shadow tier. `off` is the old `castShadow: false`; the rest raise
|
|
240
|
+
* shadow-map resolution. A point light pays 6 cube faces for the same tier a
|
|
241
|
+
* directional light covers with one map, so it gets the smaller of the pair.
|
|
242
|
+
*/
|
|
243
|
+
export declare const SHADOW_QUALITY_LEVELS: readonly ["off", "low", "medium", "high", "extra"];
|
|
244
|
+
export type ShadowQuality = (typeof SHADOW_QUALITY_LEVELS)[number];
|
|
238
245
|
/**
|
|
239
246
|
* One scene light. Angles are degrees. Directional lights aim with
|
|
240
247
|
* azimuth/elevation and sit at x/y/z (which moves their handle and shadow
|
|
@@ -253,7 +260,7 @@ export interface SceneLight {
|
|
|
253
260
|
z: number;
|
|
254
261
|
range: number;
|
|
255
262
|
/** Ambient light is directionless, so it never casts whatever this says. */
|
|
256
|
-
|
|
263
|
+
shadowQuality: ShadowQuality;
|
|
257
264
|
/** Penumbra width in shadow-map texels — a stylistic dial; the filter widens the edge uniformly. */
|
|
258
265
|
shadowRadius: number;
|
|
259
266
|
}
|
|
@@ -311,17 +318,65 @@ export interface SceneDepthOfField {
|
|
|
311
318
|
bokehScale: number;
|
|
312
319
|
focusRange: number;
|
|
313
320
|
}
|
|
314
|
-
/**
|
|
315
|
-
export interface
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
321
|
+
/** Broadcast-style glitch bursts: slice tears, RGB split, block corruption, analog noise. */
|
|
322
|
+
export interface SceneGlitch {
|
|
323
|
+
enabled: boolean;
|
|
324
|
+
/** Overall strength (0 to 2). */
|
|
325
|
+
intensity: number;
|
|
326
|
+
/** How fast the glitch pattern mutates. 1 re-rolls the tear 24 times per second. */
|
|
327
|
+
speed: number;
|
|
328
|
+
/** Seconds between bursts. 0 keeps the glitch running constantly. */
|
|
329
|
+
interval: number;
|
|
330
|
+
/** How long each burst lasts, in seconds. */
|
|
331
|
+
duration: number;
|
|
332
|
+
/** Horizontal slices the tear snaps to. Lower is chunkier. */
|
|
333
|
+
slices: number;
|
|
334
|
+
/** How far torn slices shift sideways, in output pixels. */
|
|
335
|
+
shift: number;
|
|
336
|
+
/** Chromatic RGB split during bursts, in output pixels. */
|
|
337
|
+
rgbShift: number;
|
|
338
|
+
/** Amount of corrupted block artifacts during bursts (0 to 1). */
|
|
339
|
+
blocks: number;
|
|
340
|
+
/** Analog noise and scanline flicker during bursts (0 to 1). */
|
|
341
|
+
noise: number;
|
|
342
|
+
}
|
|
343
|
+
/** Mosaic over the frame. `granularity` is pixels per block. */
|
|
344
|
+
export interface ScenePixelate {
|
|
345
|
+
enabled: boolean;
|
|
346
|
+
granularity: number;
|
|
323
347
|
}
|
|
324
|
-
/**
|
|
348
|
+
/** Rain droplets running down a glass pane in front of the frame, refracting it. */
|
|
349
|
+
export interface SceneDroplets {
|
|
350
|
+
enabled: boolean;
|
|
351
|
+
/** How much rain falls, from a light drizzle to a downpour (0 to 1.25). */
|
|
352
|
+
intensity: number;
|
|
353
|
+
/** Animation speed multiplier. */
|
|
354
|
+
speed: number;
|
|
355
|
+
/** Size of the droplet pattern. Higher means smaller drops. */
|
|
356
|
+
scale: number;
|
|
357
|
+
/** Width of the droplets and their trails. */
|
|
358
|
+
dropWidth: number;
|
|
359
|
+
/** How elongated the falling droplets are. */
|
|
360
|
+
dropLength: number;
|
|
361
|
+
/** How strongly droplets refract the frame behind them. */
|
|
362
|
+
refraction: number;
|
|
363
|
+
/** How fast the running drops slide down. */
|
|
364
|
+
fallSpeed: number;
|
|
365
|
+
/** Fall direction in degrees: 0 falls down, ±90 sideways, ±180 up. */
|
|
366
|
+
direction: number;
|
|
367
|
+
/** Horizontal wiggle of the running drops. */
|
|
368
|
+
wiggle: number;
|
|
369
|
+
/** Multiplier for the small static droplets. */
|
|
370
|
+
staticDrops: number;
|
|
371
|
+
/** Specular glint on drops where the frame is transparent, so rain reads over the desktop (0 to 1). */
|
|
372
|
+
glints: number;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Post-processing over the rendered 3D frame. Everything off skips the effect
|
|
376
|
+
* chain entirely. Deliberately flat: every toggle-plus-numbers effect sits at
|
|
377
|
+
* the top level so tooling (defaults, healing, editors) can walk the effect
|
|
378
|
+
* registry generically. Grouping is a panel concern, not a data one.
|
|
379
|
+
*/
|
|
325
380
|
export interface SceneEffects {
|
|
326
381
|
toneMapping: SceneToneMapping;
|
|
327
382
|
/** Scene brightness multiplied in before the tone curve; 1 is neutral. Works in every mode, including `none`. */
|
|
@@ -333,7 +388,9 @@ export interface SceneEffects {
|
|
|
333
388
|
grain: SceneFilmGrain;
|
|
334
389
|
lut: SceneLut;
|
|
335
390
|
dof: SceneDepthOfField;
|
|
336
|
-
|
|
391
|
+
pixelate: ScenePixelate;
|
|
392
|
+
glitch: SceneGlitch;
|
|
393
|
+
droplets: SceneDroplets;
|
|
337
394
|
}
|
|
338
395
|
/**
|
|
339
396
|
* Image-based lighting for the 3D stage: an environment map, whether to show it
|
package/dist/types.js
CHANGED
|
@@ -1,6 +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
|
+
* Per-light shadow tier. `off` is the old `castShadow: false`; the rest raise
|
|
6
|
+
* shadow-map resolution. A point light pays 6 cube faces for the same tier a
|
|
7
|
+
* directional light covers with one map, so it gets the smaller of the pair.
|
|
8
|
+
*/
|
|
9
|
+
export const SHADOW_QUALITY_LEVELS = ['off', 'low', 'medium', 'high', 'extra'];
|
|
4
10
|
export const EFFECTS_QUALITY_LEVELS = ['low', 'medium', 'high'];
|
|
5
11
|
/**
|
|
6
12
|
* Accepted values for `performance.fpsLimit`; 0 = unlimited. Anything else is snapped
|