typegpu 0.5.9 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunk-3K53YJSU.cjs +10 -0
- package/chunk-3K53YJSU.cjs.map +1 -0
- package/chunk-BF35NEOX.cjs +43 -0
- package/chunk-BF35NEOX.cjs.map +1 -0
- package/chunk-IH2QU6TV.js +43 -0
- package/chunk-IH2QU6TV.js.map +1 -0
- package/chunk-S27MYQ6U.js +10 -0
- package/chunk-S27MYQ6U.js.map +1 -0
- package/data/index.cjs +1 -1
- package/data/index.cjs.map +1 -1
- package/data/index.d.cts +30 -4
- package/data/index.d.ts +30 -4
- package/data/index.js +1 -1
- package/index.cjs +18 -29
- package/index.cjs.map +1 -1
- package/index.d.cts +95 -9
- package/index.d.ts +95 -9
- package/index.js +18 -29
- package/index.js.map +1 -1
- package/{matrix-BULDDGYa.d.ts → matrix-BXuR-7-A.d.ts} +1 -1
- package/{matrix-BnXitNJ7.d.cts → matrix-DzXuhOr3.d.cts} +1 -1
- package/package.json +1 -1
- package/std/index.cjs +1 -1
- package/std/index.cjs.map +1 -1
- package/std/index.d.cts +22 -9
- package/std/index.d.ts +22 -9
- package/std/index.js +1 -1
- package/std/index.js.map +1 -1
- package/{tgpuComputeFn-BxPDI5hQ.d.ts → tgpuConstant-BAmV6caN.d.cts} +3254 -2840
- package/{tgpuComputeFn-BxPDI5hQ.d.cts → tgpuConstant-BAmV6caN.d.ts} +3254 -2840
- package/chunk-734H4JWF.js +0 -2
- package/chunk-734H4JWF.js.map +0 -1
- package/chunk-BJSN5UVV.cjs +0 -41
- package/chunk-BJSN5UVV.cjs.map +0 -1
- package/chunk-BZVU4Q6A.cjs +0 -2
- package/chunk-BZVU4Q6A.cjs.map +0 -1
- package/chunk-CDUKTYES.cjs +0 -2
- package/chunk-CDUKTYES.cjs.map +0 -1
- package/chunk-CGVYLGBG.js +0 -2
- package/chunk-CGVYLGBG.js.map +0 -1
- package/chunk-SWJVYRFM.js +0 -41
- package/chunk-SWJVYRFM.js.map +0 -1
- /package/{LICENSE.md → LICENSE} +0 -0
package/index.d.cts
CHANGED
@@ -1,7 +1,20 @@
|
|
1
|
-
import {
|
2
|
-
export {
|
1
|
+
import { T as TgpuBindGroupLayout, a as TgpuBindGroup, W as Wgsl, C as Configurable, b as TgpuBuffer, A as AnyData, c as TgpuVar, d as TgpuRoot, e as AnyWgslData, f as TgpuFn, g as TgpuBufferUsage, I as Infer, h as TgpuAccessor, i as TgpuDerived, j as TgpuSlot, k as TgpuVertexLayout, l as WgslArray, D as Disarray, m as fn, n as bindGroupLayout, v as vertexLayout, o as fragmentFn, p as vertexFn, q as computeFn, r as privateVar, w as workgroupVar, s as constant, t as declare, u as sampler, x as comparisonSampler } from './tgpuConstant-BAmV6caN.cjs';
|
2
|
+
export { aq as BindLayoutEntry, ac as Eventual, ar as ExtractBindGroupInputFromLayout, aJ as INTERNAL_GlobalExt, a0 as IndexFlag, as as LayoutEntryToInput, ak as Render, al as Sampled, Y as Storage, Z as StorageFlag, aj as TextureProps, ad as TgpuAnyTextureView, a6 as TgpuBufferMutable, a7 as TgpuBufferReadonly, a8 as TgpuBufferUniform, aG as TgpuComputeFn, aH as TgpuComputeFnShell, $ as TgpuComputePipeline, am as TgpuConst, aI as TgpuDeclare, aB as TgpuFnShell, aE as TgpuFragmentFn, aF as TgpuFragmentFnShell, at as TgpuLayoutComparisonSampler, au as TgpuLayoutEntry, av as TgpuLayoutExternalTexture, aw as TgpuLayoutSampler, ax as TgpuLayoutStorage, ay as TgpuLayoutStorageTexture, az as TgpuLayoutTexture, aA as TgpuLayoutUniform, a9 as TgpuMutable, ae as TgpuMutableTexture, ap as TgpuQuerySet, aa as TgpuReadonly, af as TgpuReadonlyTexture, _ as TgpuRenderPipeline, ag as TgpuSampledTexture, ao as TgpuSampler, ah as TgpuTexture, ab as TgpuUniform, aC as TgpuVertexFn, aD as TgpuVertexFnShell, ai as TgpuWriteonlyTexture, a1 as Uniform, a2 as UniformFlag, a3 as ValidUsagesFor, V as ValidateBufferSchema, an as VariableScope, a4 as Vertex, a5 as VertexFlag, R as WithBinding, S as WithCompute, U as WithFragment, X as WithVertex, y as isBuffer, P as isBufferShorthand, F as isComparisonSampler, B as isDerived, H as isSampledTextureView, G as isSampler, E as isSlot, J as isStorageTextureView, K as isTexture, Q as isTgpuFn, L as isUsableAsRender, M as isUsableAsSampled, N as isUsableAsStorage, O as isUsableAsUniform, z as isUsableAsVertex } from './tgpuConstant-BAmV6caN.cjs';
|
3
3
|
import 'tinyest';
|
4
4
|
|
5
|
+
/**
|
6
|
+
* The results of a WGSL resolution.
|
7
|
+
*
|
8
|
+
* @param code - The resolved code.
|
9
|
+
* @param usedBindGroupLayouts - List of used `tgpu.bindGroupLayout`s.
|
10
|
+
* @param catchall - Automatically constructed bind group for buffer usages and buffer shorthands, preceded by its index.
|
11
|
+
*/
|
12
|
+
interface ResolutionResult {
|
13
|
+
code: string;
|
14
|
+
usedBindGroupLayouts: TgpuBindGroupLayout[];
|
15
|
+
catchall: [number, TgpuBindGroup] | undefined;
|
16
|
+
}
|
17
|
+
|
5
18
|
interface TgpuResolveOptions {
|
6
19
|
/**
|
7
20
|
* Map of external names to their resolvable values.
|
@@ -18,11 +31,46 @@ interface TgpuResolveOptions {
|
|
18
31
|
*/
|
19
32
|
names?: 'strict' | 'random' | undefined;
|
20
33
|
/**
|
21
|
-
*
|
22
|
-
* @experimental
|
34
|
+
* A function to configure the resolution context.
|
23
35
|
*/
|
24
|
-
|
36
|
+
config?: ((cfg: Configurable) => Configurable) | undefined;
|
25
37
|
}
|
38
|
+
/**
|
39
|
+
* Resolves a template with external values. Each external will get resolved to a code string and replaced in the template.
|
40
|
+
* Any dependencies of the externals will also be resolved and included in the output.
|
41
|
+
* @param options - The options for the resolution.
|
42
|
+
*
|
43
|
+
* @returns {ResolutionResult}
|
44
|
+
*
|
45
|
+
* @example
|
46
|
+
* ```ts
|
47
|
+
* const Gradient = d.struct({
|
48
|
+
* from: d.vec3f,
|
49
|
+
* to: d.vec3f,
|
50
|
+
* });
|
51
|
+
*
|
52
|
+
* const { code, usedBindGroupLayouts, catchall } = tgpu.resolveWithContext({
|
53
|
+
* template: `
|
54
|
+
* fn getGradientAngle(gradient: Gradient) -> f32 {
|
55
|
+
* return atan(gradient.to.y - gradient.from.y, gradient.to.x - gradient.from.x);
|
56
|
+
* }
|
57
|
+
* `,
|
58
|
+
* externals: {
|
59
|
+
* Gradient,
|
60
|
+
* },
|
61
|
+
* });
|
62
|
+
*
|
63
|
+
* console.log(code);
|
64
|
+
* // struct Gradient_0 {
|
65
|
+
* // from: vec3f,
|
66
|
+
* // to: vec3f,
|
67
|
+
* // }
|
68
|
+
* // fn getGradientAngle(gradient: Gradient_0) -> f32 {
|
69
|
+
* // return atan(gradient.to.y - gradient.from.y, gradient.to.x - gradient.from.x);
|
70
|
+
* // }
|
71
|
+
* ```
|
72
|
+
*/
|
73
|
+
declare function resolveWithContext(options: TgpuResolveOptions): ResolutionResult;
|
26
74
|
/**
|
27
75
|
* Resolves a template with external values. Each external will get resolved to a code string and replaced in the template.
|
28
76
|
* Any dependencies of the externals will also be resolved and included in the output.
|
@@ -60,6 +108,36 @@ interface TgpuResolveOptions {
|
|
60
108
|
*/
|
61
109
|
declare function resolve(options: TgpuResolveOptions): string;
|
62
110
|
|
111
|
+
interface SimulationResult<T> {
|
112
|
+
value: T;
|
113
|
+
buffers: Map<TgpuBuffer<AnyData>, unknown>;
|
114
|
+
privateVars: Map<TgpuVar<'private', AnyData>, unknown>[][][];
|
115
|
+
workgroupVars: Map<TgpuVar<'workgroup', AnyData>, unknown>[][][];
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Runs the provided callback in a simulated environment, giving
|
119
|
+
* it access to buffers and variables as if it were running on the GPU.
|
120
|
+
*
|
121
|
+
* The result of the simulation is returned, and does not affect the actual GPU state,
|
122
|
+
* nor does it carry over to other simulations.
|
123
|
+
*
|
124
|
+
* @param callback The callback to run in the simulated environment.
|
125
|
+
* @returns An object containing the result of the simulation, and
|
126
|
+
* the final state of the environment.
|
127
|
+
*
|
128
|
+
* @example
|
129
|
+
* const counter = tgpu.privateVar(d.u32);
|
130
|
+
*
|
131
|
+
* const result = tgpu.simulate(() => {
|
132
|
+
* counter.$ += 1;
|
133
|
+
* counter.$ += 2;
|
134
|
+
* return counter.$;
|
135
|
+
* });
|
136
|
+
*
|
137
|
+
* console.log(result.value); // 3
|
138
|
+
*/
|
139
|
+
declare function simulate<T>(callback: () => T): SimulationResult<T>;
|
140
|
+
|
63
141
|
/**
|
64
142
|
* Options passed into {@link init}.
|
65
143
|
*/
|
@@ -70,7 +148,6 @@ type InitOptions = {
|
|
70
148
|
} | undefined;
|
71
149
|
/** @default 'random' */
|
72
150
|
unstable_names?: 'random' | 'strict' | undefined;
|
73
|
-
unstable_jitTranspiler?: JitTranspiler | undefined;
|
74
151
|
};
|
75
152
|
/**
|
76
153
|
* Options passed into {@link initFromDevice}.
|
@@ -79,7 +156,6 @@ type InitFromDeviceOptions = {
|
|
79
156
|
device: GPUDevice;
|
80
157
|
/** @default 'random' */
|
81
158
|
unstable_names?: 'random' | 'strict' | undefined;
|
82
|
-
unstable_jitTranspiler?: JitTranspiler | undefined;
|
83
159
|
};
|
84
160
|
/**
|
85
161
|
* Requests a new GPU device and creates a root around it.
|
@@ -111,7 +187,7 @@ declare function init(options?: InitOptions): Promise<TgpuRoot>;
|
|
111
187
|
*/
|
112
188
|
declare function initFromDevice(options: InitFromDeviceOptions): TgpuRoot;
|
113
189
|
|
114
|
-
declare function accessor<T extends AnyWgslData>(schema: T, defaultValue?: TgpuFn<
|
190
|
+
declare function accessor<T extends AnyWgslData>(schema: T, defaultValue?: TgpuFn<() => T> | TgpuBufferUsage<T> | Infer<T>): TgpuAccessor<T>;
|
115
191
|
|
116
192
|
declare function derived<T>(compute: () => T): TgpuDerived<T>;
|
117
193
|
|
@@ -158,12 +234,18 @@ declare class MissingVertexBuffersError extends Error {
|
|
158
234
|
*/
|
159
235
|
|
160
236
|
declare const tgpu: {
|
237
|
+
fn: typeof fn;
|
161
238
|
bindGroupLayout: typeof bindGroupLayout;
|
162
239
|
vertexLayout: typeof vertexLayout;
|
240
|
+
slot: typeof slot;
|
163
241
|
init: typeof init;
|
164
242
|
initFromDevice: typeof initFromDevice;
|
165
243
|
resolve: typeof resolve;
|
244
|
+
resolveWithContext: typeof resolveWithContext;
|
166
245
|
'~unstable': {
|
246
|
+
/**
|
247
|
+
* @deprecated This feature is now stable, use tgpu.fn.
|
248
|
+
*/
|
167
249
|
fn: typeof fn;
|
168
250
|
fragmentFn: typeof fragmentFn;
|
169
251
|
vertexFn: typeof vertexFn;
|
@@ -173,6 +255,9 @@ declare const tgpu: {
|
|
173
255
|
*/
|
174
256
|
vertexLayout: typeof vertexLayout;
|
175
257
|
derived: typeof derived;
|
258
|
+
/**
|
259
|
+
* @deprecated This feature is now stable, use tgpu.slot.
|
260
|
+
*/
|
176
261
|
slot: typeof slot;
|
177
262
|
accessor: typeof accessor;
|
178
263
|
privateVar: typeof privateVar;
|
@@ -181,7 +266,8 @@ declare const tgpu: {
|
|
181
266
|
declare: typeof declare;
|
182
267
|
sampler: typeof sampler;
|
183
268
|
comparisonSampler: typeof comparisonSampler;
|
269
|
+
simulate: typeof simulate;
|
184
270
|
};
|
185
271
|
};
|
186
272
|
|
187
|
-
export { type InitFromDeviceOptions, type InitOptions, MissingBindGroupsError, MissingLinksError, MissingSlotValueError, MissingVertexBuffersError, NotUniformError, ResolutionError, TgpuAccessor, TgpuBindGroupLayout, TgpuBuffer, TgpuDerived, TgpuFn, TgpuRoot, TgpuSlot, TgpuVertexLayout, tgpu as default, tgpu };
|
273
|
+
export { Configurable, type InitFromDeviceOptions, type InitOptions, MissingBindGroupsError, MissingLinksError, MissingSlotValueError, MissingVertexBuffersError, NotUniformError, ResolutionError, TgpuAccessor, TgpuBindGroup, TgpuBindGroupLayout, TgpuBuffer, TgpuDerived, TgpuFn, TgpuRoot, TgpuSlot, TgpuVar, TgpuVertexLayout, tgpu as default, tgpu };
|
package/index.d.ts
CHANGED
@@ -1,7 +1,20 @@
|
|
1
|
-
import {
|
2
|
-
export {
|
1
|
+
import { T as TgpuBindGroupLayout, a as TgpuBindGroup, W as Wgsl, C as Configurable, b as TgpuBuffer, A as AnyData, c as TgpuVar, d as TgpuRoot, e as AnyWgslData, f as TgpuFn, g as TgpuBufferUsage, I as Infer, h as TgpuAccessor, i as TgpuDerived, j as TgpuSlot, k as TgpuVertexLayout, l as WgslArray, D as Disarray, m as fn, n as bindGroupLayout, v as vertexLayout, o as fragmentFn, p as vertexFn, q as computeFn, r as privateVar, w as workgroupVar, s as constant, t as declare, u as sampler, x as comparisonSampler } from './tgpuConstant-BAmV6caN.js';
|
2
|
+
export { aq as BindLayoutEntry, ac as Eventual, ar as ExtractBindGroupInputFromLayout, aJ as INTERNAL_GlobalExt, a0 as IndexFlag, as as LayoutEntryToInput, ak as Render, al as Sampled, Y as Storage, Z as StorageFlag, aj as TextureProps, ad as TgpuAnyTextureView, a6 as TgpuBufferMutable, a7 as TgpuBufferReadonly, a8 as TgpuBufferUniform, aG as TgpuComputeFn, aH as TgpuComputeFnShell, $ as TgpuComputePipeline, am as TgpuConst, aI as TgpuDeclare, aB as TgpuFnShell, aE as TgpuFragmentFn, aF as TgpuFragmentFnShell, at as TgpuLayoutComparisonSampler, au as TgpuLayoutEntry, av as TgpuLayoutExternalTexture, aw as TgpuLayoutSampler, ax as TgpuLayoutStorage, ay as TgpuLayoutStorageTexture, az as TgpuLayoutTexture, aA as TgpuLayoutUniform, a9 as TgpuMutable, ae as TgpuMutableTexture, ap as TgpuQuerySet, aa as TgpuReadonly, af as TgpuReadonlyTexture, _ as TgpuRenderPipeline, ag as TgpuSampledTexture, ao as TgpuSampler, ah as TgpuTexture, ab as TgpuUniform, aC as TgpuVertexFn, aD as TgpuVertexFnShell, ai as TgpuWriteonlyTexture, a1 as Uniform, a2 as UniformFlag, a3 as ValidUsagesFor, V as ValidateBufferSchema, an as VariableScope, a4 as Vertex, a5 as VertexFlag, R as WithBinding, S as WithCompute, U as WithFragment, X as WithVertex, y as isBuffer, P as isBufferShorthand, F as isComparisonSampler, B as isDerived, H as isSampledTextureView, G as isSampler, E as isSlot, J as isStorageTextureView, K as isTexture, Q as isTgpuFn, L as isUsableAsRender, M as isUsableAsSampled, N as isUsableAsStorage, O as isUsableAsUniform, z as isUsableAsVertex } from './tgpuConstant-BAmV6caN.js';
|
3
3
|
import 'tinyest';
|
4
4
|
|
5
|
+
/**
|
6
|
+
* The results of a WGSL resolution.
|
7
|
+
*
|
8
|
+
* @param code - The resolved code.
|
9
|
+
* @param usedBindGroupLayouts - List of used `tgpu.bindGroupLayout`s.
|
10
|
+
* @param catchall - Automatically constructed bind group for buffer usages and buffer shorthands, preceded by its index.
|
11
|
+
*/
|
12
|
+
interface ResolutionResult {
|
13
|
+
code: string;
|
14
|
+
usedBindGroupLayouts: TgpuBindGroupLayout[];
|
15
|
+
catchall: [number, TgpuBindGroup] | undefined;
|
16
|
+
}
|
17
|
+
|
5
18
|
interface TgpuResolveOptions {
|
6
19
|
/**
|
7
20
|
* Map of external names to their resolvable values.
|
@@ -18,11 +31,46 @@ interface TgpuResolveOptions {
|
|
18
31
|
*/
|
19
32
|
names?: 'strict' | 'random' | undefined;
|
20
33
|
/**
|
21
|
-
*
|
22
|
-
* @experimental
|
34
|
+
* A function to configure the resolution context.
|
23
35
|
*/
|
24
|
-
|
36
|
+
config?: ((cfg: Configurable) => Configurable) | undefined;
|
25
37
|
}
|
38
|
+
/**
|
39
|
+
* Resolves a template with external values. Each external will get resolved to a code string and replaced in the template.
|
40
|
+
* Any dependencies of the externals will also be resolved and included in the output.
|
41
|
+
* @param options - The options for the resolution.
|
42
|
+
*
|
43
|
+
* @returns {ResolutionResult}
|
44
|
+
*
|
45
|
+
* @example
|
46
|
+
* ```ts
|
47
|
+
* const Gradient = d.struct({
|
48
|
+
* from: d.vec3f,
|
49
|
+
* to: d.vec3f,
|
50
|
+
* });
|
51
|
+
*
|
52
|
+
* const { code, usedBindGroupLayouts, catchall } = tgpu.resolveWithContext({
|
53
|
+
* template: `
|
54
|
+
* fn getGradientAngle(gradient: Gradient) -> f32 {
|
55
|
+
* return atan(gradient.to.y - gradient.from.y, gradient.to.x - gradient.from.x);
|
56
|
+
* }
|
57
|
+
* `,
|
58
|
+
* externals: {
|
59
|
+
* Gradient,
|
60
|
+
* },
|
61
|
+
* });
|
62
|
+
*
|
63
|
+
* console.log(code);
|
64
|
+
* // struct Gradient_0 {
|
65
|
+
* // from: vec3f,
|
66
|
+
* // to: vec3f,
|
67
|
+
* // }
|
68
|
+
* // fn getGradientAngle(gradient: Gradient_0) -> f32 {
|
69
|
+
* // return atan(gradient.to.y - gradient.from.y, gradient.to.x - gradient.from.x);
|
70
|
+
* // }
|
71
|
+
* ```
|
72
|
+
*/
|
73
|
+
declare function resolveWithContext(options: TgpuResolveOptions): ResolutionResult;
|
26
74
|
/**
|
27
75
|
* Resolves a template with external values. Each external will get resolved to a code string and replaced in the template.
|
28
76
|
* Any dependencies of the externals will also be resolved and included in the output.
|
@@ -60,6 +108,36 @@ interface TgpuResolveOptions {
|
|
60
108
|
*/
|
61
109
|
declare function resolve(options: TgpuResolveOptions): string;
|
62
110
|
|
111
|
+
interface SimulationResult<T> {
|
112
|
+
value: T;
|
113
|
+
buffers: Map<TgpuBuffer<AnyData>, unknown>;
|
114
|
+
privateVars: Map<TgpuVar<'private', AnyData>, unknown>[][][];
|
115
|
+
workgroupVars: Map<TgpuVar<'workgroup', AnyData>, unknown>[][][];
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Runs the provided callback in a simulated environment, giving
|
119
|
+
* it access to buffers and variables as if it were running on the GPU.
|
120
|
+
*
|
121
|
+
* The result of the simulation is returned, and does not affect the actual GPU state,
|
122
|
+
* nor does it carry over to other simulations.
|
123
|
+
*
|
124
|
+
* @param callback The callback to run in the simulated environment.
|
125
|
+
* @returns An object containing the result of the simulation, and
|
126
|
+
* the final state of the environment.
|
127
|
+
*
|
128
|
+
* @example
|
129
|
+
* const counter = tgpu.privateVar(d.u32);
|
130
|
+
*
|
131
|
+
* const result = tgpu.simulate(() => {
|
132
|
+
* counter.$ += 1;
|
133
|
+
* counter.$ += 2;
|
134
|
+
* return counter.$;
|
135
|
+
* });
|
136
|
+
*
|
137
|
+
* console.log(result.value); // 3
|
138
|
+
*/
|
139
|
+
declare function simulate<T>(callback: () => T): SimulationResult<T>;
|
140
|
+
|
63
141
|
/**
|
64
142
|
* Options passed into {@link init}.
|
65
143
|
*/
|
@@ -70,7 +148,6 @@ type InitOptions = {
|
|
70
148
|
} | undefined;
|
71
149
|
/** @default 'random' */
|
72
150
|
unstable_names?: 'random' | 'strict' | undefined;
|
73
|
-
unstable_jitTranspiler?: JitTranspiler | undefined;
|
74
151
|
};
|
75
152
|
/**
|
76
153
|
* Options passed into {@link initFromDevice}.
|
@@ -79,7 +156,6 @@ type InitFromDeviceOptions = {
|
|
79
156
|
device: GPUDevice;
|
80
157
|
/** @default 'random' */
|
81
158
|
unstable_names?: 'random' | 'strict' | undefined;
|
82
|
-
unstable_jitTranspiler?: JitTranspiler | undefined;
|
83
159
|
};
|
84
160
|
/**
|
85
161
|
* Requests a new GPU device and creates a root around it.
|
@@ -111,7 +187,7 @@ declare function init(options?: InitOptions): Promise<TgpuRoot>;
|
|
111
187
|
*/
|
112
188
|
declare function initFromDevice(options: InitFromDeviceOptions): TgpuRoot;
|
113
189
|
|
114
|
-
declare function accessor<T extends AnyWgslData>(schema: T, defaultValue?: TgpuFn<
|
190
|
+
declare function accessor<T extends AnyWgslData>(schema: T, defaultValue?: TgpuFn<() => T> | TgpuBufferUsage<T> | Infer<T>): TgpuAccessor<T>;
|
115
191
|
|
116
192
|
declare function derived<T>(compute: () => T): TgpuDerived<T>;
|
117
193
|
|
@@ -158,12 +234,18 @@ declare class MissingVertexBuffersError extends Error {
|
|
158
234
|
*/
|
159
235
|
|
160
236
|
declare const tgpu: {
|
237
|
+
fn: typeof fn;
|
161
238
|
bindGroupLayout: typeof bindGroupLayout;
|
162
239
|
vertexLayout: typeof vertexLayout;
|
240
|
+
slot: typeof slot;
|
163
241
|
init: typeof init;
|
164
242
|
initFromDevice: typeof initFromDevice;
|
165
243
|
resolve: typeof resolve;
|
244
|
+
resolveWithContext: typeof resolveWithContext;
|
166
245
|
'~unstable': {
|
246
|
+
/**
|
247
|
+
* @deprecated This feature is now stable, use tgpu.fn.
|
248
|
+
*/
|
167
249
|
fn: typeof fn;
|
168
250
|
fragmentFn: typeof fragmentFn;
|
169
251
|
vertexFn: typeof vertexFn;
|
@@ -173,6 +255,9 @@ declare const tgpu: {
|
|
173
255
|
*/
|
174
256
|
vertexLayout: typeof vertexLayout;
|
175
257
|
derived: typeof derived;
|
258
|
+
/**
|
259
|
+
* @deprecated This feature is now stable, use tgpu.slot.
|
260
|
+
*/
|
176
261
|
slot: typeof slot;
|
177
262
|
accessor: typeof accessor;
|
178
263
|
privateVar: typeof privateVar;
|
@@ -181,7 +266,8 @@ declare const tgpu: {
|
|
181
266
|
declare: typeof declare;
|
182
267
|
sampler: typeof sampler;
|
183
268
|
comparisonSampler: typeof comparisonSampler;
|
269
|
+
simulate: typeof simulate;
|
184
270
|
};
|
185
271
|
};
|
186
272
|
|
187
|
-
export { type InitFromDeviceOptions, type InitOptions, MissingBindGroupsError, MissingLinksError, MissingSlotValueError, MissingVertexBuffersError, NotUniformError, ResolutionError, TgpuAccessor, TgpuBindGroupLayout, TgpuBuffer, TgpuDerived, TgpuFn, TgpuRoot, TgpuSlot, TgpuVertexLayout, tgpu as default, tgpu };
|
273
|
+
export { Configurable, type InitFromDeviceOptions, type InitOptions, MissingBindGroupsError, MissingLinksError, MissingSlotValueError, MissingVertexBuffersError, NotUniformError, ResolutionError, TgpuAccessor, TgpuBindGroup, TgpuBindGroupLayout, TgpuBuffer, TgpuDerived, TgpuFn, TgpuRoot, TgpuSlot, TgpuVar, TgpuVertexLayout, tgpu as default, tgpu };
|