@aardworx/wombat.rendering 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/bufferView.d.ts +74 -12
- package/dist/core/bufferView.d.ts.map +1 -1
- package/dist/core/bufferView.js +187 -9
- package/dist/core/bufferView.js.map +1 -1
- package/dist/core/elementType.d.ts +81 -0
- package/dist/core/elementType.d.ts.map +1 -0
- package/dist/core/elementType.js +151 -0
- package/dist/core/elementType.js.map +1 -0
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/renderObject.d.ts +3 -3
- package/dist/core/renderObject.d.ts.map +1 -1
- package/dist/resources/preparedRenderObject.d.ts +2 -2
- package/dist/resources/preparedRenderObject.d.ts.map +1 -1
- package/dist/resources/preparedRenderObject.js +22 -72
- package/dist/resources/preparedRenderObject.js.map +1 -1
- package/package.json +1 -1
- package/src/core/bufferView.ts +230 -20
- package/src/core/elementType.ts +178 -0
- package/src/core/index.ts +6 -1
- package/src/core/renderObject.ts +3 -3
- package/src/resources/preparedRenderObject.ts +42 -78
|
@@ -1,15 +1,77 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { aval } from "@aardworx/wombat.adaptive";
|
|
2
|
+
import { IBuffer } from "./buffer.js";
|
|
3
|
+
import { ElementType } from "./elementType.js";
|
|
4
|
+
import type { ElementKind } from "./elementType.js";
|
|
2
5
|
export interface BufferView {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
/** Adaptive buffer source — content changes flow through this aval. */
|
|
7
|
+
readonly buffer: aval<IBuffer>;
|
|
8
|
+
/** Element kind (singleton from the `ElementType` namespace). */
|
|
9
|
+
readonly elementType: ElementType;
|
|
10
|
+
/** Byte offset into `buffer` where the view starts. Default 0. */
|
|
11
|
+
readonly offset?: number;
|
|
12
|
+
/** Stride between consecutive elements in bytes. 0 = tight (= `elementType.byteSize`). */
|
|
13
|
+
readonly stride?: number;
|
|
14
|
+
/** Integer attributes treated as normalized fixed-point floats. Default false. */
|
|
15
|
+
readonly normalized?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Present iff this view was constructed from a single adaptive
|
|
18
|
+
* value (see `BufferView.ofValue`). Lets the backend lower the
|
|
19
|
+
* binding to a uniform instead of a per-vertex/per-instance
|
|
20
|
+
* attribute.
|
|
21
|
+
*/
|
|
22
|
+
readonly singleValue?: aval<unknown>;
|
|
14
23
|
}
|
|
24
|
+
interface OfArrayOptions {
|
|
25
|
+
readonly elementType?: ElementType;
|
|
26
|
+
readonly offset?: number;
|
|
27
|
+
readonly stride?: number;
|
|
28
|
+
readonly normalized?: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface OfBufferOptions {
|
|
31
|
+
readonly offset?: number;
|
|
32
|
+
readonly stride?: number;
|
|
33
|
+
readonly normalized?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare const BufferView: {
|
|
36
|
+
/**
|
|
37
|
+
* Build a view from a wombat.base packed array (`V3fArray`,
|
|
38
|
+
* `Uint16Array`, …) or an `aval<…>` of one. The element kind is
|
|
39
|
+
* inferred from the array's constructor identity; pass it
|
|
40
|
+
* explicitly via `opts.elementType` for unusual cases (e.g. a
|
|
41
|
+
* `Float32Array` interpreted as packed `V4f` with `ElementType.V4f`).
|
|
42
|
+
*/
|
|
43
|
+
readonly ofArray: <T>(a: aval<T> | T, opts?: OfArrayOptions) => BufferView;
|
|
44
|
+
/**
|
|
45
|
+
* Build a view that broadcasts a single adaptive value to every
|
|
46
|
+
* vertex / instance. The runtime detects the `singleValue` field
|
|
47
|
+
* and lowers it to a uniform binding instead of a per-element
|
|
48
|
+
* attribute. The `buffer` aval still carries packed bytes for
|
|
49
|
+
* backends that don't recognize the fast path.
|
|
50
|
+
*
|
|
51
|
+
* The `T` parameter on `ElementKind<T>` flows through to the
|
|
52
|
+
* value type — passing `ElementType.V4f` requires `T = V4f` here.
|
|
53
|
+
*/
|
|
54
|
+
readonly ofValue: <T>(v: aval<T> | T, elementType: ElementKind<T>) => BufferView;
|
|
55
|
+
/**
|
|
56
|
+
* Build a view backed by a user-supplied `GPUBuffer`. The
|
|
57
|
+
* runtime binds it directly without an upload step.
|
|
58
|
+
*/
|
|
59
|
+
readonly ofGPU: (buffer: aval<GPUBuffer> | GPUBuffer, elementType: ElementType, opts?: OfBufferOptions) => BufferView;
|
|
60
|
+
/**
|
|
61
|
+
* Wrap an already-built `aval<IBuffer>` with explicit element
|
|
62
|
+
* kind. Used by callers that compute their own `IBuffer` (e.g.
|
|
63
|
+
* compositing multiple attributes into one packed buffer).
|
|
64
|
+
*/
|
|
65
|
+
readonly ofBuffer: (buffer: aval<IBuffer>, elementType: ElementType, opts?: OfBufferOptions) => BufferView;
|
|
66
|
+
/** Byte offset, defaulting to 0. */
|
|
67
|
+
readonly offsetOf: (v: BufferView) => number;
|
|
68
|
+
/**
|
|
69
|
+
* Stride in bytes — `v.stride` if set and non-zero, otherwise
|
|
70
|
+
* tight from `elementType.byteSize`.
|
|
71
|
+
*/
|
|
72
|
+
readonly strideOf: (v: BufferView) => number;
|
|
73
|
+
/** Whether this view is a single-value broadcast. */
|
|
74
|
+
readonly isSingleValue: (v: BufferView) => boolean;
|
|
75
|
+
};
|
|
76
|
+
export {};
|
|
15
77
|
//# sourceMappingURL=bufferView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bufferView.d.ts","sourceRoot":"","sources":["../../src/core/bufferView.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bufferView.d.ts","sourceRoot":"","sources":["../../src/core/bufferView.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO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GG;6BAEO,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,eACtB,WAAW,SAClB,eAAe,KACpB,UAAU;IAYb;;;;OAIG;gCAEO,IAAI,CAAC,OAAO,CAAC,eACR,WAAW,SAClB,eAAe,KACpB,UAAU;IAYb,oCAAoC;2BACxB,UAAU,KAAG,MAAM;IAC/B;;;OAGG;2BACS,UAAU,KAAG,MAAM;IAK/B,qDAAqD;gCACpC,UAAU,KAAG,OAAO;CAG7B,CAAC"}
|
package/dist/core/bufferView.js
CHANGED
|
@@ -1,12 +1,190 @@
|
|
|
1
1
|
// BufferView — a typed slice of an `IBuffer` used as a vertex
|
|
2
|
-
// attribute, instance attribute, or index source.
|
|
3
|
-
//
|
|
4
|
-
// runtime handles upload transparently.
|
|
2
|
+
// attribute, instance attribute, or index source. Mirrors
|
|
3
|
+
// Aardvark.Rendering's `BufferView`:
|
|
5
4
|
//
|
|
6
|
-
// `
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
// `
|
|
10
|
-
//
|
|
11
|
-
|
|
5
|
+
// - `buffer` is `aval<IBuffer>` so per-frame content changes flow
|
|
6
|
+
// through normal aval marking without reshaping the view.
|
|
7
|
+
// - `elementType` is a singleton token from the `ElementType`
|
|
8
|
+
// namespace (e.g. `ElementType.V3f`, `ElementType.U16`); the
|
|
9
|
+
// backend reads `byteSize` / `vertexFormat` / `indexFormat`
|
|
10
|
+
// directly off it.
|
|
11
|
+
// - `singleValue` is set when the view was constructed from a
|
|
12
|
+
// single adaptive value broadcast to all instances/vertices —
|
|
13
|
+
// the runtime can lower it to a uniform binding instead of a
|
|
14
|
+
// per-vertex/per-instance attribute.
|
|
15
|
+
//
|
|
16
|
+
// The view itself is plain (not wrapped in `aval`). Structural
|
|
17
|
+
// fields are eager so the binding plan / pipeline layout can be
|
|
18
|
+
// computed without forcing.
|
|
19
|
+
import { AVal } from "@aardworx/wombat.adaptive";
|
|
20
|
+
import { IBuffer } from "./buffer.js";
|
|
21
|
+
import { ElementType } from "./elementType.js";
|
|
22
|
+
function isAval(v) {
|
|
23
|
+
return typeof v === "object" && v !== null
|
|
24
|
+
&& typeof v.getValue === "function";
|
|
25
|
+
}
|
|
26
|
+
function arrayToHostBytes(arr) {
|
|
27
|
+
// wombat.base packed array types expose `.buffer: ArrayBuffer`.
|
|
28
|
+
const a = arr;
|
|
29
|
+
if (a.buffer instanceof ArrayBuffer)
|
|
30
|
+
return a.buffer;
|
|
31
|
+
// Native TypedArray.
|
|
32
|
+
if (ArrayBuffer.isView(arr))
|
|
33
|
+
return arr;
|
|
34
|
+
throw new Error("BufferView.ofArray: unsupported array source");
|
|
35
|
+
}
|
|
36
|
+
export const BufferView = {
|
|
37
|
+
/**
|
|
38
|
+
* Build a view from a wombat.base packed array (`V3fArray`,
|
|
39
|
+
* `Uint16Array`, …) or an `aval<…>` of one. The element kind is
|
|
40
|
+
* inferred from the array's constructor identity; pass it
|
|
41
|
+
* explicitly via `opts.elementType` for unusual cases (e.g. a
|
|
42
|
+
* `Float32Array` interpreted as packed `V4f` with `ElementType.V4f`).
|
|
43
|
+
*/
|
|
44
|
+
ofArray(a, opts = {}) {
|
|
45
|
+
const adaptive = isAval(a) ? a : AVal.constant(a);
|
|
46
|
+
// One-time element-kind discovery from the source's constructor.
|
|
47
|
+
// Marked allow-force: structural-eager, runs at construction only;
|
|
48
|
+
// per-frame content changes flow through `buffer` without re-running.
|
|
49
|
+
const sample = adaptive.force( /* allow-force */);
|
|
50
|
+
const elementType = opts.elementType ?? ElementType.fromArray(sample);
|
|
51
|
+
const buffer = adaptive.map((arr) => IBuffer.fromHost(arrayToHostBytes(arr)));
|
|
52
|
+
return {
|
|
53
|
+
buffer,
|
|
54
|
+
elementType,
|
|
55
|
+
...(opts.offset !== undefined ? { offset: opts.offset } : {}),
|
|
56
|
+
...(opts.stride !== undefined ? { stride: opts.stride } : {}),
|
|
57
|
+
...(opts.normalized !== undefined ? { normalized: opts.normalized } : {}),
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* Build a view that broadcasts a single adaptive value to every
|
|
62
|
+
* vertex / instance. The runtime detects the `singleValue` field
|
|
63
|
+
* and lowers it to a uniform binding instead of a per-element
|
|
64
|
+
* attribute. The `buffer` aval still carries packed bytes for
|
|
65
|
+
* backends that don't recognize the fast path.
|
|
66
|
+
*
|
|
67
|
+
* The `T` parameter on `ElementKind<T>` flows through to the
|
|
68
|
+
* value type — passing `ElementType.V4f` requires `T = V4f` here.
|
|
69
|
+
*/
|
|
70
|
+
ofValue(v, elementType) {
|
|
71
|
+
const adaptive = isAval(v) ? v : AVal.constant(v);
|
|
72
|
+
const buffer = adaptive.map((value) => {
|
|
73
|
+
const bytes = elementType.byteSize;
|
|
74
|
+
const ab = new ArrayBuffer(bytes);
|
|
75
|
+
packSingle(value, elementType, ab);
|
|
76
|
+
return IBuffer.fromHost(ab);
|
|
77
|
+
});
|
|
78
|
+
return {
|
|
79
|
+
buffer,
|
|
80
|
+
elementType,
|
|
81
|
+
singleValue: adaptive,
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* Build a view backed by a user-supplied `GPUBuffer`. The
|
|
86
|
+
* runtime binds it directly without an upload step.
|
|
87
|
+
*/
|
|
88
|
+
ofGPU(buffer, elementType, opts = {}) {
|
|
89
|
+
const adaptive = isAval(buffer) ? buffer : AVal.constant(buffer);
|
|
90
|
+
const ibuffer = adaptive.map((b) => IBuffer.fromGPU(b));
|
|
91
|
+
return {
|
|
92
|
+
buffer: ibuffer,
|
|
93
|
+
elementType,
|
|
94
|
+
...(opts.offset !== undefined ? { offset: opts.offset } : {}),
|
|
95
|
+
...(opts.stride !== undefined ? { stride: opts.stride } : {}),
|
|
96
|
+
...(opts.normalized !== undefined ? { normalized: opts.normalized } : {}),
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
/**
|
|
100
|
+
* Wrap an already-built `aval<IBuffer>` with explicit element
|
|
101
|
+
* kind. Used by callers that compute their own `IBuffer` (e.g.
|
|
102
|
+
* compositing multiple attributes into one packed buffer).
|
|
103
|
+
*/
|
|
104
|
+
ofBuffer(buffer, elementType, opts = {}) {
|
|
105
|
+
return {
|
|
106
|
+
buffer,
|
|
107
|
+
elementType,
|
|
108
|
+
...(opts.offset !== undefined ? { offset: opts.offset } : {}),
|
|
109
|
+
...(opts.stride !== undefined ? { stride: opts.stride } : {}),
|
|
110
|
+
...(opts.normalized !== undefined ? { normalized: opts.normalized } : {}),
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
// ---------- accessors ----------
|
|
114
|
+
/** Byte offset, defaulting to 0. */
|
|
115
|
+
offsetOf(v) { return v.offset ?? 0; },
|
|
116
|
+
/**
|
|
117
|
+
* Stride in bytes — `v.stride` if set and non-zero, otherwise
|
|
118
|
+
* tight from `elementType.byteSize`.
|
|
119
|
+
*/
|
|
120
|
+
strideOf(v) {
|
|
121
|
+
return v.stride !== undefined && v.stride > 0
|
|
122
|
+
? v.stride
|
|
123
|
+
: v.elementType.byteSize;
|
|
124
|
+
},
|
|
125
|
+
/** Whether this view is a single-value broadcast. */
|
|
126
|
+
isSingleValue(v) {
|
|
127
|
+
return v.singleValue !== undefined;
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
// ---------------------------------------------------------------------------
|
|
131
|
+
// Single-value packing — write one element of `t` into a fresh
|
|
132
|
+
// ArrayBuffer. The runtime usually shortcuts this via `singleValue`
|
|
133
|
+
// (lifted to a uniform); this path runs only for backends that
|
|
134
|
+
// don't recognise the broadcast.
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
function packSingle(value, t, dst) {
|
|
137
|
+
const v = value;
|
|
138
|
+
if (v._data !== undefined) {
|
|
139
|
+
const src = v._data;
|
|
140
|
+
// Match by name on the singleton — concise and minifier-safe
|
|
141
|
+
// since the names are baked at the singleton's construction.
|
|
142
|
+
const name = t.name;
|
|
143
|
+
if (name === "f32"
|
|
144
|
+
|| name.startsWith("v") && name.endsWith("f")
|
|
145
|
+
|| name.startsWith("m") && name.endsWith("f")) {
|
|
146
|
+
const out = new Float32Array(dst);
|
|
147
|
+
for (let i = 0; i < src.length; i++)
|
|
148
|
+
out[i] = src[i];
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (name === "i32" || (name.startsWith("v") && name.endsWith("i"))) {
|
|
152
|
+
const out = new Int32Array(dst);
|
|
153
|
+
for (let i = 0; i < src.length; i++)
|
|
154
|
+
out[i] = src[i];
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (name === "u32" || (name.startsWith("v") && name.endsWith("u"))) {
|
|
158
|
+
const out = new Uint32Array(dst);
|
|
159
|
+
for (let i = 0; i < src.length; i++)
|
|
160
|
+
out[i] = src[i];
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// Scalars and unbranded values.
|
|
165
|
+
switch (t.name) {
|
|
166
|
+
case "f32":
|
|
167
|
+
new Float32Array(dst)[0] = value;
|
|
168
|
+
return;
|
|
169
|
+
case "u32":
|
|
170
|
+
new Uint32Array(dst)[0] = value;
|
|
171
|
+
return;
|
|
172
|
+
case "i32":
|
|
173
|
+
new Int32Array(dst)[0] = value;
|
|
174
|
+
return;
|
|
175
|
+
case "u16":
|
|
176
|
+
new Uint16Array(dst)[0] = value;
|
|
177
|
+
return;
|
|
178
|
+
case "i16":
|
|
179
|
+
new Int16Array(dst)[0] = value;
|
|
180
|
+
return;
|
|
181
|
+
case "u8":
|
|
182
|
+
new Uint8Array(dst)[0] = value;
|
|
183
|
+
return;
|
|
184
|
+
case "i8":
|
|
185
|
+
new Int8Array(dst)[0] = value;
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
throw new Error(`BufferView.ofValue: cannot pack ${typeof value} as ${t.name}`);
|
|
189
|
+
}
|
|
12
190
|
//# sourceMappingURL=bufferView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bufferView.js","sourceRoot":"","sources":["../../src/core/bufferView.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,
|
|
1
|
+
{"version":3,"file":"bufferView.js","sourceRoot":"","sources":["../../src/core/bufferView.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,0DAA0D;AAC1D,qCAAqC;AACrC,EAAE;AACF,oEAAoE;AACpE,8DAA8D;AAC9D,gEAAgE;AAChE,iEAAiE;AACjE,gEAAgE;AAChE,uBAAuB;AACvB,gEAAgE;AAChE,kEAAkE;AAClE,iEAAiE;AACjE,yCAAyC;AACzC,EAAE;AACF,+DAA+D;AAC/D,gEAAgE;AAChE,4BAA4B;AAG5B,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAwC/C,SAAS,MAAM,CAAI,CAAU;IAC3B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI;WACrC,OAAQ,CAA4B,CAAC,QAAQ,KAAK,UAAU,CAAC;AACpE,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAY;IACpC,gEAAgE;IAChE,MAAM,CAAC,GAAG,GAA2B,CAAC;IACtC,IAAI,CAAC,CAAC,MAAM,YAAY,WAAW;QAAE,OAAO,CAAC,CAAC,MAAM,CAAC;IACrD,qBAAqB;IACrB,IAAI,WAAW,CAAC,MAAM,CAAC,GAAsB,CAAC;QAAE,OAAO,GAAsB,CAAC;IAC9E,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;;;;;;OAMG;IACH,OAAO,CACL,CAAc,EACd,OAAuB,EAAE;QAEzB,MAAM,QAAQ,GAAG,MAAM,CAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,C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Y,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAe,CAAC;YAAC,OAAO;QAC/D,KAAK,KAAK;YAAE,IAAI,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAI,KAAe,CAAC;YAAC,OAAO;QAC/D,KAAK,KAAK;YAAE,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAK,KAAe,CAAC;YAAC,OAAO;QAC/D,KAAK,KAAK;YAAE,IAAI,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAI,KAAe,CAAC;YAAC,OAAO;QAC/D,KAAK,KAAK;YAAE,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAK,KAAe,CAAC;YAAC,OAAO;QAC/D,KAAK,IAAI;YAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAK,KAAe,CAAC;YAAC,OAAO;QAC/D,KAAK,IAAI;YAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAM,KAAe,CAAC;YAAC,OAAO;IACjE,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,mCAAmC,OAAO,KAAK,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { V2f, V3f, V4f, M22f, M33f, M44f, V2i, V3i, V4i } from "@aardworx/wombat.base";
|
|
2
|
+
/**
|
|
3
|
+
* Phantom-typed token describing a single element's data type. The
|
|
4
|
+
* `T` parameter is a brand only — it carries the source-side type
|
|
5
|
+
* (V3f, M44f, number, …) into the type system at zero runtime cost.
|
|
6
|
+
*
|
|
7
|
+
* Identity equality is the equality used everywhere in the renderer
|
|
8
|
+
* (group keys, bind plans). All instances are singletons under the
|
|
9
|
+
* `ElementType` namespace below.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ElementKind<T> {
|
|
12
|
+
/** Short human-readable tag (e.g. `"v3f"`, `"u16"`). */
|
|
13
|
+
readonly name: string;
|
|
14
|
+
/** Size of one element in bytes. */
|
|
15
|
+
readonly byteSize: number;
|
|
16
|
+
/** GPUVertexFormat for use as a vertex attribute. `undefined` for matrix and non-vertex types. */
|
|
17
|
+
readonly vertexFormat: GPUVertexFormat | undefined;
|
|
18
|
+
/** GPUIndexFormat when used as an index buffer. `undefined` unless the type is `u16` / `u32`. */
|
|
19
|
+
readonly indexFormat: GPUIndexFormat | undefined;
|
|
20
|
+
constructor(
|
|
21
|
+
/** Short human-readable tag (e.g. `"v3f"`, `"u16"`). */
|
|
22
|
+
name: string,
|
|
23
|
+
/** Size of one element in bytes. */
|
|
24
|
+
byteSize: number,
|
|
25
|
+
/** GPUVertexFormat for use as a vertex attribute. `undefined` for matrix and non-vertex types. */
|
|
26
|
+
vertexFormat: GPUVertexFormat | undefined,
|
|
27
|
+
/** GPUIndexFormat when used as an index buffer. `undefined` unless the type is `u16` / `u32`. */
|
|
28
|
+
indexFormat: GPUIndexFormat | undefined);
|
|
29
|
+
/** Phantom — never read at runtime. Forces TS to track T. */
|
|
30
|
+
readonly _brand: T;
|
|
31
|
+
toString(): string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* `ElementType` doubles as a type alias (the structural shape) and
|
|
35
|
+
* a value namespace (the singleton tokens). `ElementType` in type
|
|
36
|
+
* position is `ElementKind<unknown>`; in value position it's the
|
|
37
|
+
* collection of singletons below.
|
|
38
|
+
*/
|
|
39
|
+
export type ElementType = ElementKind<unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* Construct a vertex view; throws if the kind has no vertex format
|
|
42
|
+
* (matrix / unsupported type).
|
|
43
|
+
*/
|
|
44
|
+
declare function asVertexFormat(t: ElementType): GPUVertexFormat;
|
|
45
|
+
declare function asIndexFormat(t: ElementType): GPUIndexFormat;
|
|
46
|
+
declare function fromArray(arr: unknown): ElementType;
|
|
47
|
+
/**
|
|
48
|
+
* Singleton tokens + helpers. Most call sites use the singleton
|
|
49
|
+
* directly (`ElementType.V3f`); the helpers are kept on the
|
|
50
|
+
* namespace so `import { ElementType }` is the only import you
|
|
51
|
+
* need.
|
|
52
|
+
*/
|
|
53
|
+
export declare const ElementType: {
|
|
54
|
+
readonly V2f: ElementKind<V2f>;
|
|
55
|
+
readonly V3f: ElementKind<V3f>;
|
|
56
|
+
readonly V4f: ElementKind<V4f>;
|
|
57
|
+
readonly M22f: ElementKind<M22f>;
|
|
58
|
+
readonly M33f: ElementKind<M33f>;
|
|
59
|
+
readonly M44f: ElementKind<M44f>;
|
|
60
|
+
readonly V2i: ElementKind<V2i>;
|
|
61
|
+
readonly V3i: ElementKind<V3i>;
|
|
62
|
+
readonly V4i: ElementKind<V4i>;
|
|
63
|
+
readonly V2u: ElementKind<V2i>;
|
|
64
|
+
readonly V3u: ElementKind<V3i>;
|
|
65
|
+
readonly V4u: ElementKind<V4i>;
|
|
66
|
+
readonly F32: ElementKind<number>;
|
|
67
|
+
readonly U32: ElementKind<number>;
|
|
68
|
+
readonly I32: ElementKind<number>;
|
|
69
|
+
readonly U16: ElementKind<number>;
|
|
70
|
+
readonly I16: ElementKind<number>;
|
|
71
|
+
readonly U8: ElementKind<number>;
|
|
72
|
+
readonly I8: ElementKind<number>;
|
|
73
|
+
/** Infer from a wombat.base packed array or a native TypedArray. */
|
|
74
|
+
readonly fromArray: typeof fromArray;
|
|
75
|
+
/** GPUVertexFormat for `t`; throws if `t` has no vertex form. */
|
|
76
|
+
readonly toVertexFormat: typeof asVertexFormat;
|
|
77
|
+
/** GPUIndexFormat for `t`; throws if `t` is not `u16` / `u32`. */
|
|
78
|
+
readonly toIndexFormat: typeof asIndexFormat;
|
|
79
|
+
};
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=elementType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elementType.d.ts","sourceRoot":"","sources":["../../src/core/elementType.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAC/C,MAAM,uBAAuB,CAAC;AAW/B;;;;;;;;GAQG;AACH,qBAAa,WAAW,CAAC,CAAC;IAEtB,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,oCAAoC;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,kGAAkG;IAClG,QAAQ,CAAC,YAAY,EAAE,eAAe,GAAG,SAAS;IAClD,iGAAiG;IACjG,QAAQ,CAAC,WAAW,EAAE,cAAc,GAAG,SAAS;;IAPhD,wDAAwD;IAC/C,IAAI,EAAE,MAAM;IACrB,oCAAoC;IAC3B,QAAQ,EAAE,MAAM;IACzB,kGAAkG;IACzF,YAAY,EAAE,eAAe,GAAG,SAAS;IAClD,iGAAiG;IACxF,WAAW,EAAE,cAAc,GAAG,SAAS;IAGlD,6DAA6D;IAC7D,SAAiB,MAAM,EAAE,CAAC,CAAC;IAE3B,QAAQ,IAAI,MAAM;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;AA0B/C;;;GAGG;AACH,iBAAS,cAAc,CAAC,CAAC,EAAE,WAAW,GAAG,eAAe,CAQvD;AAED,iBAAS,aAAa,CAAC,CAAC,EAAE,WAAW,GAAG,cAAc,CAKrD;AAuBD,iBAAS,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAc5C;AAMD;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;IAatB,oEAAoE;;IAEpE,iEAAiE;;IAEjE,kEAAkE;;CAE1D,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// ElementType — runtime token + structural metadata for the data
|
|
2
|
+
// type of a single element in a `BufferView`. The TypeScript-side
|
|
3
|
+
// equivalent of F#'s `typeof<T>` / `System.Type`: a value (not a
|
|
4
|
+
// string tag) carrying byte size, vertex / index format, and a
|
|
5
|
+
// phantom type parameter that flows through to `BufferView<T>`-
|
|
6
|
+
// generic call sites.
|
|
7
|
+
//
|
|
8
|
+
// All entries are exposed as singleton properties on `ElementType`:
|
|
9
|
+
//
|
|
10
|
+
// ElementType.V3f // ElementKind<V3f>
|
|
11
|
+
// ElementType.U16 // ElementKind<number>
|
|
12
|
+
// ElementType.M44f // ElementKind<M44f>
|
|
13
|
+
//
|
|
14
|
+
// `BufferView.ofArray` infers the kind from the source array's
|
|
15
|
+
// constructor identity (V3fArray → ElementType.V3f, Float32Array →
|
|
16
|
+
// ElementType.F32, etc.) so the explicit second argument is rarely
|
|
17
|
+
// needed.
|
|
18
|
+
import { V2fArray, V3fArray, V4fArray, V2iArray, V3iArray, V4iArray, V2uiArray, V3uiArray, V4uiArray, } from "@aardworx/wombat.base";
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// ElementKind<T>
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
/**
|
|
23
|
+
* Phantom-typed token describing a single element's data type. The
|
|
24
|
+
* `T` parameter is a brand only — it carries the source-side type
|
|
25
|
+
* (V3f, M44f, number, …) into the type system at zero runtime cost.
|
|
26
|
+
*
|
|
27
|
+
* Identity equality is the equality used everywhere in the renderer
|
|
28
|
+
* (group keys, bind plans). All instances are singletons under the
|
|
29
|
+
* `ElementType` namespace below.
|
|
30
|
+
*/
|
|
31
|
+
export class ElementKind {
|
|
32
|
+
name;
|
|
33
|
+
byteSize;
|
|
34
|
+
vertexFormat;
|
|
35
|
+
indexFormat;
|
|
36
|
+
constructor(
|
|
37
|
+
/** Short human-readable tag (e.g. `"v3f"`, `"u16"`). */
|
|
38
|
+
name,
|
|
39
|
+
/** Size of one element in bytes. */
|
|
40
|
+
byteSize,
|
|
41
|
+
/** GPUVertexFormat for use as a vertex attribute. `undefined` for matrix and non-vertex types. */
|
|
42
|
+
vertexFormat,
|
|
43
|
+
/** GPUIndexFormat when used as an index buffer. `undefined` unless the type is `u16` / `u32`. */
|
|
44
|
+
indexFormat) {
|
|
45
|
+
this.name = name;
|
|
46
|
+
this.byteSize = byteSize;
|
|
47
|
+
this.vertexFormat = vertexFormat;
|
|
48
|
+
this.indexFormat = indexFormat;
|
|
49
|
+
}
|
|
50
|
+
toString() { return this.name; }
|
|
51
|
+
}
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
// Singleton tokens
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
const _V2f = new ElementKind("v2f", 8, "float32x2", undefined);
|
|
56
|
+
const _V3f = new ElementKind("v3f", 12, "float32x3", undefined);
|
|
57
|
+
const _V4f = new ElementKind("v4f", 16, "float32x4", undefined);
|
|
58
|
+
const _M22f = new ElementKind("m22f", 16, undefined, undefined);
|
|
59
|
+
const _M33f = new ElementKind("m33f", 36, undefined, undefined);
|
|
60
|
+
const _M44f = new ElementKind("m44f", 64, undefined, undefined);
|
|
61
|
+
const _V2i = new ElementKind("v2i", 8, "sint32x2", undefined);
|
|
62
|
+
const _V3i = new ElementKind("v3i", 12, "sint32x3", undefined);
|
|
63
|
+
const _V4i = new ElementKind("v4i", 16, "sint32x4", undefined);
|
|
64
|
+
const _V2u = new ElementKind("v2u", 8, "uint32x2", undefined);
|
|
65
|
+
const _V3u = new ElementKind("v3u", 12, "uint32x3", undefined);
|
|
66
|
+
const _V4u = new ElementKind("v4u", 16, "uint32x4", undefined);
|
|
67
|
+
const _F32 = new ElementKind("f32", 4, "float32", undefined);
|
|
68
|
+
const _U32 = new ElementKind("u32", 4, "uint32", "uint32");
|
|
69
|
+
const _I32 = new ElementKind("i32", 4, "sint32", undefined);
|
|
70
|
+
const _U16 = new ElementKind("u16", 2, undefined, "uint16");
|
|
71
|
+
const _I16 = new ElementKind("i16", 2, undefined, undefined);
|
|
72
|
+
const _U8 = new ElementKind("u8", 1, undefined, undefined);
|
|
73
|
+
const _I8 = new ElementKind("i8", 1, undefined, undefined);
|
|
74
|
+
/**
|
|
75
|
+
* Construct a vertex view; throws if the kind has no vertex format
|
|
76
|
+
* (matrix / unsupported type).
|
|
77
|
+
*/
|
|
78
|
+
function asVertexFormat(t) {
|
|
79
|
+
if (t.vertexFormat === undefined) {
|
|
80
|
+
throw new Error(`ElementType.${t.name}: no GPUVertexFormat (matrices must be split into column attributes; ` +
|
|
81
|
+
`unsupported types must be repacked first)`);
|
|
82
|
+
}
|
|
83
|
+
return t.vertexFormat;
|
|
84
|
+
}
|
|
85
|
+
function asIndexFormat(t) {
|
|
86
|
+
if (t.indexFormat === undefined) {
|
|
87
|
+
throw new Error(`ElementType.${t.name}: not a valid index type (use ElementType.U16 or ElementType.U32)`);
|
|
88
|
+
}
|
|
89
|
+
return t.indexFormat;
|
|
90
|
+
}
|
|
91
|
+
// ---------------------------------------------------------------------------
|
|
92
|
+
// Constructor → ElementType registry — drives `BufferView.ofArray`
|
|
93
|
+
// auto-inference. Keyed on class identity (V3fArray, Float32Array,
|
|
94
|
+
// …) so it survives minification.
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
const FROM_CTOR = new Map([
|
|
97
|
+
// wombat.base packed arrays
|
|
98
|
+
[V2fArray, _V2f], [V3fArray, _V3f], [V4fArray, _V4f],
|
|
99
|
+
[V2iArray, _V2i], [V3iArray, _V3i], [V4iArray, _V4i],
|
|
100
|
+
[V2uiArray, _V2u], [V3uiArray, _V3u], [V4uiArray, _V4u],
|
|
101
|
+
// native typed arrays (interpreted as scalars)
|
|
102
|
+
[Float32Array, _F32],
|
|
103
|
+
[Uint32Array, _U32],
|
|
104
|
+
[Int32Array, _I32],
|
|
105
|
+
[Uint16Array, _U16],
|
|
106
|
+
[Int16Array, _I16],
|
|
107
|
+
[Uint8Array, _U8],
|
|
108
|
+
[Int8Array, _I8],
|
|
109
|
+
]);
|
|
110
|
+
function fromArray(arr) {
|
|
111
|
+
const ctor = arr.constructor;
|
|
112
|
+
if (ctor === undefined) {
|
|
113
|
+
throw new Error("ElementType.fromArray: input has no constructor");
|
|
114
|
+
}
|
|
115
|
+
const et = FROM_CTOR.get(ctor);
|
|
116
|
+
if (et === undefined) {
|
|
117
|
+
const name = ctor.name ?? "<anonymous>";
|
|
118
|
+
throw new Error(`ElementType.fromArray: cannot infer ElementType from ${name}; ` +
|
|
119
|
+
`pass the kind explicitly (e.g. ElementType.V3f)`);
|
|
120
|
+
}
|
|
121
|
+
return et;
|
|
122
|
+
}
|
|
123
|
+
// ---------------------------------------------------------------------------
|
|
124
|
+
// Public namespace
|
|
125
|
+
// ---------------------------------------------------------------------------
|
|
126
|
+
/**
|
|
127
|
+
* Singleton tokens + helpers. Most call sites use the singleton
|
|
128
|
+
* directly (`ElementType.V3f`); the helpers are kept on the
|
|
129
|
+
* namespace so `import { ElementType }` is the only import you
|
|
130
|
+
* need.
|
|
131
|
+
*/
|
|
132
|
+
export const ElementType = {
|
|
133
|
+
// Float vectors
|
|
134
|
+
V2f: _V2f, V3f: _V3f, V4f: _V4f,
|
|
135
|
+
// Float matrices (square)
|
|
136
|
+
M22f: _M22f, M33f: _M33f, M44f: _M44f,
|
|
137
|
+
// Signed-int vectors
|
|
138
|
+
V2i: _V2i, V3i: _V3i, V4i: _V4i,
|
|
139
|
+
// Unsigned-int vectors
|
|
140
|
+
V2u: _V2u, V3u: _V3u, V4u: _V4u,
|
|
141
|
+
// Scalars
|
|
142
|
+
F32: _F32, U32: _U32, I32: _I32,
|
|
143
|
+
U16: _U16, I16: _I16, U8: _U8, I8: _I8,
|
|
144
|
+
/** Infer from a wombat.base packed array or a native TypedArray. */
|
|
145
|
+
fromArray,
|
|
146
|
+
/** GPUVertexFormat for `t`; throws if `t` has no vertex form. */
|
|
147
|
+
toVertexFormat: asVertexFormat,
|
|
148
|
+
/** GPUIndexFormat for `t`; throws if `t` is not `u16` / `u32`. */
|
|
149
|
+
toIndexFormat: asIndexFormat,
|
|
150
|
+
};
|
|
151
|
+
//# sourceMapping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AE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI;IAC/B,UAAU;IACV,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI;IAC/B,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG;IAEtC,oEAAoE;IACpE,SAAS;IACT,iEAAiE;IACjE,cAAc,EAAE,cAAc;IAC9B,kEAAkE;IAClE,aAAa,EAAG,aAAa;CACrB,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { IBuffer, } from "./buffer.js";
|
|
2
2
|
export type { HostBufferSource, } from "./buffer.js";
|
|
3
|
-
export
|
|
3
|
+
export { BufferView, } from "./bufferView.js";
|
|
4
|
+
export { ElementType, ElementKind, } from "./elementType.js";
|
|
4
5
|
export type { ClearColor, ClearValues, } from "./clear.js";
|
|
5
6
|
export type { Command, CopySpec, BufferCopy, TextureCopy, BufferCopyRange, } from "./command.js";
|
|
6
7
|
export type { DrawCall, IndexedDrawCall, NonIndexedDrawCall, } from "./drawCall.js";
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,UAAU,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,WAAW,EACX,WAAW,GACZ,MAAM,kBAAkB,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AAO,EACL,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,UAAU,EACV,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,GACd,MAAM,oBAAoB,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// `prepareRenderObject`, `runRenderTask`, etc. live in higher
|
|
5
5
|
// packages (`resources`, `commands`, `runtime`).
|
|
6
6
|
export { IBuffer, } from "./buffer.js";
|
|
7
|
+
export { BufferView, } from "./bufferView.js";
|
|
8
|
+
export { ElementType, ElementKind, } from "./elementType.js";
|
|
7
9
|
export { PipelineState } from "./pipelineState.js";
|
|
8
10
|
export { RenderTree, } from "./renderTree.js";
|
|
9
11
|
export { ISampler, } from "./sampler.js";
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,2DAA2D;AAC3D,8DAA8D;AAC9D,iDAAiD;AAEjD,OAAO,EACL,OAAO,GACR,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,2DAA2D;AAC3D,8DAA8D;AAC9D,iDAAiD;AAEjD,OAAO,EACL,OAAO,GACR,MAAM,aAAa,CAAC;AAKrB,OAAO,EACL,UAAU,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,WAAW,EACX,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAkD1B,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMnD,OAAO,EACL,UAAU,GACX,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EACL,QAAQ,GACT,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,QAAQ,GACT,MAAM,cAAc,CAAC;AA4BtB,OAAO,EACL,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,UAAU,EACV,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,GACd,MAAM,oBAAoB,CAAC"}
|
|
@@ -33,9 +33,9 @@ export interface RenderObject {
|
|
|
33
33
|
* individual buffer values are reactive. The shader's required-input
|
|
34
34
|
* set is fixed at compile; the map must contain at least those names.
|
|
35
35
|
*/
|
|
36
|
-
readonly vertexAttributes: HashMap<string,
|
|
36
|
+
readonly vertexAttributes: HashMap<string, BufferView>;
|
|
37
37
|
/** name → instance buffer view; e.g. "modelMatrix", "instanceColor". */
|
|
38
|
-
readonly instanceAttributes?: HashMap<string,
|
|
38
|
+
readonly instanceAttributes?: HashMap<string, BufferView>;
|
|
39
39
|
/** name → uniform value; runtime packs into UBO based on shader layout. */
|
|
40
40
|
readonly uniforms: HashMap<string, aval<unknown>>;
|
|
41
41
|
/** name → texture source (CPU image or pre-built GPUTexture). */
|
|
@@ -45,7 +45,7 @@ export interface RenderObject {
|
|
|
45
45
|
/** name → storage buffer source. */
|
|
46
46
|
readonly storageBuffers?: HashMap<string, aval<IBuffer>>;
|
|
47
47
|
/** Index buffer for indexed draws. */
|
|
48
|
-
readonly indices?:
|
|
48
|
+
readonly indices?: BufferView;
|
|
49
49
|
readonly drawCall: aval<DrawCall>;
|
|
50
50
|
}
|
|
51
51
|
//# sourceMappingURL=renderObject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderObject.d.ts","sourceRoot":"","sources":["../../src/core/renderObject.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ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