@forgeax/engine-vfx-render 0.1.27 → 0.1.29
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 +55 -10
- package/dist/__tests__/persistent-ticks.integration.test.d.ts +2 -0
- package/dist/__tests__/persistent-ticks.integration.test.d.ts.map +1 -0
- package/dist/feature/event-resources.d.ts +10 -3
- package/dist/feature/event-resources.d.ts.map +1 -1
- package/dist/feature/gpu-particle-feature.d.ts +18 -5
- package/dist/feature/gpu-particle-feature.d.ts.map +1 -1
- package/dist/feature/particle-resources.d.ts +43 -6
- package/dist/feature/particle-resources.d.ts.map +1 -1
- package/dist/host/data-interface-providers.d.ts +4 -1
- package/dist/host/data-interface-providers.d.ts.map +1 -1
- package/dist/host/vfx-runtime-host.d.ts +21 -2
- package/dist/host/vfx-runtime-host.d.ts.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1027 -307
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -9
- package/src/__tests__/billboard-advanced.integration.test.ts +1 -1
- package/src/__tests__/data-interface-providers.unit.test.ts +4 -0
- package/src/__tests__/data-interface-public-api.test-d.ts +1 -0
- package/src/__tests__/gpu-host.integration.test.ts +1471 -59
- package/src/__tests__/particle-resources.unit.test.ts +75 -0
- package/src/__tests__/persistent-ticks.integration.test.ts +162 -0
- package/src/__tests__/render-vocabulary-owner.test-d.ts +7 -7
- package/src/feature/event-resources.ts +18 -4
- package/src/feature/gpu-particle-feature.ts +1153 -376
- package/src/feature/particle-resources.ts +223 -11
- package/src/host/data-interface-providers.ts +19 -0
- package/src/host/vfx-runtime-host.ts +82 -2
- package/src/index.ts +8 -0
- package/src/shaders/beam-inputs.wgsl +40 -0
- package/src/shaders/beam.wgsl +4 -3
- package/src/shaders/billboard-inputs.wgsl +85 -0
- package/src/shaders/mesh-inputs.wgsl +95 -0
- package/src/shaders/mesh-shadow.wgsl +18 -0
- package/src/shaders/mesh.wgsl +64 -40
- package/src/shaders/ribbon-inputs.wgsl +39 -0
- package/src/shaders/trail-inputs.wgsl +45 -0
- package/src/shaders/trail.wgsl +9 -3
package/README.md
CHANGED
|
@@ -24,10 +24,10 @@ const renderer = created.value;
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Create the host before the Renderer and pass `host.feature` at Renderer
|
|
27
|
-
construction. `attachWorld` installs the
|
|
28
|
-
FixedUpdate producer. `detachWorld` removes both the
|
|
29
|
-
resource. Material and mesh GUIDs resolve through the
|
|
30
|
-
`AssetRegistry`.
|
|
27
|
+
construction. `attachWorld` installs the versioned Pack loader (including the
|
|
28
|
+
Program v3 path) and one FixedUpdate producer. `detachWorld` removes both the
|
|
29
|
+
system and runtime resource. Material and mesh GUIDs resolve through the
|
|
30
|
+
attached World's `AssetRegistry`.
|
|
31
31
|
|
|
32
32
|
## Frame path
|
|
33
33
|
|
|
@@ -47,8 +47,10 @@ The generic render seam accepts persistent compute programs/buffers/bindings, ex
|
|
|
47
47
|
|:--|:--|:--|
|
|
48
48
|
| Particle state | Emitter instance | Initial clear only |
|
|
49
49
|
| Alive flags, scan scratch, stable indices | Emitter instance | Initial clear only |
|
|
50
|
-
| Indirect commands | Emitter instance |
|
|
50
|
+
| Indirect commands | Emitter instance | None; GPU projection writes geometry fields and compaction owns instance count |
|
|
51
51
|
| Tick uniforms | Bounded ring | One small write per fixed tick |
|
|
52
|
+
| Program v3 Parameters | Emitter instance | One snapshot write per fixed tick when declared |
|
|
53
|
+
| Program v3 Custom | Emitter instance | GPU-persistent; no per-particle CPU mirror |
|
|
52
54
|
| Renderer projection instances | Renderer instance | None after allocation |
|
|
53
55
|
| Mesh geometry/index data | Prepared graphics cache | Initial upload |
|
|
54
56
|
| Ribbon strip resources | Ribbon renderer | Initial allocation; GPU indirect count |
|
|
@@ -56,6 +58,25 @@ The generic render seam accepts persistent compute programs/buffers/bindings, ex
|
|
|
56
58
|
| Beam endpoint resources | Beam renderer | Initial allocation; GPU endpoint projection |
|
|
57
59
|
|
|
58
60
|
There is no steady-state particle readback or CPU particle upload.
|
|
61
|
+
|
|
62
|
+
Material particle inputs use up to four vec4 lanes. The highest selected lane
|
|
63
|
+
determines the input region size; selecting lane 3 alone still reserves four
|
|
64
|
+
lanes. VFX projects the cooked values on GPU and forwards that lane count in the
|
|
65
|
+
graphics program declaration. Render derives the matching multi-stream layout
|
|
66
|
+
and includes its complete stride/attributes in pipeline identity.
|
|
67
|
+
|
|
68
|
+
| Adapter | Core instance bytes | First material-input shader location |
|
|
69
|
+
|:--|--:|--:|
|
|
70
|
+
| Billboard | 124 | 9 |
|
|
71
|
+
| Ribbon / Trail / Beam | 48 | 4 |
|
|
72
|
+
| Mesh | 72 | 10 |
|
|
73
|
+
|
|
74
|
+
Each selected input occupies its declared lane at `coreBytes + lane * 16`;
|
|
75
|
+
instance stride is `coreBytes + (highestLane + 1) * 16`. Missing or stale material
|
|
76
|
+
declarations fail with structured input errors rather than silently substituting
|
|
77
|
+
zero-valued inputs. Four-lane and sparse-lane support is exercised through the
|
|
78
|
+
cooked five-topology Dawn fixture, not only synthetic buffer uploads.
|
|
79
|
+
|
|
59
80
|
Bindings retained by an attached player keep their transitive buffers alive. When a player,
|
|
60
81
|
emitter, or World disappears, untouched GPU resources leave the live cache immediately and their
|
|
61
82
|
buffers are destroyed only after the submitted queue work completes. Renderer recovery and dispose
|
|
@@ -63,13 +84,28 @@ use the same owner path.
|
|
|
63
84
|
|
|
64
85
|
## Rendering
|
|
65
86
|
|
|
66
|
-
- Billboard projection uses camera right/up, particle width/height, and `
|
|
87
|
+
- Billboard projection uses camera right/up, particle width/height, and the v3 `sprite_rotation`; color and HDR material values are packed per renderer on GPU.
|
|
67
88
|
- Mesh renderers consume the explicitly selected `MeshAsset` submesh geometry/index data and one independent projected instance stream per renderer.
|
|
89
|
+
- Program v3 Mesh projection writes world-space center and Quaternion/Scale3 basis
|
|
90
|
+
data. The built-in Mesh adapter supplies geometry inputs to the same Standard
|
|
91
|
+
surface evaluator as scene Mesh. Render owns lighting preparation, topology
|
|
92
|
+
variants, effective material values, Skylight inputs, and Cluster bindings;
|
|
93
|
+
particles do not allocate a second lighting system or scene Mesh/Instance tables.
|
|
94
|
+
Negative/non-uniform scale uses an inverse-transpose normal basis and preserves
|
|
95
|
+
tangent handedness. Mesh `castShadows` contributes the same GPU instance/index/
|
|
96
|
+
indirect data to Standard light views through a `shadow-caster` plan pass.
|
|
97
|
+
The shared Dawn/WebGPU acceptance fixture proves directional/point/spot casting,
|
|
98
|
+
camera-culled casters, Point receiving and authored bias, and four roughness/
|
|
99
|
+
metallic combinations against ordinary Mesh under a real HDR equirect.
|
|
100
|
+
Current-depth-dependent simulation executes after opaque depth; early shadows
|
|
101
|
+
consume the last submitted projection. Render-only frames retain it without
|
|
102
|
+
advancing simulation, and a catch-up submission exposes only its final tick to
|
|
103
|
+
the following frame. The indirect buffer is never reinitialized per tick.
|
|
68
104
|
- Multiple renderers on one emitter receive independent material values and indirect command offsets.
|
|
69
105
|
- A material pass named `particle-billboard` or `particle-mesh` selects that renderer's authored
|
|
70
|
-
shader module and render state.
|
|
71
|
-
|
|
72
|
-
|
|
106
|
+
shader module and render state. Without a matching particle pass, the package-owned
|
|
107
|
+
built-in shader supplies the particle vertex adapter. Mesh preserves the ordinary
|
|
108
|
+
`Forward` material render state; the other renderers use their particle defaults.
|
|
73
109
|
- A custom particle material with a non-empty `parameters` schema receives the standard material
|
|
74
110
|
bind group at group 1. Numeric parameters are uploaded through the shader-schema UBO layout;
|
|
75
111
|
texture parameters resolve their authored TextureAsset and optional SamplerAsset through the
|
|
@@ -80,7 +116,8 @@ use the same owner path.
|
|
|
80
116
|
remains owned by the shared GPU resource store.
|
|
81
117
|
- Billboard blend is explicit: `additive`, premultiplied `alpha`, or `opaque-cutout`.
|
|
82
118
|
- Scene color/depth target formats and sample counts derive from RenderFeature targets.
|
|
83
|
-
- Fixed bounds
|
|
119
|
+
- Fixed bounds suppress the main-camera raster when culled, not an enabled Mesh
|
|
120
|
+
shadow contribution. Simulation follows the source culling policy.
|
|
84
121
|
- Camera-frustum results publish through `setEmitterCameraVisibility`; session mute/isolate is a separate mask that suppresses compute and draw contribution while retaining prepared bindings as warm state. A paused player can therefore be isolated and restored without a new simulation intent or GPU-resource reallocation.
|
|
85
122
|
- WGSL runtime time is the effect-relative `phaseTick`; the world-global tick remains an internal ring-selection and correlation clock. Replay and deterministic seek therefore restart shader time as well as CPU scheduling.
|
|
86
123
|
|
|
@@ -118,6 +155,14 @@ reattach, or player destruction therefore returns a structured
|
|
|
118
155
|
lease after any host generation change. These controls are transient runtime
|
|
119
156
|
intent and do not modify authored `ParticleEffectPlayer` data.
|
|
120
157
|
|
|
158
|
+
The same generation-bound lease exposes `patchPlayerParameters` and
|
|
159
|
+
`submitChannel` for the bounded runtime control surface. Parameter patches
|
|
160
|
+
return the host generation, parameter generation, and pending patch count;
|
|
161
|
+
channel submissions retain the existing typed channel/event/sub-emitter path.
|
|
162
|
+
Missing players, invalid instance input, stale generations, and detached
|
|
163
|
+
worlds all return the closed `VfxRuntimeHostControlError` union. There is no
|
|
164
|
+
open Data Interface or second channel registry.
|
|
165
|
+
|
|
121
166
|
`createVfxRenderInspectSnapshot` and `topologyRecoveryHint` expose structured
|
|
122
167
|
readiness and recovery evidence. Device loss or a stale generation discards the
|
|
123
168
|
affected topology resources and rebuilds them from cooked reflection.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persistent-ticks.integration.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/persistent-ticks.integration.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { VfxGpuEmitterProgramAny, VfxGpuTickIntent } from '@forgeax/engine-vfx';
|
|
2
2
|
export declare const VFX_EVENT_INPUT_BYTES = 32;
|
|
3
3
|
export declare const VFX_EVENT_BYTES = 32;
|
|
4
4
|
export declare const VFX_EVENT_COUNTER_BYTES = 16;
|
|
5
|
-
export declare function eventInputCapacity(emitter:
|
|
6
|
-
export declare function eventCapacity(emitter:
|
|
5
|
+
export declare function eventInputCapacity(emitter: VfxGpuEmitterProgramAny): number;
|
|
6
|
+
export declare function eventCapacity(emitter: VfxGpuEmitterProgramAny): number;
|
|
7
7
|
export declare function encodeEventInputs(intent: VfxGpuTickIntent): Uint8Array;
|
|
8
|
+
/**
|
|
9
|
+
* Pack the fixed-tick inputs and GPU-produced events into one typed storage
|
|
10
|
+
* resource. The managed event kernel uses the reflected input capacity as the
|
|
11
|
+
* split point; this keeps channel/sub-emitter semantics while leaving one
|
|
12
|
+
* storage binding available for Custom-enabled emitters.
|
|
13
|
+
*/
|
|
14
|
+
export declare function encodeEventBuffer(intent: VfxGpuTickIntent): Uint8Array;
|
|
8
15
|
export declare function eventCounterData(): Uint8Array;
|
|
9
16
|
//# sourceMappingURL=event-resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-resources.d.ts","sourceRoot":"","sources":["../../src/feature/event-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"event-resources.d.ts","sourceRoot":"","sources":["../../src/feature/event-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAErF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAW1C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAK3E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAMtE;AAWD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,CAkBtE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,CAMtE;AAED,wBAAgB,gBAAgB,IAAI,UAAU,CAE7C"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { EntityHandle, World } from '@forgeax/engine-ecs';
|
|
2
2
|
import type { RenderFeature } from '@forgeax/engine-render';
|
|
3
3
|
import { type MaterialAsset, type MeshAsset } from '@forgeax/engine-types';
|
|
4
|
-
import type {
|
|
5
|
-
import { type VfxGpuRuntime, type VfxGpuTickIntent } from '@forgeax/engine-vfx';
|
|
4
|
+
import type { ParticleRendererSourceV3 } from '@forgeax/engine-vfx';
|
|
5
|
+
import { type VfxGpuEmitterSource, type VfxGpuRuntime, type VfxGpuTickIntent } from '@forgeax/engine-vfx';
|
|
6
6
|
import type { VfxDataInterfaceRegistry } from '../host/data-interface-providers.js';
|
|
7
7
|
import type { ParticleRenderCamera } from './camera.js';
|
|
8
8
|
import type { VfxStagePlanObservation } from './stage-plan.js';
|
|
9
|
-
type ParticleRendererKind =
|
|
10
|
-
type ParticleTopologyRenderer = Extract<
|
|
9
|
+
type ParticleRendererKind = ParticleRendererSourceV3['kind'];
|
|
10
|
+
type ParticleTopologyRenderer = Extract<ParticleRendererSourceV3, {
|
|
11
11
|
readonly capacity: number;
|
|
12
12
|
}>;
|
|
13
13
|
type ParticleTopologyKind = ParticleTopologyRenderer['kind'];
|
|
@@ -44,7 +44,7 @@ export interface BillboardAdvancedSample {
|
|
|
44
44
|
readonly sceneDepth: number;
|
|
45
45
|
readonly depthAvailable: boolean;
|
|
46
46
|
}
|
|
47
|
-
export declare function resolveBillboardAdvancedState(renderer: Extract<
|
|
47
|
+
export declare function resolveBillboardAdvancedState(renderer: Extract<ParticleRendererSourceV3, {
|
|
48
48
|
readonly kind: 'billboard';
|
|
49
49
|
}>, sample: BillboardAdvancedSample): import("@forgeax/engine-types").ResultErr<{
|
|
50
50
|
code: "vfx-renderer-depth-missing";
|
|
@@ -80,6 +80,19 @@ interface ExtractedWorld {
|
|
|
80
80
|
readonly runtime: VfxGpuRuntime;
|
|
81
81
|
readonly camera: ParticleRenderCamera;
|
|
82
82
|
readonly intents: readonly VfxGpuTickIntent[];
|
|
83
|
+
/**
|
|
84
|
+
* Last submitted emitter state kept drawable between fixed ticks. The
|
|
85
|
+
* queue above is simulation work only; renderHz is allowed to exceed
|
|
86
|
+
* fixedHz, and a live emitter must keep its projection/raster lease warm.
|
|
87
|
+
*/
|
|
88
|
+
readonly retained: readonly RetainedEmitter[];
|
|
89
|
+
}
|
|
90
|
+
interface RetainedEmitter {
|
|
91
|
+
readonly player: VfxGpuEmitterSource['player'];
|
|
92
|
+
readonly emitter: VfxGpuEmitterSource['emitter'];
|
|
93
|
+
readonly intent: VfxGpuTickIntent;
|
|
94
|
+
readonly localToWorld: Float32Array;
|
|
95
|
+
readonly visible: boolean;
|
|
83
96
|
}
|
|
84
97
|
interface ExtractedFrame {
|
|
85
98
|
readonly worlds: readonly ExtractedWorld[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpu-particle-feature.d.ts","sourceRoot":"","sources":["../../src/feature/gpu-particle-feature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"gpu-particle-feature.d.ts","sourceRoot":"","sources":["../../src/feature/gpu-particle-feature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EACV,aAAa,EAGd,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAO,KAAK,aAAa,EAAE,KAAK,SAAS,EAAM,MAAM,uBAAuB,CAAC;AACpF,OAAO,KAAK,EACV,wBAAwB,EAGzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,qBAAqB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AAS,GAAG,SAAS,CAAA;KAAE,CAAC;IAC5E,QAAQ,CAAC,iBAAiB,CAAC,EAAE;QAC3B,QAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC;KACrE,CAAC;CACH;AAED,UAAU,cAAc;IACtB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;CAC/C;AAED,UAAU,eAAe;IACvB,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACjD,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,UAAU,cAAc;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAqQD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,yBAAyB,GACjC,aAAa,CAAC,cAAc,CAAC,CAmoC/B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RenderFeatureMaterialShaderBindingContract } from '@forgeax/engine-render';
|
|
2
|
-
import { type MaterialAsset, type MaterialRenderState, type MeshAsset, type Result } from '@forgeax/engine-types';
|
|
3
|
-
import type {
|
|
4
|
-
type ParticleRendererKind =
|
|
5
|
-
type ParticleTopologyRenderer = Extract<
|
|
2
|
+
import { type MaterialAsset, type MaterialParticleInput, type MaterialRenderState, type MeshAsset, type Result } from '@forgeax/engine-types';
|
|
3
|
+
import type { ParticleRendererSourceV3 } from '@forgeax/engine-vfx';
|
|
4
|
+
type ParticleRendererKind = ParticleRendererSourceV3['kind'];
|
|
5
|
+
type ParticleTopologyRenderer = Extract<ParticleRendererSourceV3, {
|
|
6
6
|
readonly capacity: number;
|
|
7
7
|
}>;
|
|
8
8
|
type ParticleTopologyKind = ParticleTopologyRenderer['kind'];
|
|
@@ -13,6 +13,14 @@ export declare const PARTICLE_SHADER_IDENTIFIERS: Readonly<{
|
|
|
13
13
|
trail: "forgeax::vfx-render.particles.trail";
|
|
14
14
|
beam: "forgeax::vfx-render.particles.beam";
|
|
15
15
|
}>;
|
|
16
|
+
/** Built-in shader variants with one explicit vec4 material-input lane block. */
|
|
17
|
+
export declare const PARTICLE_INPUT_SHADER_IDENTIFIERS: Readonly<{
|
|
18
|
+
billboard: "forgeax::vfx-render.particles.billboard-inputs";
|
|
19
|
+
mesh: "forgeax::vfx-render.particles.mesh-inputs";
|
|
20
|
+
ribbon: "forgeax::vfx-render.particles.ribbon-inputs";
|
|
21
|
+
trail: "forgeax::vfx-render.particles.trail-inputs";
|
|
22
|
+
beam: "forgeax::vfx-render.particles.beam-inputs";
|
|
23
|
+
}>;
|
|
16
24
|
export interface TopologyResourcePlan {
|
|
17
25
|
readonly topology: ParticleTopologyKind;
|
|
18
26
|
readonly capacity: number;
|
|
@@ -50,7 +58,7 @@ export interface ParticleMaterialPass {
|
|
|
50
58
|
readonly shader: string;
|
|
51
59
|
readonly renderState?: MaterialRenderState;
|
|
52
60
|
}
|
|
53
|
-
type ParticleBlendMode = Extract<
|
|
61
|
+
type ParticleBlendMode = Extract<ParticleRendererSourceV3, {
|
|
54
62
|
readonly kind: 'billboard';
|
|
55
63
|
}>['blend'];
|
|
56
64
|
/**
|
|
@@ -59,7 +67,35 @@ type ParticleBlendMode = Extract<ParticleRendererSource, {
|
|
|
59
67
|
* different contract, so silently accepting it would compile the wrong input
|
|
60
68
|
* shape and make authored particle shaders appear to work while never running.
|
|
61
69
|
*/
|
|
62
|
-
export declare function particleMaterialPass(kind: ParticleRendererKind, material: MaterialAsset | undefined): ParticleMaterialPass;
|
|
70
|
+
export declare function particleMaterialPass(kind: ParticleRendererKind, material: MaterialAsset | undefined, hasParticleInputs?: boolean): ParticleMaterialPass;
|
|
71
|
+
export interface PreparedParticleMaterialInputs {
|
|
72
|
+
/** The exact declarations requested by this renderer, in authored order. */
|
|
73
|
+
readonly definitions: readonly MaterialParticleInput[];
|
|
74
|
+
/** Number of vec4 lanes reserved in the per-particle instance stream. */
|
|
75
|
+
readonly lanes: number;
|
|
76
|
+
/** Byte width of the per-particle input projection. */
|
|
77
|
+
readonly stride: number;
|
|
78
|
+
}
|
|
79
|
+
export interface ParticleMaterialInputPreparationError {
|
|
80
|
+
readonly code: 'vfx-material-input-missing' | 'vfx-material-input-wrong-type' | 'vfx-material-input-stale' | 'vfx-material-input-duplicate';
|
|
81
|
+
readonly expected: string;
|
|
82
|
+
readonly hint: string;
|
|
83
|
+
readonly detail: {
|
|
84
|
+
readonly material?: string;
|
|
85
|
+
readonly name?: string;
|
|
86
|
+
readonly lane?: number;
|
|
87
|
+
readonly path?: string;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Validate and prepare the material-side particle-input bridge.
|
|
92
|
+
*
|
|
93
|
+
* The returned stride is added to the renderer-owned GPU instance stream; no
|
|
94
|
+
* CPU mirror or per-frame upload is created. Reflection is required when the
|
|
95
|
+
* renderer came from a cooked effect so an old material/program pair cannot
|
|
96
|
+
* silently bind a different input layout.
|
|
97
|
+
*/
|
|
98
|
+
export declare function prepareParticleMaterialInputs(renderer: ParticleRendererSourceV3, material: MaterialAsset | undefined, reflected?: readonly MaterialParticleInput[]): Result<PreparedParticleMaterialInputs, ParticleMaterialInputPreparationError>;
|
|
63
99
|
/**
|
|
64
100
|
* Resolve the default pipeline state for a particle renderer.
|
|
65
101
|
*
|
|
@@ -84,5 +120,6 @@ export declare function particleMaterialUsesBindings(material: MaterialAsset | u
|
|
|
84
120
|
*/
|
|
85
121
|
export declare function particleMaterialSceneDepthBinding(contract: RenderFeatureMaterialShaderBindingContract | undefined): 0 | 1 | undefined;
|
|
86
122
|
export declare function canonicalMeshVertices(mesh: MeshAsset): Float32Array;
|
|
123
|
+
export declare function canonicalMeshVerticesCached(mesh: MeshAsset): Float32Array;
|
|
87
124
|
export {};
|
|
88
125
|
//# sourceMappingURL=particle-resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"particle-resources.d.ts","sourceRoot":"","sources":["../../src/feature/particle-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EAEd,KAAK,MAAM,EACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"particle-resources.d.ts","sourceRoot":"","sources":["../../src/feature/particle-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,SAAS,EAEd,KAAK,MAAM,EACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,KAAK,oBAAoB,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAC7D,KAAK,wBAAwB,GAAG,OAAO,CAAC,wBAAwB,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AACjG,KAAK,oBAAoB,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAE7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AED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,oBAAoB,EAC1B,KAAK,EAAE,iBAAiB,EACxB,QAAQ,EAAE,mBAAmB,GAAG,SAAS,GACxC,mBAAmB,GAAG,SAAS,CAkBjC;AAED,wFAAwF;AACxF,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,aAAa,GAAG,SAAS,GAAG,OAAO,CAEzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,0CAA0C,GAAG,SAAS,GAC/D,CAAC,GAAG,CAAC,GAAG,SAAS,CAKnB;AAQD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS,GAAG,YAAY,CAyBnE;AAUD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,SAAS,GAAG,YAAY,CAOzE"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type Result } from '@forgeax/engine-types';
|
|
2
|
-
import { type VfxDataInterfaceError, type VfxDataInterfaceProvider, type VfxDataInterfaceRequirement, type VfxDataInterfaceResolution } from '@forgeax/engine-vfx';
|
|
2
|
+
import { type VfxDataInterfaceError, type VfxDataInterfaceProvider, type VfxDataInterfaceRequirement, type VfxDataInterfaceResolution, type VfxDataInterfaceResource } from '@forgeax/engine-vfx';
|
|
3
3
|
export type { VfxDataInterfaceProvider } from '@forgeax/engine-vfx';
|
|
4
4
|
export interface VfxDataInterfaceAvailabilitySource {
|
|
5
5
|
readonly available: (generation: number) => boolean;
|
|
6
|
+
readonly sampleCount?: 1 | 4;
|
|
7
|
+
readonly resource?: (generation: number) => VfxDataInterfaceResource['resource'] | undefined;
|
|
6
8
|
}
|
|
7
9
|
export interface VfxDataInterfaceRegistry {
|
|
8
10
|
readonly providers: readonly VfxDataInterfaceProvider[];
|
|
@@ -15,5 +17,6 @@ export interface VfxDataInterfaceRegistry {
|
|
|
15
17
|
}
|
|
16
18
|
export declare function createCameraProvider(source: VfxDataInterfaceAvailabilitySource): VfxDataInterfaceProvider<'camera'>;
|
|
17
19
|
export declare function createSceneDepthProvider(source: VfxDataInterfaceAvailabilitySource): VfxDataInterfaceProvider<'scene-depth'>;
|
|
20
|
+
export declare function createNoiseProvider(source: VfxDataInterfaceAvailabilitySource): VfxDataInterfaceProvider<'noise'>;
|
|
18
21
|
export declare function createVfxDataInterfaceRegistry(initialProviders?: readonly VfxDataInterfaceProvider[]): VfxDataInterfaceRegistry;
|
|
19
22
|
//# sourceMappingURL=data-interface-providers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-interface-providers.d.ts","sourceRoot":"","sources":["../../src/host/data-interface-providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAEL,KAAK,qBAAqB,EAE1B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,
|
|
1
|
+
{"version":3,"file":"data-interface-providers.d.ts","sourceRoot":"","sources":["../../src/host/data-interface-providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAEL,KAAK,qBAAqB,EAE1B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAE9B,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IACpD,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,wBAAwB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;CAC9F;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACxD,QAAQ,CAAC,QAAQ,EACb;QACE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,0BAA0B,EAAE,qBAAqB,CAAC,CAAC;KAC5E,GACD,SAAS,CAAC;IACd,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IAClF,OAAO,CACL,YAAY,EAAE,SAAS,2BAA2B,EAAE,EACpD,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,0BAA0B,EAAE,qBAAqB,CAAC,CAAC;CAC9D;AAqDD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kCAAkC,GACzC,wBAAwB,CAAC,QAAQ,CAAC,CAEpC;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,kCAAkC,GACzC,wBAAwB,CAAC,aAAa,CAAC,CAEzC;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,kCAAkC,GACzC,wBAAwB,CAAC,OAAO,CAAC,CAEnC;AAED,wBAAgB,8BAA8B,CAC5C,gBAAgB,GAAE,SAAS,wBAAwB,EAAO,GACzD,wBAAwB,CA+B1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AssetRegistry as LegacyAssetRegistry, RuntimeAssetRegistry } from '@forgeax/engine-assets-runtime';
|
|
2
2
|
import { type EntityHandle, type World } from '@forgeax/engine-ecs';
|
|
3
3
|
import type { Asset, AssetDecoderLease, Result } from '@forgeax/engine-types';
|
|
4
|
-
import type { VfxDataInterfaceError, VfxDataInterfaceProvider, VfxDataInterfaceRequirement, VfxDataInterfaceResolution, VfxGpuPlayerInspectSnapshot, VfxGpuRuntimeDiagnostic, VfxReplayInput, VfxValueMap } from '@forgeax/engine-vfx';
|
|
4
|
+
import type { VfxChannelInput, VfxDataInterfaceError, VfxDataInterfaceProvider, VfxDataInterfaceRequirement, VfxDataInterfaceResolution, VfxGpuPlayerInspectSnapshot, VfxGpuRuntimeDiagnostic, VfxReplayInput, VfxValueMap } from '@forgeax/engine-vfx';
|
|
5
5
|
import type { ParticleRenderCameraSource } from '../feature/camera.js';
|
|
6
6
|
import { gpuParticleRenderFeature } from '../feature/gpu-particle-feature.js';
|
|
7
7
|
import { type VfxDataInterfaceRegistry } from './data-interface-providers.js';
|
|
@@ -34,13 +34,14 @@ export interface VfxRuntimeHostError {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
export interface VfxRuntimeHostControlError {
|
|
37
|
-
readonly code: 'vfx-host-control-world-detached' | 'vfx-host-control-stale-generation' | 'vfx-host-control-runtime-unavailable' | 'vfx-host-control-player-unavailable';
|
|
37
|
+
readonly code: 'vfx-host-control-world-detached' | 'vfx-host-control-stale-generation' | 'vfx-host-control-runtime-unavailable' | 'vfx-host-control-player-unavailable' | 'vfx-host-control-instance-rejected';
|
|
38
38
|
readonly expected: string;
|
|
39
39
|
readonly hint: string;
|
|
40
40
|
readonly detail: {
|
|
41
41
|
readonly requestedGeneration?: number;
|
|
42
42
|
readonly currentGeneration?: number;
|
|
43
43
|
readonly player?: EntityHandle;
|
|
44
|
+
readonly causeCode?: string;
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
47
|
export interface VfxRuntimeHostControl {
|
|
@@ -67,6 +68,24 @@ export interface VfxRuntimeHostControl {
|
|
|
67
68
|
readonly state: 'enabled' | 'paused';
|
|
68
69
|
readonly generation: number;
|
|
69
70
|
}, VfxRuntimeHostControlError>;
|
|
71
|
+
patchPlayerParameters(input: {
|
|
72
|
+
readonly player: EntityHandle;
|
|
73
|
+
readonly values: Partial<VfxValueMap>;
|
|
74
|
+
}): Result<{
|
|
75
|
+
readonly state: 'queued';
|
|
76
|
+
readonly generation: number;
|
|
77
|
+
readonly parameterGeneration: number;
|
|
78
|
+
readonly pendingPatchCount: number;
|
|
79
|
+
}, VfxRuntimeHostControlError>;
|
|
80
|
+
submitChannel(input: {
|
|
81
|
+
readonly player: EntityHandle;
|
|
82
|
+
readonly channel: string;
|
|
83
|
+
readonly payload: VfxChannelInput['payload'];
|
|
84
|
+
readonly sequence: number;
|
|
85
|
+
}): Result<{
|
|
86
|
+
readonly state: 'queued';
|
|
87
|
+
readonly generation: number;
|
|
88
|
+
}, VfxRuntimeHostControlError>;
|
|
70
89
|
}
|
|
71
90
|
export interface VfxRuntimeHost {
|
|
72
91
|
readonly feature: ReturnType<typeof gpuParticleRenderFeature>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vfx-runtime-host.d.ts","sourceRoot":"","sources":["../../src/host/vfx-runtime-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,IAAI,mBAAmB,EACpC,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAsB,KAAK,YAAY,EAAE,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,KAAK,EACV,KAAK,EACL,iBAAiB,EAGjB,MAAM,EACP,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"vfx-runtime-host.d.ts","sourceRoot":"","sources":["../../src/host/vfx-runtime-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,IAAI,mBAAmB,EACpC,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAsB,KAAK,YAAY,EAAE,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,KAAK,EACV,KAAK,EACL,iBAAiB,EAGjB,MAAM,EACP,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAEV,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EACvB,cAAc,EACd,WAAW,EACZ,MAAM,qBAA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,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,GAAG,MAAM,CAAC,0BAA0B,EAAE,qBAAqB,CAAC,CAAC;IAC9D,WAAW,CAAC,KAAK,EAAE;QACjB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;QACtB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;KAChC,GAAG,OAAO,CAAC,MAAM,CAAC;QAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,kBAAkB,CAAA;KAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAC9F,WAAW,CAAC,KAAK,EAAE;QACjB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;KACvB,GAAG,OAAO,CAAC,MAAM,CAAC;QAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,cAAc,CAAA;KAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC;CAC3F;AAED,4DAA4D;AAC5D,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,iBAAiB,CAE1F;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,6EAA6E;IAC7E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,SAAS,2BAA2B,EAAE,CAAC;IACzD,QAAQ,CAAC,WAAW,EAAE,SAAS,uBAAuB,EAAE,CAAC;CAC1D;AAsBD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,cAAc,CAsVnF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export type { ParticleRenderCamera, ParticleRenderCameraSource } from './feature/camera.js';
|
|
2
|
-
export { encodeEventInputs, eventCapacity, eventCounterData, eventInputCapacity, VFX_EVENT_BYTES, VFX_EVENT_COUNTER_BYTES, VFX_EVENT_INPUT_BYTES, } from './feature/event-resources.js';
|
|
2
|
+
export { encodeEventBuffer, encodeEventInputs, eventCapacity, eventCounterData, eventInputCapacity, VFX_EVENT_BYTES, VFX_EVENT_COUNTER_BYTES, VFX_EVENT_INPUT_BYTES, } from './feature/event-resources.js';
|
|
3
3
|
export { createVfxRenderInspectSnapshot, gpuParticleRenderFeature, resolveBillboardAdvancedState, topologyRecoveryHint, } from './feature/gpu-particle-feature.js';
|
|
4
|
-
export {
|
|
4
|
+
export type { ParticleMaterialInputPreparationError, PreparedParticleMaterialInputs, } from './feature/particle-resources.js';
|
|
5
|
+
export { createTopologyResourcePlan, PARTICLE_INPUT_SHADER_IDENTIFIERS, PARTICLE_SHADER_IDENTIFIERS, prepareParticleMaterialInputs, topologyCapacitySnapshot, } from './feature/particle-resources.js';
|
|
5
6
|
export type { VfxStagePlanError, VfxStagePlanObservation, VfxStageReadiness, VfxStageRecovery, VfxValidatedStage, VfxValidatedStagePlan, } from './feature/stage-plan.js';
|
|
6
7
|
export { observeStagePlan, stageDispatches, stageRecoveryReadiness, validatedStagePlan, } from './feature/stage-plan.js';
|
|
7
8
|
export type { VfxDataInterfaceAvailabilitySource, VfxDataInterfaceProvider, VfxDataInterfaceRegistry, } from './host/data-interface-providers.js';
|
|
8
|
-
export { createCameraProvider, createSceneDepthProvider, createVfxDataInterfaceRegistry, } from './host/data-interface-providers.js';
|
|
9
|
+
export { createCameraProvider, createNoiseProvider, createSceneDepthProvider, createVfxDataInterfaceRegistry, } from './host/data-interface-providers.js';
|
|
9
10
|
export type { VfxAuthoringAssetRegistry, VfxRuntimeHost, VfxRuntimeHostControl, VfxRuntimeHostControlError, VfxRuntimeHostError, VfxRuntimeHostInspectSnapshot, VfxRuntimeHostOptions, } from './host/vfx-runtime-host.js';
|
|
10
11
|
export { createVfxRuntimeHost, installVfxRuntimeDecoder } from './host/vfx-runtime-host.js';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,kCAAkC,EAClC,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,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