@tapez/core 0.0.0-alpha.0 → 0.0.0-alpha.2
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/array.d.ts +26 -0
- package/dist/array.d.ts.map +1 -0
- package/dist/array.js +30 -0
- package/dist/array.js.map +1 -0
- package/dist/bind-helpers.d.ts +36 -0
- package/dist/bind-helpers.d.ts.map +1 -0
- package/dist/bind-helpers.js +44 -0
- package/dist/bind-helpers.js.map +1 -0
- package/dist/const.d.ts +26 -0
- package/dist/const.d.ts.map +1 -0
- package/dist/const.js +43 -0
- package/dist/const.js.map +1 -0
- package/dist/gpu-buffer-utils.d.ts +40 -0
- package/dist/gpu-buffer-utils.d.ts.map +1 -0
- package/dist/gpu-buffer-utils.js +105 -0
- package/dist/gpu-buffer-utils.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/layout.d.ts +36 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +39 -0
- package/dist/layout.js.map +1 -0
- package/dist/matrix.d.ts +20 -0
- package/dist/matrix.d.ts.map +1 -0
- package/dist/matrix.js +25 -0
- package/dist/matrix.js.map +1 -0
- package/dist/schemas.d.ts +61 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +85 -0
- package/dist/schemas.js.map +1 -0
- package/dist/struct.d.ts +47 -0
- package/dist/struct.d.ts.map +1 -0
- package/dist/struct.js +81 -0
- package/dist/struct.js.map +1 -0
- package/dist/typed-buffer.d.ts +117 -0
- package/dist/typed-buffer.d.ts.map +1 -0
- package/dist/typed-buffer.js +273 -0
- package/dist/typed-buffer.js.map +1 -0
- package/dist/types.d.ts +33 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +23 -0
- package/dist/types.js.map +1 -0
- package/dist/vectors.d.ts +26 -0
- package/dist/vectors.d.ts.map +1 -0
- package/dist/vectors.js +44 -0
- package/dist/vectors.js.map +1 -0
- package/package.json +26 -3
- package/README.md +0 -3
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer-owned tapez schemas — shared GPU structs used by the rendering engine.
|
|
3
|
+
* Widgets import these via @import in their WGSL shaders.
|
|
4
|
+
*/
|
|
5
|
+
import * as tapez from './index';
|
|
6
|
+
export declare const CameraUniform: tapez.TapezStruct<{
|
|
7
|
+
boundsMin: tapez.TapezVector;
|
|
8
|
+
boundsMax: tapez.TapezVector;
|
|
9
|
+
viewport: tapez.TapezVector;
|
|
10
|
+
zoom: tapez.TapezScalar;
|
|
11
|
+
dpr: tapez.TapezScalar;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const Theme: tapez.TapezStruct<{
|
|
14
|
+
bg: tapez.TapezVector;
|
|
15
|
+
text: tapez.TapezVector;
|
|
16
|
+
bids: tapez.TapezVector;
|
|
17
|
+
bidsSecondary: tapez.TapezVector;
|
|
18
|
+
asks: tapez.TapezVector;
|
|
19
|
+
asksSecondary: tapez.TapezVector;
|
|
20
|
+
accent: tapez.TapezVector;
|
|
21
|
+
accentSecondary: tapez.TapezVector;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const BgColorUniforms: tapez.TapezStruct<{
|
|
24
|
+
color: tapez.TapezVector;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const TextParams: tapez.TapezStruct<{
|
|
27
|
+
distance_range: tapez.TapezScalar;
|
|
28
|
+
screen_px_range: tapez.TapezScalar;
|
|
29
|
+
atlas_size: tapez.TapezScalar;
|
|
30
|
+
em_size: tapez.TapezScalar;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const GlyphData: tapez.TapezStruct<{
|
|
33
|
+
uv_rect: tapez.TapezVector;
|
|
34
|
+
plane_rect: tapez.TapezVector;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const TEXT_INSTANCE_STRIDE: tapez.TapezConst<tapez.TapezScalar>;
|
|
37
|
+
export declare const IndirectDraw: tapez.TapezStruct<{
|
|
38
|
+
vertexCount: tapez.TapezScalar;
|
|
39
|
+
instanceCount: tapez.TapezScalar;
|
|
40
|
+
firstVertex: tapez.TapezScalar;
|
|
41
|
+
firstInstance: tapez.TapezScalar;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const PriceFeed: tapez.TapezStruct<{
|
|
44
|
+
price: tapez.TapezScalar;
|
|
45
|
+
direction: tapez.TapezScalar;
|
|
46
|
+
_pad0: tapez.TapezScalar;
|
|
47
|
+
_pad1: tapez.TapezScalar;
|
|
48
|
+
}>;
|
|
49
|
+
export declare const LineConfig: tapez.TapezStruct<{
|
|
50
|
+
lineWidthPx: tapez.TapezScalar;
|
|
51
|
+
_pad0: tapez.TapezScalar;
|
|
52
|
+
_pad1: tapez.TapezScalar;
|
|
53
|
+
_pad2: tapez.TapezScalar;
|
|
54
|
+
}>;
|
|
55
|
+
export declare const MarkerConfig: tapez.TapezStruct<{
|
|
56
|
+
heightPx: tapez.TapezScalar;
|
|
57
|
+
_pad0: tapez.TapezScalar;
|
|
58
|
+
_pad1: tapez.TapezScalar;
|
|
59
|
+
_pad2: tapez.TapezScalar;
|
|
60
|
+
}>;
|
|
61
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAMhC,eAAO,MAAM,aAAa;;;;;;EAMxB,CAAA;AAMF,eAAO,MAAM,KAAK;;;;;;;;;EAShB,CAAA;AAMF,eAAO,MAAM,eAAe;;EAE1B,CAAA;AAMF,eAAO,MAAM,UAAU;;;;;EAKrB,CAAA;AAEF,eAAO,MAAM,SAAS;;;EAGpB,CAAA;AAEF,eAAO,MAAM,oBAAoB,qCAA+C,CAAA;AAMhF,eAAO,MAAM,YAAY;;;;;EAKvB,CAAA;AAMF,eAAO,MAAM,SAAS;;;;;EAKpB,CAAA;AAMF,eAAO,MAAM,UAAU;;;;;EAKrB,CAAA;AAMF,eAAO,MAAM,YAAY;;;;;EAKvB,CAAA"}
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer-owned tapez schemas — shared GPU structs used by the rendering engine.
|
|
3
|
+
* Widgets import these via @import in their WGSL shaders.
|
|
4
|
+
*/
|
|
5
|
+
import * as tapez from './index';
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Camera
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
export const CameraUniform = tapez.struct('CameraUniform', {
|
|
10
|
+
boundsMin: tapez.vec2f,
|
|
11
|
+
boundsMax: tapez.vec2f,
|
|
12
|
+
viewport: tapez.vec2f,
|
|
13
|
+
zoom: tapez.f32,
|
|
14
|
+
dpr: tapez.f32,
|
|
15
|
+
});
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Theme — 8 named colors
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
export const Theme = tapez.struct('Theme', {
|
|
20
|
+
bg: tapez.vec4f,
|
|
21
|
+
text: tapez.vec4f,
|
|
22
|
+
bids: tapez.vec4f,
|
|
23
|
+
bidsSecondary: tapez.vec4f,
|
|
24
|
+
asks: tapez.vec4f,
|
|
25
|
+
asksSecondary: tapez.vec4f,
|
|
26
|
+
accent: tapez.vec4f,
|
|
27
|
+
accentSecondary: tapez.vec4f,
|
|
28
|
+
});
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
// Background color
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
export const BgColorUniforms = tapez.struct('Uniforms', {
|
|
33
|
+
color: tapez.vec4f,
|
|
34
|
+
});
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// MSDF text rendering
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
export const TextParams = tapez.struct('TextParams', {
|
|
39
|
+
distance_range: tapez.f32,
|
|
40
|
+
screen_px_range: tapez.f32,
|
|
41
|
+
atlas_size: tapez.f32,
|
|
42
|
+
em_size: tapez.f32,
|
|
43
|
+
});
|
|
44
|
+
export const GlyphData = tapez.struct('GlyphData', {
|
|
45
|
+
uv_rect: tapez.vec4f,
|
|
46
|
+
plane_rect: tapez.vec4f,
|
|
47
|
+
});
|
|
48
|
+
export const TEXT_INSTANCE_STRIDE = tapez.const('INSTANCE_STRIDE', tapez.u32, 9);
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
// Indirect draw (generic GPU pattern)
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
52
|
+
export const IndirectDraw = tapez.struct('IndirectDraw', {
|
|
53
|
+
vertexCount: tapez.u32,
|
|
54
|
+
instanceCount: tapez.u32,
|
|
55
|
+
firstVertex: tapez.u32,
|
|
56
|
+
firstInstance: tapez.u32,
|
|
57
|
+
});
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
// Price feed (used by chart entities)
|
|
60
|
+
// ---------------------------------------------------------------------------
|
|
61
|
+
export const PriceFeed = tapez.struct('PriceFeed', {
|
|
62
|
+
price: tapez.f32,
|
|
63
|
+
direction: tapez.u32,
|
|
64
|
+
_pad0: tapez.f32,
|
|
65
|
+
_pad1: tapez.f32,
|
|
66
|
+
});
|
|
67
|
+
// ---------------------------------------------------------------------------
|
|
68
|
+
// Line config (used by price line entity)
|
|
69
|
+
// ---------------------------------------------------------------------------
|
|
70
|
+
export const LineConfig = tapez.struct('LineConfig', {
|
|
71
|
+
lineWidthPx: tapez.f32,
|
|
72
|
+
_pad0: tapez.f32,
|
|
73
|
+
_pad1: tapez.f32,
|
|
74
|
+
_pad2: tapez.f32,
|
|
75
|
+
});
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
// Marker config (used by price marker entity)
|
|
78
|
+
// ---------------------------------------------------------------------------
|
|
79
|
+
export const MarkerConfig = tapez.struct('MarkerConfig', {
|
|
80
|
+
heightPx: tapez.f32,
|
|
81
|
+
_pad0: tapez.f32,
|
|
82
|
+
_pad1: tapez.f32,
|
|
83
|
+
_pad2: tapez.f32,
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAEhC,8EAA8E;AAC9E,SAAS;AACT,8EAA8E;AAE9E,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE;IACzD,SAAS,EAAE,KAAK,CAAC,KAAK;IACtB,SAAS,EAAE,KAAK,CAAC,KAAK;IACtB,QAAQ,EAAE,KAAK,CAAC,KAAK;IACrB,IAAI,EAAE,KAAK,CAAC,GAAG;IACf,GAAG,EAAE,KAAK,CAAC,GAAG;CACf,CAAC,CAAA;AAEF,8EAA8E;AAC9E,yBAAyB;AACzB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE;IACzC,EAAE,EAAE,KAAK,CAAC,KAAK;IACf,IAAI,EAAE,KAAK,CAAC,KAAK;IACjB,IAAI,EAAE,KAAK,CAAC,KAAK;IACjB,aAAa,EAAE,KAAK,CAAC,KAAK;IAC1B,IAAI,EAAE,KAAK,CAAC,KAAK;IACjB,aAAa,EAAE,KAAK,CAAC,KAAK;IAC1B,MAAM,EAAE,KAAK,CAAC,KAAK;IACnB,eAAe,EAAE,KAAK,CAAC,KAAK;CAC7B,CAAC,CAAA;AAEF,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE;IACtD,KAAK,EAAE,KAAK,CAAC,KAAK;C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AAC,MAAM,CAAC,YAAY,EAAE;IACnD,WAAW,EAAE,KAAK,CAAC,GAAG;IACtB,KAAK,EAAE,KAAK,CAAC,GAAG;IAChB,KAAK,EAAE,KAAK,CAAC,GAAG;IAChB,KAAK,EAAE,KAAK,CAAC,GAAG;CACjB,CAAC,CAAA;AAEF,8EAA8E;AAC9E,8CAA8C;AAC9C,8EAA8E;AAE9E,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,cAAc,EAAE;IACvD,QAAQ,EAAE,KAAK,CAAC,GAAG;IACnB,KAAK,EAAE,KAAK,CAAC,GAAG;IAChB,KAAK,EAAE,KAAK,CAAC,GAAG;IAChB,KAAK,EAAE,KAAK,CAAC,GAAG;CACjB,CAAC,CAAA"}
|
package/dist/struct.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TapeZ struct definition — the core of the schema system.
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* const MyConfig = tapez.struct('MyConfig', {
|
|
6
|
+
* midPrice: tapez.f32,
|
|
7
|
+
* rowHeight: tapez.f32,
|
|
8
|
+
* decimals: tapez.u32,
|
|
9
|
+
* })
|
|
10
|
+
*
|
|
11
|
+
* MyConfig.byteSize // 12
|
|
12
|
+
* MyConfig.offsets // { midPrice: 0, rowHeight: 4, decimals: 8 }
|
|
13
|
+
* MyConfig.toWGSL() // "struct MyConfig {\n midPrice: f32,\n ..."
|
|
14
|
+
*/
|
|
15
|
+
import type { TapezType } from './types';
|
|
16
|
+
import { type StructLayout } from './layout';
|
|
17
|
+
export interface TapezStruct<F extends Record<string, TapezType> = Record<string, TapezType>> extends TapezType {
|
|
18
|
+
readonly kind: 'struct';
|
|
19
|
+
/** Struct name (used in WGSL output) */
|
|
20
|
+
readonly name: string;
|
|
21
|
+
/** Field type definitions, keyed by name */
|
|
22
|
+
readonly fields: F;
|
|
23
|
+
/** Byte offset of each field */
|
|
24
|
+
readonly offsets: {
|
|
25
|
+
readonly [K in keyof F]: number;
|
|
26
|
+
};
|
|
27
|
+
/** Field names in definition order */
|
|
28
|
+
readonly fieldOrder: readonly (keyof F & string)[];
|
|
29
|
+
/** Full computed layout with per-field metadata */
|
|
30
|
+
readonly layout: StructLayout;
|
|
31
|
+
/** Generate WGSL struct declaration */
|
|
32
|
+
toWGSL(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Create a new struct with specified fields wrapped in atomic<>.
|
|
35
|
+
* Same memory layout — atomic<u32> and u32 are identical in size/alignment.
|
|
36
|
+
* Only u32 and i32 fields can be made atomic.
|
|
37
|
+
*/
|
|
38
|
+
withAtomics<K extends keyof F & string>(name: string, atomicFields: K[]): TapezStruct<F>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Define a GPU struct schema.
|
|
42
|
+
*
|
|
43
|
+
* Fields are laid out in definition order following WGSL alignment rules.
|
|
44
|
+
* The returned object is frozen and can be shared across entities.
|
|
45
|
+
*/
|
|
46
|
+
export declare function struct<F extends Record<string, TapezType>>(name: string, fields: F): TapezStruct<F>;
|
|
47
|
+
//# sourceMappingURL=struct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"struct.d.ts","sourceRoot":"","sources":["../src/struct.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,SAAS,CAAA;AAErD,OAAO,EAAyC,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AAMnF,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAC1F,SAAQ,SAAS;IACjB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;IAClB,gCAAgC;IAChC,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM;KAAE,CAAA;IACrD,sCAAsC;IACtC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,CAAA;IAClD,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAA;IAC7B,uCAAuC;IACvC,MAAM,IAAI,MAAM,CAAA;IAChB;;;;OAIG;IACH,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EACpC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,CAAC,EAAE,GAChB,WAAW,CAAC,CAAC,CAAC,CAAA;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EACxD,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,CAAC,GACR,WAAW,CAAC,CAAC,CAAC,CAoDhB"}
|
package/dist/struct.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TapeZ struct definition — the core of the schema system.
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* const MyConfig = tapez.struct('MyConfig', {
|
|
6
|
+
* midPrice: tapez.f32,
|
|
7
|
+
* rowHeight: tapez.f32,
|
|
8
|
+
* decimals: tapez.u32,
|
|
9
|
+
* })
|
|
10
|
+
*
|
|
11
|
+
* MyConfig.byteSize // 12
|
|
12
|
+
* MyConfig.offsets // { midPrice: 0, rowHeight: 4, decimals: 8 }
|
|
13
|
+
* MyConfig.toWGSL() // "struct MyConfig {\n midPrice: f32,\n ..."
|
|
14
|
+
*/
|
|
15
|
+
import { atomic } from './types';
|
|
16
|
+
import { computeStructLayout } from './layout';
|
|
17
|
+
/**
|
|
18
|
+
* Define a GPU struct schema.
|
|
19
|
+
*
|
|
20
|
+
* Fields are laid out in definition order following WGSL alignment rules.
|
|
21
|
+
* The returned object is frozen and can be shared across entities.
|
|
22
|
+
*/
|
|
23
|
+
export function struct(name, fields) {
|
|
24
|
+
const fieldOrder = Object.keys(fields);
|
|
25
|
+
const fieldEntries = fieldOrder.map((k) => {
|
|
26
|
+
const t = fields[k];
|
|
27
|
+
if (!t)
|
|
28
|
+
throw new Error(`struct ${name}: missing field type for "${k}"`);
|
|
29
|
+
return { name: k, type: t };
|
|
30
|
+
});
|
|
31
|
+
const layout = computeStructLayout(fieldEntries);
|
|
32
|
+
const offsets = {};
|
|
33
|
+
for (const k of fieldOrder) {
|
|
34
|
+
const off = layout.offsets[k];
|
|
35
|
+
if (off === undefined)
|
|
36
|
+
throw new Error(`struct ${name}: missing offset for "${k}"`);
|
|
37
|
+
offsets[k] = off;
|
|
38
|
+
}
|
|
39
|
+
const result = {
|
|
40
|
+
kind: 'struct',
|
|
41
|
+
wgslType: name,
|
|
42
|
+
name,
|
|
43
|
+
byteSize: layout.byteSize,
|
|
44
|
+
alignment: layout.alignment,
|
|
45
|
+
fields,
|
|
46
|
+
offsets,
|
|
47
|
+
fieldOrder,
|
|
48
|
+
layout,
|
|
49
|
+
toWGSL() {
|
|
50
|
+
return structToWGSL(result);
|
|
51
|
+
},
|
|
52
|
+
withAtomics(atomicName, atomicFields) {
|
|
53
|
+
const atomicSet = new Set(atomicFields);
|
|
54
|
+
const newFields = {};
|
|
55
|
+
for (const k of fieldOrder) {
|
|
56
|
+
const fieldType = fields[k];
|
|
57
|
+
if (!fieldType)
|
|
58
|
+
throw new Error(`withAtomics: missing field "${k}"`);
|
|
59
|
+
if (atomicSet.has(k)) {
|
|
60
|
+
if (fieldType.kind !== 'scalar') {
|
|
61
|
+
throw new Error(`withAtomics: field "${k}" is not a scalar (got ${fieldType.kind})`);
|
|
62
|
+
}
|
|
63
|
+
newFields[k] = atomic(fieldType);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
newFields[k] = fieldType;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return struct(atomicName, newFields);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
return Object.freeze(result);
|
|
73
|
+
}
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
// WGSL emission
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
function structToWGSL(s) {
|
|
78
|
+
const lines = s.layout.fields.map((f) => ` ${f.name}: ${f.type.wgslType},`);
|
|
79
|
+
return `struct ${s.name} {\n${lines.join('\n')}\n}`;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=struct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"struct.js","sourceRoot":"","sources":["../src/struct.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,mBAAmB,EAAuC,MAAM,UAAU,CAAA;AAgCnF;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CACpB,IAAY,EACZ,MAAS;IAET,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAyB,CAAA;IAC9D,MAAM,YAAY,GAAwC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QAC7E,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;QACnB,IAAI,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,6BAA6B,CAAC,GAAG,CAAC,CAAA;QACxE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAA;IAC7B,CAAC,CAAC,CAAA;IACF,MAAM,MAAM,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAA;IAEhD,MAAM,OAAO,GAAG,EAAgC,CAAA;IAChD,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;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,OAAO,MAAM,CAAC,UAAU,EAAE,SAAc,CAAC,CAAA;QAC3C,CAAC;KACF,CAAA;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AAC9B,CAAC;AAED,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,SAAS,YAAY,CAAC,CAAc;IAClC,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAc,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;IACzF,OAAO,UAAU,CAAC,CAAC,IAAI,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAA;AACrD,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypedBuffer — GPU buffer backed by a tapez type.
|
|
3
|
+
*
|
|
4
|
+
* Accepts any TapezType: scalars, vectors, arrays, structs.
|
|
5
|
+
* For structs, provides named field setters/getters with dirty tracking.
|
|
6
|
+
* For all types, provides the raw GPUBuffer, typed array views, and lifecycle.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* // Struct — named setters
|
|
10
|
+
* const config = TypedBuffer.createUniform(device, MyStruct, 'config')
|
|
11
|
+
* config.set.midPrice(1.5)
|
|
12
|
+
* config.writeIfDirty(queue)
|
|
13
|
+
*
|
|
14
|
+
* // Array — raw typed array access
|
|
15
|
+
* const rows = TypedBuffer.createStorage(device, tapez.arrayOf(tapez.f32, 4096), 'rows')
|
|
16
|
+
* rows.raw.f32.set(myData)
|
|
17
|
+
* rows.write(queue)
|
|
18
|
+
*
|
|
19
|
+
* // Indirect draw
|
|
20
|
+
* const indirect = TypedBuffer.createIndirect(device, IndirectDraw, 'indirect')
|
|
21
|
+
*/
|
|
22
|
+
import { DirtyUniformBuffer } from './gpu-buffer-utils';
|
|
23
|
+
import type { TapezType, TapezScalar, TapezAtomic } from './types';
|
|
24
|
+
import type { TapezVector } from './vectors';
|
|
25
|
+
import type { TapezStruct } from './struct';
|
|
26
|
+
/** Maps a TapezType to its TypeScript setter value type */
|
|
27
|
+
type SetterValue<T extends TapezType> = T extends TapezScalar | TapezAtomic ? number : T extends TapezVector ? number[] | Float32Array | Uint32Array | Int32Array : number[] | Float32Array;
|
|
28
|
+
/** Setter functions keyed by field name */
|
|
29
|
+
type Setters<F extends Record<string, TapezType>> = {
|
|
30
|
+
readonly [K in keyof F]: (value: SetterValue<F[K]>) => void;
|
|
31
|
+
};
|
|
32
|
+
/** Getter functions keyed by field name */
|
|
33
|
+
type Getters<F extends Record<string, TapezType>> = {
|
|
34
|
+
readonly [K in keyof F]: () => SetterValue<F[K]>;
|
|
35
|
+
};
|
|
36
|
+
/** Extract the fields type from a TapezStruct, or never */
|
|
37
|
+
type FieldsOf<T extends TapezType> = T extends TapezStruct<infer F> ? F : never;
|
|
38
|
+
export interface TypedBufferBase {
|
|
39
|
+
readonly buffer: GPUBuffer;
|
|
40
|
+
readonly byteSize: number;
|
|
41
|
+
readonly isDirty: boolean;
|
|
42
|
+
markDirty(): void;
|
|
43
|
+
writeIfDirty(queue: GPUQueue): void;
|
|
44
|
+
write(queue: GPUQueue): void;
|
|
45
|
+
writeRaw(queue: GPUQueue, data: BufferSource | SharedArrayBuffer, bufferOffset?: number, dataOffset?: number, size?: number): void;
|
|
46
|
+
copyTo(encoder: GPUCommandEncoder, dest: TypedBufferBase, srcOffset?: number, dstOffset?: number, size?: number): void;
|
|
47
|
+
copyFrom(encoder: GPUCommandEncoder, src: TypedBufferBase, srcOffset?: number, dstOffset?: number, size?: number): void;
|
|
48
|
+
drawIndirect(pass: GPURenderPassEncoder, offset?: number): void;
|
|
49
|
+
dispatchIndirect(pass: GPUComputePassEncoder, offset?: number): void;
|
|
50
|
+
mapRead(): Promise<ArrayBuffer>;
|
|
51
|
+
unmap(): void;
|
|
52
|
+
destroy(): void;
|
|
53
|
+
}
|
|
54
|
+
export declare class TypedBuffer<T extends TapezType = TapezType> implements TypedBufferBase {
|
|
55
|
+
/** The underlying DirtyUniformBuffer (provides typed array views: .f32, .u32, .i32) */
|
|
56
|
+
readonly raw: DirtyUniformBuffer;
|
|
57
|
+
/** The tapez type this buffer was created from */
|
|
58
|
+
readonly type: T;
|
|
59
|
+
/**
|
|
60
|
+
* Named field setters. Only available for struct types.
|
|
61
|
+
* For non-struct buffers this is an empty object.
|
|
62
|
+
*/
|
|
63
|
+
readonly set: T extends TapezStruct<infer F> ? Setters<F> : Record<string, never>;
|
|
64
|
+
/**
|
|
65
|
+
* Named field getters. Only available for struct types.
|
|
66
|
+
* For non-struct buffers this is an empty object.
|
|
67
|
+
*/
|
|
68
|
+
readonly get: T extends TapezStruct<infer F> ? Getters<F> : Record<string, never>;
|
|
69
|
+
private constructor();
|
|
70
|
+
/** The raw GPUBuffer — for texture/sampler bind group entries only */
|
|
71
|
+
get buffer(): GPUBuffer;
|
|
72
|
+
/** Total byte size of the buffer */
|
|
73
|
+
get byteSize(): number;
|
|
74
|
+
/** Whether any values have changed since last write */
|
|
75
|
+
get isDirty(): boolean;
|
|
76
|
+
/** Force dirty state (for external invalidation) */
|
|
77
|
+
markDirty(): void;
|
|
78
|
+
/** Upload to GPU only if dirty, then clear dirty flag */
|
|
79
|
+
writeIfDirty(queue: GPUQueue): void;
|
|
80
|
+
/** Upload to GPU unconditionally */
|
|
81
|
+
write(queue: GPUQueue): void;
|
|
82
|
+
/**
|
|
83
|
+
* Bulk set multiple struct fields at once.
|
|
84
|
+
* Only available for struct-typed buffers.
|
|
85
|
+
*/
|
|
86
|
+
writeFields(values: Partial<{
|
|
87
|
+
[K in keyof FieldsOf<T>]: SetterValue<FieldsOf<T>[K]>;
|
|
88
|
+
}>): void;
|
|
89
|
+
/** Destroy the underlying GPU buffer */
|
|
90
|
+
destroy(): void;
|
|
91
|
+
/** Write raw data to this buffer via queue.writeBuffer */
|
|
92
|
+
writeRaw(queue: GPUQueue, data: BufferSource | SharedArrayBuffer, bufferOffset?: number, dataOffset?: number, size?: number): void;
|
|
93
|
+
/** Copy data from this buffer to another TypedBuffer */
|
|
94
|
+
copyTo(encoder: GPUCommandEncoder, dest: TypedBuffer, srcOffset?: number, dstOffset?: number, size?: number): void;
|
|
95
|
+
/** Copy data from another TypedBuffer into this buffer */
|
|
96
|
+
copyFrom(encoder: GPUCommandEncoder, src: TypedBuffer, srcOffset?: number, dstOffset?: number, size?: number): void;
|
|
97
|
+
/** Use this buffer for drawIndirect */
|
|
98
|
+
drawIndirect(pass: GPURenderPassEncoder, offset?: number): void;
|
|
99
|
+
/** Use this buffer for dispatchWorkgroupsIndirect */
|
|
100
|
+
dispatchIndirect(pass: GPUComputePassEncoder, offset?: number): void;
|
|
101
|
+
/** Map buffer for reading (for readback buffers). Returns the mapped ArrayBuffer. */
|
|
102
|
+
mapRead(): Promise<ArrayBuffer>;
|
|
103
|
+
/** Unmap a previously mapped buffer */
|
|
104
|
+
unmap(): void;
|
|
105
|
+
/** Create a buffer with explicit usage flags. Accepts any TapezType. */
|
|
106
|
+
static create<T extends TapezType>(device: GPUDevice, type: T, label: string, usage: GPUBufferUsageFlags): TypedBuffer<T>;
|
|
107
|
+
/** Create a uniform buffer (UNIFORM | STORAGE | COPY_DST) */
|
|
108
|
+
static createUniform<T extends TapezType>(device: GPUDevice, type: T, label: string): TypedBuffer<T>;
|
|
109
|
+
/** Create a storage buffer (STORAGE | COPY_DST). Pass extraFlags for COPY_SRC etc. */
|
|
110
|
+
static createStorage<T extends TapezType>(device: GPUDevice, type: T, label: string, extraFlags?: GPUBufferUsageFlags): TypedBuffer<T>;
|
|
111
|
+
/** Create an indirect draw/dispatch buffer (INDIRECT | STORAGE | COPY_DST) */
|
|
112
|
+
static createIndirect<T extends TapezType>(device: GPUDevice, type: T, label: string): TypedBuffer<T>;
|
|
113
|
+
/** Create a readback buffer (MAP_READ | COPY_DST). For GPU→CPU data transfer. */
|
|
114
|
+
static createReadback<T extends TapezType>(device: GPUDevice, type: T, label: string): TypedBuffer<T>;
|
|
115
|
+
}
|
|
116
|
+
export {};
|
|
117
|
+
//# sourceMappingURL=typed-buffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-buffer.d.ts","sourceRoot":"","sources":["../src/typed-buffer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAO3C,2DAA2D;AAC3D,KAAK,WAAW,CAAC,CAAC,SAAS,SAAS,IAAI,CAAC,SAAS,WAAW,GAAG,WAAW,GACvE,MAAM,GACN,CAAC,SAAS,WAAW,GACnB,MAAM,EAAE,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,GAClD,MAAM,EAAE,GAAG,YAAY,CAAA;AAE7B,2CAA2C;AAC3C,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI;IAClD,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI;CAC5D,CAAA;AAED,2CAA2C;AAC3C,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI;IAClD,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACjD,CAAA;AAED,2DAA2D;AAC3D,KAAK,QAAQ,CAAC,CAAC,SAAS,SAAS,IAAI,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