typegpu 0.11.5 → 0.11.6
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/index.d.ts +2 -2
- package/indexNamedExports.d.ts +1 -1
- package/package.js +1 -1
- package/package.json +1 -1
- package/resolutionCtx.js +1 -1
- package/tgsl/wgslGenerator.js +1 -1
package/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { TgpuComputeFn, TgpuComputeFnShell, computeFn, isTgpuComputeFn } from ".
|
|
|
7
7
|
import { TgpuVar, VariableScope, isVariable, privateVar, workgroupVar } from "./core/variable/tgpuVariable.js";
|
|
8
8
|
import { Eventual, TgpuAccessor, TgpuLazy, TgpuMutableAccessor, TgpuSlot, isAccessor, isLazy, isMutableAccessor, isSlot } from "./core/slot/slotTypes.js";
|
|
9
9
|
import { TgpuComputePipeline } from "./core/pipeline/computePipeline.js";
|
|
10
|
-
import { AutoFragmentIn, AutoFragmentOut, AutoVertexOut, _AutoVertexIn } from "./core/function/autoIO.js";
|
|
10
|
+
import { AnyAutoCustoms, AutoFragmentIn, AutoFragmentOut, AutoVertexOut, _AutoVertexIn } from "./core/function/autoIO.js";
|
|
11
11
|
import { TgpuFragmentFn, TgpuFragmentFnShell, fragmentFn, isTgpuFragmentFn } from "./core/function/tgpuFragmentFn.js";
|
|
12
12
|
import { TgpuVertexFn, TgpuVertexFnShell, isTgpuVertexFn, vertexFn } from "./core/function/tgpuVertexFn.js";
|
|
13
13
|
import { TextureProps } from "./core/texture/textureProps.js";
|
|
@@ -70,4 +70,4 @@ declare const tgpu: {
|
|
|
70
70
|
'~unstable': typeof tgpuUnstable_d_exports;
|
|
71
71
|
};
|
|
72
72
|
//#endregion
|
|
73
|
-
export { AutoFragmentIn, AutoFragmentOut, _AutoVertexIn as AutoVertexIn, AutoVertexOut, BindLayoutEntry, ColorAttachment, Configurable, Eventual, ExtractBindGroupInputFromLayout, INTERNAL_GlobalExt, IndexFlag, InitFromDeviceOptions, InitOptions, LayoutEntryToInput, MissingBindGroupsError, MissingLinksError, MissingSlotValueError, MissingVertexBuffersError, Namespace, NotUniformError, RawCodeSnippetOrigin, RenderFlag, ResolutionError, SampledFlag, ShaderGenerator, Storage, StorageFlag, TextureProps, TgpuAccessor, TgpuBindGroup, TgpuBindGroupLayout, TgpuBuffer, TgpuBufferMutable, TgpuBufferReadonly, TgpuBufferUniform, TgpuComparisonSampler, TgpuComptime, TgpuComputeFn, TgpuComputeFnShell, TgpuComputePipeline, TgpuConst, TgpuDeclare, TgpuFixedComparisonSampler, TgpuFixedSampler, TgpuFn, TgpuFnShell, TgpuFragmentFn, TgpuFragmentFnShell, TgpuGenericFn, TgpuGuardedComputePipeline, TgpuLayoutComparisonSampler, TgpuLayoutEntry, TgpuLayoutExternalTexture, TgpuLayoutSampler, TgpuLayoutStorage, TgpuLayoutTexture, TgpuLayoutUniform, TgpuLazy, TgpuMutable, TgpuMutableAccessor, TgpuPrimitiveState, TgpuQuerySet, TgpuRawCodeSnippet, TgpuReadonly, TgpuRenderPipeline, TgpuRenderPipelineDescriptor, TgpuRoot, TgpuSampler, TgpuSlot, TgpuTexture, TgpuTextureView, TgpuUniform, TgpuVar, TgpuVertexFn, TgpuVertexFnShell, TgpuVertexLayout, Uniform, UniformFlag, ValidUsagesFor, ValidateBufferSchema, ValidateStorageSchema, ValidateUniformSchema, VariableScope, Vertex, VertexFlag, WgslGenerator, WithBinding, WithCompute, WithFragment, WithVertex, Withable, index_d_exports as common, index_d_exports$1 as d, tgpu as default, tgpu, isAccessor, isBuffer, isBufferShorthand, isComparisonSampler, isLazy, isMutableAccessor, isSampler, isSlot, isTexture, isTgpuComputeFn, isTgpuFn, isTgpuFragmentFn, isTgpuVertexFn, isUsableAsRender, isUsableAsSampled, isUsableAsStorage, isUsableAsUniform, isUsableAsVertex, isVariable, patchArrayBuffer, readFromArrayBuffer, index_d_exports$2 as std, writeToArrayBuffer };
|
|
73
|
+
export { AnyAutoCustoms, AutoFragmentIn, AutoFragmentOut, _AutoVertexIn as AutoVertexIn, AutoVertexOut, BindLayoutEntry, ColorAttachment, Configurable, Eventual, ExtractBindGroupInputFromLayout, INTERNAL_GlobalExt, IndexFlag, InitFromDeviceOptions, InitOptions, LayoutEntryToInput, MissingBindGroupsError, MissingLinksError, MissingSlotValueError, MissingVertexBuffersError, Namespace, NotUniformError, RawCodeSnippetOrigin, RenderFlag, ResolutionError, SampledFlag, ShaderGenerator, Storage, StorageFlag, TextureProps, TgpuAccessor, TgpuBindGroup, TgpuBindGroupLayout, TgpuBuffer, TgpuBufferMutable, TgpuBufferReadonly, TgpuBufferUniform, TgpuComparisonSampler, TgpuComptime, TgpuComputeFn, TgpuComputeFnShell, TgpuComputePipeline, TgpuConst, TgpuDeclare, TgpuFixedComparisonSampler, TgpuFixedSampler, TgpuFn, TgpuFnShell, TgpuFragmentFn, TgpuFragmentFnShell, TgpuGenericFn, TgpuGuardedComputePipeline, TgpuLayoutComparisonSampler, TgpuLayoutEntry, TgpuLayoutExternalTexture, TgpuLayoutSampler, TgpuLayoutStorage, TgpuLayoutTexture, TgpuLayoutUniform, TgpuLazy, TgpuMutable, TgpuMutableAccessor, TgpuPrimitiveState, TgpuQuerySet, TgpuRawCodeSnippet, TgpuReadonly, TgpuRenderPipeline, TgpuRenderPipelineDescriptor, TgpuRoot, TgpuSampler, TgpuSlot, TgpuTexture, TgpuTextureView, TgpuUniform, TgpuVar, TgpuVertexFn, TgpuVertexFnShell, TgpuVertexLayout, Uniform, UniformFlag, ValidUsagesFor, ValidateBufferSchema, ValidateStorageSchema, ValidateUniformSchema, VariableScope, Vertex, VertexFlag, WgslGenerator, WithBinding, WithCompute, WithFragment, WithVertex, Withable, index_d_exports as common, index_d_exports$1 as d, tgpu as default, tgpu, isAccessor, isBuffer, isBufferShorthand, isComparisonSampler, isLazy, isMutableAccessor, isSampler, isSlot, isTexture, isTgpuComputeFn, isTgpuFn, isTgpuFragmentFn, isTgpuVertexFn, isUsableAsRender, isUsableAsSampled, isUsableAsStorage, isUsableAsUniform, isUsableAsVertex, isVariable, patchArrayBuffer, readFromArrayBuffer, index_d_exports$2 as std, writeToArrayBuffer };
|
package/indexNamedExports.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { TgpuComputeFn, TgpuComputeFnShell, isTgpuComputeFn } from "./core/funct
|
|
|
7
7
|
import { TgpuVar, VariableScope, isVariable } from "./core/variable/tgpuVariable.js";
|
|
8
8
|
import { Eventual, TgpuAccessor, TgpuLazy, TgpuMutableAccessor, TgpuSlot, isAccessor, isLazy, isMutableAccessor, isSlot } from "./core/slot/slotTypes.js";
|
|
9
9
|
import { TgpuComputePipeline } from "./core/pipeline/computePipeline.js";
|
|
10
|
-
import { AutoFragmentIn, AutoFragmentOut, AutoVertexOut, _AutoVertexIn } from "./core/function/autoIO.js";
|
|
10
|
+
import { AnyAutoCustoms, AutoFragmentIn, AutoFragmentOut, AutoVertexOut, _AutoVertexIn } from "./core/function/autoIO.js";
|
|
11
11
|
import { TgpuFragmentFn, TgpuFragmentFnShell, isTgpuFragmentFn } from "./core/function/tgpuFragmentFn.js";
|
|
12
12
|
import { TgpuVertexFn, TgpuVertexFnShell, isTgpuVertexFn } from "./core/function/tgpuVertexFn.js";
|
|
13
13
|
import { TextureProps } from "./core/texture/textureProps.js";
|
package/package.js
CHANGED
package/package.json
CHANGED
package/resolutionCtx.js
CHANGED
|
@@ -359,7 +359,7 @@ var ResolutionCtxImpl = class {
|
|
|
359
359
|
else if (firstParam?.type === FuncParameterType.identifier) {
|
|
360
360
|
const proxyEntries = [];
|
|
361
361
|
for (const a of positionalArgs) {
|
|
362
|
-
const arg = createArgument(this.makeUniqueIdentifier(
|
|
362
|
+
const arg = createArgument(this.makeUniqueIdentifier(a.schemaKey, "block"), a.type);
|
|
363
363
|
args.push(arg);
|
|
364
364
|
proxyEntries.push({
|
|
365
365
|
schemaKey: a.schemaKey,
|
package/tgsl/wgslGenerator.js
CHANGED
|
@@ -426,7 +426,7 @@ ${this.ctx.pre}}`;
|
|
|
426
426
|
let body = this._block(options.body);
|
|
427
427
|
const scope = this.ctx.topFunctionScope;
|
|
428
428
|
invariant(scope, "Expected function scope to be present");
|
|
429
|
-
const replacements = Object.fromEntries(scope.placeholderForVariable.entries().map(([variable, placeholder]) => [placeholder, scope.modifiedVariables.has(variable) ? "var" : "let"]));
|
|
429
|
+
const replacements = Object.fromEntries([...scope.placeholderForVariable.entries()].map(([variable, placeholder]) => [placeholder, scope.modifiedVariables.has(variable) ? "var" : "let"]));
|
|
430
430
|
if (Object.keys(replacements).length > 0) {
|
|
431
431
|
const regex = new RegExp(Object.keys(replacements).join("|"), "gi");
|
|
432
432
|
body = body.replace(regex, (match) => replacements[match] ?? "#ERR");
|