typegpu 0.3.0-alpha.1 → 0.3.0-alpha.3

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.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as TgpuNamable, D as Default, F as F32, U as U32, I as I32, V as Vec4f, a as Vec4u, b as Vec4i, c as UnionToIntersection, A as AnyData, d as Infer, E as Exotic, P as Prettify, M as Mutable, O as OmitProps, B as BaseWgslData, e as AnyWgslData } from './utilityTypes-0b50gROn.cjs';
1
+ import { T as TgpuNamable, D as Default, F as F32, U as U32, I as I32, V as Vec4f, a as Vec4u, b as Vec4i, c as UnionToIntersection, A as AnyData, d as Infer, E as Exotic, P as Prettify, M as Mutable, O as OmitProps, B as BaseWgslData, e as AnyWgslData } from './utilityTypes-NWbtoFu5.cjs';
2
2
  import * as smol from 'tinyest';
3
3
  import { Block } from 'tinyest';
4
4
 
@@ -387,7 +387,7 @@ interface TgpuBufferReadonly$1<TData extends BaseWgslData> extends TgpuBufferUsa
387
387
  interface TgpuBufferMutable$1<TData extends BaseWgslData> extends TgpuBufferUsage<TData, 'mutable'> {
388
388
  }
389
389
 
390
- interface TgpuSampler {
390
+ interface TgpuSampler extends TgpuResolvable {
391
391
  readonly resourceType: 'sampler';
392
392
  }
393
393
  interface TgpuComparisonSampler {
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as TgpuNamable, D as Default, F as F32, U as U32, I as I32, V as Vec4f, a as Vec4u, b as Vec4i, c as UnionToIntersection, A as AnyData, d as Infer, E as Exotic, P as Prettify, M as Mutable, O as OmitProps, B as BaseWgslData, e as AnyWgslData } from './utilityTypes-0b50gROn.js';
1
+ import { T as TgpuNamable, D as Default, F as F32, U as U32, I as I32, V as Vec4f, a as Vec4u, b as Vec4i, c as UnionToIntersection, A as AnyData, d as Infer, E as Exotic, P as Prettify, M as Mutable, O as OmitProps, B as BaseWgslData, e as AnyWgslData } from './utilityTypes-NWbtoFu5.js';
2
2
  import * as smol from 'tinyest';
3
3
  import { Block } from 'tinyest';
4
4
 
@@ -387,7 +387,7 @@ interface TgpuBufferReadonly$1<TData extends BaseWgslData> extends TgpuBufferUsa
387
387
  interface TgpuBufferMutable$1<TData extends BaseWgslData> extends TgpuBufferUsage<TData, 'mutable'> {
388
388
  }
389
389
 
390
- interface TgpuSampler {
390
+ interface TgpuSampler extends TgpuResolvable {
391
391
  readonly resourceType: 'sampler';
392
392
  }
393
393
  interface TgpuComparisonSampler {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import{A as H,Aa as rt,B as X,Ba as nt,C as be,Ca as at,D as he,E as we,F as y,G as B,H as F,a as E,b as R,c as s,d as M,ma as P,na as Q,pa as w,q as ce,r as $,s as Qe,t as Ze,u as xe,ua as et,v as D,va as tt,w as v,x as u,z as L}from"./chunk-IQYHODCR.js";var V=class{constructor(){s(this,"lastUniqueId",0)}makeUnique(t){let r;return t?(r=t.replaceAll(/\s/g,"_"),r=r.replaceAll(/[^\w\d]/g,"")):r="item",`${r}_${this.lastUniqueId++}`}},k=class{constructor(){s(this,"_usedNames",new Set)}makeUnique(t){if(t===void 0)throw new Error("Unnamed item found when using a strict name registry");let r=0,n=t;for(;this._usedNames.has(n);)r++,n=`${t}_${r}`;return this._usedNames.add(n),n}};function ot(e,t){throw new Error(`Failed to handle ${e} at ${t}`)}var Gt=["bool","f32","f16","i32","u32","vec2f","vec3f","vec4f","vec2i","vec3i","vec4i","vec2u","vec3u","vec4u","mat2x2f","mat3x3f","mat4x4f"];function It(e){return Gt.includes(e.type)}function Ct(e,[t,r]){return` ${tt(r)}${t}: ${e.resolve(r)},
1
+ import{A as H,Aa as rt,B as X,Ba as nt,C as be,Ca as at,D as he,E as we,F as y,G as B,H as F,a as E,b as R,c as s,d as M,ma as P,na as Q,pa as w,q as ce,r as $,s as Qe,t as Ze,u as xe,ua as et,v as D,va as tt,w as v,x as u,z as L}from"./chunk-6N2XUXQX.js";var V=class{constructor(){s(this,"lastUniqueId",0)}makeUnique(t){let r;return t?(r=t.replaceAll(/\s/g,"_"),r=r.replaceAll(/[^\w\d]/g,"")):r="item",`${r}_${this.lastUniqueId++}`}},k=class{constructor(){s(this,"_usedNames",new Set)}makeUnique(t){if(t===void 0)throw new Error("Unnamed item found when using a strict name registry");let r=0,n=t;for(;this._usedNames.has(n);)r++,n=`${t}_${r}`;return this._usedNames.add(n),n}};function ot(e,t){throw new Error(`Failed to handle ${e} at ${t}`)}var Gt=["bool","f32","f16","i32","u32","vec2f","vec3f","vec4f","vec2i","vec3i","vec4i","vec2u","vec3u","vec4u","mat2x2f","mat3x3f","mat4x4f"];function It(e){return Gt.includes(e.type)}function Ct(e,[t,r]){return` ${tt(r)}${t}: ${e.resolve(r)},
2
2
  `}function Vt(e,t){let r=e.names.makeUnique(t.label);return e.addDeclaration(`
3
3
  struct ${r} {
4
4
  ${Object.entries(t.propTypes).map(n=>Ct(e,n)).join("")}}