@vived/component-pneumatic-panel 1.2.0 → 2.0.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 +60 -21
- package/dist/Domain/Adapters/pneumaticPanelPMAdapter.d.ts.map +1 -1
- package/dist/Domain/Controllers/applyPanelState.d.ts.map +1 -1
- package/dist/Domain/Controllers/getPanelState.d.ts.map +1 -1
- package/dist/Domain/Controllers/panelStateDefaults.d.ts +0 -1
- package/dist/Domain/Controllers/panelStateDefaults.d.ts.map +1 -1
- package/dist/Domain/Entities/PneumaticPanelEntity.d.ts +0 -4
- package/dist/Domain/Entities/PneumaticPanelEntity.d.ts.map +1 -1
- package/dist/Domain/Mocks/MockPneumaticPanelSelectUC.d.ts +0 -4
- package/dist/Domain/Mocks/MockPneumaticPanelSelectUC.d.ts.map +1 -1
- package/dist/Domain/PMs/PneumaticPanelPM.d.ts +0 -3
- package/dist/Domain/PMs/PneumaticPanelPM.d.ts.map +1 -1
- package/dist/Domain/UCs/PneumaticPanelSelectUC.d.ts +0 -14
- package/dist/Domain/UCs/PneumaticPanelSelectUC.d.ts.map +1 -1
- package/dist/Frameworks/Babylon/PneumaticPanelBabylonView.d.ts +9 -12
- package/dist/Frameworks/Babylon/PneumaticPanelBabylonView.d.ts.map +1 -1
- package/dist/Frameworks/Babylon/PneumaticPanelExhaustView.d.ts +2 -2
- package/dist/Frameworks/Babylon/PneumaticPanelExhaustView.d.ts.map +1 -1
- package/dist/Frameworks/Babylon/PneumaticPanelGaugeView.d.ts +2 -2
- package/dist/Frameworks/Babylon/PneumaticPanelGaugeView.d.ts.map +1 -1
- package/dist/Frameworks/Babylon/PneumaticPanelHitboxView.d.ts +5 -7
- package/dist/Frameworks/Babylon/PneumaticPanelHitboxView.d.ts.map +1 -1
- package/dist/Frameworks/Babylon/PneumaticPanelLockView.d.ts +2 -2
- package/dist/Frameworks/Babylon/PneumaticPanelLockView.d.ts.map +1 -1
- package/dist/PneumaticPanelFacade.d.ts +1 -13
- package/dist/PneumaticPanelFacade.d.ts.map +1 -1
- package/dist/index.d.ts +1 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5169 -51
- package/package.json +1 -1
- package/dist/Domain/Controllers/clearAllHighlights.d.ts +0 -9
- package/dist/Domain/Controllers/clearAllHighlights.d.ts.map +0 -1
- package/dist/Domain/Controllers/onPanelHoverEnter.d.ts +0 -7
- package/dist/Domain/Controllers/onPanelHoverEnter.d.ts.map +0 -1
- package/dist/Domain/Controllers/onPanelHoverExit.d.ts +0 -7
- package/dist/Domain/Controllers/onPanelHoverExit.d.ts.map +0 -1
- package/dist/Domain/Controllers/panelHitboxHoverEnter.d.ts +0 -7
- package/dist/Domain/Controllers/panelHitboxHoverEnter.d.ts.map +0 -1
- package/dist/Domain/Controllers/panelHitboxHoverExit.d.ts +0 -7
- package/dist/Domain/Controllers/panelHitboxHoverExit.d.ts.map +0 -1
- package/dist/Domain/Controllers/setHighlightedObject.d.ts +0 -11
- package/dist/Domain/Controllers/setHighlightedObject.d.ts.map +0 -1
- package/dist/Frameworks/Babylon/OutlinePulseController.d.ts +0 -18
- package/dist/Frameworks/Babylon/OutlinePulseController.d.ts.map +0 -1
- package/dist/Frameworks/Babylon/OverlayPulseController.d.ts +0 -17
- package/dist/Frameworks/Babylon/OverlayPulseController.d.ts.map +0 -1
- package/dist/Frameworks/Babylon/PanelOutlineController.d.ts +0 -32
- package/dist/Frameworks/Babylon/PanelOutlineController.d.ts.map +0 -1
- package/dist/Frameworks/Babylon/ScreenSpaceOutlinePulseController.d.ts +0 -17
- package/dist/Frameworks/Babylon/ScreenSpaceOutlinePulseController.d.ts.map +0 -1
- package/dist/clipPlaneFragment-BRmzi2tV.js +0 -55
- package/dist/clipPlaneFragment-CDdVuU0n.js +0 -55
- package/dist/clipPlaneVertex-CIEg9nQi.js +0 -358
- package/dist/clipPlaneVertex-CIarPzTc.js +0 -391
- package/dist/dumpTools-BUC-AUZt.js +0 -110
- package/dist/glowBlurPostProcess.fragment-DDhSDO38.js +0 -13
- package/dist/glowBlurPostProcess.fragment-fpk0xJVe.js +0 -13
- package/dist/glowMapGeneration.fragment-BBSNxu8K.js +0 -193
- package/dist/glowMapGeneration.fragment-Cl-xwsZp.js +0 -161
- package/dist/glowMapGeneration.vertex-CzQHgJdT.js +0 -85
- package/dist/glowMapGeneration.vertex-DErxE57o.js +0 -85
- package/dist/glowMapMerge.vertex-BQosy0g5.js +0 -14
- package/dist/glowMapMerge.vertex-tVYqLRGm.js +0 -13
- package/dist/index-CmNnQLDH.js +0 -36863
- package/dist/pass.fragment-D3pYn4R1.js +0 -10
- package/dist/selection.fragment-CGZK1kVt.js +0 -45
- package/dist/selection.fragment-DjWRsu7R.js +0 -45
- package/dist/selection.vertex-DY_1B2lX.js +0 -84
- package/dist/selection.vertex-PhS5tOTA.js +0 -83
- package/dist/selectionOutline.fragment-Bp__J_pC.js +0 -53
- package/dist/selectionOutline.fragment-DmyQJACa.js +0 -54
- package/dist/thinEngine-dZnz-Owz.js +0 -4
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AppObjectRepo } from "@vived/core";
|
|
2
|
-
/**
|
|
3
|
-
* Clears all active highlights on the Pneumatic Panel.
|
|
4
|
-
*
|
|
5
|
-
* @param id - The ID of the Pneumatic Panel instance.
|
|
6
|
-
* @param appObjects - The AppObject repository.
|
|
7
|
-
*/
|
|
8
|
-
export declare function clearAllHighlights(id: string, appObjects: AppObjectRepo): void;
|
|
9
|
-
//# sourceMappingURL=clearAllHighlights.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clearAllHighlights.d.ts","sourceRoot":"","sources":["../../../src/Domain/Controllers/clearAllHighlights.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,IAAI,CAYN"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AppObjectRepo } from "@vived/core";
|
|
2
|
-
import { type PneumaticPanelHighlightedObject } from "../Entities/PneumaticPanelEntity";
|
|
3
|
-
/**
|
|
4
|
-
* Sets which single object should be highlighted in the scene.
|
|
5
|
-
*
|
|
6
|
-
* @param id - The ID of the Pneumatic Panel instance.
|
|
7
|
-
* @param appObjects - The AppObject repository.
|
|
8
|
-
* @param highlightedObject - The object to highlight, or "none".
|
|
9
|
-
*/
|
|
10
|
-
export declare function setHighlightedObject(id: string, appObjects: AppObjectRepo, highlightedObject: PneumaticPanelHighlightedObject): void;
|
|
11
|
-
//# sourceMappingURL=setHighlightedObject.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setHighlightedObject.d.ts","sourceRoot":"","sources":["../../../src/Domain/Controllers/setHighlightedObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,kCAAkC,CAAC;AAE1C;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,EACzB,iBAAiB,EAAE,+BAA+B,GACjD,IAAI,CAYN"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AbstractMesh, Color3 } from "@babylonjs/core";
|
|
2
|
-
type OutlinePulseOptions = {
|
|
3
|
-
color?: Color3;
|
|
4
|
-
intervalMs?: number;
|
|
5
|
-
width?: number;
|
|
6
|
-
};
|
|
7
|
-
type OutlinePulseController = {
|
|
8
|
-
apply(on: boolean): void;
|
|
9
|
-
dispose(): void;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Creates a pulsing hard-edge outline controller for one or more meshes.
|
|
13
|
-
* It guarantees immediate cleanup when turned off or disposed.
|
|
14
|
-
* The outline pulses on/off at the specified interval, creating a strobe effect.
|
|
15
|
-
*/
|
|
16
|
-
export declare function makeOutlinePulseController(getMeshes: () => AbstractMesh[], options?: OutlinePulseOptions): OutlinePulseController;
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=OutlinePulseController.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OutlinePulseController.d.ts","sourceRoot":"","sources":["../../../src/Frameworks/Babylon/OutlinePulseController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEvD,KAAK,mBAAmB,GAAG;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,YAAY,EAAE,EAC/B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,sBAAsB,CAqExB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { AbstractMesh, Color3 } from "@babylonjs/core";
|
|
2
|
-
type OverlayPulseOptions = {
|
|
3
|
-
alpha?: number;
|
|
4
|
-
color?: Color3;
|
|
5
|
-
intervalMs?: number;
|
|
6
|
-
};
|
|
7
|
-
type OverlayPulseController = {
|
|
8
|
-
apply(on: boolean): void;
|
|
9
|
-
dispose(): void;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Creates a small pulsing-overlay controller for one or more meshes.
|
|
13
|
-
* It guarantees immediate cleanup when turned off or disposed.
|
|
14
|
-
*/
|
|
15
|
-
export declare function makeOverlayPulseController(getMeshes: () => AbstractMesh[], options?: OverlayPulseOptions): OverlayPulseController;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=OverlayPulseController.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayPulseController.d.ts","sourceRoot":"","sources":["../../../src/Frameworks/Babylon/OverlayPulseController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEvD,KAAK,mBAAmB,GAAG;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,YAAY,EAAE,EAC/B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,sBAAsB,CAoExB"}
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,17 +0,0 @@
|
|
|
1
|
-
import { AbstractMesh, Color3, HighlightLayer } from "@babylonjs/core";
|
|
2
|
-
type ScreenSpaceOutlinePulseOptions = {
|
|
3
|
-
color?: Color3;
|
|
4
|
-
intervalMs?: number;
|
|
5
|
-
};
|
|
6
|
-
type ScreenSpaceOutlinePulseController = {
|
|
7
|
-
apply(on: boolean): void;
|
|
8
|
-
dispose(): void;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Creates a pulsing screen-space outline controller for one or more meshes.
|
|
12
|
-
* Uses Babylon's HighlightLayer for post-process rendering with consistent pixel width.
|
|
13
|
-
* The outline pulses on/off at the specified interval, creating a strobe effect.
|
|
14
|
-
*/
|
|
15
|
-
export declare function makeScreenSpaceOutlinePulseController(getMeshes: () => AbstractMesh[], layer: HighlightLayer | undefined, options?: ScreenSpaceOutlinePulseOptions): ScreenSpaceOutlinePulseController;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=ScreenSpaceOutlinePulseController.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenSpaceOutlinePulseController.d.ts","sourceRoot":"","sources":["../../../src/Frameworks/Babylon/ScreenSpaceOutlinePulseController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAQ,MAAM,iBAAiB,CAAC;AAE7E,KAAK,8BAA8B,GAAG;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,iCAAiC,GAAG;IACvC,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,qCAAqC,CACnD,SAAS,EAAE,MAAM,YAAY,EAAE,EAC/B,KAAK,EAAE,cAAc,GAAG,SAAS,EACjC,OAAO,CAAC,EAAE,8BAA8B,GACvC,iCAAiC,CA6EnC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
import { S as e } from "./index-CmNnQLDH.js";
|
|
2
|
-
const t = "bonesDeclaration", T = `#if NUM_BONE_INFLUENCERS>0
|
|
3
|
-
attribute vec4 matricesIndices;attribute vec4 matricesWeights;
|
|
4
|
-
#if NUM_BONE_INFLUENCERS>4
|
|
5
|
-
attribute vec4 matricesIndicesExtra;attribute vec4 matricesWeightsExtra;
|
|
6
|
-
#endif
|
|
7
|
-
#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
8
|
-
#ifdef BONETEXTURE
|
|
9
|
-
uniform highp sampler2D boneSampler;uniform vec2 boneTextureInfo;
|
|
10
|
-
#else
|
|
11
|
-
uniform mat4 mBones[BonesPerMesh];
|
|
12
|
-
#endif
|
|
13
|
-
#ifdef BONES_VELOCITY_ENABLED
|
|
14
|
-
uniform mat4 mPreviousBones[BonesPerMesh];
|
|
15
|
-
#endif
|
|
16
|
-
#ifdef BONETEXTURE
|
|
17
|
-
#define inline
|
|
18
|
-
mat4 readMatrixFromRawSampler(sampler2D smp,float index)
|
|
19
|
-
{
|
|
20
|
-
#if defined(WEBGL2) || defined(WEBGPU)
|
|
21
|
-
int offset=int(index)*4;
|
|
22
|
-
int textureWidth=int(boneTextureInfo.x);int y=int(offset)/textureWidth;int x=int(offset) % textureWidth;vec4 m0=texelFetch(smp,ivec2(x+0,y),0);vec4 m1=texelFetch(smp,ivec2(x+1,y),0);vec4 m2=texelFetch(smp,ivec2(x+2,y),0);vec4 m3=texelFetch(smp,ivec2(x+3,y),0);return mat4(m0,m1,m2,m3);
|
|
23
|
-
#else
|
|
24
|
-
float offset=index*4.0;float y=floor(offset/boneTextureInfo.x);float x=offset-y*boneTextureInfo.x;float dy=1.0/boneTextureInfo.y;float dx=1.0/boneTextureInfo.x;vec4 m0=texture2D(smp,vec2(dx*(x+0.5),dy*(y+0.5)));vec4 m1=texture2D(smp,vec2(dx*(x+1.5),dy*(y+0.5)));vec4 m2=texture2D(smp,vec2(dx*(x+2.5),dy*(y+0.5)));vec4 m3=texture2D(smp,vec2(dx*(x+3.5),dy*(y+0.5)));
|
|
25
|
-
return mat4(m0,m1,m2,m3);
|
|
26
|
-
#endif
|
|
27
|
-
}
|
|
28
|
-
#endif
|
|
29
|
-
#endif
|
|
30
|
-
#endif
|
|
31
|
-
`;
|
|
32
|
-
e.IncludesShadersStore[t] || (e.IncludesShadersStore[t] = T);
|
|
33
|
-
const _ = { name: t, shader: T }, r = "bakedVertexAnimationDeclaration", E = `#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
34
|
-
uniform float bakedVertexAnimationTime;
|
|
35
|
-
#if !defined(WEBGL2) && !defined(WEBGPU)
|
|
36
|
-
uniform vec2 bakedVertexAnimationTextureSizeInverted;
|
|
37
|
-
#endif
|
|
38
|
-
uniform vec4 bakedVertexAnimationSettings;uniform sampler2D bakedVertexAnimationTexture;
|
|
39
|
-
#ifdef INSTANCES
|
|
40
|
-
attribute vec4 bakedVertexAnimationSettingsInstanced;
|
|
41
|
-
#endif
|
|
42
|
-
#define inline
|
|
43
|
-
mat4 readMatrixFromRawSamplerVAT(sampler2D smp,float index,float frame)
|
|
44
|
-
{
|
|
45
|
-
#if defined(WEBGL2) || defined(WEBGPU)
|
|
46
|
-
int offset=int(index)*4;int frameUV=int(frame);vec4 m0=texelFetch(smp,ivec2(offset+0,frameUV),0);vec4 m1=texelFetch(smp,ivec2(offset+1,frameUV),0);vec4 m2=texelFetch(smp,ivec2(offset+2,frameUV),0);vec4 m3=texelFetch(smp,ivec2(offset+3,frameUV),0);return mat4(m0,m1,m2,m3);
|
|
47
|
-
#else
|
|
48
|
-
float offset=index*4.0;float frameUV=(frame+0.5)*bakedVertexAnimationTextureSizeInverted.y;float dx=bakedVertexAnimationTextureSizeInverted.x;vec4 m0=texture2D(smp,vec2(dx*(offset+0.5),frameUV));vec4 m1=texture2D(smp,vec2(dx*(offset+1.5),frameUV));vec4 m2=texture2D(smp,vec2(dx*(offset+2.5),frameUV));vec4 m3=texture2D(smp,vec2(dx*(offset+3.5),frameUV));return mat4(m0,m1,m2,m3);
|
|
49
|
-
#endif
|
|
50
|
-
}
|
|
51
|
-
#endif
|
|
52
|
-
`;
|
|
53
|
-
e.IncludesShadersStore[r] || (e.IncludesShadersStore[r] = E);
|
|
54
|
-
const O = { name: r, shader: E }, i = "morphTargetsVertexGlobalDeclaration", x = `#ifdef MORPHTARGETS
|
|
55
|
-
uniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS];
|
|
56
|
-
#ifdef MORPHTARGETS_TEXTURE
|
|
57
|
-
uniform float morphTargetTextureIndices[NUM_MORPH_INFLUENCERS];uniform vec3 morphTargetTextureInfo;uniform highp sampler2DArray morphTargets;vec3 readVector3FromRawSampler(int targetIndex,float vertexIndex)
|
|
58
|
-
{
|
|
59
|
-
#if defined(WEBGL2) || defined(WEBGPU)
|
|
60
|
-
int textureWidth=int(morphTargetTextureInfo.y);int y=int(vertexIndex)/textureWidth;int x=int(vertexIndex) % textureWidth;return texelFetch(morphTargets,ivec3(x,y,int(morphTargetTextureIndices[targetIndex])),0).xyz;
|
|
61
|
-
#else
|
|
62
|
-
float y=floor(vertexIndex/morphTargetTextureInfo.y);float x=vertexIndex-y*morphTargetTextureInfo.y;vec3 textureUV=vec3((x+0.5)/morphTargetTextureInfo.y,(y+0.5)/morphTargetTextureInfo.z,morphTargetTextureIndices[targetIndex]);return texture(morphTargets,textureUV).xyz;
|
|
63
|
-
#endif
|
|
64
|
-
}
|
|
65
|
-
vec4 readVector4FromRawSampler(int targetIndex,float vertexIndex)
|
|
66
|
-
{
|
|
67
|
-
#if defined(WEBGL2) || defined(WEBGPU)
|
|
68
|
-
int textureWidth=int(morphTargetTextureInfo.y);int y=int(vertexIndex)/textureWidth;int x=int(vertexIndex) % textureWidth;return texelFetch(morphTargets,ivec3(x,y,int(morphTargetTextureIndices[targetIndex])),0);
|
|
69
|
-
#else
|
|
70
|
-
float y=floor(vertexIndex/morphTargetTextureInfo.y);float x=vertexIndex-y*morphTargetTextureInfo.y;vec3 textureUV=vec3((x+0.5)/morphTargetTextureInfo.y,(y+0.5)/morphTargetTextureInfo.z,morphTargetTextureIndices[targetIndex]);return texture(morphTargets,textureUV);
|
|
71
|
-
#endif
|
|
72
|
-
}
|
|
73
|
-
#endif
|
|
74
|
-
#endif
|
|
75
|
-
`;
|
|
76
|
-
e.IncludesShadersStore[i] || (e.IncludesShadersStore[i] = x);
|
|
77
|
-
const P = { name: i, shader: x }, n = "morphTargetsVertexDeclaration", I = `#ifdef MORPHTARGETS
|
|
78
|
-
#ifndef MORPHTARGETS_TEXTURE
|
|
79
|
-
#ifdef MORPHTARGETS_POSITION
|
|
80
|
-
attribute vec3 position{X};
|
|
81
|
-
#endif
|
|
82
|
-
#ifdef MORPHTARGETS_NORMAL
|
|
83
|
-
attribute vec3 normal{X};
|
|
84
|
-
#endif
|
|
85
|
-
#ifdef MORPHTARGETS_TANGENT
|
|
86
|
-
attribute vec3 tangent{X};
|
|
87
|
-
#endif
|
|
88
|
-
#ifdef MORPHTARGETS_UV
|
|
89
|
-
attribute vec2 uv_{X};
|
|
90
|
-
#endif
|
|
91
|
-
#ifdef MORPHTARGETS_UV2
|
|
92
|
-
attribute vec2 uv2_{X};
|
|
93
|
-
#endif
|
|
94
|
-
#ifdef MORPHTARGETS_COLOR
|
|
95
|
-
attribute vec4 color{X};
|
|
96
|
-
#endif
|
|
97
|
-
#elif {X}==0
|
|
98
|
-
uniform float morphTargetCount;
|
|
99
|
-
#endif
|
|
100
|
-
#endif
|
|
101
|
-
`;
|
|
102
|
-
e.IncludesShadersStore[n] || (e.IncludesShadersStore[n] = I);
|
|
103
|
-
const U = { name: n, shader: I }, a = "clipPlaneVertexDeclaration", u = `#ifdef CLIPPLANE
|
|
104
|
-
uniform vec4 vClipPlane;varying float fClipDistance;
|
|
105
|
-
#endif
|
|
106
|
-
#ifdef CLIPPLANE2
|
|
107
|
-
uniform vec4 vClipPlane2;varying float fClipDistance2;
|
|
108
|
-
#endif
|
|
109
|
-
#ifdef CLIPPLANE3
|
|
110
|
-
uniform vec4 vClipPlane3;varying float fClipDistance3;
|
|
111
|
-
#endif
|
|
112
|
-
#ifdef CLIPPLANE4
|
|
113
|
-
uniform vec4 vClipPlane4;varying float fClipDistance4;
|
|
114
|
-
#endif
|
|
115
|
-
#ifdef CLIPPLANE5
|
|
116
|
-
uniform vec4 vClipPlane5;varying float fClipDistance5;
|
|
117
|
-
#endif
|
|
118
|
-
#ifdef CLIPPLANE6
|
|
119
|
-
uniform vec4 vClipPlane6;varying float fClipDistance6;
|
|
120
|
-
#endif
|
|
121
|
-
`;
|
|
122
|
-
e.IncludesShadersStore[a] || (e.IncludesShadersStore[a] = u);
|
|
123
|
-
const C = { name: a, shader: u }, f = "instancesDeclaration", S = `#ifdef INSTANCES
|
|
124
|
-
attribute vec4 world0;attribute vec4 world1;attribute vec4 world2;attribute vec4 world3;
|
|
125
|
-
#ifdef INSTANCESCOLOR
|
|
126
|
-
attribute vec4 instanceColor;
|
|
127
|
-
#endif
|
|
128
|
-
#if defined(THIN_INSTANCES) && !defined(WORLD_UBO)
|
|
129
|
-
uniform mat4 world;
|
|
130
|
-
#endif
|
|
131
|
-
#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
132
|
-
attribute vec4 previousWorld0;attribute vec4 previousWorld1;attribute vec4 previousWorld2;attribute vec4 previousWorld3;
|
|
133
|
-
#ifdef THIN_INSTANCES
|
|
134
|
-
uniform mat4 previousWorld;
|
|
135
|
-
#endif
|
|
136
|
-
#endif
|
|
137
|
-
#else
|
|
138
|
-
#if !defined(WORLD_UBO)
|
|
139
|
-
uniform mat4 world;
|
|
140
|
-
#endif
|
|
141
|
-
#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
142
|
-
uniform mat4 previousWorld;
|
|
143
|
-
#endif
|
|
144
|
-
#endif
|
|
145
|
-
`;
|
|
146
|
-
e.IncludesShadersStore[f] || (e.IncludesShadersStore[f] = S);
|
|
147
|
-
const L = { name: f, shader: S }, d = "morphTargetsVertexGlobal", N = `#ifdef MORPHTARGETS
|
|
148
|
-
#ifdef MORPHTARGETS_TEXTURE
|
|
149
|
-
float vertexID;
|
|
150
|
-
#endif
|
|
151
|
-
#endif
|
|
152
|
-
`;
|
|
153
|
-
e.IncludesShadersStore[d] || (e.IncludesShadersStore[d] = N);
|
|
154
|
-
const g = { name: d, shader: N }, o = "morphTargetsVertex", A = `#ifdef MORPHTARGETS
|
|
155
|
-
#ifdef MORPHTARGETS_TEXTURE
|
|
156
|
-
#if {X}==0
|
|
157
|
-
for (int i=0; i<NUM_MORPH_INFLUENCERS; i++) {if (float(i)>=morphTargetCount) break;vertexID=float(gl_VertexID)*morphTargetTextureInfo.x;
|
|
158
|
-
#ifdef MORPHTARGETS_POSITION
|
|
159
|
-
positionUpdated+=(readVector3FromRawSampler(i,vertexID)-position)*morphTargetInfluences[i];
|
|
160
|
-
#endif
|
|
161
|
-
#ifdef MORPHTARGETTEXTURE_HASPOSITIONS
|
|
162
|
-
vertexID+=1.0;
|
|
163
|
-
#endif
|
|
164
|
-
#ifdef MORPHTARGETS_NORMAL
|
|
165
|
-
normalUpdated+=(readVector3FromRawSampler(i,vertexID) -normal)*morphTargetInfluences[i];
|
|
166
|
-
#endif
|
|
167
|
-
#ifdef MORPHTARGETTEXTURE_HASNORMALS
|
|
168
|
-
vertexID+=1.0;
|
|
169
|
-
#endif
|
|
170
|
-
#ifdef MORPHTARGETS_UV
|
|
171
|
-
uvUpdated+=(readVector3FromRawSampler(i,vertexID).xy-uv)*morphTargetInfluences[i];
|
|
172
|
-
#endif
|
|
173
|
-
#ifdef MORPHTARGETTEXTURE_HASUVS
|
|
174
|
-
vertexID+=1.0;
|
|
175
|
-
#endif
|
|
176
|
-
#ifdef MORPHTARGETS_TANGENT
|
|
177
|
-
tangentUpdated.xyz+=(readVector3FromRawSampler(i,vertexID) -tangent.xyz)*morphTargetInfluences[i];
|
|
178
|
-
#endif
|
|
179
|
-
#ifdef MORPHTARGETTEXTURE_HASTANGENTS
|
|
180
|
-
vertexID+=1.0;
|
|
181
|
-
#endif
|
|
182
|
-
#ifdef MORPHTARGETS_UV2
|
|
183
|
-
uv2Updated+=(readVector3FromRawSampler(i,vertexID).xy-uv2)*morphTargetInfluences[i];
|
|
184
|
-
#endif
|
|
185
|
-
#ifdef MORPHTARGETTEXTURE_HASUV2S
|
|
186
|
-
vertexID+=1.0;
|
|
187
|
-
#endif
|
|
188
|
-
#ifdef MORPHTARGETS_COLOR
|
|
189
|
-
colorUpdated+=(readVector4FromRawSampler(i,vertexID)-color)*morphTargetInfluences[i];
|
|
190
|
-
#endif
|
|
191
|
-
}
|
|
192
|
-
#endif
|
|
193
|
-
#else
|
|
194
|
-
#ifdef MORPHTARGETS_POSITION
|
|
195
|
-
positionUpdated+=(position{X}-position)*morphTargetInfluences[{X}];
|
|
196
|
-
#endif
|
|
197
|
-
#ifdef MORPHTARGETS_NORMAL
|
|
198
|
-
normalUpdated+=(normal{X}-normal)*morphTargetInfluences[{X}];
|
|
199
|
-
#endif
|
|
200
|
-
#ifdef MORPHTARGETS_TANGENT
|
|
201
|
-
tangentUpdated.xyz+=(tangent{X}-tangent.xyz)*morphTargetInfluences[{X}];
|
|
202
|
-
#endif
|
|
203
|
-
#ifdef MORPHTARGETS_UV
|
|
204
|
-
uvUpdated+=(uv_{X}-uv)*morphTargetInfluences[{X}];
|
|
205
|
-
#endif
|
|
206
|
-
#ifdef MORPHTARGETS_UV2
|
|
207
|
-
uv2Updated+=(uv2_{X}-uv2)*morphTargetInfluences[{X}];
|
|
208
|
-
#endif
|
|
209
|
-
#ifdef MORPHTARGETS_COLOR
|
|
210
|
-
colorUpdated+=(color{X}-color)*morphTargetInfluences[{X}];
|
|
211
|
-
#endif
|
|
212
|
-
#endif
|
|
213
|
-
#endif
|
|
214
|
-
`;
|
|
215
|
-
e.IncludesShadersStore[o] || (e.IncludesShadersStore[o] = A);
|
|
216
|
-
const M = { name: o, shader: A }, m = "instancesVertex", R = `#ifdef INSTANCES
|
|
217
|
-
mat4 finalWorld=mat4(world0,world1,world2,world3);
|
|
218
|
-
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
219
|
-
mat4 finalPreviousWorld=mat4(previousWorld0,previousWorld1,
|
|
220
|
-
previousWorld2,previousWorld3);
|
|
221
|
-
#endif
|
|
222
|
-
#ifdef THIN_INSTANCES
|
|
223
|
-
finalWorld=world*finalWorld;
|
|
224
|
-
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
225
|
-
finalPreviousWorld=previousWorld*finalPreviousWorld;
|
|
226
|
-
#endif
|
|
227
|
-
#endif
|
|
228
|
-
#else
|
|
229
|
-
mat4 finalWorld=world;
|
|
230
|
-
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
231
|
-
mat4 finalPreviousWorld=previousWorld;
|
|
232
|
-
#endif
|
|
233
|
-
#endif
|
|
234
|
-
`;
|
|
235
|
-
e.IncludesShadersStore[m] || (e.IncludesShadersStore[m] = R);
|
|
236
|
-
const F = { name: m, shader: R }, s = "bonesVertex", p = `#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
237
|
-
#if NUM_BONE_INFLUENCERS>0
|
|
238
|
-
mat4 influence;
|
|
239
|
-
#ifdef BONETEXTURE
|
|
240
|
-
influence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0];
|
|
241
|
-
#if NUM_BONE_INFLUENCERS>1
|
|
242
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1];
|
|
243
|
-
#endif
|
|
244
|
-
#if NUM_BONE_INFLUENCERS>2
|
|
245
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2];
|
|
246
|
-
#endif
|
|
247
|
-
#if NUM_BONE_INFLUENCERS>3
|
|
248
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3];
|
|
249
|
-
#endif
|
|
250
|
-
#if NUM_BONE_INFLUENCERS>4
|
|
251
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0];
|
|
252
|
-
#endif
|
|
253
|
-
#if NUM_BONE_INFLUENCERS>5
|
|
254
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1];
|
|
255
|
-
#endif
|
|
256
|
-
#if NUM_BONE_INFLUENCERS>6
|
|
257
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2];
|
|
258
|
-
#endif
|
|
259
|
-
#if NUM_BONE_INFLUENCERS>7
|
|
260
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3];
|
|
261
|
-
#endif
|
|
262
|
-
#else
|
|
263
|
-
influence=mBones[int(matricesIndices[0])]*matricesWeights[0];
|
|
264
|
-
#if NUM_BONE_INFLUENCERS>1
|
|
265
|
-
influence+=mBones[int(matricesIndices[1])]*matricesWeights[1];
|
|
266
|
-
#endif
|
|
267
|
-
#if NUM_BONE_INFLUENCERS>2
|
|
268
|
-
influence+=mBones[int(matricesIndices[2])]*matricesWeights[2];
|
|
269
|
-
#endif
|
|
270
|
-
#if NUM_BONE_INFLUENCERS>3
|
|
271
|
-
influence+=mBones[int(matricesIndices[3])]*matricesWeights[3];
|
|
272
|
-
#endif
|
|
273
|
-
#if NUM_BONE_INFLUENCERS>4
|
|
274
|
-
influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];
|
|
275
|
-
#endif
|
|
276
|
-
#if NUM_BONE_INFLUENCERS>5
|
|
277
|
-
influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];
|
|
278
|
-
#endif
|
|
279
|
-
#if NUM_BONE_INFLUENCERS>6
|
|
280
|
-
influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];
|
|
281
|
-
#endif
|
|
282
|
-
#if NUM_BONE_INFLUENCERS>7
|
|
283
|
-
influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];
|
|
284
|
-
#endif
|
|
285
|
-
#endif
|
|
286
|
-
finalWorld=finalWorld*influence;
|
|
287
|
-
#endif
|
|
288
|
-
#endif
|
|
289
|
-
`;
|
|
290
|
-
e.IncludesShadersStore[s] || (e.IncludesShadersStore[s] = p);
|
|
291
|
-
const W = { name: s, shader: p }, c = "bakedVertexAnimation", h = `#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
292
|
-
{
|
|
293
|
-
#ifdef INSTANCES
|
|
294
|
-
#define BVASNAME bakedVertexAnimationSettingsInstanced
|
|
295
|
-
#else
|
|
296
|
-
#define BVASNAME bakedVertexAnimationSettings
|
|
297
|
-
#endif
|
|
298
|
-
float VATStartFrame=BVASNAME.x;float VATEndFrame=BVASNAME.y;float VATOffsetFrame=BVASNAME.z;float VATSpeed=BVASNAME.w;float totalFrames=VATEndFrame-VATStartFrame+1.0;float time=bakedVertexAnimationTime*VATSpeed/totalFrames;float frameCorrection=time<1.0 ? 0.0 : 1.0;float numOfFrames=totalFrames-frameCorrection;float VATFrameNum=fract(time)*numOfFrames;VATFrameNum=mod(VATFrameNum+VATOffsetFrame,numOfFrames);VATFrameNum=floor(VATFrameNum);VATFrameNum+=VATStartFrame+frameCorrection;mat4 VATInfluence;VATInfluence=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[0],VATFrameNum)*matricesWeights[0];
|
|
299
|
-
#if NUM_BONE_INFLUENCERS>1
|
|
300
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[1],VATFrameNum)*matricesWeights[1];
|
|
301
|
-
#endif
|
|
302
|
-
#if NUM_BONE_INFLUENCERS>2
|
|
303
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[2],VATFrameNum)*matricesWeights[2];
|
|
304
|
-
#endif
|
|
305
|
-
#if NUM_BONE_INFLUENCERS>3
|
|
306
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[3],VATFrameNum)*matricesWeights[3];
|
|
307
|
-
#endif
|
|
308
|
-
#if NUM_BONE_INFLUENCERS>4
|
|
309
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[0],VATFrameNum)*matricesWeightsExtra[0];
|
|
310
|
-
#endif
|
|
311
|
-
#if NUM_BONE_INFLUENCERS>5
|
|
312
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[1],VATFrameNum)*matricesWeightsExtra[1];
|
|
313
|
-
#endif
|
|
314
|
-
#if NUM_BONE_INFLUENCERS>6
|
|
315
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[2],VATFrameNum)*matricesWeightsExtra[2];
|
|
316
|
-
#endif
|
|
317
|
-
#if NUM_BONE_INFLUENCERS>7
|
|
318
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[3],VATFrameNum)*matricesWeightsExtra[3];
|
|
319
|
-
#endif
|
|
320
|
-
finalWorld=finalWorld*VATInfluence;}
|
|
321
|
-
#endif
|
|
322
|
-
`;
|
|
323
|
-
e.IncludesShadersStore[c] || (e.IncludesShadersStore[c] = h);
|
|
324
|
-
const b = { name: c, shader: h }, l = "clipPlaneVertex", v = `#ifdef CLIPPLANE
|
|
325
|
-
fClipDistance=dot(worldPos,vClipPlane);
|
|
326
|
-
#endif
|
|
327
|
-
#ifdef CLIPPLANE2
|
|
328
|
-
fClipDistance2=dot(worldPos,vClipPlane2);
|
|
329
|
-
#endif
|
|
330
|
-
#ifdef CLIPPLANE3
|
|
331
|
-
fClipDistance3=dot(worldPos,vClipPlane3);
|
|
332
|
-
#endif
|
|
333
|
-
#ifdef CLIPPLANE4
|
|
334
|
-
fClipDistance4=dot(worldPos,vClipPlane4);
|
|
335
|
-
#endif
|
|
336
|
-
#ifdef CLIPPLANE5
|
|
337
|
-
fClipDistance5=dot(worldPos,vClipPlane5);
|
|
338
|
-
#endif
|
|
339
|
-
#ifdef CLIPPLANE6
|
|
340
|
-
fClipDistance6=dot(worldPos,vClipPlane6);
|
|
341
|
-
#endif
|
|
342
|
-
`;
|
|
343
|
-
e.IncludesShadersStore[l] || (e.IncludesShadersStore[l] = v);
|
|
344
|
-
const B = { name: l, shader: v };
|
|
345
|
-
export {
|
|
346
|
-
O as a,
|
|
347
|
-
b,
|
|
348
|
-
_ as c,
|
|
349
|
-
W as d,
|
|
350
|
-
B as e,
|
|
351
|
-
C as f,
|
|
352
|
-
F as g,
|
|
353
|
-
U as h,
|
|
354
|
-
L as i,
|
|
355
|
-
g as j,
|
|
356
|
-
P as k,
|
|
357
|
-
M as m
|
|
358
|
-
};
|