@sparkjsdev/spark 0.1.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.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +212 -0
  3. package/dist/assets/worker-DQiiPuma.js.map +1 -0
  4. package/dist/assets/worker-DnqMl73p.js.map +1 -0
  5. package/dist/spark.cjs.js +12696 -0
  6. package/dist/spark.cjs.js.map +1 -0
  7. package/dist/spark.cjs.min.js +1086 -0
  8. package/dist/spark.cjs.min.js.map +1 -0
  9. package/dist/spark.module.js +12679 -0
  10. package/dist/spark.module.js.map +1 -0
  11. package/dist/spark.module.min.js +10048 -0
  12. package/dist/spark.module.min.js.map +1 -0
  13. package/dist/types/ForgeRenderer.d.ts +136 -0
  14. package/dist/types/ForgeViewpoint.d.ts +83 -0
  15. package/dist/types/PackedSplats.d.ts +87 -0
  16. package/dist/types/Readback.d.ts +50 -0
  17. package/dist/types/RgbaArray.d.ts +44 -0
  18. package/dist/types/SplatAccumulator.d.ts +27 -0
  19. package/dist/types/SplatEdit.d.ts +94 -0
  20. package/dist/types/SplatGenerator.d.ts +61 -0
  21. package/dist/types/SplatGeometry.d.ts +7 -0
  22. package/dist/types/SplatLoader.d.ts +80 -0
  23. package/dist/types/SplatMesh.d.ts +85 -0
  24. package/dist/types/SplatSkinning.d.ts +29 -0
  25. package/dist/types/antisplat.d.ts +5 -0
  26. package/dist/types/controls.d.ts +114 -0
  27. package/dist/types/defines.d.ts +17 -0
  28. package/dist/types/dyno/base.d.ts +174 -0
  29. package/dist/types/dyno/control.d.ts +6 -0
  30. package/dist/types/dyno/convert.d.ts +190 -0
  31. package/dist/types/dyno/logic.d.ts +103 -0
  32. package/dist/types/dyno/math.d.ts +214 -0
  33. package/dist/types/dyno/mathTypes.d.ts +47 -0
  34. package/dist/types/dyno/output.d.ts +25 -0
  35. package/dist/types/dyno/program.d.ts +30 -0
  36. package/dist/types/dyno/splats.d.ts +156 -0
  37. package/dist/types/dyno/texture.d.ts +50 -0
  38. package/dist/types/dyno/transform.d.ts +59 -0
  39. package/dist/types/dyno/trig.d.ts +94 -0
  40. package/dist/types/dyno/types.d.ts +62 -0
  41. package/dist/types/dyno/uniforms.d.ts +374 -0
  42. package/dist/types/dyno/util.d.ts +139 -0
  43. package/dist/types/dyno/value.d.ts +32 -0
  44. package/dist/types/dyno/vecmat.d.ts +226 -0
  45. package/dist/types/dyno.d.ts +16 -0
  46. package/dist/types/generators/snow.d.ts +65 -0
  47. package/dist/types/generators/static.d.ts +9 -0
  48. package/dist/types/generators.d.ts +2 -0
  49. package/dist/types/hands.d.ts +95 -0
  50. package/dist/types/index.d.ts +20 -0
  51. package/dist/types/ksplat.d.ts +6 -0
  52. package/dist/types/ply.d.ts +31 -0
  53. package/dist/types/shaders.d.ts +1 -0
  54. package/dist/types/splatConstructors.d.ts +46 -0
  55. package/dist/types/splatWorker.d.ts +20 -0
  56. package/dist/types/spz.d.ts +50 -0
  57. package/dist/types/utils.d.ts +150 -0
  58. package/dist/types/vrButton.d.ts +6 -0
  59. package/dist/types/worker.d.ts +1 -0
  60. package/package.json +63 -0
@@ -0,0 +1,59 @@
1
+ import { Dyno } from './base';
2
+ import { DynoVal } from './value';
3
+ export declare const transformPos: (position: DynoVal<"vec3">, { scale, scales, rotate, translate, }: {
4
+ scale?: DynoVal<"float">;
5
+ scales?: DynoVal<"vec3">;
6
+ rotate?: DynoVal<"vec4">;
7
+ translate?: DynoVal<"vec3">;
8
+ }) => DynoVal<"vec3">;
9
+ export declare const transformDir: (dir: DynoVal<"vec3">, { scale, scales, rotate, }: {
10
+ scale?: DynoVal<"float">;
11
+ scales?: DynoVal<"vec3">;
12
+ rotate?: DynoVal<"vec4">;
13
+ }) => DynoVal<"vec3">;
14
+ export declare const transformQuat: (quaternion: DynoVal<"vec4">, { rotate }: {
15
+ rotate?: DynoVal<"vec4">;
16
+ }) => DynoVal<"vec4">;
17
+ export declare class TransformPosition extends Dyno<{
18
+ position: "vec3";
19
+ scale: "float";
20
+ scales: "vec3";
21
+ rotate: "vec4";
22
+ translate: "vec3";
23
+ }, {
24
+ position: "vec3";
25
+ }> {
26
+ constructor({ position, scale, scales, rotate, translate, }: {
27
+ position?: DynoVal<"vec3">;
28
+ scale?: DynoVal<"float">;
29
+ scales?: DynoVal<"vec3">;
30
+ rotate?: DynoVal<"vec4">;
31
+ translate?: DynoVal<"vec3">;
32
+ });
33
+ }
34
+ export declare class TransformDir extends Dyno<{
35
+ dir: "vec3";
36
+ scale: "float";
37
+ scales: "vec3";
38
+ rotate: "vec4";
39
+ }, {
40
+ dir: "vec3";
41
+ }> {
42
+ constructor({ dir, scale, scales, rotate, }: {
43
+ dir?: DynoVal<"vec3">;
44
+ scale?: DynoVal<"float">;
45
+ scales?: DynoVal<"vec3">;
46
+ rotate?: DynoVal<"vec4">;
47
+ });
48
+ }
49
+ export declare class TransformQuaternion extends Dyno<{
50
+ quaternion: "vec4";
51
+ rotate: "vec4";
52
+ }, {
53
+ quaternion: "vec4";
54
+ }> {
55
+ constructor({ quaternion, rotate, }: {
56
+ quaternion?: DynoVal<"vec4">;
57
+ rotate?: DynoVal<"vec4">;
58
+ });
59
+ }
@@ -0,0 +1,94 @@
1
+ import { BinaryOp, UnaryOp } from './base';
2
+ import { FloatTypes } from './types';
3
+ import { DynoVal } from './value';
4
+ export declare const radians: <A extends FloatTypes>(degrees: DynoVal<A>) => DynoVal<A>;
5
+ export declare const degrees: <A extends FloatTypes>(radians: DynoVal<A>) => DynoVal<A>;
6
+ export declare const sin: <A extends FloatTypes>(radians: DynoVal<A>) => DynoVal<A>;
7
+ export declare const cos: <A extends FloatTypes>(radians: DynoVal<A>) => DynoVal<A>;
8
+ export declare const tan: <A extends FloatTypes>(radians: DynoVal<A>) => DynoVal<A>;
9
+ export declare const asin: <A extends FloatTypes>(sin: DynoVal<A>) => DynoVal<A>;
10
+ export declare const acos: <A extends FloatTypes>(cos: DynoVal<A>) => DynoVal<A>;
11
+ export declare const atan: <A extends FloatTypes>(tan: DynoVal<A>) => DynoVal<A>;
12
+ export declare const atan2: <A extends FloatTypes>(y: DynoVal<A>, x: DynoVal<A>) => DynoVal<A>;
13
+ export declare const sinh: <A extends FloatTypes>(x: DynoVal<A>) => DynoVal<A>;
14
+ export declare const cosh: <A extends FloatTypes>(x: DynoVal<A>) => DynoVal<A>;
15
+ export declare const tanh: <A extends FloatTypes>(x: DynoVal<A>) => DynoVal<A>;
16
+ export declare const asinh: <A extends FloatTypes>(x: DynoVal<A>) => DynoVal<A>;
17
+ export declare const acosh: <A extends FloatTypes>(x: DynoVal<A>) => DynoVal<A>;
18
+ export declare const atanh: <A extends FloatTypes>(x: DynoVal<A>) => DynoVal<A>;
19
+ export declare class Radians<A extends FloatTypes> extends UnaryOp<A, A, "radians"> {
20
+ constructor({ degrees }: {
21
+ degrees: DynoVal<A>;
22
+ });
23
+ }
24
+ export declare class Degrees<A extends FloatTypes> extends UnaryOp<A, A, "degrees"> {
25
+ constructor({ radians }: {
26
+ radians: DynoVal<A>;
27
+ });
28
+ }
29
+ export declare class Sin<A extends FloatTypes> extends UnaryOp<A, A, "sin"> {
30
+ constructor({ radians }: {
31
+ radians: DynoVal<A>;
32
+ });
33
+ }
34
+ export declare class Cos<A extends FloatTypes> extends UnaryOp<A, A, "cos"> {
35
+ constructor({ radians }: {
36
+ radians: DynoVal<A>;
37
+ });
38
+ }
39
+ export declare class Tan<A extends FloatTypes> extends UnaryOp<A, A, "tan"> {
40
+ constructor({ radians }: {
41
+ radians: DynoVal<A>;
42
+ });
43
+ }
44
+ export declare class Asin<A extends FloatTypes> extends UnaryOp<A, A, "asin"> {
45
+ constructor({ sin }: {
46
+ sin: DynoVal<A>;
47
+ });
48
+ }
49
+ export declare class Acos<A extends FloatTypes> extends UnaryOp<A, A, "acos"> {
50
+ constructor({ cos }: {
51
+ cos: DynoVal<A>;
52
+ });
53
+ }
54
+ export declare class Atan<A extends FloatTypes> extends UnaryOp<A, A, "atan"> {
55
+ constructor({ tan }: {
56
+ tan: DynoVal<A>;
57
+ });
58
+ }
59
+ export declare class Atan2<A extends FloatTypes> extends BinaryOp<A, A, A, "atan2"> {
60
+ constructor({ y, x }: {
61
+ y: DynoVal<A>;
62
+ x: DynoVal<A>;
63
+ });
64
+ }
65
+ export declare class Sinh<A extends FloatTypes> extends UnaryOp<A, A, "sinh"> {
66
+ constructor({ x }: {
67
+ x: DynoVal<A>;
68
+ });
69
+ }
70
+ export declare class Cosh<A extends FloatTypes> extends UnaryOp<A, A, "cosh"> {
71
+ constructor({ x }: {
72
+ x: DynoVal<A>;
73
+ });
74
+ }
75
+ export declare class Tanh<A extends FloatTypes> extends UnaryOp<A, A, "tanh"> {
76
+ constructor({ x }: {
77
+ x: DynoVal<A>;
78
+ });
79
+ }
80
+ export declare class Asinh<A extends FloatTypes> extends UnaryOp<A, A, "asinh"> {
81
+ constructor({ x }: {
82
+ x: DynoVal<A>;
83
+ });
84
+ }
85
+ export declare class Acosh<A extends FloatTypes> extends UnaryOp<A, A, "acosh"> {
86
+ constructor({ x }: {
87
+ x: DynoVal<A>;
88
+ });
89
+ }
90
+ export declare class Atanh<A extends FloatTypes> extends UnaryOp<A, A, "atanh"> {
91
+ constructor({ x }: {
92
+ x: DynoVal<A>;
93
+ });
94
+ }
@@ -0,0 +1,62 @@
1
+ import type * as THREE from "three";
2
+ export type BoolTypes = "bool" | "bvec2" | "bvec3" | "bvec4";
3
+ export type IntTypes = "int" | "ivec2" | "ivec3" | "ivec4";
4
+ export type UintTypes = "uint" | "uvec2" | "uvec3" | "uvec4";
5
+ export type AllIntTypes = IntTypes | UintTypes;
6
+ export type FloatTypes = "float" | "vec2" | "vec3" | "vec4";
7
+ export type ScalarTypes = "uint" | "int" | "float";
8
+ export type Vector2Types = "vec2" | "ivec2" | "uvec2";
9
+ export type Vector3Types = "vec3" | "ivec3" | "uvec3";
10
+ export type Vector4Types = "vec4" | "ivec4" | "uvec4";
11
+ export type VectorTypes = Vector2Types | Vector3Types | Vector4Types;
12
+ export type MatFloatTypes = "mat2" | "mat2x2" | "mat2x3" | "mat2x4" | "mat3" | "mat3x2" | "mat3x3" | "mat3x4" | "mat4" | "mat4x2" | "mat4x3" | "mat4x4";
13
+ export type SquareMatTypes = "mat2" | "mat3" | "mat4" | "mat2x2" | "mat3x3" | "mat4x4";
14
+ export type AllFloatTypes = FloatTypes | MatFloatTypes;
15
+ export type SignedTypes = IntTypes | FloatTypes;
16
+ export type AllSignedTypes = SignedTypes | MatFloatTypes;
17
+ export type ValueTypes = FloatTypes | IntTypes | UintTypes;
18
+ export type AllValueTypes = AllFloatTypes | IntTypes | UintTypes;
19
+ export type SimpleTypes = BoolTypes | AllValueTypes;
20
+ export type VectorElementType<A extends VectorTypes> = A extends FloatTypes ? "float" : A extends IntTypes ? "int" : A extends UintTypes ? "uint" : never;
21
+ export type SameSizeVec<T extends ValueTypes> = T extends ScalarTypes ? "float" : T extends "vec2" | "ivec2" | "uvec2" ? "vec2" : T extends "vec3" | "ivec3" | "uvec3" ? "vec3" : T extends "vec4" | "ivec4" | "uvec4" ? "vec4" : never;
22
+ export type SameSizeUvec<T extends ValueTypes> = T extends ScalarTypes ? "uint" : T extends "vec2" | "ivec2" | "uvec2" ? "uvec2" : T extends "vec3" | "ivec3" | "uvec3" ? "uvec3" : T extends "vec4" | "ivec4" | "uvec4" ? "uvec4" : never;
23
+ export type SameSizeIvec<T extends ValueTypes> = T extends ScalarTypes ? "int" : T extends "vec2" | "ivec2" | "uvec2" ? "ivec2" : T extends "vec3" | "ivec3" | "uvec3" ? "ivec3" : T extends "vec4" | "ivec4" | "uvec4" ? "ivec4" : never;
24
+ export type SamplerTypes = "sampler2D" | "sampler2DArray" | "sampler3D" | "samplerCube";
25
+ export type UsamplerTypes = "usampler2D" | "usampler2DArray" | "usampler3D" | "usamplerCube";
26
+ export type IsamplerTypes = "isampler2D" | "isampler2DArray" | "isampler3D" | "isamplerCube";
27
+ export type NormalSamplerTypes = SamplerTypes | UsamplerTypes | IsamplerTypes;
28
+ export type SamplerShadowTypes = "sampler2DShadow" | "sampler2DArrayShadow" | "samplerCubeShadow";
29
+ export type AllSamplerTypes = NormalSamplerTypes | SamplerShadowTypes;
30
+ export type Sampler2DTypes = "sampler2D" | "usampler2D" | "isampler2D" | "sampler2DShadow";
31
+ export type Sampler2DArrayTypes = "sampler2DArray" | "usampler2DArray" | "isampler2DArray" | "sampler2DArrayShadow";
32
+ export type Sampler3DTypes = "sampler3D" | "usampler3D" | "isampler3D";
33
+ export type SamplerCubeTypes = "samplerCube" | "usamplerCube" | "isamplerCube" | "samplerCubeShadow";
34
+ export declare function isBoolType(type: DynoType): boolean;
35
+ export declare function isScalarType(type: DynoType): boolean;
36
+ export declare function isIntType(type: DynoType): boolean;
37
+ export declare function isUintType(type: DynoType): boolean;
38
+ export declare function isFloatType(type: DynoType): boolean;
39
+ export declare function isMatFloatType(type: DynoType): boolean;
40
+ export declare function isAllFloatType(type: DynoType): boolean;
41
+ export declare function isVector2Type(type: DynoType): boolean;
42
+ export declare function isVector3Type(type: DynoType): boolean;
43
+ export declare function isVector4Type(type: DynoType): boolean;
44
+ export declare function isVectorType(type: DynoType): boolean;
45
+ export declare function isMat2(type: DynoType): boolean;
46
+ export declare function isMat3(type: DynoType): boolean;
47
+ export declare function isMat4(type: DynoType): boolean;
48
+ export declare function vectorElementType<A extends VectorTypes>(type: A): VectorElementType<A>;
49
+ export declare function vectorDim<A extends VectorTypes>(type: A): number;
50
+ export declare function sameSizeVec<T extends ValueTypes>(type: T): SameSizeVec<T>;
51
+ export declare function sameSizeUvec<T extends ValueTypes>(type: T): SameSizeUvec<T>;
52
+ export declare function sameSizeIvec<T extends ValueTypes>(type: T): SameSizeIvec<T>;
53
+ export type BaseType = SimpleTypes | AllSamplerTypes;
54
+ export type UserType = {
55
+ type: string;
56
+ };
57
+ export type DynoType = BaseType | UserType;
58
+ export type DynoJsType<T extends DynoType> = T extends "bool" ? boolean : T extends "uint" ? number : T extends "int" ? number : T extends "float" ? number : T extends "bvec2" ? [boolean, boolean] : T extends "uvec2" ? THREE.Vector2 | [number, number] | Uint32Array : T extends "ivec2" ? THREE.Vector2 | [number, number] | Int32Array : T extends "vec2" ? THREE.Vector2 | [number, number] | Float32Array : T extends "bvec3" ? [boolean, boolean, boolean] : T extends "uvec3" ? THREE.Vector3 | [number, number, number] | Uint32Array : T extends "ivec3" ? THREE.Vector3 | [number, number, number] | Int32Array : T extends "vec3" ? THREE.Vector3 | THREE.Color | [number, number, number] | Float32Array : T extends "bvec4" ? [boolean, boolean, boolean, boolean] : T extends "uvec4" ? THREE.Vector4 | [number, number, number, number] | Uint32Array : T extends "ivec4" ? THREE.Vector4 | [number, number, number, number] | Int32Array : T extends "vec4" ? THREE.Vector4 | THREE.Quaternion | [number, number, number, number] | Float32Array : T extends "mat2" ? THREE.Matrix2 | Float32Array : T extends "mat2x2" ? THREE.Matrix2 | Float32Array : T extends "mat2x3" ? Float32Array : T extends "mat2x4" ? Float32Array : T extends "mat3" ? THREE.Matrix3 | Float32Array : T extends "mat3x2" ? Float32Array : T extends "mat3x3" ? THREE.Matrix3 | Float32Array : T extends "mat3x4" ? Float32Array : T extends "mat4" ? THREE.Matrix4 | Float32Array : T extends "mat4x2" ? Float32Array : T extends "mat4x3" ? Float32Array : T extends "mat4x4" ? THREE.Matrix4 | Float32Array : T extends "usampler2D" ? THREE.Texture : T extends "isampler2D" ? THREE.Texture : T extends "sampler2D" ? THREE.Texture : T extends "sampler2DShadow" ? THREE.Texture : T extends "usampler2DArray" ? THREE.DataArrayTexture : T extends "isampler2DArray" ? THREE.DataArrayTexture : T extends "sampler2DArray" ? THREE.DataArrayTexture : T extends "sampler2DArrayShadow" ? THREE.Texture : T extends "usampler3D" ? THREE.DataArrayTexture : T extends "isampler3D" ? THREE.DataArrayTexture : T extends "sampler3D" ? THREE.DataArrayTexture : T extends "usamplerCube" ? THREE.DataArrayTexture : T extends "isamplerCube" ? THREE.DataArrayTexture : T extends "samplerCube" ? THREE.DataArrayTexture : T extends "samplerCubeShadow" ? THREE.Texture : unknown;
59
+ export declare function typeLiteral(type: DynoType): string;
60
+ export declare function numberAsInt(value: number): string;
61
+ export declare function numberAsUint(value: number): string;
62
+ export declare function numberAsFloat(value: number): string;
@@ -0,0 +1,374 @@
1
+ import { Dyno } from './base';
2
+ import { DynoJsType, DynoType } from './types';
3
+ import { DynoValue, HasDynoOut } from './value';
4
+ export declare const uniform: <V extends DynoJsType<DynoType>>(key: string, type: DynoType, value: V) => DynoUniform<DynoType, string, V>;
5
+ export declare const dynoBool: (value?: boolean, key?: string) => DynoBool<string>;
6
+ export declare const dynoUint: (value?: number, key?: string) => DynoUint<string>;
7
+ export declare const dynoInt: (value?: number, key?: string) => DynoInt<string>;
8
+ export declare const dynoFloat: (value?: number, key?: string) => DynoFloat<string>;
9
+ export declare const dynoBvec2: <V extends DynoJsType<"bvec2">>(value: V, key?: string) => DynoBvec2<string, V>;
10
+ export declare const dynoUvec2: <V extends DynoJsType<"uvec2">>(value: V, key?: string) => DynoUvec2<string, V>;
11
+ export declare const dynoIvec2: <V extends DynoJsType<"ivec2">>(value: V, key?: string) => DynoIvec2<string, V>;
12
+ export declare const dynoVec2: <V extends DynoJsType<"vec2">>(value: V, key?: string) => DynoVec2<string, V>;
13
+ export declare const dynoBvec3: <V extends DynoJsType<"bvec3">>(value: V, key?: string) => DynoBvec3<string, V>;
14
+ export declare const dynoUvec3: <V extends DynoJsType<"uvec3">>(value: V, key?: string) => DynoUvec3<V, string>;
15
+ export declare const dynoIvec3: <V extends DynoJsType<"ivec3">>(value: V, key?: string) => DynoIvec3<V, string>;
16
+ export declare const dynoVec3: <V extends DynoJsType<"vec3">>(value: V, key?: string) => DynoVec3<V, string>;
17
+ export declare const dynoBvec4: <V extends DynoJsType<"bvec4">>(value: V, key?: string) => DynoBvec4<string, V>;
18
+ export declare const dynoUvec4: <V extends DynoJsType<"uvec4">>(value: V, key?: string) => DynoUvec4<string, V>;
19
+ export declare const dynoIvec4: <V extends DynoJsType<"ivec4">>(value: V, key?: string) => DynoIvec4<string, V>;
20
+ export declare const dynoVec4: <V extends DynoJsType<"vec4">>(value: V, key?: string) => DynoVec4<V, string>;
21
+ export declare const dynoMat2: <V extends DynoJsType<"mat2">>(value: V, key?: string) => DynoMat2<string, V>;
22
+ export declare const dynoMat2x2: <V extends DynoJsType<"mat2x2">>(value: V, key?: string) => DynoMat2x2<string, V>;
23
+ export declare const dynoMat2x3: <V extends DynoJsType<"mat2x3">>(value: V, key?: string) => DynoMat2x3<string, V>;
24
+ export declare const dynoMat2x4: <V extends DynoJsType<"mat2x4">>(value: V, key?: string) => DynoMat2x4<string, V>;
25
+ export declare const dynoMat3: <V extends DynoJsType<"mat3">>(value: V, key?: string) => DynoMat3<string, V>;
26
+ export declare const dynoMat3x2: <V extends DynoJsType<"mat3x2">>(value: V, key?: string) => DynoMat3x2<string, V>;
27
+ export declare const dynoMat3x3: <V extends DynoJsType<"mat3x3">>(value: V, key?: string) => DynoMat3x3<string, V>;
28
+ export declare const dynoMat3x4: <V extends DynoJsType<"mat3x4">>(value: V, key?: string) => DynoMat3x4<string, V>;
29
+ export declare const dynoMat4: <V extends DynoJsType<"mat4">>(value: V, key?: string) => DynoMat4<string, V>;
30
+ export declare const dynoMat4x2: <V extends DynoJsType<"mat4x2">>(value: V, key?: string) => DynoMat4x2<string, V>;
31
+ export declare const dynoMat4x3: <V extends DynoJsType<"mat4x3">>(value: V, key?: string) => DynoMat4x3<string, V>;
32
+ export declare const dynoMat4x4: <V extends DynoJsType<"mat4x4">>(value: V, key?: string) => DynoMat4x4<string, V>;
33
+ export declare const dynoUsampler2D: <V extends DynoJsType<"usampler2D">>(value: V, key?: string) => DynoUsampler2D<string, V>;
34
+ export declare const dynoIsampler2D: <V extends DynoJsType<"isampler2D">>(value: V, key?: string) => DynoIsampler2D<string, V>;
35
+ export declare const dynoSampler2D: <V extends DynoJsType<"sampler2D">>(value: V, key?: string) => DynoSampler2D<string, V>;
36
+ export declare const dynoUsampler2DArray: <V extends DynoJsType<"usampler2DArray">>(value: V, key?: string) => DynoUsampler2DArray<string, V>;
37
+ export declare const dynoIsampler2DArray: <V extends DynoJsType<"isampler2DArray">>(key: string, value: V) => DynoIsampler2DArray<string, V>;
38
+ export declare const dynoSampler2DArray: <V extends DynoJsType<"sampler2DArray">>(value: V, key?: string) => DynoSampler2DArray<string, V>;
39
+ export declare const dynoUsampler3D: <V extends DynoJsType<"usampler3D">>(value: V, key?: string) => DynoUsampler3D<string, V>;
40
+ export declare const dynoIsampler3D: <V extends DynoJsType<"isampler3D">>(value: V, key?: string) => DynoIsampler3D<string, V>;
41
+ export declare const dynoSampler3D: <V extends DynoJsType<"sampler3D">>(value: V, key?: string) => DynoSampler3D<string, V>;
42
+ export declare const dynoUsamplerCube: <V extends DynoJsType<"usamplerCube">>(value: V, key?: string) => DynoUsamplerCube<string, V>;
43
+ export declare const dynoIsamplerCube: <V extends DynoJsType<"isamplerCube">>(value: V, key?: string) => DynoIsamplerCube<string, V>;
44
+ export declare const dynoSamplerCube: <V extends DynoJsType<"samplerCube">>(value: V, key?: string) => DynoSamplerCube<string, V>;
45
+ export declare const dynoSampler2DShadow: <V extends DynoJsType<"sampler2DShadow">>(value: V, key?: string) => DynoSampler2DShadow<string, V>;
46
+ export declare const dynoSampler2DArrayShadow: <V extends DynoJsType<"sampler2DArrayShadow">>(value: V, key?: string) => DynoSampler2DArrayShadow<string, V>;
47
+ export declare const dynoSamplerCubeShadow: <V extends DynoJsType<"samplerCubeShadow">>(value: V, key?: string) => DynoSamplerCubeShadow<string, V>;
48
+ export declare class DynoUniform<T extends DynoType, K extends string = "value", V extends DynoJsType<T> = DynoJsType<T>> extends Dyno<Record<string, never>, {
49
+ [key in K]: T;
50
+ }> implements HasDynoOut<T> {
51
+ type: T;
52
+ count?: number;
53
+ outKey: K;
54
+ value: V;
55
+ uniform: {
56
+ value: V;
57
+ type?: string;
58
+ };
59
+ constructor({ key, type, count, value, update, globals, }: {
60
+ key?: K;
61
+ type: T;
62
+ count?: number;
63
+ value: V;
64
+ update?: (value: V) => V | undefined;
65
+ globals?: ({ inputs, outputs, }: {
66
+ inputs: unknown;
67
+ outputs: {
68
+ [key in K]?: string;
69
+ };
70
+ }) => string[];
71
+ });
72
+ dynoOut(): DynoValue<T>;
73
+ }
74
+ export declare class DynoBool<K extends string> extends DynoUniform<"bool", K, boolean> {
75
+ constructor({ key, value, update, }: {
76
+ key?: K;
77
+ value: boolean;
78
+ update?: (value: boolean) => boolean | undefined;
79
+ });
80
+ }
81
+ export declare class DynoUint<K extends string> extends DynoUniform<"uint", K, number> {
82
+ constructor({ key, value, update, }: {
83
+ key?: K;
84
+ value: number;
85
+ update?: (value: number) => number | undefined;
86
+ });
87
+ }
88
+ export declare class DynoInt<K extends string> extends DynoUniform<"int", K, number> {
89
+ constructor({ key, value, update, }: {
90
+ key?: K;
91
+ value: number;
92
+ update?: (value: number) => number | undefined;
93
+ });
94
+ }
95
+ export declare class DynoFloat<K extends string = "value"> extends DynoUniform<"float", K, number> {
96
+ constructor({ key, value, update, }: {
97
+ key?: K;
98
+ value: number;
99
+ update?: (value: number) => number | undefined;
100
+ });
101
+ }
102
+ export declare class DynoBvec2<K extends string, V extends DynoJsType<"bvec2">> extends DynoUniform<"bvec2", K, V> {
103
+ constructor({ key, value, update, }: {
104
+ key?: K;
105
+ value: V;
106
+ update?: (value: V) => V | undefined;
107
+ });
108
+ }
109
+ export declare class DynoUvec2<K extends string, V extends DynoJsType<"uvec2">> extends DynoUniform<"uvec2", K, V> {
110
+ constructor({ key, value, update, }: {
111
+ key?: K;
112
+ value: V;
113
+ update?: (value: V) => V | undefined;
114
+ });
115
+ }
116
+ export declare class DynoIvec2<K extends string, V extends DynoJsType<"ivec2">> extends DynoUniform<"ivec2", K, V> {
117
+ constructor({ key, value, update, }: {
118
+ key?: K;
119
+ value: V;
120
+ update?: (value: V) => V | undefined;
121
+ });
122
+ }
123
+ export declare class DynoVec2<K extends string, V extends DynoJsType<"vec2">> extends DynoUniform<"vec2", K, V> {
124
+ constructor({ key, value, update, }: {
125
+ key?: K;
126
+ value: V;
127
+ update?: (value: V) => V | undefined;
128
+ });
129
+ }
130
+ export declare class DynoBvec3<K extends string, V extends DynoJsType<"bvec3">> extends DynoUniform<"bvec3", K, V> {
131
+ constructor({ key, value, update, }: {
132
+ key?: K;
133
+ value: V;
134
+ update?: (value: V) => V | undefined;
135
+ });
136
+ }
137
+ export declare class DynoUvec3<V extends DynoJsType<"uvec3">, K extends string = "value"> extends DynoUniform<"uvec3", K, V> {
138
+ constructor({ key, value, update, }: {
139
+ key?: K;
140
+ value: V;
141
+ update?: (value: V) => V | undefined;
142
+ });
143
+ }
144
+ export declare class DynoIvec3<V extends DynoJsType<"ivec3">, K extends string = "value"> extends DynoUniform<"ivec3", K, V> {
145
+ constructor({ key, value, update, }: {
146
+ key?: K;
147
+ value: V;
148
+ update?: (value: V) => V | undefined;
149
+ });
150
+ }
151
+ export declare class DynoVec3<V extends DynoJsType<"vec3">, K extends string = "value"> extends DynoUniform<"vec3", K, V> {
152
+ constructor({ key, value, update, }: {
153
+ key?: K;
154
+ value: V;
155
+ update?: (value: V) => V | undefined;
156
+ });
157
+ }
158
+ export declare class DynoBvec4<K extends string, V extends DynoJsType<"bvec4">> extends DynoUniform<"bvec4", K, V> {
159
+ constructor({ key, value, update, }: {
160
+ key?: K;
161
+ value: V;
162
+ update?: (value: V) => V | undefined;
163
+ });
164
+ }
165
+ export declare class DynoUvec4<K extends string, V extends DynoJsType<"uvec4">> extends DynoUniform<"uvec4", K, V> {
166
+ constructor({ key, value, update, }: {
167
+ key?: K;
168
+ value: V;
169
+ update?: (value: V) => V | undefined;
170
+ });
171
+ }
172
+ export declare class DynoIvec4<K extends string, V extends DynoJsType<"ivec4">> extends DynoUniform<"ivec4", K, V> {
173
+ constructor({ key, value, update, }: {
174
+ key?: K;
175
+ value: V;
176
+ update?: (value: V) => V | undefined;
177
+ });
178
+ }
179
+ export declare class DynoVec4<V extends DynoJsType<"vec4">, K extends string = "value"> extends DynoUniform<"vec4", K, V> {
180
+ constructor({ key, value, update, }: {
181
+ key?: K;
182
+ value: V;
183
+ update?: (value: V) => V | undefined;
184
+ });
185
+ }
186
+ export declare class DynoMat2<K extends string, V extends DynoJsType<"mat2">> extends DynoUniform<"mat2", K, V> {
187
+ constructor({ key, value, update, }: {
188
+ key?: K;
189
+ value: V;
190
+ update?: (value: V) => V | undefined;
191
+ });
192
+ }
193
+ export declare class DynoMat2x2<K extends string, V extends DynoJsType<"mat2x2">> extends DynoUniform<"mat2x2", K, V> {
194
+ constructor({ key, value, update, }: {
195
+ key?: K;
196
+ value: V;
197
+ update?: (value: V) => V | undefined;
198
+ });
199
+ }
200
+ export declare class DynoMat2x3<K extends string, V extends DynoJsType<"mat2x3">> extends DynoUniform<"mat2x3", K, V> {
201
+ constructor({ key, value, update, }: {
202
+ key?: K;
203
+ value: V;
204
+ update?: (value: V) => V | undefined;
205
+ });
206
+ }
207
+ export declare class DynoMat2x4<K extends string, V extends DynoJsType<"mat2x4">> extends DynoUniform<"mat2x4", K, V> {
208
+ constructor({ key, value, update, }: {
209
+ key?: K;
210
+ value: V;
211
+ update?: (value: V) => V | undefined;
212
+ });
213
+ }
214
+ export declare class DynoMat3<K extends string, V extends DynoJsType<"mat3">> extends DynoUniform<"mat3", K, V> {
215
+ constructor({ key, value, update, }: {
216
+ key?: K;
217
+ value: V;
218
+ update?: (value: V) => V | undefined;
219
+ });
220
+ }
221
+ export declare class DynoMat3x2<K extends string, V extends DynoJsType<"mat3x2">> extends DynoUniform<"mat3x2", K, V> {
222
+ constructor({ key, value, update, }: {
223
+ key?: K;
224
+ value: V;
225
+ update?: (value: V) => V | undefined;
226
+ });
227
+ }
228
+ export declare class DynoMat3x3<K extends string, V extends DynoJsType<"mat3x3">> extends DynoUniform<"mat3x3", K, V> {
229
+ constructor({ key, value, update, }: {
230
+ key?: K;
231
+ value: V;
232
+ update?: (value: V) => V | undefined;
233
+ });
234
+ }
235
+ export declare class DynoMat3x4<K extends string, V extends DynoJsType<"mat3x4">> extends DynoUniform<"mat3x4", K, V> {
236
+ constructor({ key, value, update, }: {
237
+ key?: K;
238
+ value: V;
239
+ update?: (value: V) => V | undefined;
240
+ });
241
+ }
242
+ export declare class DynoMat4<K extends string, V extends DynoJsType<"mat4">> extends DynoUniform<"mat4", K, V> {
243
+ constructor({ key, value, update, }: {
244
+ key?: K;
245
+ value: V;
246
+ update?: (value: V) => V | undefined;
247
+ });
248
+ }
249
+ export declare class DynoMat4x2<K extends string, V extends DynoJsType<"mat4x2">> extends DynoUniform<"mat4x2", K, V> {
250
+ constructor({ key, value, update, }: {
251
+ key?: K;
252
+ value: V;
253
+ update?: (value: V) => V | undefined;
254
+ });
255
+ }
256
+ export declare class DynoMat4x3<K extends string, V extends DynoJsType<"mat4x3">> extends DynoUniform<"mat4x3", K, V> {
257
+ constructor({ key, value, update, }: {
258
+ key?: K;
259
+ value: V;
260
+ update?: (value: V) => V | undefined;
261
+ });
262
+ }
263
+ export declare class DynoMat4x4<K extends string, V extends DynoJsType<"mat4x4">> extends DynoUniform<"mat4x4", K, V> {
264
+ constructor({ key, value, update, }: {
265
+ key?: K;
266
+ value: V;
267
+ update?: (value: V) => V | undefined;
268
+ });
269
+ }
270
+ export declare class DynoUsampler2D<K extends string, V extends DynoJsType<"usampler2D">> extends DynoUniform<"usampler2D", K, V> {
271
+ constructor({ key, value, update, }: {
272
+ key?: K;
273
+ value: V;
274
+ update?: (value: V) => V | undefined;
275
+ });
276
+ }
277
+ export declare class DynoIsampler2D<K extends string, V extends DynoJsType<"isampler2D">> extends DynoUniform<"isampler2D", K, V> {
278
+ constructor({ key, value, update, }: {
279
+ key?: K;
280
+ value: V;
281
+ update?: (value: V) => V | undefined;
282
+ });
283
+ }
284
+ export declare class DynoSampler2D<K extends string, V extends DynoJsType<"sampler2D">> extends DynoUniform<"sampler2D", K, V> {
285
+ constructor({ key, value, update, }: {
286
+ key?: K;
287
+ value: V;
288
+ update?: (value: V) => V | undefined;
289
+ });
290
+ }
291
+ export declare class DynoUsampler2DArray<K extends string, V extends DynoJsType<"usampler2DArray">> extends DynoUniform<"usampler2DArray", K, V> {
292
+ constructor({ key, value, update, }: {
293
+ key?: K;
294
+ value: V;
295
+ update?: (value: V) => V | undefined;
296
+ });
297
+ }
298
+ export declare class DynoIsampler2DArray<K extends string, V extends DynoJsType<"isampler2DArray">> extends DynoUniform<"isampler2DArray", K, V> {
299
+ constructor({ key, value, update, }: {
300
+ key?: K;
301
+ value: V;
302
+ update?: (value: V) => V | undefined;
303
+ });
304
+ }
305
+ export declare class DynoSampler2DArray<K extends string, V extends DynoJsType<"sampler2DArray">> extends DynoUniform<"sampler2DArray", K, V> {
306
+ constructor({ key, value, update, }: {
307
+ key?: K;
308
+ value: V;
309
+ update?: (value: V) => V | undefined;
310
+ });
311
+ }
312
+ export declare class DynoUsampler3D<K extends string, V extends DynoJsType<"usampler3D">> extends DynoUniform<"usampler3D", K, V> {
313
+ constructor({ key, value, update, }: {
314
+ key?: K;
315
+ value: V;
316
+ update?: (value: V) => V | undefined;
317
+ });
318
+ }
319
+ export declare class DynoIsampler3D<K extends string, V extends DynoJsType<"isampler3D">> extends DynoUniform<"isampler3D", K, V> {
320
+ constructor({ key, value, update, }: {
321
+ key?: K;
322
+ value: V;
323
+ update?: (value: V) => V | undefined;
324
+ });
325
+ }
326
+ export declare class DynoSampler3D<K extends string, V extends DynoJsType<"sampler3D">> extends DynoUniform<"sampler3D", K, V> {
327
+ constructor({ key, value, update, }: {
328
+ key?: K;
329
+ value: V;
330
+ update?: (value: V) => V | undefined;
331
+ });
332
+ }
333
+ export declare class DynoUsamplerCube<K extends string, V extends DynoJsType<"usamplerCube">> extends DynoUniform<"usamplerCube", K, V> {
334
+ constructor({ key, value, update, }: {
335
+ key?: K;
336
+ value: V;
337
+ update?: (value: V) => V | undefined;
338
+ });
339
+ }
340
+ export declare class DynoIsamplerCube<K extends string, V extends DynoJsType<"isamplerCube">> extends DynoUniform<"isamplerCube", K, V> {
341
+ constructor({ key, value, update, }: {
342
+ key?: K;
343
+ value: V;
344
+ update?: (value: V) => V | undefined;
345
+ });
346
+ }
347
+ export declare class DynoSamplerCube<K extends string, V extends DynoJsType<"samplerCube">> extends DynoUniform<"samplerCube", K, V> {
348
+ constructor({ key, value, update, }: {
349
+ key?: K;
350
+ value: V;
351
+ update?: (value: V) => V | undefined;
352
+ });
353
+ }
354
+ export declare class DynoSampler2DShadow<K extends string, V extends DynoJsType<"sampler2DShadow">> extends DynoUniform<"sampler2DShadow", K, V> {
355
+ constructor({ key, value, update, }: {
356
+ key?: K;
357
+ value: V;
358
+ update?: (value: V) => V | undefined;
359
+ });
360
+ }
361
+ export declare class DynoSampler2DArrayShadow<K extends string, V extends DynoJsType<"sampler2DArrayShadow">> extends DynoUniform<"sampler2DArrayShadow", K, V> {
362
+ constructor({ key, value, update, }: {
363
+ key?: K;
364
+ value: V;
365
+ update?: (value: V) => V | undefined;
366
+ });
367
+ }
368
+ export declare class DynoSamplerCubeShadow<K extends string, V extends DynoJsType<"samplerCubeShadow">> extends DynoUniform<"samplerCubeShadow", K, V> {
369
+ constructor({ key, value, update, }: {
370
+ key?: K;
371
+ value: V;
372
+ update?: (value: V) => V | undefined;
373
+ });
374
+ }