react-native-shine 0.2.1 → 0.3.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 (112) hide show
  1. package/README.md +1 -1
  2. package/lib/module/components/Shine.js +269 -0
  3. package/lib/module/components/Shine.js.map +1 -0
  4. package/lib/module/components/ShineGroup.js +104 -0
  5. package/lib/module/components/ShineGroup.js.map +1 -0
  6. package/lib/module/enums/waveCallback.js +19 -0
  7. package/lib/module/enums/waveCallback.js.map +1 -0
  8. package/lib/module/hooks/useOrientation.js +16 -0
  9. package/lib/module/hooks/useOrientation.js.map +1 -0
  10. package/lib/module/index.js +5 -219
  11. package/lib/module/index.js.map +1 -1
  12. package/lib/module/shaders/bindGroupLayouts.js +40 -5
  13. package/lib/module/shaders/bindGroupLayouts.js.map +1 -1
  14. package/lib/module/shaders/bindGroupUtils.js +27 -12
  15. package/lib/module/shaders/bindGroupUtils.js.map +1 -1
  16. package/lib/module/shaders/fragmentShaders/colorMaskFragment.js +2 -2
  17. package/lib/module/shaders/fragmentShaders/colorMaskFragment.js.map +1 -1
  18. package/lib/module/shaders/fragmentShaders/glareFragment.js +114 -0
  19. package/lib/module/shaders/fragmentShaders/glareFragment.js.map +1 -0
  20. package/lib/module/shaders/fragmentShaders/holoFragment.js +33 -0
  21. package/lib/module/shaders/fragmentShaders/holoFragment.js.map +1 -0
  22. package/lib/module/shaders/fragmentShaders/maskFragment.js +20 -0
  23. package/lib/module/shaders/fragmentShaders/maskFragment.js.map +1 -0
  24. package/lib/module/shaders/fragmentShaders/reverseHoloFragment.js +46 -0
  25. package/lib/module/shaders/fragmentShaders/reverseHoloFragment.js.map +1 -0
  26. package/lib/module/shaders/pipelineSetups.js +82 -13
  27. package/lib/module/shaders/pipelineSetups.js.map +1 -1
  28. package/lib/module/shaders/{resourceManagement.js → resourceManagement/bitmaps.js} +2 -1
  29. package/lib/module/shaders/resourceManagement/bitmaps.js.map +1 -0
  30. package/lib/module/shaders/resourceManagement/bufferManager.js +46 -0
  31. package/lib/module/shaders/resourceManagement/bufferManager.js.map +1 -0
  32. package/lib/module/shaders/resourceManagement/textures.js +17 -0
  33. package/lib/module/shaders/resourceManagement/textures.js.map +1 -0
  34. package/lib/module/shaders/tgpuUtils.js +19 -1
  35. package/lib/module/shaders/tgpuUtils.js.map +1 -1
  36. package/lib/module/shaders/utils.js +0 -14
  37. package/lib/module/shaders/utils.js.map +1 -1
  38. package/lib/module/shaders/vertexShaders/mainRotationEffectVertex.js +47 -0
  39. package/lib/module/shaders/vertexShaders/mainRotationEffectVertex.js.map +1 -0
  40. package/lib/module/types/typeUtils.js +17 -5
  41. package/lib/module/types/typeUtils.js.map +1 -1
  42. package/lib/typescript/src/components/Shine.d.ts +17 -0
  43. package/lib/typescript/src/components/Shine.d.ts.map +1 -0
  44. package/lib/typescript/src/components/ShineGroup.d.ts +8 -0
  45. package/lib/typescript/src/components/ShineGroup.d.ts.map +1 -0
  46. package/lib/typescript/src/enums/waveCallback.d.ts +9 -0
  47. package/lib/typescript/src/enums/waveCallback.d.ts.map +1 -0
  48. package/lib/typescript/src/hooks/useOrientation.d.ts +2 -0
  49. package/lib/typescript/src/hooks/useOrientation.d.ts.map +1 -0
  50. package/lib/typescript/src/index.d.ts +6 -11
  51. package/lib/typescript/src/index.d.ts.map +1 -1
  52. package/lib/typescript/src/shaders/bindGroupLayouts.d.ts +44 -6
  53. package/lib/typescript/src/shaders/bindGroupLayouts.d.ts.map +1 -1
  54. package/lib/typescript/src/shaders/bindGroupUtils.d.ts +8 -8
  55. package/lib/typescript/src/shaders/bindGroupUtils.d.ts.map +1 -1
  56. package/lib/typescript/src/shaders/fragmentShaders/glareFragment.d.ts +8 -0
  57. package/lib/typescript/src/shaders/fragmentShaders/glareFragment.d.ts.map +1 -0
  58. package/lib/typescript/src/shaders/fragmentShaders/holoFragment.d.ts +5 -0
  59. package/lib/typescript/src/shaders/fragmentShaders/holoFragment.d.ts.map +1 -0
  60. package/lib/typescript/src/shaders/fragmentShaders/maskFragment.d.ts +6 -0
  61. package/lib/typescript/src/shaders/fragmentShaders/maskFragment.d.ts.map +1 -0
  62. package/lib/typescript/src/shaders/fragmentShaders/reverseHoloFragment.d.ts +5 -0
  63. package/lib/typescript/src/shaders/fragmentShaders/reverseHoloFragment.d.ts.map +1 -0
  64. package/lib/typescript/src/shaders/pipelineSetups.d.ts +9 -4
  65. package/lib/typescript/src/shaders/pipelineSetups.d.ts.map +1 -1
  66. package/lib/typescript/src/shaders/{resourceManagement.d.ts → resourceManagement/bitmaps.d.ts} +1 -1
  67. package/lib/typescript/src/shaders/resourceManagement/bitmaps.d.ts.map +1 -0
  68. package/lib/typescript/src/shaders/resourceManagement/bufferManager.d.ts +28 -0
  69. package/lib/typescript/src/shaders/resourceManagement/bufferManager.d.ts.map +1 -0
  70. package/lib/typescript/src/shaders/resourceManagement/textures.d.ts +7 -0
  71. package/lib/typescript/src/shaders/resourceManagement/textures.d.ts.map +1 -0
  72. package/lib/typescript/src/shaders/tgpuUtils.d.ts +5 -1
  73. package/lib/typescript/src/shaders/tgpuUtils.d.ts.map +1 -1
  74. package/lib/typescript/src/shaders/utils.d.ts +1 -7
  75. package/lib/typescript/src/shaders/utils.d.ts.map +1 -1
  76. package/lib/typescript/src/shaders/vertexShaders/mainRotationEffectVertex.d.ts +6 -0
  77. package/lib/typescript/src/shaders/vertexShaders/mainRotationEffectVertex.d.ts.map +1 -0
  78. package/lib/typescript/src/types/typeUtils.d.ts +3 -2
  79. package/lib/typescript/src/types/typeUtils.d.ts.map +1 -1
  80. package/lib/typescript/src/types/types.d.ts +7 -2
  81. package/lib/typescript/src/types/types.d.ts.map +1 -1
  82. package/package.json +5 -3
  83. package/scripts/install-peers.js +21 -0
  84. package/scripts/postinstall.js +18 -0
  85. package/src/components/Shine.tsx +480 -0
  86. package/src/components/ShineGroup.tsx +107 -0
  87. package/src/enums/waveCallback.ts +22 -0
  88. package/src/hooks/useOrientation.ts +20 -0
  89. package/src/index.tsx +6 -322
  90. package/src/shaders/bindGroupLayouts.ts +43 -6
  91. package/src/shaders/bindGroupUtils.ts +34 -19
  92. package/src/shaders/fragmentShaders/colorMaskFragment.ts +2 -2
  93. package/src/shaders/fragmentShaders/glareFragment.ts +142 -0
  94. package/src/shaders/fragmentShaders/holoFragment.ts +43 -0
  95. package/src/shaders/fragmentShaders/maskFragment.ts +31 -0
  96. package/src/shaders/fragmentShaders/reverseHoloFragment.ts +71 -0
  97. package/src/shaders/pipelineSetups.ts +161 -14
  98. package/src/shaders/{resourceManagement.ts → resourceManagement/bitmaps.ts} +1 -0
  99. package/src/shaders/resourceManagement/bufferManager.ts +82 -0
  100. package/src/shaders/resourceManagement/textures.ts +30 -0
  101. package/src/shaders/tgpuUtils.ts +36 -1
  102. package/src/shaders/utils.ts +0 -30
  103. package/src/shaders/vertexShaders/mainRotationEffectVertex.ts +76 -0
  104. package/src/types/typeUtils.ts +22 -8
  105. package/src/types/types.ts +8 -2
  106. package/lib/module/shaders/fragmentShaders/bloomFragment.js +0 -66
  107. package/lib/module/shaders/fragmentShaders/bloomFragment.js.map +0 -1
  108. package/lib/module/shaders/resourceManagement.js.map +0 -1
  109. package/lib/typescript/src/shaders/fragmentShaders/bloomFragment.d.ts +0 -6
  110. package/lib/typescript/src/shaders/fragmentShaders/bloomFragment.d.ts.map +0 -1
  111. package/lib/typescript/src/shaders/resourceManagement.d.ts.map +0 -1
  112. package/src/shaders/fragmentShaders/bloomFragment.ts +0 -83
@@ -9,29 +9,39 @@ export declare const textureBindGroupLayout: import("typegpu").TgpuBindGroupLayo
9
9
  sampler: "filtering";
10
10
  };
11
11
  }>;
12
+ export declare const maskTextureBindGroupLayout: import("typegpu").TgpuBindGroupLayout<{
13
+ texture: {
14
+ texture: "float";
15
+ dimension: string;
16
+ sampleType: string;
17
+ };
18
+ sampler: {
19
+ sampler: "filtering";
20
+ };
21
+ }>;
12
22
  export declare const rotationValuesBindGroupLayout: import("typegpu").TgpuBindGroupLayout<{
13
23
  vec: {
14
24
  uniform: d.Vec3f;
15
25
  };
16
26
  }>;
17
- export declare const bloomOptionsSchema: d.WgslStruct<{
27
+ export declare const glareOptionsSchema: d.WgslStruct<{
18
28
  glowPower: d.F32;
19
29
  hueShiftAngleMax: d.F32;
20
30
  hueShiftAngleMin: d.F32;
21
31
  hueBlendPower: d.F32;
22
32
  lightIntensity: d.F32;
23
- bloomIntensity: d.F32;
33
+ glareIntensity: d.F32;
24
34
  }>;
25
- export type bloomOptionsSchema = typeof bloomOptionsSchema;
26
- export declare const bloomOptionsBindGroupLayout: import("typegpu").TgpuBindGroupLayout<{
27
- bloomOptions: {
35
+ export type glareOptionsSchema = typeof glareOptionsSchema;
36
+ export declare const glareOptionsBindGroupLayout: import("typegpu").TgpuBindGroupLayout<{
37
+ glareOptions: {
28
38
  uniform: d.WgslStruct<{
29
39
  glowPower: d.F32;
30
40
  hueShiftAngleMax: d.F32;
31
41
  hueShiftAngleMin: d.F32;
32
42
  hueBlendPower: d.F32;
33
43
  lightIntensity: d.F32;
34
- bloomIntensity: d.F32;
44
+ glareIntensity: d.F32;
35
45
  }>;
36
46
  };
37
47
  }>;
@@ -54,4 +64,32 @@ export declare const colorMaskBindGroupLayout: import("typegpu").TgpuBindGroupLa
54
64
  }>;
55
65
  };
56
66
  }>;
67
+ export declare const bufferData: {
68
+ readonly rotationBuffer: {
69
+ readonly schema: d.Vec3f;
70
+ readonly usage: "uniform";
71
+ };
72
+ readonly glareBuffer: {
73
+ readonly schema: d.WgslStruct<{
74
+ glowPower: d.F32;
75
+ hueShiftAngleMax: d.F32;
76
+ hueShiftAngleMin: d.F32;
77
+ hueBlendPower: d.F32;
78
+ lightIntensity: d.F32;
79
+ glareIntensity: d.F32;
80
+ }>;
81
+ readonly usage: "uniform";
82
+ };
83
+ readonly colorMaskBuffer: {
84
+ readonly schema: d.WgslStruct<{
85
+ baseColor: d.Vec3f;
86
+ rgbToleranceRange: d.WgslStruct<{
87
+ upper: d.Vec3f;
88
+ lower: d.Vec3f;
89
+ }>;
90
+ }>;
91
+ readonly usage: "uniform";
92
+ };
93
+ };
94
+ export type BufferDataMap = typeof bufferData;
57
95
  //# sourceMappingURL=bindGroupLayouts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bindGroupLayouts.d.ts","sourceRoot":"","sources":["../../../../src/shaders/bindGroupLayouts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;EAExC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;EAO7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AAE3D,eAAO,MAAM,2BAA2B;;;;;;;;;;;EAEtC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD,eAAO,MAAM,wBAAwB;;;;;;;;;;EAEnC,CAAC"}
1
+ {"version":3,"file":"bindGroupLayouts.d.ts","sourceRoot":"","sources":["../../../../src/shaders/bindGroupLayouts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;EAExC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;EAO7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC;AAE3D,eAAO,MAAM,2BAA2B;;;;;;;;;;;EAEtC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD,eAAO,MAAM,wBAAwB;;;;;;;;;;EAEnC,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBtB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,UAAU,CAAC"}
@@ -1,34 +1,34 @@
1
1
  import { type TgpuBuffer, type TgpuRoot, type UniformFlag } from 'typegpu';
2
2
  import * as d from 'typegpu/data';
3
- import { bloomOptionsSchema, colorMaskSchema } from './bindGroupLayouts';
4
- import type { BloomOptions, ColorMask, PartiallyOptional } from '../types/types';
3
+ import { glareOptionsSchema, colorMaskSchema } from './bindGroupLayouts';
4
+ import type { GlareOptions, ColorMask, PartiallyOptional } from '../types/types';
5
5
  export declare const createRotationBuffer: (root: TgpuRoot, initValues?: {
6
6
  x: number;
7
7
  y: number;
8
8
  z: number;
9
9
  }) => TgpuBuffer<d.Vec3f> & UniformFlag;
10
- export declare const createRotationValuesBindGroup: (root: TgpuRoot, buffer: TgpuBuffer<d.Vec3f> & UniformFlag) => import("typegpu").TgpuBindGroup<{
10
+ export declare const createRotationValuesBindGroup: (root: TgpuRoot, buffer: TgpuBuffer<d.Vec3f>) => import("typegpu").TgpuBindGroup<{
11
11
  vec: {
12
12
  uniform: d.Vec3f;
13
13
  };
14
14
  }>;
15
- export declare const createBloomOptionsBuffer: (root: TgpuRoot, initValues?: Partial<BloomOptions>) => TgpuBuffer<d.WgslStruct<{
15
+ export declare const createGlareOptionsBuffer: (root: TgpuRoot, initValues?: Partial<GlareOptions>) => TgpuBuffer<d.WgslStruct<{
16
16
  glowPower: d.F32;
17
17
  hueShiftAngleMax: d.F32;
18
18
  hueShiftAngleMin: d.F32;
19
19
  hueBlendPower: d.F32;
20
20
  lightIntensity: d.F32;
21
- bloomIntensity: d.F32;
21
+ glareIntensity: d.F32;
22
22
  }>> & UniformFlag;
23
- export declare const createBloomOptionsBindGroup: (root: TgpuRoot, buffer: TgpuBuffer<bloomOptionsSchema> & UniformFlag) => import("typegpu").TgpuBindGroup<{
24
- bloomOptions: {
23
+ export declare const createGlareOptionsBindGroup: (root: TgpuRoot, buffer: TgpuBuffer<glareOptionsSchema> & UniformFlag) => import("typegpu").TgpuBindGroup<{
24
+ glareOptions: {
25
25
  uniform: d.WgslStruct<{
26
26
  glowPower: d.F32;
27
27
  hueShiftAngleMax: d.F32;
28
28
  hueShiftAngleMin: d.F32;
29
29
  hueBlendPower: d.F32;
30
30
  lightIntensity: d.F32;
31
- bloomIntensity: d.F32;
31
+ glareIntensity: d.F32;
32
32
  }>;
33
33
  };
34
34
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"bindGroupUtils.d.ts","sourceRoot":"","sources":["../../../../src/shaders/bindGroupUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAEL,kBAAkB,EAElB,eAAe,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAQxB,eAAO,MAAM,oBAAoB,GAC/B,MAAM,QAAQ,EACd,aAAa;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,sCAUjD,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,MAAM,QAAQ,EACd,QAAQ,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,WAAW;;;;EAU1C,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,MAAM,QAAQ,EACd,aAAa,OAAO,CAAC,YAAY,CAAC;;;;;;;iBAUnC,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,MAAM,QAAQ,EACd,QAAQ,UAAU,CAAC,kBAAkB,CAAC,GAAG,WAAW;;;;;;;;;;;EAUrD,CAAC;AAEF,eAAO,MAAM,qBAAq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ACnC,MAAM,QAAQ,EACd,QAAQ,UAAU,CAAC,eAAe,CAAC,GAAG,WAAW;;;;;;;;;;EAOlD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import * as d from 'typegpu/data';
2
+ export declare const glareFragment: import("typegpu").TgpuFragmentFn<{
3
+ uv: d.Vec2f;
4
+ }, d.Vec4f>;
5
+ export declare const newGlareFragment: import("typegpu").TgpuFragmentFn<{
6
+ uv: d.Vec2f;
7
+ }, d.Vec4f>;
8
+ //# sourceMappingURL=glareFragment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glareFragment.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/fragmentShaders/glareFragment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAUlC,eAAO,MAAM,aAAa;;WAqExB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;WA2D3B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as d from 'typegpu/data';
2
+ export declare const holoFragment: import("typegpu").TgpuFragmentFn<{
3
+ uv: d.Vec2f;
4
+ }, d.Vec4f>;
5
+ //# sourceMappingURL=holoFragment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"holoFragment.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/fragmentShaders/holoFragment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AASlC,eAAO,MAAM,YAAY;;WAgCvB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as d from 'typegpu/data';
2
+ declare const maskFragment: import("typegpu").TgpuFragmentFn<{
3
+ uv: d.Vec2f;
4
+ }, d.Vec4f>;
5
+ export default maskFragment;
6
+ //# sourceMappingURL=maskFragment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maskFragment.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/fragmentShaders/maskFragment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAOlC,QAAA,MAAM,YAAY;;WAoBhB,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as d from 'typegpu/data';
2
+ export declare const reverseHoloFragment: import("typegpu").TgpuFragmentFn<{
3
+ uv: d.Vec2f;
4
+ }, d.Vec4f>;
5
+ //# sourceMappingURL=reverseHoloFragment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reverseHoloFragment.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/fragmentShaders/reverseHoloFragment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAUlC,eAAO,MAAM,mBAAmB;;WA2D9B,CAAC"}
@@ -1,8 +1,13 @@
1
- import type { TgpuRenderPipeline } from 'typegpu';
1
+ import type { TgpuRenderPipeline, TgpuRoot, TgpuTexture } from 'typegpu';
2
2
  import type { BindGroupPair } from '../types/types';
3
- export declare const attachBindGroups: (pipeline: TgpuRenderPipeline, bindGroupPairs: BindGroupPair[]) => TgpuRenderPipeline<import("typegpu/data").Void | ((import("typegpu/data").U32 | import("typegpu/data").Bool | import("typegpu/data").F32 | import("typegpu/data").F16 | import("typegpu/data").I32 | import("typegpu/data").Vec2f | import("typegpu/data").Vec3f | import("typegpu/data").Vec4f | import("typegpu/data").Vec2h | import("typegpu/data").Vec3h | import("typegpu/data").Vec4h | import("typegpu/data").Vec2i | import("typegpu/data").Vec3i | import("typegpu/data").Vec4i | import("typegpu/data").Vec2u | import("typegpu/data").Vec3u | import("typegpu/data").Vec4u) | import("typegpu/data").BuiltinClipDistances | import("typegpu/data").Decorated<import("typegpu/data").U32 | import("typegpu/data").Bool | import("typegpu/data").F32 | import("typegpu/data").F16 | import("typegpu/data").I32 | import("typegpu/data").Vec2f | import("typegpu/data").Vec3f | import("typegpu/data").Vec4f | import("typegpu/data").Vec2h | import("typegpu/data").Vec3h | import("typegpu/data").Vec4h | import("typegpu/data").Vec2i | import("typegpu/data").Vec3i | import("typegpu/data").Vec4i | import("typegpu/data").Vec2u | import("typegpu/data").Vec3u | import("typegpu/data").Vec4u, import("typegpu/data").AnyAttribute<import("typegpu/data").Builtin<"vertex_index" | "position" | "clip_distances" | "instance_index" | "front_facing" | "frag_depth" | "sample_index" | "sample_mask" | "local_invocation_id" | "local_invocation_index" | "global_invocation_id" | "workgroup_id" | "num_workgroups" | "subgroup_invocation_id" | "subgroup_size" | "fragment">>[]>) | {
4
- [x: string]: (import("typegpu/data").U32 | import("typegpu/data").Bool | import("typegpu/data").F32 | import("typegpu/data").F16 | import("typegpu/data").I32 | import("typegpu/data").Vec2f | import("typegpu/data").Vec3f | import("typegpu/data").Vec4f | import("typegpu/data").Vec2h | import("typegpu/data").Vec3h | import("typegpu/data").Vec4h | import("typegpu/data").Vec2i | import("typegpu/data").Vec3i | import("typegpu/data").Vec4i | import("typegpu/data").Vec2u | import("typegpu/data").Vec3u | import("typegpu/data").Vec4u) | import("typegpu/data").BuiltinClipDistances | import("typegpu/data").Decorated<import("typegpu/data").U32 | import("typegpu/data").Bool | import("typegpu/data").F32 | import("typegpu/data").F16 | import("typegpu/data").I32 | import("typegpu/data").Vec2f | import("typegpu/data").Vec3f | import("typegpu/data").Vec4f | import("typegpu/data").Vec2h | import("typegpu/data").Vec3h | import("typegpu/data").Vec4h | import("typegpu/data").Vec2i | import("typegpu/data").Vec3i | import("typegpu/data").Vec4i | import("typegpu/data").Vec2u | import("typegpu/data").Vec3u | import("typegpu/data").Vec4u, import("typegpu/data").AnyAttribute<import("typegpu/data").Builtin<"vertex_index" | "position" | "clip_distances" | "instance_index" | "front_facing" | "frag_depth" | "sample_index" | "sample_mask" | "local_invocation_id" | "local_invocation_index" | "global_invocation_id" | "workgroup_id" | "num_workgroups" | "subgroup_invocation_id" | "subgroup_size" | "fragment">>[]>;
3
+ export declare const attachBindGroups: (pipeline: TgpuRenderPipeline, bindGroupPairs: BindGroupPair[]) => TgpuRenderPipeline<import("typegpu/data").Void | ((import("typegpu/data").Vec2f | import("typegpu/data").Bool | import("typegpu/data").F32 | import("typegpu/data").F16 | import("typegpu/data").I32 | import("typegpu/data").U32 | import("typegpu/data").Vec2h | import("typegpu/data").Vec2i | import("typegpu/data").Vec2u | import("typegpu/data").Vec3f | import("typegpu/data").Vec3h | import("typegpu/data").Vec3i | import("typegpu/data").Vec3u | import("typegpu/data").Vec4f | import("typegpu/data").Vec4h | import("typegpu/data").Vec4i | import("typegpu/data").Vec4u) | import("typegpu/data").BuiltinClipDistances | import("typegpu/data").Decorated<import("typegpu/data").Vec2f | import("typegpu/data").Bool | import("typegpu/data").F32 | import("typegpu/data").F16 | import("typegpu/data").I32 | import("typegpu/data").U32 | import("typegpu/data").Vec2h | import("typegpu/data").Vec2i | import("typegpu/data").Vec2u | import("typegpu/data").Vec3f | import("typegpu/data").Vec3h | import("typegpu/data").Vec3i | import("typegpu/data").Vec3u | import("typegpu/data").Vec4f | import("typegpu/data").Vec4h | import("typegpu/data").Vec4i | import("typegpu/data").Vec4u, import("typegpu/data").AnyAttribute<import("typegpu/data").Builtin<"vertex_index" | "position" | "clip_distances" | "instance_index" | "front_facing" | "frag_depth" | "sample_index" | "sample_mask" | "local_invocation_id" | "local_invocation_index" | "global_invocation_id" | "workgroup_id" | "num_workgroups" | "subgroup_invocation_id" | "subgroup_size" | "fragment">>[]>) | {
4
+ [x: string]: (import("typegpu/data").Vec2f | import("typegpu/data").Bool | import("typegpu/data").F32 | import("typegpu/data").F16 | import("typegpu/data").I32 | import("typegpu/data").U32 | import("typegpu/data").Vec2h | import("typegpu/data").Vec2i | import("typegpu/data").Vec2u | import("typegpu/data").Vec3f | import("typegpu/data").Vec3h | import("typegpu/data").Vec3i | import("typegpu/data").Vec3u | import("typegpu/data").Vec4f | import("typegpu/data").Vec4h | import("typegpu/data").Vec4i | import("typegpu/data").Vec4u) | import("typegpu/data").BuiltinClipDistances | import("typegpu/data").Decorated<import("typegpu/data").Vec2f | import("typegpu/data").Bool | import("typegpu/data").F32 | import("typegpu/data").F16 | import("typegpu/data").I32 | import("typegpu/data").U32 | import("typegpu/data").Vec2h | import("typegpu/data").Vec2i | import("typegpu/data").Vec2u | import("typegpu/data").Vec3f | import("typegpu/data").Vec3h | import("typegpu/data").Vec3i | import("typegpu/data").Vec3u | import("typegpu/data").Vec4f | import("typegpu/data").Vec4h | import("typegpu/data").Vec4i | import("typegpu/data").Vec4u, import("typegpu/data").AnyAttribute<import("typegpu/data").Builtin<"vertex_index" | "position" | "clip_distances" | "instance_index" | "front_facing" | "frag_depth" | "sample_index" | "sample_mask" | "local_invocation_id" | "local_invocation_index" | "global_invocation_id" | "workgroup_id" | "num_workgroups" | "subgroup_invocation_id" | "subgroup_size" | "fragment">>[]>;
5
5
  }>;
6
- export declare const getDefaultTarget: (presentationFormat: GPUTextureFormat) => GPUColorTargetState;
6
+ export declare const blend: GPUBlendState;
7
+ export declare const getDefaultTarget: (presentationFormat: GPUTextureFormat, blendMode?: GPUBlendState) => GPUColorTargetState;
7
8
  export declare const attachBindGroupsToPass: (pass: any, bindGroupPairs: BindGroupPair[]) => any;
9
+ export declare const createMaskPipeline: (root: TgpuRoot, maskTexture: TgpuTexture | null, BGP: BindGroupPair[], sampler: GPUSampler, presentationFormat: GPUTextureFormat) => TgpuRenderPipeline | null;
10
+ export declare const createReverseHoloPipeline: (root: TgpuRoot, texture: TgpuTexture | null, BGP: BindGroupPair[], sampler: GPUSampler, presentationFormat: GPUTextureFormat) => TgpuRenderPipeline | null;
11
+ export declare const createRainbowHoloPipeline: (root: TgpuRoot, texture: TgpuTexture | null, BGP: BindGroupPair[], sampler: GPUSampler, presentationFormat: GPUTextureFormat) => TgpuRenderPipeline | null;
12
+ export declare const pipelineRenderFunction: (root: TgpuRoot, pipelines: TgpuRenderPipeline[], attachments: any[], view: GPUTextureView, isInSinglePass: boolean) => void;
8
13
  //# sourceMappingURL=pipelineSetups.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipelineSetups.d.ts","sourceRoot":"","sources":["../../../../src/shaders/pipelineSetups.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,eAAO,MAAM,gBAAgB,GAC3B,UAAU,kBAAkB,EAC5B,gBAAgB,aAAa,EAAE;;EAOhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,oBAAoB,gBAAgB,KACnC,mBAgBF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,MAAM,GAAG,EACT,gBAAgB,aAAa,EAAE,QAOhC,CAAC"}
1
+ {"version":3,"file":"pipelineSetups.d.ts","sourceRoot":"","sources":["../../../../src/shaders/pipelineSetups.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAgBpD,eAAO,MAAM,gBAAgB,GAC3B,UAAU,kBAAkB,EAC5B,gBAAgB,aAAa,EAAE;;EAOhC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,aAWnB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,oBAAoB,gBAAgB,EACpC,YAAY,aAAa,KACxB,mBAKF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,MAAM,GAAG,EACT,gBAAgB,aAAa,EAAE,QAOhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,MAAM,QAAQ,EACd,aAAa,WAAW,GAAG,IAAI,EAC/B,KAAK,aAAa,EAAE,EACpB,SAAS,UAAU,EACnB,oBAAoB,gBAAgB,KACnC,kBAAkB,GAAG,IAwBvB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,MAAM,QAAQ,EACd,SAAS,WAAW,GAAG,IAAI,EAC3B,KAAK,aAAa,EAAE,EACpB,SAAS,UAAU,EACnB,oBAAoB,gBAAgB,KACnC,kBAAkB,GAAG,IAyBvB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,MAAM,QAAQ,EACd,SAAS,WAAW,GAAG,IAAI,EAC3B,KAAK,aAAa,EAAE,EACpB,SAAS,UAAU,EACnB,oBAAoB,gBAAgB,KACnC,kBAAkB,GAAG,IAqBvB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,MAAM,QAAQ,EACd,WAAW,kBAAkB,EAAE,EAC/B,aAAa,GAAG,EAAE,EAClB,MAAM,cAAc,EACpB,gBAAgB,OAAO,SA6BxB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  declare const getBitmapFromURI: (uri: string) => Promise<ImageBitmap>;
2
2
  export default getBitmapFromURI;
3
- //# sourceMappingURL=resourceManagement.d.ts.map
3
+ //# sourceMappingURL=bitmaps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitmaps.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/resourceManagement/bitmaps.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,gBAAgB,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,WAAW,CAgBhE,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { TgpuRoot, TgpuBuffer, ValidateBufferSchema } from 'typegpu';
2
+ export type BufferUsageType = 'uniform' | 'storage' | 'vertex';
3
+ type BufferWithUsageFromEntry<TEntry extends {
4
+ schema: ValidateBufferSchema<any>;
5
+ usage: BufferUsageType;
6
+ }> = TEntry['usage'] extends 'uniform' ? TgpuBuffer<TEntry['schema']> & {
7
+ usableAsUniform: true;
8
+ } : TEntry['usage'] extends 'storage' ? TgpuBuffer<TEntry['schema']> & {
9
+ usableAsStorage: true;
10
+ } : TEntry['usage'] extends 'vertex' ? TgpuBuffer<TEntry['schema']> & {
11
+ usableAsVertex: true;
12
+ } : never;
13
+ export declare class TypedBufferMap<TSchemas extends Record<string, {
14
+ schema: ValidateBufferSchema<any>;
15
+ usage: BufferUsageType;
16
+ }>> {
17
+ private schemas;
18
+ private buffers;
19
+ constructor(schemas: TSchemas);
20
+ set<K extends keyof TSchemas>(key: K, buffer: BufferWithUsageFromEntry<TSchemas[K]>): void;
21
+ get<K extends keyof TSchemas>(key: K): BufferWithUsageFromEntry<TSchemas[K]> | undefined;
22
+ addBuffer<K extends keyof TSchemas>(root: TgpuRoot, key: K, initValues?: TSchemas[K]['schema']['_TSType']): BufferWithUsageFromEntry<TSchemas[K]>;
23
+ keys(): (keyof TSchemas)[];
24
+ has<K extends keyof TSchemas>(key: K): boolean;
25
+ delete<K extends keyof TSchemas>(key: K): void;
26
+ }
27
+ export {};
28
+ //# sourceMappingURL=bufferManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bufferManager.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/resourceManagement/bufferManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE1E,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE/D,KAAK,wBAAwB,CAC3B,MAAM,SAAS;IAAE,MAAM,EAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAAC,KAAK,EAAE,eAAe,CAAA;CAAE,IAC1E,MAAM,CAAC,OAAO,CAAC,SAAS,SAAS,GACjC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG;IAAE,eAAe,EAAE,IAAI,CAAA;CAAE,GACxD,MAAM,CAAC,OAAO,CAAC,SAAS,SAAS,GAC/B,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG;IAAE,eAAe,EAAE,IAAI,CAAA;CAAE,GACxD,MAAM,CAAC,OAAO,CAAC,SAAS,QAAQ,GAC9B,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG;IAAE,cAAc,EAAE,IAAI,CAAA;CAAE,GACvD,KAAK,CAAC;AAEd,qBAAa,cAAc,CACzB,QAAQ,SAAS,MAAM,CACrB,MAAM,EACN;IAAE,MAAM,EAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAAC,KAAK,EAAE,eAAe,CAAA;CAAE,CAC9D;IAMW,OAAO,CAAC,OAAO;IAJ3B,OAAO,CAAC,OAAO,CAER;gBAEa,OAAO,EAAE,QAAQ;IAErC,GAAG,CAAC,CAAC,SAAS,MAAM,QAAQ,EAC1B,GAAG,EAAE,CAAC,EACN,MAAM,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAC5C,IAAI;IAIP,GAAG,CAAC,CAAC,SAAS,MAAM,QAAQ,EAC1B,GAAG,EAAE,CAAC,GACL,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;IAIpD,SAAS,CAAC,CAAC,SAAS,MAAM,QAAQ,EAChC,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,CAAC,EACN,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,GAC5C,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAuBxC,IAAI,IAAI,CAAC,MAAM,QAAQ,CAAC,EAAE;IAI1B,GAAG,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO;IAI9C,MAAM,CAAC,CAAC,SAAS,MAAM,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI;CAO/C"}
@@ -0,0 +1,7 @@
1
+ import { type TgpuRoot, type TgpuTexture } from 'typegpu';
2
+ export declare const createTexture: (root: TgpuRoot, size: {
3
+ width: number;
4
+ height: number;
5
+ }) => Promise<TgpuTexture>;
6
+ export declare const loadTexture: (root: TgpuRoot, imageBitmap: ImageBitmap, texture: TgpuTexture) => Promise<void>;
7
+ //# sourceMappingURL=textures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textures.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/resourceManagement/textures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,eAAO,MAAM,aAAa,GACxB,MAAM,QAAQ,EACd,MAAM;IACJ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,KACA,OAAO,CAAC,WAAW,CASrB,CAAC;AAEF,eAAO,MAAM,WAAW,GACtB,MAAM,QAAQ,EACd,aAAa,WAAW,EACxB,SAAS,WAAW,kBAOrB,CAAC"}
@@ -1,6 +1,10 @@
1
1
  import * as d from 'typegpu/data';
2
2
  export declare const hueShift: import("typegpu").TgpuFn<(rgb: d.Vec3f, angle: d.F32) => d.Vec3f>;
3
- export declare const bloomColorShift: import("typegpu").TgpuFn<(color: d.Vec3f, power: d.F32) => d.Vec3f>;
3
+ export declare const glareColorShift: import("typegpu").TgpuFn<(color: d.Vec3f, power: d.F32) => d.Vec3f>;
4
4
  export declare const overlayChannel: import("typegpu").TgpuFn<(base: d.F32, blend: d.F32) => d.F32>;
5
5
  export declare const overlayChannels: import("typegpu").TgpuFn<(base: d.Vec3f, blend: d.Vec3f) => d.Vec3f>;
6
+ /** Rec.601 luma */
7
+ export declare const luma601: import("typegpu").TgpuFn<(rgb: d.Vec3f) => d.F32>;
8
+ export declare const tiltTowardsLighterNeighbor: import("typegpu").TgpuFn<(rgb: d.Vec3f, t: d.F32) => d.Vec3f>;
9
+ export declare const linearstep: import("typegpu").TgpuFn<(num1: d.F32, num2: d.F32, x: d.F32) => d.F32>;
6
10
  //# sourceMappingURL=tgpuUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tgpuUtils.d.ts","sourceRoot":"","sources":["../../../../src/shaders/tgpuUtils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,eAAO,MAAM,QAAQ,mEA6BnB,CAAC;AAEH,eAAO,MAAM,eAAe,qEAc1B,CAAC;AAEH,eAAO,MAAM,cAAc,gEAYzB,CAAC;AAEH,eAAO,MAAM,eAAe,sEAS1B,CAAC"}
1
+ {"version":3,"file":"tgpuUtils.d.ts","sourceRoot":"","sources":["../../../../src/shaders/tgpuUtils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,eAAO,MAAM,QAAQ,mEA6BnB,CAAC;AAEH,eAAO,MAAM,eAAe,qEAc1B,CAAC;AAEH,eAAO,MAAM,cAAc,gEAYzB,CAAC;AAEH,eAAO,MAAM,eAAe,sEAS1B,CAAC;AAEH,mBAAmB;AACnB,eAAO,MAAM,OAAO,mDAQlB,CAAC;AAEH,eAAO,MAAM,0BAA0B,+DAcrC,CAAC;AAEH,eAAO,MAAM,UAAU,yEAMrB,CAAC"}
@@ -1,13 +1,7 @@
1
- import { type TgpuRoot, type TgpuTexture } from 'typegpu';
2
1
  import type { quaternion, vec3 } from '../types/types';
3
- export declare const createTexture: (root: TgpuRoot, size: {
4
- width: number;
5
- height: number;
6
- }) => Promise<TgpuTexture>;
7
- export declare const loadTexture: (root: TgpuRoot, imageBitmap: ImageBitmap, texture: TgpuTexture) => Promise<void>;
8
2
  export declare const rotateVectorByQuaternion: (vec: vec3, quaternion: quaternion) => vec3;
9
3
  export declare const clamp: (v: number, min?: number, max?: number) => number;
10
4
  export declare const rotate2D: ([x, y]: [number, number], angleDeg: number) => [number, number];
11
- export declare function getAngleFromDimensions(): 0 | 90;
5
+ export declare function getAngleFromDimensions(): 90 | 0;
12
6
  export declare function subscribeToOrientationChange(callback: (angleDeg: number) => void): () => void;
13
7
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/shaders/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,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sB,WAGrC;AAGD,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,cAWrC"}
@@ -0,0 +1,6 @@
1
+ import * as d from 'typegpu/data';
2
+ declare const mainRotationEffectVertex: import("typegpu").TgpuVertexFn<{}, {
3
+ uv: d.Vec2f;
4
+ }>;
5
+ export default mainRotationEffectVertex;
6
+ //# sourceMappingURL=mainRotationEffectVertex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mainRotationEffectVertex.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/vertexShaders/mainRotationEffectVertex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,QAAA,MAAM,wBAAwB;;EAoE5B,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { f32 } from 'typegpu/data';
2
- import type { BindGroupPair, BloomOptions, ColorMask, DeepPartiallyOptional } from './types';
2
+ import type { BindGroupPair, GlareOptions, ColorMask, DeepPartiallyOptional, HoloOptions } from './types';
3
3
  import type { TgpuBindGroup, TgpuBindGroupLayout } from 'typegpu';
4
- export declare const createBloomOptions: (options: Partial<BloomOptions>) => BloomOptions;
4
+ export declare const createGlareOptions: (options: Partial<GlareOptions>) => GlareOptions;
5
5
  export declare const mapToF32: <T extends Record<string, number>>(obj: T) => { [K in keyof T]: ReturnType<typeof f32>; };
6
6
  export declare const createColorMask: (colorMask: DeepPartiallyOptional<ColorMask, "baseColor">) => ColorMask;
7
7
  export declare const colorMaskToTyped: (colorMask: ColorMask) => {
@@ -11,6 +11,7 @@ export declare const colorMaskToTyped: (colorMask: ColorMask) => {
11
11
  lower: any;
12
12
  };
13
13
  };
14
+ export declare const createHoloOptions: (options: Partial<HoloOptions>) => HoloOptions;
14
15
  export declare const numberArrToTyped: (vec: number[]) => any;
15
16
  export declare const createBindGroupPair: (bindGroupLayout: TgpuBindGroupLayout, bindGroup: TgpuBindGroup) => BindGroupPair;
16
17
  export declare const createBindGroupPairs: (bindGroupLayouts: TgpuBindGroupLayout[], bindGroups: TgpuBindGroup[]) => BindGroupPair[];
@@ -1 +1 @@
1
- {"version":3,"file":"typeUtils.d.ts","sourceRoot":"","sources":["../../../../src/types/typeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAuB,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,SAAS,EACT,qBAAqB,EAEtB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAElE,eAAO,MAAM,kBAAkB,GAC7B,SAAS,OAAO,CAAC,YAAY,CAAC,KAC7B,YAoBF,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACvD,KAAK,CAAC,KACL,GACA,CAAC,IAAI,MAAM,CAAC,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,GAQvC,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,WAAW,qBAAqB,CAAC,SAAS,EAAE,WAAW,CAAC,KACvD,SAcF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,WAAW,SAAS;;;;;;CASpD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,EAAE,QAkB7C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,iBAAiB,mBAAmB,EACpC,WAAW,aAAa,KACvB,aAEF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,kBAAkB,mBAAmB,EAAE,EACvC,YAAY,aAAa,EAAE,KAC1B,aAAa,EAcf,CAAC"}
1
+ {"version":3,"file":"typeUtils.d.ts","sourceRoot":"","sources":["../../../../src/types/typeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAuB,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,SAAS,EACT,qBAAqB,EAErB,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGlE,eAAO,MAAM,kBAAkB,GAC7B,SAAS,OAAO,CAAC,YAAY,CAAC,KAC7B,YAoBF,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACvD,KAAK,CAAC,KACL,GACA,CAAC,IAAI,MAAM,CAAC,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,GAQvC,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,WAAW,qBAAqB,CAAC,SAAS,EAAE,WAAW,CAAC,KACvD,SAcF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,WAAW,SAAS;;;;;;CASpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,SAAS,OAAO,CAAC,WAAW,CAAC,KAC5B,WAQF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,EAAE,QAkB7C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,iBAAiB,mBAAmB,EACpC,WAAW,aAAa,KACvB,aAEF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,kBAAkB,mBAAmB,EAAE,EACvC,YAAY,aAAa,EAAE,KAC1B,aAAa,EAcf,CAAC"}
@@ -1,15 +1,16 @@
1
1
  import type { TgpuBindGroup, TgpuBindGroupLayout } from 'typegpu';
2
+ import type { WaveCallbackFn } from '../enums/waveCallback';
2
3
  export type vec2 = [number, number];
3
4
  export type vec3 = [number, number, number];
4
5
  export type vec4 = [number, number, number, number];
5
6
  export type quaternion = vec4;
6
- export type BloomOptions = {
7
+ export type GlareOptions = {
7
8
  glowPower: number;
8
9
  hueShiftAngleMax: number;
9
10
  hueShiftAngleMin: number;
10
11
  hueBlendPower: number;
11
12
  lightIntensity: number;
12
- bloomIntensity: number;
13
+ glareIntensity: number;
13
14
  };
14
15
  export type ColorMask = {
15
16
  baseColor: vec3;
@@ -18,6 +19,10 @@ export type ColorMask = {
18
19
  lower: vec3;
19
20
  };
20
21
  };
22
+ export type HoloOptions = {
23
+ intensity: number;
24
+ waveCallback: WaveCallbackFn;
25
+ };
21
26
  export type PartiallyOptional<T, K extends keyof T> = {
22
27
  [P in K]: T[P];
23
28
  } & Partial<Omit<T, K>>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAElE,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACpC,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC5C,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACpD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC;AAE9B,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,IAAI,CAAC;IAChB,iBAAiB,EAAE;QACjB,KAAK,EAAE,IAAI,CAAC;QACZ,KAAK,EAAE,IAAI,CAAC;KACb,CAAC;CACH,CAAC;AAGF,MAAM,MAAM,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI;KACnD,CAAC,IAAI,CAAC,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AAE1B,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,EAAE,aAAa,CAAC;CACtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-shine",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Fast and efficient way of adding interactive effects that are run entirely on shaders using typeGPU.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -20,6 +20,7 @@
20
20
  "cpp",
21
21
  "*.podspec",
22
22
  "react-native.config.js",
23
+ "scripts",
23
24
  "!ios/build",
24
25
  "!android/build",
25
26
  "!android/gradle",
@@ -83,7 +84,7 @@
83
84
  "react-native": "0.79.5",
84
85
  "react-native-builder-bob": "^0.40.13",
85
86
  "react-native-reanimated": "^4.0.1",
86
- "react-native-wgpu": "^0.2.1",
87
+ "react-native-wgpu": "^0.2.8",
87
88
  "react-native-worklets": "^0.4.1",
88
89
  "release-it": "^17.10.0",
89
90
  "typegpu": "^0.7.0",
@@ -94,7 +95,7 @@
94
95
  "react": "*",
95
96
  "react-native": "*",
96
97
  "react-native-reanimated": "^4.0.1",
97
- "react-native-wgpu": "^0.2.0",
98
+ "react-native-wgpu": "^0.2.8",
98
99
  "react-native-worklets": "^0.4.1",
99
100
  "typegpu": "^0.7.0"
100
101
  },
@@ -166,6 +167,7 @@
166
167
  "dependencies": {
167
168
  "expo-asset": "^11.1.7",
168
169
  "react-native-orientation-locker": "^1.7.0",
170
+ "react-native-view-shot": "^4.0.3",
169
171
  "unplugin-typegpu": "^0.2.2"
170
172
  }
171
173
  }
@@ -0,0 +1,21 @@
1
+ const { execSync } = require('child_process');
2
+
3
+ const PEERS = [
4
+ 'react-native-reanimated',
5
+ 'react-native-worklets',
6
+ 'react-native-wgpu',
7
+ 'typegpu',
8
+ ];
9
+
10
+ const installer = process.env.npm_config_user_agent?.includes('yarn')
11
+ ? 'yarn add'
12
+ : 'npm install';
13
+
14
+ console.log(`\n📦 Installing peer dependencies:\n${PEERS.join('\n')}\n`);
15
+
16
+ try {
17
+ execSync(`${installer} ${PEERS.join(' ')}`, { stdio: 'inherit' });
18
+ console.log('\n✅ Peer dependencies installed!\n');
19
+ } catch (err) {
20
+ console.error('\n❌ Failed to install peer dependencies:', err.message);
21
+ }
@@ -0,0 +1,18 @@
1
+ console.warn('\n🔆 react-native-shine installed!\n');
2
+ console.warn(
3
+ '⚠️ Make sure you have the following peer dependencies installed:\n'
4
+ );
5
+ console.warn('• react-native-reanimated');
6
+ console.warn('• react-native-worklets');
7
+ console.warn('• react-native-wgpu');
8
+ console.warn('• typegpu');
9
+
10
+ console.warn('\n👉 You can install them with:\n');
11
+ console.warn(
12
+ '\tyarn add react-native-reanimated react-native-worklets react-native-wgpu typegpu \nor\n\tnpm install react-native-reanimated react-native-worklets react-native-wgpu typegpu'
13
+ );
14
+
15
+ process.stderr.write('\n✅ postinstall finished.\n');
16
+ console.log(
17
+ '👉 For more details, visit: https://github.com/wojtus7/react-native-shine'
18
+ );