@vived/component-pneumatic-panel 1.1.1 → 1.2.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/README.md +3 -1
- package/dist/Domain/Controllers/applyPanelState.d.ts +4 -0
- package/dist/Domain/Controllers/applyPanelState.d.ts.map +1 -0
- package/dist/Domain/Controllers/getPanelState.d.ts +4 -0
- package/dist/Domain/Controllers/getPanelState.d.ts.map +1 -0
- package/dist/Domain/Controllers/onPanelHoverEnter.d.ts +7 -0
- package/dist/Domain/Controllers/onPanelHoverEnter.d.ts.map +1 -0
- package/dist/Domain/Controllers/onPanelHoverExit.d.ts +7 -0
- package/dist/Domain/Controllers/onPanelHoverExit.d.ts.map +1 -0
- package/dist/Domain/Controllers/panelHitboxHoverEnter.d.ts +7 -0
- package/dist/Domain/Controllers/panelHitboxHoverEnter.d.ts.map +1 -0
- package/dist/Domain/Controllers/panelHitboxHoverExit.d.ts +7 -0
- package/dist/Domain/Controllers/panelHitboxHoverExit.d.ts.map +1 -0
- package/dist/Domain/Controllers/panelStateDefaults.d.ts +8 -0
- package/dist/Domain/Controllers/panelStateDefaults.d.ts.map +1 -0
- package/dist/Domain/Mocks/MockPneumaticPanelSelectUC.d.ts +5 -1
- package/dist/Domain/Mocks/MockPneumaticPanelSelectUC.d.ts.map +1 -1
- package/dist/Domain/UCs/PneumaticPanelSelectUC.d.ts +14 -0
- package/dist/Domain/UCs/PneumaticPanelSelectUC.d.ts.map +1 -1
- package/dist/Domain/makeDomainForTesting.d.ts +6 -0
- package/dist/Domain/makeDomainForTesting.d.ts.map +1 -0
- package/dist/Frameworks/Babylon/PanelOutlineController.d.ts +32 -0
- package/dist/Frameworks/Babylon/PanelOutlineController.d.ts.map +1 -0
- package/dist/Frameworks/Babylon/PneumaticPanelBabylonView.d.ts.map +1 -1
- package/dist/Frameworks/Babylon/PneumaticPanelHitboxView.d.ts +2 -1
- package/dist/Frameworks/Babylon/PneumaticPanelHitboxView.d.ts.map +1 -1
- package/dist/PneumaticPanelFacade.d.ts +128 -0
- package/dist/PneumaticPanelFacade.d.ts.map +1 -0
- package/dist/clipPlaneFragment-BRmzi2tV.js +55 -0
- package/dist/clipPlaneFragment-CDdVuU0n.js +55 -0
- package/dist/clipPlaneVertex-CIEg9nQi.js +358 -0
- package/dist/clipPlaneVertex-CIarPzTc.js +391 -0
- package/dist/dumpTools-BUC-AUZt.js +110 -0
- package/dist/glowBlurPostProcess.fragment-DDhSDO38.js +13 -0
- package/dist/glowBlurPostProcess.fragment-fpk0xJVe.js +13 -0
- package/dist/glowMapGeneration.fragment-BBSNxu8K.js +193 -0
- package/dist/glowMapGeneration.fragment-Cl-xwsZp.js +161 -0
- package/dist/glowMapGeneration.vertex-CzQHgJdT.js +85 -0
- package/dist/glowMapGeneration.vertex-DErxE57o.js +85 -0
- package/dist/glowMapMerge.vertex-BQosy0g5.js +14 -0
- package/dist/glowMapMerge.vertex-tVYqLRGm.js +13 -0
- package/dist/index-CmNnQLDH.js +36863 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +51 -5192
- package/dist/pass.fragment-D3pYn4R1.js +10 -0
- package/dist/selection.fragment-CGZK1kVt.js +45 -0
- package/dist/selection.fragment-DjWRsu7R.js +45 -0
- package/dist/selection.vertex-DY_1B2lX.js +84 -0
- package/dist/selection.vertex-PhS5tOTA.js +83 -0
- package/dist/selectionOutline.fragment-Bp__J_pC.js +53 -0
- package/dist/selectionOutline.fragment-DmyQJACa.js +54 -0
- package/dist/thinEngine-dZnz-Owz.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,7 +54,9 @@ interface PneumaticPanelVM {
|
|
|
54
54
|
}
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Subscribe to state changes via `
|
|
57
|
+
Subscribe to state changes via the facade: `panel.onViewModel(callback)` (returns an
|
|
58
|
+
unsubscribe function). See `COMPONENT_KNOWLEDGE.md` for the full `PneumaticPanelFacade`
|
|
59
|
+
host-facing surface.
|
|
58
60
|
|
|
59
61
|
## Development
|
|
60
62
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AppObjectRepo } from "@vived/core";
|
|
2
|
+
import type { PneumaticPanelState } from "../../PneumaticPanelFacade";
|
|
3
|
+
export declare function applyPanelState(id: string, appObjects: AppObjectRepo, state: Partial<PneumaticPanelState>): void;
|
|
4
|
+
//# sourceMappingURL=applyPanelState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyPanelState.d.ts","sourceRoot":"","sources":["../../../src/Domain/Controllers/applyPanelState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,wBAAgB,eAAe,CAC7B,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAClC,IAAI,CAuBN"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AppObjectRepo } from "@vived/core";
|
|
2
|
+
import type { PneumaticPanelState } from "../../PneumaticPanelFacade";
|
|
3
|
+
export declare function getPanelState(id: string, appObjects: AppObjectRepo, version: number): PneumaticPanelState;
|
|
4
|
+
//# sourceMappingURL=getPanelState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPanelState.d.ts","sourceRoot":"","sources":["../../../src/Domain/Controllers/getPanelState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,wBAAgB,aAAa,CAC3B,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,EACzB,OAAO,EAAE,MAAM,GACd,mBAAmB,CAsBrB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppObjectRepo } from "@vived/core";
|
|
2
|
+
/**
|
|
3
|
+
* Subscribes to panel-hover-enter events on the given panel.
|
|
4
|
+
* Returns an unsubscribe function.
|
|
5
|
+
*/
|
|
6
|
+
export declare function onPanelHoverEnter(id: string, appObjects: AppObjectRepo, callback: () => void): () => void;
|
|
7
|
+
//# sourceMappingURL=onPanelHoverEnter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onPanelHoverEnter.d.ts","sourceRoot":"","sources":["../../../src/Domain/Controllers/onPanelHoverEnter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,EACzB,QAAQ,EAAE,MAAM,IAAI,GACnB,MAAM,IAAI,CAYZ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppObjectRepo } from "@vived/core";
|
|
2
|
+
/**
|
|
3
|
+
* Subscribes to panel-hover-exit events on the given panel.
|
|
4
|
+
* Returns an unsubscribe function.
|
|
5
|
+
*/
|
|
6
|
+
export declare function onPanelHoverExit(id: string, appObjects: AppObjectRepo, callback: () => void): () => void;
|
|
7
|
+
//# sourceMappingURL=onPanelHoverExit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onPanelHoverExit.d.ts","sourceRoot":"","sources":["../../../src/Domain/Controllers/onPanelHoverExit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,EACzB,QAAQ,EAAE,MAAM,IAAI,GACnB,MAAM,IAAI,CAYZ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppObjectRepo } from "@vived/core";
|
|
2
|
+
/**
|
|
3
|
+
* Framework boundary controller — called by the Babylon HitboxView when
|
|
4
|
+
* the pointer enters the panel_hitbox mesh. Notifies domain subscribers.
|
|
5
|
+
*/
|
|
6
|
+
export declare function panelHitboxHoverEnter(id: string, appObjects: AppObjectRepo): void;
|
|
7
|
+
//# sourceMappingURL=panelHitboxHoverEnter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelHitboxHoverEnter.d.ts","sourceRoot":"","sources":["../../../src/Domain/Controllers/panelHitboxHoverEnter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,IAAI,CAYN"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppObjectRepo } from "@vived/core";
|
|
2
|
+
/**
|
|
3
|
+
* Framework boundary controller — called by the Babylon HitboxView when
|
|
4
|
+
* the pointer exits the panel_hitbox mesh. Notifies domain subscribers.
|
|
5
|
+
*/
|
|
6
|
+
export declare function panelHitboxHoverExit(id: string, appObjects: AppObjectRepo): void;
|
|
7
|
+
//# sourceMappingURL=panelHitboxHoverExit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelHitboxHoverExit.d.ts","sourceRoot":"","sources":["../../../src/Domain/Controllers/panelHitboxHoverExit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,IAAI,CAYN"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PNEUMATIC_PANEL_DEFAULT_STATE_FIELDS: {
|
|
2
|
+
readonly exhaustOpen: false;
|
|
3
|
+
readonly isLocked: false;
|
|
4
|
+
readonly showGhostLockHint: false;
|
|
5
|
+
readonly highlightedObject: "none";
|
|
6
|
+
readonly panelHitboxEnabled: false;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=panelStateDefaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelStateDefaults.d.ts","sourceRoot":"","sources":["../../../src/Domain/Controllers/panelStateDefaults.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC;;;;;;CAMvC,CAAC"}
|
|
@@ -6,8 +6,12 @@ import { PneumaticPanelSelectUC } from "../UCs/PneumaticPanelSelectUC";
|
|
|
6
6
|
export declare class MockPneumaticPanelSelectUC extends PneumaticPanelSelectUC {
|
|
7
7
|
enableHitbox: () => void;
|
|
8
8
|
disableHitbox: () => void;
|
|
9
|
-
subscribeOnPanelSelected: (
|
|
9
|
+
subscribeOnPanelSelected: () => (() => void);
|
|
10
10
|
notifyPanelSelected: () => void;
|
|
11
|
+
subscribeOnPanelHoverEnter: () => (() => void);
|
|
12
|
+
notifyPanelHoverEnter: () => void;
|
|
13
|
+
subscribeOnPanelHoverExit: () => (() => void);
|
|
14
|
+
notifyPanelHoverExit: () => void;
|
|
11
15
|
constructor(appObject: AppObject);
|
|
12
16
|
}
|
|
13
17
|
//# sourceMappingURL=MockPneumaticPanelSelectUC.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockPneumaticPanelSelectUC.d.ts","sourceRoot":"","sources":["../../../src/Domain/Mocks/MockPneumaticPanelSelectUC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,sBAAsB;IACpE,YAAY,QAAO,IAAI,CAAO;IAC9B,aAAa,QAAO,IAAI,CAAO;IAC/B,wBAAwB,
|
|
1
|
+
{"version":3,"file":"MockPneumaticPanelSelectUC.d.ts","sourceRoot":"","sources":["../../../src/Domain/Mocks/MockPneumaticPanelSelectUC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,sBAAsB;IACpE,YAAY,QAAO,IAAI,CAAO;IAC9B,aAAa,QAAO,IAAI,CAAO;IAC/B,wBAAwB,QAAO,CAAC,MAAM,IAAI,CAAC,CAAa;IACxD,mBAAmB,QAAO,IAAI,CAAO;IACrC,0BAA0B,QAAO,CAAC,MAAM,IAAI,CAAC,CAAa;IAC1D,qBAAqB,QAAO,IAAI,CAAO;IACvC,yBAAyB,QAAO,CAAC,MAAM,IAAI,CAAC,CAAa;IACzD,oBAAoB,QAAO,IAAI,CAAO;gBAE1B,SAAS,EAAE,SAAS;CAGjC"}
|
|
@@ -18,6 +18,20 @@ export declare abstract class PneumaticPanelSelectUC extends AppObjectUC {
|
|
|
18
18
|
* Called exclusively via the panelHitboxClicked controller (framework boundary).
|
|
19
19
|
*/
|
|
20
20
|
abstract notifyPanelSelected(): void;
|
|
21
|
+
/** Subscribe to panel-hover-enter events. Returns an unsubscribe function. */
|
|
22
|
+
abstract subscribeOnPanelHoverEnter(callback: () => void): () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Notify all subscribers that the pointer entered the panel hitbox.
|
|
25
|
+
* Called exclusively via the panelHitboxHoverEnter controller (framework boundary).
|
|
26
|
+
*/
|
|
27
|
+
abstract notifyPanelHoverEnter(): void;
|
|
28
|
+
/** Subscribe to panel-hover-exit events. Returns an unsubscribe function. */
|
|
29
|
+
abstract subscribeOnPanelHoverExit(callback: () => void): () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Notify all subscribers that the pointer exited the panel hitbox.
|
|
32
|
+
* Called exclusively via the panelHitboxHoverExit controller (framework boundary).
|
|
33
|
+
*/
|
|
34
|
+
abstract notifyPanelHoverExit(): void;
|
|
21
35
|
static get(appObj: AppObject): PneumaticPanelSelectUC | undefined;
|
|
22
36
|
static getById(id: string, appObjects: AppObjectRepo): PneumaticPanelSelectUC | undefined;
|
|
23
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PneumaticPanelSelectUC.d.ts","sourceRoot":"","sources":["../../../src/Domain/UCs/PneumaticPanelSelectUC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGpE;;;;;GAKG;AACH,8BAAsB,sBAAuB,SAAQ,WAAW;IAC9D,MAAM,CAAC,QAAQ,CAAC,IAAI,4BAA4B;IAEhD,mDAAmD;IACnD,QAAQ,CAAC,YAAY,IAAI,IAAI;IAE7B,mFAAmF;IACnF,QAAQ,CAAC,aAAa,IAAI,IAAI;IAE9B,2EAA2E;IAC3E,QAAQ,CAAC,wBAAwB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAEnE;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,IAAI,IAAI;IAEpC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,sBAAsB,GAAG,SAAS;IAIjE,MAAM,CAAC,OAAO,CACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,sBAAsB,GAAG,SAAS;CAGtC;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,GACnB,sBAAsB,CAExB"}
|
|
1
|
+
{"version":3,"file":"PneumaticPanelSelectUC.d.ts","sourceRoot":"","sources":["../../../src/Domain/UCs/PneumaticPanelSelectUC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGpE;;;;;GAKG;AACH,8BAAsB,sBAAuB,SAAQ,WAAW;IAC9D,MAAM,CAAC,QAAQ,CAAC,IAAI,4BAA4B;IAEhD,mDAAmD;IACnD,QAAQ,CAAC,YAAY,IAAI,IAAI;IAE7B,mFAAmF;IACnF,QAAQ,CAAC,aAAa,IAAI,IAAI;IAE9B,2EAA2E;IAC3E,QAAQ,CAAC,wBAAwB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAEnE;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,IAAI,IAAI;IAEpC,8EAA8E;IAC9E,QAAQ,CAAC,0BAA0B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAErE;;;OAGG;IACH,QAAQ,CAAC,qBAAqB,IAAI,IAAI;IAEtC,6EAA6E;IAC7E,QAAQ,CAAC,yBAAyB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAEpE;;;OAGG;IACH,QAAQ,CAAC,oBAAoB,IAAI,IAAI;IAErC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,sBAAsB,GAAG,SAAS;IAIjE,MAAM,CAAC,OAAO,CACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,sBAAsB,GAAG,SAAS;CAGtC;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,GACnB,sBAAsB,CAExB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeDomainForTesting.d.ts","sourceRoot":"","sources":["../../src/Domain/makeDomainForTesting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAGd,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,aAAa,CAAC;CAC3B;AAED,wBAAgB,oBAAoB,IAAI,gBAAgB,CAMvD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AbstractMesh, Color3, Scene } from "@babylonjs/core";
|
|
2
|
+
type PanelOutlineOptions = {
|
|
3
|
+
/** Outline color (default: amber `Color3(1, 0.8, 0)`). */
|
|
4
|
+
color?: Color3;
|
|
5
|
+
/** Outline edge width in **pixels** (default: 4). */
|
|
6
|
+
thickness?: number;
|
|
7
|
+
/**
|
|
8
|
+
* How much to dim the outline where the panel is occluded by foreground objects.
|
|
9
|
+
* 0 = fully visible through occluders (x-ray); 1 = hidden behind occluders.
|
|
10
|
+
* Default: 0 (full-strength see-through, per user requirement).
|
|
11
|
+
*/
|
|
12
|
+
occlusionStrength?: number;
|
|
13
|
+
};
|
|
14
|
+
export type PanelOutlineController = {
|
|
15
|
+
apply(on: boolean): void;
|
|
16
|
+
dispose(): void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Screen-space outline controller wrapping Babylon's `SelectionOutlineLayer`.
|
|
20
|
+
*
|
|
21
|
+
* Draws a crisp, unified silhouette around a group of meshes on hover:
|
|
22
|
+
* - `outlineThickness` is in **pixel space** — constant width regardless of zoom.
|
|
23
|
+
* - All meshes are passed to `addSelection` as a single group, so internal seams
|
|
24
|
+
* between panel sub-meshes produce no outline; only the outer contour draws.
|
|
25
|
+
* - `occlusionStrength = 0` renders the outline at full alpha even where foreground
|
|
26
|
+
* objects occlude the panel (x-ray / on-top effect).
|
|
27
|
+
*
|
|
28
|
+
* Usage: `apply(true)` shows the outline; `apply(false)` hides it. Dispose when done.
|
|
29
|
+
*/
|
|
30
|
+
export declare function makePanelOutlineController(getMeshes: () => AbstractMesh[], scene: Scene, options?: PanelOutlineOptions): PanelOutlineController;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=PanelOutlineController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelOutlineController.d.ts","sourceRoot":"","sources":["../../../src/Frameworks/Babylon/PanelOutlineController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAG9D,KAAK,mBAAmB,GAAG;IACzB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,YAAY,EAAE,EAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,mBAAmB,GAC5B,sBAAsB,CAyCxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PneumaticPanelBabylonView.d.ts","sourceRoot":"","sources":["../../../src/Frameworks/Babylon/PneumaticPanelBabylonView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIrD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"PneumaticPanelBabylonView.d.ts","sourceRoot":"","sources":["../../../src/Frameworks/Babylon/PneumaticPanelBabylonView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIrD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAwBvD,MAAM,MAAM,wBAAwB,GAAG;IACrC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,8BAAsB,yBAA0B,SAAQ,aAAa;IACnE,MAAM,CAAC,QAAQ,CAAC,IAAI,+BAA+B;IAEnD,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9B,gGAAgG;IAChG,QAAQ,KAAK,iBAAiB,IAAI,aAAa,GAAG,SAAS,CAAC;IAE5D,sEAAsE;IACtE,QAAQ,KAAK,aAAa,IAAI,YAAY,EAAE,CAAC;IAE7C,mGAAmG;IACnG,QAAQ,KAAK,eAAe,IAAI,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAE1D,qEAAqE;IACrE,QAAQ,KAAK,UAAU,IAAI,QAAQ,CAAC,wBAAwB,CAAC,CAAC;IAE9D,wDAAwD;IACxD,QAAQ,CAAC,gBAAgB,CACvB,KAAK,EAAE,OAAO,CAAC,wBAAwB,CAAC,GACvC,QAAQ,CAAC,wBAAwB,CAAC;IAErC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,yBAAyB,GAAG,SAAS;CAGrE;AAED,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,SAAS,GACnB,yBAAyB,CAE3B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HighlightLayer, Node } from "@babylonjs/core";
|
|
2
2
|
import { AppObject, AppObjectView } from "@vived/core";
|
|
3
|
+
import { type PanelOutlineController } from "./PanelOutlineController";
|
|
3
4
|
export declare const pneumaticPanelHitboxMetadata = "panel_hitbox";
|
|
4
5
|
/**
|
|
5
6
|
* Babylon view that owns panel hitbox interaction and visual feedback.
|
|
@@ -11,7 +12,7 @@ export declare const pneumaticPanelHitboxMetadata = "panel_hitbox";
|
|
|
11
12
|
*/
|
|
12
13
|
export declare abstract class PneumaticPanelHitboxView extends AppObjectView {
|
|
13
14
|
static readonly type = "PneumaticPanelHitboxView";
|
|
14
|
-
abstract bindMeshes(nodesByObjectId: ReadonlyMap<string, Node>, highlightLayer: HighlightLayer): void;
|
|
15
|
+
abstract bindMeshes(nodesByObjectId: ReadonlyMap<string, Node>, highlightLayer: HighlightLayer, panelOutline: PanelOutlineController): void;
|
|
15
16
|
static get(appObj: AppObject): PneumaticPanelHitboxView | undefined;
|
|
16
17
|
}
|
|
17
18
|
export declare function makePneumaticPanelHitboxView(appObject: AppObject): PneumaticPanelHitboxView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PneumaticPanelHitboxView.d.ts","sourceRoot":"","sources":["../../../src/Frameworks/Babylon/PneumaticPanelHitboxView.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EAEd,IAAI,EACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOvD,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAQ3D;;;;;;;GAOG;AACH,8BAAsB,wBAAyB,SAAQ,aAAa;IAClE,MAAM,CAAC,QAAQ,CAAC,IAAI,8BAA8B;IAElD,QAAQ,CAAC,UAAU,CACjB,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,EAC1C,cAAc,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"PneumaticPanelHitboxView.d.ts","sourceRoot":"","sources":["../../../src/Frameworks/Babylon/PneumaticPanelHitboxView.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EAEd,IAAI,EACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOvD,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,eAAO,MAAM,4BAA4B,iBAAiB,CAAC;AAQ3D;;;;;;;GAOG;AACH,8BAAsB,wBAAyB,SAAQ,aAAa;IAClE,MAAM,CAAC,QAAQ,CAAC,IAAI,8BAA8B;IAElD,QAAQ,CAAC,UAAU,CACjB,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,EAC1C,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,sBAAsB,GACnC,IAAI;IAEP,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,wBAAwB,GAAG,SAAS;CAGpE;AAED,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,SAAS,GACnB,wBAAwB,CAE1B"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { AppObjectRepo } from "@vived/core";
|
|
2
|
+
import { type PneumaticPanelHighlightedObject } from "./Domain/Entities/PneumaticPanelEntity";
|
|
3
|
+
import type { PneumaticPanelVM } from "./Domain/PMs/PneumaticPanelPM";
|
|
4
|
+
export declare const PNEUMATIC_PANEL_STATE_VERSION = 1;
|
|
5
|
+
export type PneumaticPanelState = {
|
|
6
|
+
version: number;
|
|
7
|
+
exhaustOpen: boolean;
|
|
8
|
+
isLocked: boolean;
|
|
9
|
+
showGhostLockHint: boolean;
|
|
10
|
+
highlightedObject: PneumaticPanelHighlightedObject;
|
|
11
|
+
panelHitboxEnabled: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* SmartComponent structural convention (local definition per ADR-0006).
|
|
15
|
+
* Smart Component Facade Contract v1 — eight mandatory members. Copied
|
|
16
|
+
* per-project and satisfied by structural typing (no shared base class).
|
|
17
|
+
*/
|
|
18
|
+
export interface SmartComponent {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly interfaceVersion: number;
|
|
21
|
+
onEvent(event: string, cb: (...args: never[]) => void): () => void;
|
|
22
|
+
onViewModel(cb: (vm: PneumaticPanelVM) => void): () => void;
|
|
23
|
+
load(variant?: string): Promise<void>;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
getState(): PneumaticPanelState;
|
|
26
|
+
applyState(state: PneumaticPanelState): void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Typed event catalog for PneumaticPanel events (per ADR-0006)
|
|
30
|
+
*/
|
|
31
|
+
export type PneumaticPanelEvents = {
|
|
32
|
+
exhaustOpened: () => void;
|
|
33
|
+
exhaustClosed: () => void;
|
|
34
|
+
exhaustCloseBlockedByLock: () => void;
|
|
35
|
+
panelLocked: () => void;
|
|
36
|
+
panelUnlocked: () => void;
|
|
37
|
+
panelSelected: () => void;
|
|
38
|
+
pressureChecked: () => void;
|
|
39
|
+
panelHoverEnter: () => void;
|
|
40
|
+
panelHoverExit: () => void;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Host-facing facade for Pneumatic Panel smart component.
|
|
44
|
+
* Wraps flat controllers behind a single typed class implementing SmartComponent.
|
|
45
|
+
*/
|
|
46
|
+
export declare class PneumaticPanelFacade implements SmartComponent {
|
|
47
|
+
readonly id: string;
|
|
48
|
+
readonly interfaceVersion = 1;
|
|
49
|
+
private appObjects;
|
|
50
|
+
/**
|
|
51
|
+
* Dispatch map: event key → subscribe controller
|
|
52
|
+
* Each controller has signature: (id, appObjects, cb: () => void) => () => void
|
|
53
|
+
*/
|
|
54
|
+
private eventDispatchMap;
|
|
55
|
+
/**
|
|
56
|
+
* Constructor: synchronously wire the domain instance.
|
|
57
|
+
* No Babylon dependency; fully headless and testable.
|
|
58
|
+
*
|
|
59
|
+
* @param id - The instance identifier
|
|
60
|
+
* @param appObjects - The AppObject repository
|
|
61
|
+
*/
|
|
62
|
+
constructor(id: string, appObjects: AppObjectRepo);
|
|
63
|
+
/**
|
|
64
|
+
* Asynchronously load and attach the Babylon view.
|
|
65
|
+
* Required before the component renders in a 3D scene.
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* Asynchronously load and attach the Babylon view.
|
|
69
|
+
*
|
|
70
|
+
* @param variant - Optional asset variant. No variants are implemented yet,
|
|
71
|
+
* so an omitted or unrecognized variant loads the default asset
|
|
72
|
+
* (best-effort, per Contract v1).
|
|
73
|
+
*/
|
|
74
|
+
load(variant?: string): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* Tear down the component and release all resources.
|
|
77
|
+
*/
|
|
78
|
+
destroy(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Toggle the exhaust valve open/closed.
|
|
81
|
+
* @returns true if toggle succeeded, false if blocked (e.g., by lock)
|
|
82
|
+
*/
|
|
83
|
+
toggleExhaust(): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Toggle the lock state.
|
|
86
|
+
* @returns true if toggle succeeded, false if blocked (e.g., exhaust open)
|
|
87
|
+
*/
|
|
88
|
+
toggleLock(): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Trigger a pressure check.
|
|
91
|
+
*/
|
|
92
|
+
checkPressure(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Set which single object should be highlighted in the scene.
|
|
95
|
+
*/
|
|
96
|
+
setHighlightedObject(obj: PneumaticPanelHighlightedObject): void;
|
|
97
|
+
/**
|
|
98
|
+
* Clear all highlights.
|
|
99
|
+
*/
|
|
100
|
+
clearAllHighlights(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Show or hide the ghost lock hint.
|
|
103
|
+
*/
|
|
104
|
+
setShowGhostLockHint(show: boolean): void;
|
|
105
|
+
/**
|
|
106
|
+
* Enable the whole-panel hitbox for single-target selection.
|
|
107
|
+
*/
|
|
108
|
+
enableHitbox(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Disable the whole-panel hitbox, restoring sub-component interactivity.
|
|
111
|
+
*/
|
|
112
|
+
disableHitbox(): void;
|
|
113
|
+
getState(): PneumaticPanelState;
|
|
114
|
+
applyState(state: PneumaticPanelState): void;
|
|
115
|
+
/**
|
|
116
|
+
* Subscribe to a typed event.
|
|
117
|
+
* @param event - The event key (typed by PneumaticPanelEvents)
|
|
118
|
+
* @param cb - The callback function
|
|
119
|
+
* @returns An unsubscribe function
|
|
120
|
+
*/
|
|
121
|
+
onEvent<K extends keyof PneumaticPanelEvents>(event: K, cb: PneumaticPanelEvents[K]): () => void;
|
|
122
|
+
/**
|
|
123
|
+
* Subscribe to the reactive view model. Emits the current VM immediately,
|
|
124
|
+
* then on every change. Returns an unsubscribe function.
|
|
125
|
+
*/
|
|
126
|
+
onViewModel(cb: (vm: PneumaticPanelVM) => void): () => void;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=PneumaticPanelFacade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PneumaticPanelFacade.d.ts","sourceRoot":"","sources":["../src/PneumaticPanelFacade.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { S as e } from "./index-CmNnQLDH.js";
|
|
2
|
+
const i = "clipPlaneFragmentDeclaration", d = `#ifdef CLIPPLANE
|
|
3
|
+
varying float fClipDistance;
|
|
4
|
+
#endif
|
|
5
|
+
#ifdef CLIPPLANE2
|
|
6
|
+
varying float fClipDistance2;
|
|
7
|
+
#endif
|
|
8
|
+
#ifdef CLIPPLANE3
|
|
9
|
+
varying float fClipDistance3;
|
|
10
|
+
#endif
|
|
11
|
+
#ifdef CLIPPLANE4
|
|
12
|
+
varying float fClipDistance4;
|
|
13
|
+
#endif
|
|
14
|
+
#ifdef CLIPPLANE5
|
|
15
|
+
varying float fClipDistance5;
|
|
16
|
+
#endif
|
|
17
|
+
#ifdef CLIPPLANE6
|
|
18
|
+
varying float fClipDistance6;
|
|
19
|
+
#endif
|
|
20
|
+
`;
|
|
21
|
+
e.IncludesShadersStore[i] || (e.IncludesShadersStore[i] = d);
|
|
22
|
+
const s = { name: i, shader: d }, f = "clipPlaneFragment", n = `#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)
|
|
23
|
+
if (false) {}
|
|
24
|
+
#endif
|
|
25
|
+
#ifdef CLIPPLANE
|
|
26
|
+
else if (fClipDistance>0.0)
|
|
27
|
+
{discard;}
|
|
28
|
+
#endif
|
|
29
|
+
#ifdef CLIPPLANE2
|
|
30
|
+
else if (fClipDistance2>0.0)
|
|
31
|
+
{discard;}
|
|
32
|
+
#endif
|
|
33
|
+
#ifdef CLIPPLANE3
|
|
34
|
+
else if (fClipDistance3>0.0)
|
|
35
|
+
{discard;}
|
|
36
|
+
#endif
|
|
37
|
+
#ifdef CLIPPLANE4
|
|
38
|
+
else if (fClipDistance4>0.0)
|
|
39
|
+
{discard;}
|
|
40
|
+
#endif
|
|
41
|
+
#ifdef CLIPPLANE5
|
|
42
|
+
else if (fClipDistance5>0.0)
|
|
43
|
+
{discard;}
|
|
44
|
+
#endif
|
|
45
|
+
#ifdef CLIPPLANE6
|
|
46
|
+
else if (fClipDistance6>0.0)
|
|
47
|
+
{discard;}
|
|
48
|
+
#endif
|
|
49
|
+
`;
|
|
50
|
+
e.IncludesShadersStore[f] || (e.IncludesShadersStore[f] = n);
|
|
51
|
+
const P = { name: f, shader: n };
|
|
52
|
+
export {
|
|
53
|
+
s as a,
|
|
54
|
+
P as c
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { S as e } from "./index-CmNnQLDH.js";
|
|
2
|
+
const i = "clipPlaneFragmentDeclaration", n = `#ifdef CLIPPLANE
|
|
3
|
+
varying fClipDistance: f32;
|
|
4
|
+
#endif
|
|
5
|
+
#ifdef CLIPPLANE2
|
|
6
|
+
varying fClipDistance2: f32;
|
|
7
|
+
#endif
|
|
8
|
+
#ifdef CLIPPLANE3
|
|
9
|
+
varying fClipDistance3: f32;
|
|
10
|
+
#endif
|
|
11
|
+
#ifdef CLIPPLANE4
|
|
12
|
+
varying fClipDistance4: f32;
|
|
13
|
+
#endif
|
|
14
|
+
#ifdef CLIPPLANE5
|
|
15
|
+
varying fClipDistance5: f32;
|
|
16
|
+
#endif
|
|
17
|
+
#ifdef CLIPPLANE6
|
|
18
|
+
varying fClipDistance6: f32;
|
|
19
|
+
#endif
|
|
20
|
+
`;
|
|
21
|
+
e.IncludesShadersStoreWGSL[i] || (e.IncludesShadersStoreWGSL[i] = n);
|
|
22
|
+
const s = { name: i, shader: n }, f = "clipPlaneFragment", d = `#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)
|
|
23
|
+
if (false) {}
|
|
24
|
+
#endif
|
|
25
|
+
#ifdef CLIPPLANE
|
|
26
|
+
else if (fragmentInputs.fClipDistance>0.0)
|
|
27
|
+
{discard;}
|
|
28
|
+
#endif
|
|
29
|
+
#ifdef CLIPPLANE2
|
|
30
|
+
else if (fragmentInputs.fClipDistance2>0.0)
|
|
31
|
+
{discard;}
|
|
32
|
+
#endif
|
|
33
|
+
#ifdef CLIPPLANE3
|
|
34
|
+
else if (fragmentInputs.fClipDistance3>0.0)
|
|
35
|
+
{discard;}
|
|
36
|
+
#endif
|
|
37
|
+
#ifdef CLIPPLANE4
|
|
38
|
+
else if (fragmentInputs.fClipDistance4>0.0)
|
|
39
|
+
{discard;}
|
|
40
|
+
#endif
|
|
41
|
+
#ifdef CLIPPLANE5
|
|
42
|
+
else if (fragmentInputs.fClipDistance5>0.0)
|
|
43
|
+
{discard;}
|
|
44
|
+
#endif
|
|
45
|
+
#ifdef CLIPPLANE6
|
|
46
|
+
else if (fragmentInputs.fClipDistance6>0.0)
|
|
47
|
+
{discard;}
|
|
48
|
+
#endif
|
|
49
|
+
`;
|
|
50
|
+
e.IncludesShadersStoreWGSL[f] || (e.IncludesShadersStoreWGSL[f] = d);
|
|
51
|
+
const t = { name: f, shader: d };
|
|
52
|
+
export {
|
|
53
|
+
t as a,
|
|
54
|
+
s as c
|
|
55
|
+
};
|