typegpu 0.12.8 → 0.12.10
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/common/attachAutoResizer.d.ts +33 -0
- package/common/attachAutoResizer.js +83 -0
- package/common/index.d.ts +1 -0
- package/common/index.js +1 -0
- package/common/writeSoA.js +4 -3
- package/core/commandEncoder/commandEncoder.d.ts +1 -1
- package/core/declare/tgpuDeclare.d.ts +10 -7
- package/core/declare/tgpuDeclare.js +25 -10
- package/core/function/comptime.d.ts +2 -0
- package/core/function/comptime.js +29 -24
- package/core/function/createCallableSchema.js +32 -37
- package/core/function/dualImpl.js +45 -44
- package/core/function/tgpuComputeFn.d.ts +0 -3
- package/core/function/tgpuFn.d.ts +1 -0
- package/core/function/tgpuFn.js +14 -4
- package/core/function/tgpuFragmentFn.d.ts +1 -1
- package/core/function/tgpuVertexFn.d.ts +1 -1
- package/core/pipeline/computePipeline.js +5 -2
- package/core/pipeline/drawState.js +1 -1
- package/core/pipeline/renderPipeline.js +5 -2
- package/core/pipeline/webgpuLimitations.js +11 -3
- package/core/resolve/externals.js +4 -0
- package/core/resolve/namespace.d.ts +4 -0
- package/core/resolve/namespace.js +1 -2
- package/core/resolve/stitch.js +13 -8
- package/core/root/init.d.ts +3 -3
- package/core/root/init.js +12 -13
- package/core/root/rootTypes.d.ts +44 -37
- package/core/slot/accessor.js +4 -4
- package/core/texture/texture.d.ts +3 -3
- package/core/texture/texture.js +60 -44
- package/core/texture/textureFormats.d.ts +4 -3
- package/core/texture/textureFormats.js +17 -6
- package/core/texture/textureWrite.d.ts +9 -0
- package/core/texture/textureWrite.js +21 -0
- package/core/unroll/tgpuUnroll.js +2 -4
- package/core/vertexLayout/vertexAttribute.d.ts +1 -4
- package/core/vertexLayout/vertexLayout.js +11 -30
- package/data/alignmentOf.d.ts +1 -1
- package/data/alignmentOf.js +5 -12
- package/data/array.js +34 -2
- package/data/attributes.d.ts +16 -3
- package/data/attributes.js +11 -2
- package/data/compiledIO.js +3 -3
- package/data/dataIO.js +77 -111
- package/data/dataTypes.d.ts +0 -2
- package/data/dataTypes.js +3 -3
- package/data/disarray.js +2 -0
- package/data/index.d.ts +4 -3
- package/data/index.js +3 -2
- package/data/offsetUtils.js +23 -13
- package/data/offsets.js +1 -2
- package/data/partialIO.js +2 -3
- package/data/ref.js +35 -37
- package/data/schemaCallWrapper.js +2 -2
- package/data/schemaMemoryLayout.d.ts +6 -1
- package/data/schemaMemoryLayout.js +23 -14
- package/data/schemasEqual.d.ts +37 -0
- package/data/schemasEqual.js +122 -0
- package/data/sizeOf.d.ts +1 -1
- package/data/sizeOf.js +2 -3
- package/data/snippet.d.ts +1 -1
- package/data/struct.js +27 -1
- package/data/unstruct.js +2 -0
- package/data/vectorImpl.js +45 -21
- package/data/vertexFormatData.js +7 -9
- package/data/wgslTypes.d.ts +28 -13
- package/data/wgslTypes.js +33 -39
- package/extension.d.ts +0 -4
- package/package.json +2 -2
- package/resolutionCtx.d.ts +1 -1
- package/resolutionCtx.js +26 -7
- package/serial/restore.d.ts +4 -3
- package/serial/restore.js +2 -1
- package/shared/meta.js +1 -1
- package/shared/symbols.d.ts +5 -0
- package/shared/symbols.js +6 -1
- package/shared/utilityTypes.d.ts +0 -6
- package/std/bitcast.d.ts +1 -1
- package/std/comptime.d.ts +67 -0
- package/std/comptime.js +88 -0
- package/std/environment.js +2 -4
- package/std/index.d.ts +2 -0
- package/std/index.js +2 -0
- package/std/matrix.js +5 -5
- package/std/numeric.d.ts +2 -1
- package/std/numeric.js +47 -10
- package/std/typeOf.d.ts +31 -0
- package/std/typeOf.js +54 -0
- package/tgpu.d.ts +1 -1
- package/tgpu.js +1 -1
- package/tgpuBindGroupLayout.d.ts +6 -3
- package/tgpuBindGroupLayout.js +15 -2
- package/tgpuLogger.d.ts +3 -0
- package/tgpuLogger.js +3 -0
- package/tgpuUnstableNamespace.d.ts +1 -0
- package/tgpuUnstableNamespace.js +5 -0
- package/tgsl/accessIndex.js +10 -7
- package/tgsl/accessProp.js +5 -57
- package/tgsl/consoleLog/serializers.d.ts +1 -8
- package/tgsl/consoleLog/serializers.js +53 -37
- package/tgsl/consoleLog/types.d.ts +1 -1
- package/tgsl/conversion.js +21 -0
- package/tgsl/forOfUtils.js +1 -1
- package/tgsl/generationHelpers.d.ts +0 -1
- package/tgsl/generationHelpers.js +1 -4
- package/tgsl/shaderGenerator.d.ts +5 -0
- package/tgsl/shellless.js +3 -20
- package/tgsl/swizzle.d.ts +24 -0
- package/tgsl/swizzle.js +112 -0
- package/tgsl/wgslGenerator.d.ts +13 -3
- package/tgsl/wgslGenerator.js +150 -152
- package/types.d.ts +10 -10
- package/types.js +1 -1
- package/unwrapper.d.ts +2 -2
- package/data/deepEqual.d.ts +0 -21
- package/data/deepEqual.js +0 -93
- package/taskQueue.d.ts +0 -6
- package/taskQueue.js +0 -30
package/taskQueue.d.ts
DELETED
package/taskQueue.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export class TaskQueue {
|
|
2
|
-
_queue = [];
|
|
3
|
-
_pending = false;
|
|
4
|
-
enqueue(task) {
|
|
5
|
-
return new Promise((resolve, reject) => {
|
|
6
|
-
this._queue.push(async () => {
|
|
7
|
-
try {
|
|
8
|
-
resolve(await task());
|
|
9
|
-
}
|
|
10
|
-
catch (e) {
|
|
11
|
-
reject(e);
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
void this._processQueue();
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
async _processQueue() {
|
|
18
|
-
if (this._pending) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
this._pending = true;
|
|
22
|
-
while (this._queue.length > 0) {
|
|
23
|
-
const task = this._queue.shift();
|
|
24
|
-
if (task) {
|
|
25
|
-
await task();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
this._pending = false;
|
|
29
|
-
}
|
|
30
|
-
}
|