@seatlayer/core 0.52.0 → 0.53.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/LICENSE +16 -17
- package/README.md +8 -18
- package/dist/chunk-54A7LIL5.js +1 -0
- package/dist/chunk-IJI4WU57.js +1 -0
- package/dist/chunk-XPPT3OGQ.js +1 -0
- package/dist/core/seatConfidence.cjs +1 -76
- package/dist/core/seatConfidence.js +1 -51
- package/dist/de-75NWRKC5.js +1 -0
- package/dist/es-BM7EJ7PW.js +1 -0
- package/dist/fr-HPXQHIB4.js +1 -0
- package/dist/index.cjs +1 -12717
- package/dist/index.d.cts +38 -53
- package/dist/index.d.ts +38 -53
- package/dist/index.js +1 -10235
- package/dist/picker/minimapGeometry.cjs +1 -80
- package/dist/picker/minimapGeometry.js +1 -52
- package/dist/view/panoramaDelivery.cjs +1 -126
- package/dist/view/panoramaDelivery.js +1 -17
- package/dist/view3d/crossfade/panorama.cjs +1 -459
- package/dist/view3d/crossfade/panorama.d.cts +1 -3
- package/dist/view3d/crossfade/panorama.d.ts +1 -3
- package/dist/view3d/crossfade/panorama.js +1 -30
- package/dist/view3d/index.cjs +27 -7929
- package/dist/view3d/index.d.cts +62 -21
- package/dist/view3d/index.d.ts +62 -21
- package/dist/view3d/index.js +27 -7062
- package/package.json +2 -7
- package/dist/chunk-AZODENEL.js +0 -97
- package/dist/chunk-AZODENEL.js.map +0 -1
- package/dist/chunk-BE3F7CT3.js +0 -341
- package/dist/chunk-BE3F7CT3.js.map +0 -1
- package/dist/chunk-UID7KN44.js +0 -1569
- package/dist/chunk-UID7KN44.js.map +0 -1
- package/dist/core/seatConfidence.cjs.map +0 -1
- package/dist/core/seatConfidence.js.map +0 -1
- package/dist/de-YGODYJ3E.js +0 -292
- package/dist/de-YGODYJ3E.js.map +0 -1
- package/dist/es-VMBTGVFQ.js +0 -292
- package/dist/es-VMBTGVFQ.js.map +0 -1
- package/dist/fr-SLBE2ULB.js +0 -292
- package/dist/fr-SLBE2ULB.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/picker/minimapGeometry.cjs.map +0 -1
- package/dist/picker/minimapGeometry.js.map +0 -1
- package/dist/view/panoramaDelivery.cjs.map +0 -1
- package/dist/view/panoramaDelivery.js.map +0 -1
- package/dist/view3d/crossfade/panorama.cjs.map +0 -1
- package/dist/view3d/crossfade/panorama.js.map +0 -1
- package/dist/view3d/index.cjs.map +0 -1
- package/dist/view3d/index.js.map +0 -1
package/dist/view3d/index.d.cts
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { C as ChartDoc, E as ExpandedSeat } from '../types-tLOunI-B.cjs';
|
|
2
2
|
import { SeatView } from './crossfade/panorama.cjs';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Dirty-flag render loop. A frame is drawn only while the camera is moving /
|
|
6
|
-
* damping or an availability update arrived; when idle, no rAF is scheduled at
|
|
7
|
-
* all (zero CPU/GPU when parked). Tracks an FPS EMA over frames actually
|
|
8
|
-
* rendered — it reads as "idle" when nothing is scheduled.
|
|
9
|
-
*/
|
|
10
|
-
interface RenderLoopStats {
|
|
11
|
-
fps: number;
|
|
12
|
-
rendered: number;
|
|
13
|
-
idle: boolean;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
4
|
/**
|
|
17
5
|
* view3d palette + seat-state model — the single source of colour truth for the
|
|
18
6
|
* OGL venue view. Pure data (no GPU, no DOM) so the scene builder and the unit
|
|
@@ -21,6 +9,7 @@ interface RenderLoopStats {
|
|
|
21
9
|
* Look brief (docs/3d-usp-strategy §3): desaturated cool greys for structure,
|
|
22
10
|
* one warm accent for the stage, availability colours only on seats.
|
|
23
11
|
*/
|
|
12
|
+
|
|
24
13
|
type SeatState3D = 'available' | 'held' | 'sold' | 'selected' | 'dimmed';
|
|
25
14
|
type RGB = [number, number, number];
|
|
26
15
|
/** Structure palette — cool desaturated greys + one warm stage accent. */
|
|
@@ -398,6 +387,34 @@ interface SceneModelInput {
|
|
|
398
387
|
/** Optional initial per-seat state (default all available). */
|
|
399
388
|
initialState?: (seat: ExpandedSeat) => SeatState3D;
|
|
400
389
|
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* The JS-side source of truth for the 3D scene — a pure, GPU-free description
|
|
393
|
+
* built once from the chart's existing height contract. Everything the renderer
|
|
394
|
+
* uploads (merged solid geometry, the instanced seat cloud, camera-framing
|
|
395
|
+
* bounds, the seat-state colour LUT) is derived here, so it survives a WebGL
|
|
396
|
+
* context loss: on `webglcontextrestored` the renderer simply re-uploads from
|
|
397
|
+
* this model without recomputing anything.
|
|
398
|
+
*
|
|
399
|
+
* Feeds 100% from `sectionGeometry` / `Floor.baseHeightM` / `ExpandedSeat`
|
|
400
|
+
* (docs/3d-program-workorder §Architecture) — no new chart data is invented.
|
|
401
|
+
*
|
|
402
|
+
* This module is the ORCHESTRATOR and the public face of `scene/model/`: it
|
|
403
|
+
* sequences the passes and re-exports every type and helper the rest of the
|
|
404
|
+
* codebase, the tests and the SDK import from `scene/sceneModel`. The passes
|
|
405
|
+
* themselves live in `scene/model/` — see `docs/architecture` for the layering:
|
|
406
|
+
*
|
|
407
|
+
* types the shapes everything below is described in
|
|
408
|
+
* paint AO + how an authored colour becomes an architectural tone
|
|
409
|
+
* footprints configuration filtering, floor units, plan-space polygons
|
|
410
|
+
* shapeArchitecture décor vocabulary → architecture, and coplanar claims
|
|
411
|
+
* objectBuilders one prism per booth / table / shape / décor / GA area
|
|
412
|
+
* tiers per-section decks and the per-floor bowl
|
|
413
|
+
* labels zones, sections, rows and everything worth naming
|
|
414
|
+
* floors per-level boxes, and the per-seat floor attribute
|
|
415
|
+
* bounds chart footprint, ground datum, render + overview volumes
|
|
416
|
+
*/
|
|
417
|
+
|
|
401
418
|
declare function buildSceneModel(input: SceneModelInput): SceneModel;
|
|
402
419
|
|
|
403
420
|
/**
|
|
@@ -440,16 +457,26 @@ interface PrepareVenue3DInput {
|
|
|
440
457
|
declare function prepareVenue3D(input: PrepareVenue3DInput): Promise<PreparedVenue3D>;
|
|
441
458
|
|
|
442
459
|
/**
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
*
|
|
447
|
-
|
|
460
|
+
* Dirty-flag render loop. A frame is drawn only while the camera is moving /
|
|
461
|
+
* damping or an availability update arrived; when idle, no rAF is scheduled at
|
|
462
|
+
* all (zero CPU/GPU when parked). Tracks an FPS EMA over frames actually
|
|
463
|
+
* rendered — it reads as "idle" when nothing is scheduled.
|
|
464
|
+
*/
|
|
465
|
+
interface RenderLoopStats {
|
|
466
|
+
fps: number;
|
|
467
|
+
rendered: number;
|
|
468
|
+
idle: boolean;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* The public contract of the lazy venue-view chunk: what you mount it with
|
|
473
|
+
* (`Venue3DInput`), how you configure it (`Venue3DOptions`), and what you get
|
|
474
|
+
* back (`Venue3DHandle`).
|
|
448
475
|
*
|
|
449
|
-
*
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
476
|
+
* Split out of `index.ts` so the mount closure and the UI/interaction modules
|
|
477
|
+
* can share them without importing the entry. `index.ts` re-exports all four —
|
|
478
|
+
* that is the path the SDK (`@seatlayer/core/view3d`), the picker, the designer
|
|
479
|
+
* preview and the harness import from, and it must never move.
|
|
453
480
|
*/
|
|
454
481
|
|
|
455
482
|
interface Venue3DInput {
|
|
@@ -565,6 +592,20 @@ interface Venue3DHandle {
|
|
|
565
592
|
*/
|
|
566
593
|
focusFloor(index: number | null): boolean;
|
|
567
594
|
}
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* view3d — the sole dynamic-import boundary for the lazy OGL venue-view chunk.
|
|
598
|
+
*
|
|
599
|
+
* const { mountVenue3D } = await import('../view3d');
|
|
600
|
+
* const handle = mountVenue3D(container, { doc, seats }, { onSeatPick, getSeatView });
|
|
601
|
+
* await handle.flyToSeat(seatId);
|
|
602
|
+
*
|
|
603
|
+
* Read-only 3D of any chart, fed entirely from the existing height contract.
|
|
604
|
+
* Slice 1: orbit camera, extruded tiers/stage/GA, instanced seat dots, sub-range
|
|
605
|
+
* availability, dispose + context-loss survival. Slice 2: GPU color-pick. Slice
|
|
606
|
+
* 3: the fly-to-seat cinematic that dissolves into the view-from-seat panorama.
|
|
607
|
+
*/
|
|
608
|
+
|
|
568
609
|
declare function mountVenue3D(container: HTMLElement, input: Venue3DInput, opts?: Venue3DOptions): Venue3DHandle;
|
|
569
610
|
|
|
570
611
|
export { type Analytics3DCallback, type Scene3DPrepSource, type SeatState3D, SeatView, type Venue3DHandle, type Venue3DInput, type Venue3DOptions, type Venue3DStats, buildSceneModel, mountVenue3D, prepareVenue3D };
|
package/dist/view3d/index.d.ts
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { C as ChartDoc, E as ExpandedSeat } from '../types-tLOunI-B.js';
|
|
2
2
|
import { SeatView } from './crossfade/panorama.js';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Dirty-flag render loop. A frame is drawn only while the camera is moving /
|
|
6
|
-
* damping or an availability update arrived; when idle, no rAF is scheduled at
|
|
7
|
-
* all (zero CPU/GPU when parked). Tracks an FPS EMA over frames actually
|
|
8
|
-
* rendered — it reads as "idle" when nothing is scheduled.
|
|
9
|
-
*/
|
|
10
|
-
interface RenderLoopStats {
|
|
11
|
-
fps: number;
|
|
12
|
-
rendered: number;
|
|
13
|
-
idle: boolean;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
4
|
/**
|
|
17
5
|
* view3d palette + seat-state model — the single source of colour truth for the
|
|
18
6
|
* OGL venue view. Pure data (no GPU, no DOM) so the scene builder and the unit
|
|
@@ -21,6 +9,7 @@ interface RenderLoopStats {
|
|
|
21
9
|
* Look brief (docs/3d-usp-strategy §3): desaturated cool greys for structure,
|
|
22
10
|
* one warm accent for the stage, availability colours only on seats.
|
|
23
11
|
*/
|
|
12
|
+
|
|
24
13
|
type SeatState3D = 'available' | 'held' | 'sold' | 'selected' | 'dimmed';
|
|
25
14
|
type RGB = [number, number, number];
|
|
26
15
|
/** Structure palette — cool desaturated greys + one warm stage accent. */
|
|
@@ -398,6 +387,34 @@ interface SceneModelInput {
|
|
|
398
387
|
/** Optional initial per-seat state (default all available). */
|
|
399
388
|
initialState?: (seat: ExpandedSeat) => SeatState3D;
|
|
400
389
|
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* The JS-side source of truth for the 3D scene — a pure, GPU-free description
|
|
393
|
+
* built once from the chart's existing height contract. Everything the renderer
|
|
394
|
+
* uploads (merged solid geometry, the instanced seat cloud, camera-framing
|
|
395
|
+
* bounds, the seat-state colour LUT) is derived here, so it survives a WebGL
|
|
396
|
+
* context loss: on `webglcontextrestored` the renderer simply re-uploads from
|
|
397
|
+
* this model without recomputing anything.
|
|
398
|
+
*
|
|
399
|
+
* Feeds 100% from `sectionGeometry` / `Floor.baseHeightM` / `ExpandedSeat`
|
|
400
|
+
* (docs/3d-program-workorder §Architecture) — no new chart data is invented.
|
|
401
|
+
*
|
|
402
|
+
* This module is the ORCHESTRATOR and the public face of `scene/model/`: it
|
|
403
|
+
* sequences the passes and re-exports every type and helper the rest of the
|
|
404
|
+
* codebase, the tests and the SDK import from `scene/sceneModel`. The passes
|
|
405
|
+
* themselves live in `scene/model/` — see `docs/architecture` for the layering:
|
|
406
|
+
*
|
|
407
|
+
* types the shapes everything below is described in
|
|
408
|
+
* paint AO + how an authored colour becomes an architectural tone
|
|
409
|
+
* footprints configuration filtering, floor units, plan-space polygons
|
|
410
|
+
* shapeArchitecture décor vocabulary → architecture, and coplanar claims
|
|
411
|
+
* objectBuilders one prism per booth / table / shape / décor / GA area
|
|
412
|
+
* tiers per-section decks and the per-floor bowl
|
|
413
|
+
* labels zones, sections, rows and everything worth naming
|
|
414
|
+
* floors per-level boxes, and the per-seat floor attribute
|
|
415
|
+
* bounds chart footprint, ground datum, render + overview volumes
|
|
416
|
+
*/
|
|
417
|
+
|
|
401
418
|
declare function buildSceneModel(input: SceneModelInput): SceneModel;
|
|
402
419
|
|
|
403
420
|
/**
|
|
@@ -440,16 +457,26 @@ interface PrepareVenue3DInput {
|
|
|
440
457
|
declare function prepareVenue3D(input: PrepareVenue3DInput): Promise<PreparedVenue3D>;
|
|
441
458
|
|
|
442
459
|
/**
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
*
|
|
447
|
-
|
|
460
|
+
* Dirty-flag render loop. A frame is drawn only while the camera is moving /
|
|
461
|
+
* damping or an availability update arrived; when idle, no rAF is scheduled at
|
|
462
|
+
* all (zero CPU/GPU when parked). Tracks an FPS EMA over frames actually
|
|
463
|
+
* rendered — it reads as "idle" when nothing is scheduled.
|
|
464
|
+
*/
|
|
465
|
+
interface RenderLoopStats {
|
|
466
|
+
fps: number;
|
|
467
|
+
rendered: number;
|
|
468
|
+
idle: boolean;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* The public contract of the lazy venue-view chunk: what you mount it with
|
|
473
|
+
* (`Venue3DInput`), how you configure it (`Venue3DOptions`), and what you get
|
|
474
|
+
* back (`Venue3DHandle`).
|
|
448
475
|
*
|
|
449
|
-
*
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
476
|
+
* Split out of `index.ts` so the mount closure and the UI/interaction modules
|
|
477
|
+
* can share them without importing the entry. `index.ts` re-exports all four —
|
|
478
|
+
* that is the path the SDK (`@seatlayer/core/view3d`), the picker, the designer
|
|
479
|
+
* preview and the harness import from, and it must never move.
|
|
453
480
|
*/
|
|
454
481
|
|
|
455
482
|
interface Venue3DInput {
|
|
@@ -565,6 +592,20 @@ interface Venue3DHandle {
|
|
|
565
592
|
*/
|
|
566
593
|
focusFloor(index: number | null): boolean;
|
|
567
594
|
}
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* view3d — the sole dynamic-import boundary for the lazy OGL venue-view chunk.
|
|
598
|
+
*
|
|
599
|
+
* const { mountVenue3D } = await import('../view3d');
|
|
600
|
+
* const handle = mountVenue3D(container, { doc, seats }, { onSeatPick, getSeatView });
|
|
601
|
+
* await handle.flyToSeat(seatId);
|
|
602
|
+
*
|
|
603
|
+
* Read-only 3D of any chart, fed entirely from the existing height contract.
|
|
604
|
+
* Slice 1: orbit camera, extruded tiers/stage/GA, instanced seat dots, sub-range
|
|
605
|
+
* availability, dispose + context-loss survival. Slice 2: GPU color-pick. Slice
|
|
606
|
+
* 3: the fly-to-seat cinematic that dissolves into the view-from-seat panorama.
|
|
607
|
+
*/
|
|
608
|
+
|
|
568
609
|
declare function mountVenue3D(container: HTMLElement, input: Venue3DInput, opts?: Venue3DOptions): Venue3DHandle;
|
|
569
610
|
|
|
570
611
|
export { type Analytics3DCallback, type Scene3DPrepSource, type SeatState3D, SeatView, type Venue3DHandle, type Venue3DInput, type Venue3DOptions, type Venue3DStats, buildSceneModel, mountVenue3D, prepareVenue3D };
|