typegpu 0.10.0 → 0.10.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/{chunk-BYypO7fO.js → _virtual/_rolldown/runtime.js} +1 -1
- package/builtin.d.ts +50 -0
- package/builtin.js +37 -0
- package/common/fullScreenTriangle.d.ts +26 -0
- package/common/fullScreenTriangle.js +36 -0
- package/common/index.d.ts +2 -3
- package/common/index.js +3 -4
- package/core/buffer/buffer.d.ts +74 -0
- package/core/buffer/buffer.js +197 -0
- package/core/buffer/bufferShorthand.d.ts +48 -0
- package/core/buffer/bufferShorthand.js +49 -0
- package/core/buffer/bufferUsage.d.ts +45 -0
- package/core/buffer/bufferUsage.js +163 -0
- package/core/constant/tgpuConstant.d.ts +28 -0
- package/core/constant/tgpuConstant.js +67 -0
- package/core/declare/tgpuDeclare.d.ts +18 -0
- package/core/declare/tgpuDeclare.js +40 -0
- package/core/function/autoIO.d.ts +37 -0
- package/core/function/autoIO.js +87 -0
- package/core/function/comptime.d.ts +39 -0
- package/core/function/comptime.js +51 -0
- package/core/function/createCallableSchema.js +42 -0
- package/core/function/dualImpl.js +54 -0
- package/core/function/extractArgs.js +204 -0
- package/core/function/fnCore.js +79 -0
- package/core/function/fnTypes.d.ts +34 -0
- package/core/function/ioSchema.d.ts +10 -0
- package/core/function/ioSchema.js +30 -0
- package/core/function/shelllessImpl.d.ts +28 -0
- package/core/function/shelllessImpl.js +23 -0
- package/core/function/templateUtils.js +13 -0
- package/core/function/tgpuComputeFn.d.ts +49 -0
- package/core/function/tgpuComputeFn.js +62 -0
- package/core/function/tgpuFn.d.ts +52 -0
- package/core/function/tgpuFn.js +170 -0
- package/core/function/tgpuFragmentFn.d.ts +68 -0
- package/core/function/tgpuFragmentFn.js +68 -0
- package/core/function/tgpuVertexFn.d.ts +55 -0
- package/core/function/tgpuVertexFn.js +65 -0
- package/core/pipeline/applyPipelineState.js +37 -0
- package/core/pipeline/computePipeline.d.ts +58 -0
- package/core/pipeline/computePipeline.js +226 -0
- package/core/pipeline/connectAttachmentToShader.js +26 -0
- package/core/pipeline/connectTargetsToShader.js +29 -0
- package/core/pipeline/limitsOverflow.js +13 -0
- package/core/pipeline/renderPipeline.d.ts +266 -0
- package/core/pipeline/renderPipeline.js +471 -0
- package/core/pipeline/timeable.d.ts +23 -0
- package/core/pipeline/timeable.js +61 -0
- package/core/pipeline/typeGuards.js +29 -0
- package/core/querySet/querySet.d.ts +22 -0
- package/core/querySet/querySet.js +103 -0
- package/core/rawCodeSnippet/tgpuRawCodeSnippet.d.ts +59 -0
- package/core/rawCodeSnippet/tgpuRawCodeSnippet.js +96 -0
- package/core/resolve/externals.d.ts +10 -0
- package/core/resolve/externals.js +58 -0
- package/core/resolve/namespace.d.ts +38 -0
- package/core/resolve/namespace.js +41 -0
- package/core/resolve/resolveData.js +146 -0
- package/core/resolve/stitch.js +25 -0
- package/core/resolve/tgpuResolve.d.ts +151 -0
- package/core/resolve/tgpuResolve.js +68 -0
- package/core/root/configurableImpl.js +18 -0
- package/core/root/init.d.ts +69 -0
- package/core/root/init.js +457 -0
- package/core/root/rootTypes.d.ts +622 -0
- package/core/sampler/sampler.d.ts +35 -0
- package/core/sampler/sampler.js +116 -0
- package/core/simulate/tgpuSimulate.d.ts +36 -0
- package/core/simulate/tgpuSimulate.js +76 -0
- package/core/slot/accessor.d.ts +13 -0
- package/core/slot/accessor.js +97 -0
- package/core/slot/internalSlots.js +7 -0
- package/core/slot/lazy.d.ts +6 -0
- package/core/slot/lazy.js +42 -0
- package/core/slot/slot.d.ts +6 -0
- package/core/slot/slot.js +40 -0
- package/core/slot/slotTypes.d.ts +92 -0
- package/core/slot/slotTypes.js +21 -0
- package/core/texture/externalTexture.d.ts +12 -0
- package/core/texture/externalTexture.js +48 -0
- package/core/texture/texture.d.ts +118 -0
- package/core/texture/texture.js +312 -0
- package/core/texture/textureFormats.d.ts +29 -0
- package/core/texture/textureFormats.js +99 -0
- package/core/texture/textureProps.d.ts +11 -0
- package/core/texture/textureUtils.js +224 -0
- package/core/texture/usageExtension.d.ts +21 -0
- package/core/texture/usageExtension.js +21 -0
- package/core/unroll/tgpuUnroll.d.ts +13 -0
- package/core/unroll/tgpuUnroll.js +36 -0
- package/core/valueProxyUtils.js +44 -0
- package/core/variable/tgpuVariable.d.ts +38 -0
- package/core/variable/tgpuVariable.js +101 -0
- package/core/vertexLayout/connectAttributesToShader.js +59 -0
- package/core/vertexLayout/vertexAttribute.d.ts +29 -0
- package/core/vertexLayout/vertexLayout.d.ts +19 -0
- package/core/vertexLayout/vertexLayout.js +103 -0
- package/data/alignIO.js +15 -0
- package/data/alignmentOf.d.ts +10 -0
- package/data/alignmentOf.js +88 -0
- package/data/array.d.ts +28 -0
- package/data/array.js +48 -0
- package/data/atomic.d.ts +15 -0
- package/data/atomic.js +25 -0
- package/data/attributes.d.ts +121 -0
- package/data/attributes.js +145 -0
- package/data/autoStruct.d.ts +3 -0
- package/data/autoStruct.js +83 -0
- package/data/compiledIO.js +231 -0
- package/data/dataIO.js +549 -0
- package/data/dataTypes.d.ts +115 -0
- package/data/dataTypes.js +97 -0
- package/data/deepEqual.d.ts +25 -0
- package/data/deepEqual.js +58 -0
- package/data/disarray.d.ts +34 -0
- package/data/disarray.js +52 -0
- package/data/getLongestContiguousPrefix.d.ts +10 -0
- package/data/getLongestContiguousPrefix.js +15 -0
- package/data/index.d.ts +26 -4
- package/data/index.js +27 -7
- package/data/instanceToSchema.d.ts +33 -0
- package/data/isContiguous.d.ts +10 -0
- package/data/isContiguous.js +15 -0
- package/data/matrix.d.ts +126 -0
- package/data/matrix.js +517 -0
- package/data/numberOps.js +24 -0
- package/data/numeric.d.ts +81 -0
- package/data/numeric.js +234 -0
- package/data/offsetUtils.d.ts +33 -0
- package/data/offsetUtils.js +167 -0
- package/data/offsets.js +36 -0
- package/data/partialIO.js +68 -0
- package/data/ptr.d.ts +12 -0
- package/data/ptr.js +46 -0
- package/data/ref.d.ts +37 -0
- package/data/ref.js +96 -0
- package/data/sampler.d.ts +107 -0
- package/data/sampler.js +26 -0
- package/data/schemaCallWrapper.js +32 -0
- package/data/schemaMemoryLayout.js +200 -0
- package/data/sizeOf.d.ts +10 -0
- package/data/sizeOf.js +15 -0
- package/data/snippet.d.ts +26 -0
- package/data/snippet.js +61 -0
- package/data/struct.d.ts +17 -0
- package/data/struct.js +46 -0
- package/data/texture.d.ts +292 -0
- package/{texture-Dg5ybJro.js → data/texture.js} +6 -3
- package/data/unstruct.d.ts +24 -0
- package/data/unstruct.js +43 -0
- package/data/vector.d.ts +191 -0
- package/data/vector.js +247 -0
- package/data/vectorImpl.js +516 -0
- package/data/vectorOps.js +664 -0
- package/data/vertexFormatData.d.ts +190 -0
- package/data/vertexFormatData.js +110 -0
- package/data/wgslTypes.d.ts +896 -0
- package/data/wgslTypes.js +215 -0
- package/errors.d.ts +44 -0
- package/errors.js +128 -0
- package/execMode.js +51 -0
- package/extension.d.ts +11 -0
- package/extension.js +18 -0
- package/getGPUValue.js +9 -0
- package/index.d.ts +40 -243
- package/index.js +19 -6318
- package/indexNamedExports.d.ts +38 -0
- package/mathUtils.js +13 -0
- package/memo.js +22 -0
- package/nameRegistry.d.ts +30 -0
- package/nameRegistry.js +449 -0
- package/package.js +5 -0
- package/package.json +23 -23
- package/resolutionCtx.d.ts +29 -0
- package/resolutionCtx.js +546 -0
- package/shared/env.js +13 -0
- package/shared/generators.js +14 -0
- package/shared/meta.d.ts +39 -0
- package/shared/meta.js +63 -0
- package/shared/repr.d.ts +108 -0
- package/shared/stringify.js +22 -0
- package/shared/symbols.d.ts +61 -0
- package/shared/symbols.js +71 -0
- package/shared/utilityTypes.d.ts +29 -0
- package/shared/utilityTypes.js +7 -0
- package/shared/vertexFormat.d.ts +70 -0
- package/shared/vertexFormat.js +64 -0
- package/std/array.d.ts +7 -0
- package/std/array.js +27 -0
- package/std/atomic.d.ts +19 -0
- package/std/atomic.js +113 -0
- package/std/bitcast.d.ts +10 -0
- package/std/bitcast.js +43 -0
- package/std/boolean.d.ts +127 -0
- package/std/boolean.js +274 -0
- package/std/derivative.d.ts +16 -0
- package/std/derivative.js +89 -0
- package/std/discard.d.ts +6 -0
- package/std/discard.js +16 -0
- package/std/extensions.d.ts +8 -0
- package/std/extensions.js +14 -0
- package/std/index.d.ts +15 -3
- package/std/index.js +16 -5
- package/std/matrix.d.ts +41 -0
- package/std/matrix.js +87 -0
- package/std/numeric.d.ts +254 -0
- package/std/numeric.js +847 -0
- package/std/operators.d.ts +48 -0
- package/std/operators.js +153 -0
- package/std/packing.d.ts +26 -0
- package/std/packing.js +86 -0
- package/std/subgroup.d.ts +47 -0
- package/std/subgroup.js +220 -0
- package/std/texture.d.ts +108 -0
- package/std/texture.js +197 -0
- package/tgpu.js +44 -0
- package/tgpuBindGroupLayout.d.ts +161 -0
- package/tgpuBindGroupLayout.js +271 -0
- package/tgpuUnstable.d.ts +48 -0
- package/tgpuUnstable.js +66 -0
- package/tgsl/accessIndex.js +45 -0
- package/tgsl/accessProp.js +113 -0
- package/tgsl/consoleLog/deserializers.js +117 -0
- package/tgsl/consoleLog/logGenerator.js +86 -0
- package/tgsl/consoleLog/serializers.js +225 -0
- package/tgsl/consoleLog/types.d.ts +54 -0
- package/tgsl/consoleLog/types.js +12 -0
- package/tgsl/conversion.js +200 -0
- package/tgsl/forOfUtils.js +45 -0
- package/tgsl/generationHelpers.d.ts +37 -0
- package/tgsl/generationHelpers.js +67 -0
- package/tgsl/math.js +45 -0
- package/tgsl/shaderGenerator.d.ts +18 -0
- package/tgsl/shellless.d.ts +11 -0
- package/tgsl/shellless.js +53 -0
- package/tgsl/wgslGenerator.js +585 -0
- package/types.d.ts +255 -0
- package/types.js +43 -0
- package/unwrapper.d.ts +27 -0
- package/wgslExtensions.d.ts +5 -0
- package/wgslExtensions.js +18 -0
- package/builtin-ClEnM-Ye.js +0 -818
- package/builtin-ClEnM-Ye.js.map +0 -1
- package/common/index.d.ts.map +0 -1
- package/common/index.js.map +0 -1
- package/data/index.d.ts.map +0 -1
- package/data/index.js.map +0 -1
- package/deepEqual-yZXvaV2C.js +0 -413
- package/deepEqual-yZXvaV2C.js.map +0 -1
- package/extensions-0SFbU9FH.js +0 -2032
- package/extensions-0SFbU9FH.js.map +0 -1
- package/fullScreenTriangle-MdLGaAMR.js +0 -543
- package/fullScreenTriangle-MdLGaAMR.js.map +0 -1
- package/index.d.ts.map +0 -1
- package/index.js.map +0 -1
- package/indexNamedExports-Cdy7USiY.d.ts +0 -5696
- package/indexNamedExports-Cdy7USiY.d.ts.map +0 -1
- package/operators-HTxa_0k9.js +0 -4156
- package/operators-HTxa_0k9.js.map +0 -1
- package/std/index.d.ts.map +0 -1
- package/std/index.js.map +0 -1
- package/texture-Dg5ybJro.js.map +0 -1
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
import { $internal, $resolve } from "../shared/symbols.js";
|
|
2
|
+
import { snip } from "./snippet.js";
|
|
3
|
+
import { bool, f16, f32, i32, u32 } from "./numeric.js";
|
|
4
|
+
|
|
5
|
+
//#region src/data/vectorImpl.ts
|
|
6
|
+
const XYZW = [
|
|
7
|
+
"x",
|
|
8
|
+
"y",
|
|
9
|
+
"z",
|
|
10
|
+
"w"
|
|
11
|
+
];
|
|
12
|
+
const RGBA = [
|
|
13
|
+
"r",
|
|
14
|
+
"g",
|
|
15
|
+
"b",
|
|
16
|
+
"a"
|
|
17
|
+
];
|
|
18
|
+
var VecBase = class VecBase extends Array {
|
|
19
|
+
static {
|
|
20
|
+
for (let e0 = 0; e0 < 4; e0++) for (let e1 = 0; e1 < 4; e1++) for (let e2 = 0; e2 < 4; e2++) for (let e3 = 0; e3 < 4; e3++) {
|
|
21
|
+
const xyzwProp = `${XYZW[e0]}${XYZW[e1]}${XYZW[e2]}${XYZW[e3]}`;
|
|
22
|
+
const rgbaProp = `${RGBA[e0]}${RGBA[e1]}${RGBA[e2]}${RGBA[e3]}`;
|
|
23
|
+
Object.defineProperty(VecBase.prototype, xyzwProp, { get() {
|
|
24
|
+
return new this._Vec4(this[e0], this[e1], this[e2], this[e3]);
|
|
25
|
+
} });
|
|
26
|
+
Object.defineProperty(VecBase.prototype, rgbaProp, { get() {
|
|
27
|
+
return new this._Vec4(this[e0], this[e1], this[e2], this[e3]);
|
|
28
|
+
} });
|
|
29
|
+
}
|
|
30
|
+
for (let e0 = 0; e0 < 4; e0++) for (let e1 = 0; e1 < 4; e1++) for (let e2 = 0; e2 < 4; e2++) {
|
|
31
|
+
const xyzwProp = `${XYZW[e0]}${XYZW[e1]}${XYZW[e2]}`;
|
|
32
|
+
const rgbaProp = `${RGBA[e0]}${RGBA[e1]}${RGBA[e2]}`;
|
|
33
|
+
Object.defineProperty(VecBase.prototype, xyzwProp, { get() {
|
|
34
|
+
return new this._Vec3(this[e0], this[e1], this[e2]);
|
|
35
|
+
} });
|
|
36
|
+
Object.defineProperty(VecBase.prototype, rgbaProp, { get() {
|
|
37
|
+
return new this._Vec3(this[e0], this[e1], this[e2]);
|
|
38
|
+
} });
|
|
39
|
+
}
|
|
40
|
+
for (let e0 = 0; e0 < 4; e0++) for (let e1 = 0; e1 < 4; e1++) {
|
|
41
|
+
const xyzwProp = `${XYZW[e0]}${XYZW[e1]}`;
|
|
42
|
+
const rgbaProp = `${RGBA[e0]}${RGBA[e1]}`;
|
|
43
|
+
Object.defineProperty(VecBase.prototype, xyzwProp, { get() {
|
|
44
|
+
return new this._Vec2(this[e0], this[e1]);
|
|
45
|
+
} });
|
|
46
|
+
Object.defineProperty(VecBase.prototype, rgbaProp, { get() {
|
|
47
|
+
return new this._Vec2(this[e0], this[e1]);
|
|
48
|
+
} });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
castElement() {
|
|
52
|
+
return this[$internal].elementSchema;
|
|
53
|
+
}
|
|
54
|
+
[$resolve]() {
|
|
55
|
+
const schema = this[$internal].elementSchema;
|
|
56
|
+
if (this.every((e) => !e)) return snip(`${this.kind}()`, schema, "constant");
|
|
57
|
+
if (this.every((e) => this[0] === e)) return snip(`${this.kind}(${this[0]})`, schema, "runtime");
|
|
58
|
+
return snip(`${this.kind}(${this.join(", ")})`, schema, "runtime");
|
|
59
|
+
}
|
|
60
|
+
toString() {
|
|
61
|
+
return this[$resolve]().value;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var Vec2 = class extends VecBase {
|
|
65
|
+
e0;
|
|
66
|
+
e1;
|
|
67
|
+
constructor(x, y) {
|
|
68
|
+
super(2);
|
|
69
|
+
this.e0 = this.castElement()(x);
|
|
70
|
+
this.e1 = this.castElement()(y ?? x);
|
|
71
|
+
}
|
|
72
|
+
get 0() {
|
|
73
|
+
return this.e0;
|
|
74
|
+
}
|
|
75
|
+
get 1() {
|
|
76
|
+
return this.e1;
|
|
77
|
+
}
|
|
78
|
+
set 0(value) {
|
|
79
|
+
this.e0 = this.castElement()(value);
|
|
80
|
+
}
|
|
81
|
+
set 1(value) {
|
|
82
|
+
this.e1 = this.castElement()(value);
|
|
83
|
+
}
|
|
84
|
+
get x() {
|
|
85
|
+
return this[0];
|
|
86
|
+
}
|
|
87
|
+
get y() {
|
|
88
|
+
return this[1];
|
|
89
|
+
}
|
|
90
|
+
set x(value) {
|
|
91
|
+
this[0] = this.castElement()(value);
|
|
92
|
+
}
|
|
93
|
+
set y(value) {
|
|
94
|
+
this[1] = this.castElement()(value);
|
|
95
|
+
}
|
|
96
|
+
get r() {
|
|
97
|
+
return this[0];
|
|
98
|
+
}
|
|
99
|
+
get g() {
|
|
100
|
+
return this[1];
|
|
101
|
+
}
|
|
102
|
+
set r(value) {
|
|
103
|
+
this[0] = this.castElement()(value);
|
|
104
|
+
}
|
|
105
|
+
set g(value) {
|
|
106
|
+
this[1] = this.castElement()(value);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
var Vec3 = class extends VecBase {
|
|
110
|
+
e0;
|
|
111
|
+
e1;
|
|
112
|
+
e2;
|
|
113
|
+
constructor(x, y, z) {
|
|
114
|
+
super(3);
|
|
115
|
+
this.e0 = this.castElement()(x);
|
|
116
|
+
this.e1 = this.castElement()(y ?? x);
|
|
117
|
+
this.e2 = this.castElement()(z ?? x);
|
|
118
|
+
}
|
|
119
|
+
get 0() {
|
|
120
|
+
return this.e0;
|
|
121
|
+
}
|
|
122
|
+
get 1() {
|
|
123
|
+
return this.e1;
|
|
124
|
+
}
|
|
125
|
+
get 2() {
|
|
126
|
+
return this.e2;
|
|
127
|
+
}
|
|
128
|
+
set 0(value) {
|
|
129
|
+
this.e0 = this.castElement()(value);
|
|
130
|
+
}
|
|
131
|
+
set 1(value) {
|
|
132
|
+
this.e1 = this.castElement()(value);
|
|
133
|
+
}
|
|
134
|
+
set 2(value) {
|
|
135
|
+
this.e2 = this.castElement()(value);
|
|
136
|
+
}
|
|
137
|
+
get x() {
|
|
138
|
+
return this[0];
|
|
139
|
+
}
|
|
140
|
+
get y() {
|
|
141
|
+
return this[1];
|
|
142
|
+
}
|
|
143
|
+
get z() {
|
|
144
|
+
return this[2];
|
|
145
|
+
}
|
|
146
|
+
set x(value) {
|
|
147
|
+
this[0] = this.castElement()(value);
|
|
148
|
+
}
|
|
149
|
+
set y(value) {
|
|
150
|
+
this[1] = this.castElement()(value);
|
|
151
|
+
}
|
|
152
|
+
set z(value) {
|
|
153
|
+
this[2] = this.castElement()(value);
|
|
154
|
+
}
|
|
155
|
+
get r() {
|
|
156
|
+
return this[0];
|
|
157
|
+
}
|
|
158
|
+
get g() {
|
|
159
|
+
return this[1];
|
|
160
|
+
}
|
|
161
|
+
get b() {
|
|
162
|
+
return this[2];
|
|
163
|
+
}
|
|
164
|
+
set r(value) {
|
|
165
|
+
this[0] = this.castElement()(value);
|
|
166
|
+
}
|
|
167
|
+
set g(value) {
|
|
168
|
+
this[1] = this.castElement()(value);
|
|
169
|
+
}
|
|
170
|
+
set b(value) {
|
|
171
|
+
this[2] = this.castElement()(value);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
var Vec4 = class extends VecBase {
|
|
175
|
+
e0;
|
|
176
|
+
e1;
|
|
177
|
+
e2;
|
|
178
|
+
e3;
|
|
179
|
+
constructor(x, y, z, w) {
|
|
180
|
+
super(4);
|
|
181
|
+
this.e0 = this.castElement()(x);
|
|
182
|
+
this.e1 = this.castElement()(y ?? x);
|
|
183
|
+
this.e2 = this.castElement()(z ?? x);
|
|
184
|
+
this.e3 = this.castElement()(w ?? x);
|
|
185
|
+
}
|
|
186
|
+
get 0() {
|
|
187
|
+
return this.e0;
|
|
188
|
+
}
|
|
189
|
+
get 1() {
|
|
190
|
+
return this.e1;
|
|
191
|
+
}
|
|
192
|
+
get 2() {
|
|
193
|
+
return this.e2;
|
|
194
|
+
}
|
|
195
|
+
get 3() {
|
|
196
|
+
return this.e3;
|
|
197
|
+
}
|
|
198
|
+
set 0(value) {
|
|
199
|
+
this.e0 = this.castElement()(value);
|
|
200
|
+
}
|
|
201
|
+
set 1(value) {
|
|
202
|
+
this.e1 = this.castElement()(value);
|
|
203
|
+
}
|
|
204
|
+
set 2(value) {
|
|
205
|
+
this.e2 = this.castElement()(value);
|
|
206
|
+
}
|
|
207
|
+
set 3(value) {
|
|
208
|
+
this.e3 = this.castElement()(value);
|
|
209
|
+
}
|
|
210
|
+
get x() {
|
|
211
|
+
return this[0];
|
|
212
|
+
}
|
|
213
|
+
get y() {
|
|
214
|
+
return this[1];
|
|
215
|
+
}
|
|
216
|
+
get r() {
|
|
217
|
+
return this[0];
|
|
218
|
+
}
|
|
219
|
+
get g() {
|
|
220
|
+
return this[1];
|
|
221
|
+
}
|
|
222
|
+
get b() {
|
|
223
|
+
return this[2];
|
|
224
|
+
}
|
|
225
|
+
get a() {
|
|
226
|
+
return this[3];
|
|
227
|
+
}
|
|
228
|
+
set r(value) {
|
|
229
|
+
this[0] = value;
|
|
230
|
+
}
|
|
231
|
+
set g(value) {
|
|
232
|
+
this[1] = value;
|
|
233
|
+
}
|
|
234
|
+
set b(value) {
|
|
235
|
+
this[2] = value;
|
|
236
|
+
}
|
|
237
|
+
set a(value) {
|
|
238
|
+
this[3] = value;
|
|
239
|
+
}
|
|
240
|
+
get z() {
|
|
241
|
+
return this[2];
|
|
242
|
+
}
|
|
243
|
+
get w() {
|
|
244
|
+
return this[3];
|
|
245
|
+
}
|
|
246
|
+
set x(value) {
|
|
247
|
+
this[0] = value;
|
|
248
|
+
}
|
|
249
|
+
set y(value) {
|
|
250
|
+
this[1] = value;
|
|
251
|
+
}
|
|
252
|
+
set z(value) {
|
|
253
|
+
this[2] = value;
|
|
254
|
+
}
|
|
255
|
+
set w(value) {
|
|
256
|
+
this[3] = value;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
var Vec2fImpl = class Vec2fImpl extends Vec2 {
|
|
260
|
+
get [$internal]() {
|
|
261
|
+
return { elementSchema: f32 };
|
|
262
|
+
}
|
|
263
|
+
get kind() {
|
|
264
|
+
return "vec2f";
|
|
265
|
+
}
|
|
266
|
+
get _Vec2() {
|
|
267
|
+
return Vec2fImpl;
|
|
268
|
+
}
|
|
269
|
+
get _Vec3() {
|
|
270
|
+
return Vec3fImpl;
|
|
271
|
+
}
|
|
272
|
+
get _Vec4() {
|
|
273
|
+
return Vec4fImpl;
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
var Vec2hImpl = class Vec2hImpl extends Vec2 {
|
|
277
|
+
get [$internal]() {
|
|
278
|
+
return { elementSchema: f16 };
|
|
279
|
+
}
|
|
280
|
+
get kind() {
|
|
281
|
+
return "vec2h";
|
|
282
|
+
}
|
|
283
|
+
get _Vec2() {
|
|
284
|
+
return Vec2hImpl;
|
|
285
|
+
}
|
|
286
|
+
get _Vec3() {
|
|
287
|
+
return Vec3hImpl;
|
|
288
|
+
}
|
|
289
|
+
get _Vec4() {
|
|
290
|
+
return Vec4hImpl;
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
var Vec2iImpl = class Vec2iImpl extends Vec2 {
|
|
294
|
+
get [$internal]() {
|
|
295
|
+
return { elementSchema: i32 };
|
|
296
|
+
}
|
|
297
|
+
get kind() {
|
|
298
|
+
return "vec2i";
|
|
299
|
+
}
|
|
300
|
+
get _Vec2() {
|
|
301
|
+
return Vec2iImpl;
|
|
302
|
+
}
|
|
303
|
+
get _Vec3() {
|
|
304
|
+
return Vec3iImpl;
|
|
305
|
+
}
|
|
306
|
+
get _Vec4() {
|
|
307
|
+
return Vec4iImpl;
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
var Vec2uImpl = class Vec2uImpl extends Vec2 {
|
|
311
|
+
get [$internal]() {
|
|
312
|
+
return { elementSchema: u32 };
|
|
313
|
+
}
|
|
314
|
+
get kind() {
|
|
315
|
+
return "vec2u";
|
|
316
|
+
}
|
|
317
|
+
get _Vec2() {
|
|
318
|
+
return Vec2uImpl;
|
|
319
|
+
}
|
|
320
|
+
get _Vec3() {
|
|
321
|
+
return Vec3uImpl;
|
|
322
|
+
}
|
|
323
|
+
get _Vec4() {
|
|
324
|
+
return Vec4uImpl;
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
var Vec2bImpl = class Vec2bImpl extends Vec2 {
|
|
328
|
+
get [$internal]() {
|
|
329
|
+
return { elementSchema: bool };
|
|
330
|
+
}
|
|
331
|
+
get kind() {
|
|
332
|
+
return "vec2<bool>";
|
|
333
|
+
}
|
|
334
|
+
get _Vec2() {
|
|
335
|
+
return Vec2bImpl;
|
|
336
|
+
}
|
|
337
|
+
get _Vec3() {
|
|
338
|
+
return Vec3bImpl;
|
|
339
|
+
}
|
|
340
|
+
get _Vec4() {
|
|
341
|
+
return Vec4bImpl;
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
var Vec3fImpl = class Vec3fImpl extends Vec3 {
|
|
345
|
+
get [$internal]() {
|
|
346
|
+
return { elementSchema: f32 };
|
|
347
|
+
}
|
|
348
|
+
get kind() {
|
|
349
|
+
return "vec3f";
|
|
350
|
+
}
|
|
351
|
+
get _Vec2() {
|
|
352
|
+
return Vec2fImpl;
|
|
353
|
+
}
|
|
354
|
+
get _Vec3() {
|
|
355
|
+
return Vec3fImpl;
|
|
356
|
+
}
|
|
357
|
+
get _Vec4() {
|
|
358
|
+
return Vec4fImpl;
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
var Vec3hImpl = class Vec3hImpl extends Vec3 {
|
|
362
|
+
get [$internal]() {
|
|
363
|
+
return { elementSchema: f16 };
|
|
364
|
+
}
|
|
365
|
+
get kind() {
|
|
366
|
+
return "vec3h";
|
|
367
|
+
}
|
|
368
|
+
get _Vec2() {
|
|
369
|
+
return Vec2hImpl;
|
|
370
|
+
}
|
|
371
|
+
get _Vec3() {
|
|
372
|
+
return Vec3hImpl;
|
|
373
|
+
}
|
|
374
|
+
get _Vec4() {
|
|
375
|
+
return Vec4hImpl;
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
var Vec3iImpl = class Vec3iImpl extends Vec3 {
|
|
379
|
+
get [$internal]() {
|
|
380
|
+
return { elementSchema: i32 };
|
|
381
|
+
}
|
|
382
|
+
get kind() {
|
|
383
|
+
return "vec3i";
|
|
384
|
+
}
|
|
385
|
+
get _Vec2() {
|
|
386
|
+
return Vec2iImpl;
|
|
387
|
+
}
|
|
388
|
+
get _Vec3() {
|
|
389
|
+
return Vec3iImpl;
|
|
390
|
+
}
|
|
391
|
+
get _Vec4() {
|
|
392
|
+
return Vec4iImpl;
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
var Vec3uImpl = class Vec3uImpl extends Vec3 {
|
|
396
|
+
get [$internal]() {
|
|
397
|
+
return { elementSchema: u32 };
|
|
398
|
+
}
|
|
399
|
+
get kind() {
|
|
400
|
+
return "vec3u";
|
|
401
|
+
}
|
|
402
|
+
get _Vec2() {
|
|
403
|
+
return Vec2uImpl;
|
|
404
|
+
}
|
|
405
|
+
get _Vec3() {
|
|
406
|
+
return Vec3uImpl;
|
|
407
|
+
}
|
|
408
|
+
get _Vec4() {
|
|
409
|
+
return Vec4uImpl;
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
var Vec3bImpl = class Vec3bImpl extends Vec3 {
|
|
413
|
+
get [$internal]() {
|
|
414
|
+
return { elementSchema: bool };
|
|
415
|
+
}
|
|
416
|
+
get kind() {
|
|
417
|
+
return "vec3<bool>";
|
|
418
|
+
}
|
|
419
|
+
get _Vec2() {
|
|
420
|
+
return Vec2bImpl;
|
|
421
|
+
}
|
|
422
|
+
get _Vec3() {
|
|
423
|
+
return Vec3bImpl;
|
|
424
|
+
}
|
|
425
|
+
get _Vec4() {
|
|
426
|
+
return Vec4bImpl;
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
var Vec4fImpl = class Vec4fImpl extends Vec4 {
|
|
430
|
+
get [$internal]() {
|
|
431
|
+
return { elementSchema: f32 };
|
|
432
|
+
}
|
|
433
|
+
get kind() {
|
|
434
|
+
return "vec4f";
|
|
435
|
+
}
|
|
436
|
+
get _Vec2() {
|
|
437
|
+
return Vec2fImpl;
|
|
438
|
+
}
|
|
439
|
+
get _Vec3() {
|
|
440
|
+
return Vec3fImpl;
|
|
441
|
+
}
|
|
442
|
+
get _Vec4() {
|
|
443
|
+
return Vec4fImpl;
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
var Vec4hImpl = class Vec4hImpl extends Vec4 {
|
|
447
|
+
get [$internal]() {
|
|
448
|
+
return { elementSchema: f16 };
|
|
449
|
+
}
|
|
450
|
+
get kind() {
|
|
451
|
+
return "vec4h";
|
|
452
|
+
}
|
|
453
|
+
get _Vec2() {
|
|
454
|
+
return Vec2hImpl;
|
|
455
|
+
}
|
|
456
|
+
get _Vec3() {
|
|
457
|
+
return Vec3hImpl;
|
|
458
|
+
}
|
|
459
|
+
get _Vec4() {
|
|
460
|
+
return Vec4hImpl;
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
var Vec4iImpl = class Vec4iImpl extends Vec4 {
|
|
464
|
+
get [$internal]() {
|
|
465
|
+
return { elementSchema: i32 };
|
|
466
|
+
}
|
|
467
|
+
get kind() {
|
|
468
|
+
return "vec4i";
|
|
469
|
+
}
|
|
470
|
+
get _Vec2() {
|
|
471
|
+
return Vec2iImpl;
|
|
472
|
+
}
|
|
473
|
+
get _Vec3() {
|
|
474
|
+
return Vec3iImpl;
|
|
475
|
+
}
|
|
476
|
+
get _Vec4() {
|
|
477
|
+
return Vec4iImpl;
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
var Vec4uImpl = class Vec4uImpl extends Vec4 {
|
|
481
|
+
get [$internal]() {
|
|
482
|
+
return { elementSchema: u32 };
|
|
483
|
+
}
|
|
484
|
+
get kind() {
|
|
485
|
+
return "vec4u";
|
|
486
|
+
}
|
|
487
|
+
get _Vec2() {
|
|
488
|
+
return Vec2uImpl;
|
|
489
|
+
}
|
|
490
|
+
get _Vec3() {
|
|
491
|
+
return Vec3uImpl;
|
|
492
|
+
}
|
|
493
|
+
get _Vec4() {
|
|
494
|
+
return Vec4uImpl;
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
var Vec4bImpl = class Vec4bImpl extends Vec4 {
|
|
498
|
+
get [$internal]() {
|
|
499
|
+
return { elementSchema: bool };
|
|
500
|
+
}
|
|
501
|
+
get kind() {
|
|
502
|
+
return "vec4<bool>";
|
|
503
|
+
}
|
|
504
|
+
get _Vec2() {
|
|
505
|
+
return Vec2bImpl;
|
|
506
|
+
}
|
|
507
|
+
get _Vec3() {
|
|
508
|
+
return Vec3bImpl;
|
|
509
|
+
}
|
|
510
|
+
get _Vec4() {
|
|
511
|
+
return Vec4bImpl;
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
//#endregion
|
|
516
|
+
export { Vec2bImpl, Vec2fImpl, Vec2hImpl, Vec2iImpl, Vec2uImpl, Vec3bImpl, Vec3fImpl, Vec3hImpl, Vec3iImpl, Vec3uImpl, Vec4bImpl, Vec4fImpl, Vec4hImpl, Vec4iImpl, Vec4uImpl, VecBase };
|