@laplace.live/persona-sdk 0.4.0 → 0.5.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 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
- castShadow: boolean;
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,39 @@ export interface SceneDepthOfField {
311
318
  bokehScale: number;
312
319
  focusRange: number;
313
320
  }
314
- /** Overlay/stylization gimmicks, each independently switchable. */
315
- export interface SceneStylize {
316
- pixelate: {
317
- enabled: boolean;
318
- granularity: number;
319
- };
320
- glitch: {
321
- enabled: boolean;
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
- /** Post-processing over the rendered 3D frame. Everything off skips the effect chain entirely. */
348
+ /**
349
+ * Post-processing over the rendered 3D frame. Everything off skips the effect
350
+ * chain entirely. Deliberately flat: every toggle-plus-numbers effect sits at
351
+ * the top level so tooling (defaults, healing, editors) can walk the effect
352
+ * registry generically. Grouping is a panel concern, not a data one.
353
+ */
325
354
  export interface SceneEffects {
326
355
  toneMapping: SceneToneMapping;
327
356
  /** Scene brightness multiplied in before the tone curve; 1 is neutral. Works in every mode, including `none`. */
@@ -333,7 +362,8 @@ export interface SceneEffects {
333
362
  grain: SceneFilmGrain;
334
363
  lut: SceneLut;
335
364
  dof: SceneDepthOfField;
336
- stylize: SceneStylize;
365
+ pixelate: ScenePixelate;
366
+ glitch: SceneGlitch;
337
367
  }
338
368
  /**
339
369
  * 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laplace.live/persona-sdk",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "TypeScript SDK and wire schema for the LAPLACE Persona plugin API",
5
5
  "license": "MIT",
6
6
  "type": "module",