react-native-shine 0.3.0 → 0.3.1

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 (99) hide show
  1. package/README.md +21 -6
  2. package/lib/module/components/Content.js +232 -0
  3. package/lib/module/components/Content.js.map +1 -0
  4. package/lib/module/components/Shine.js +18 -254
  5. package/lib/module/components/Shine.js.map +1 -1
  6. package/lib/module/components/ShineGroup.js +11 -23
  7. package/lib/module/components/ShineGroup.js.map +1 -1
  8. package/lib/module/hooks/useAnimationFrame.js +17 -0
  9. package/lib/module/hooks/useAnimationFrame.js.map +1 -0
  10. package/lib/module/hooks/useOrientation.js +2 -8
  11. package/lib/module/hooks/useOrientation.js.map +1 -1
  12. package/lib/module/index.js +3 -2
  13. package/lib/module/index.js.map +1 -1
  14. package/lib/module/shaders/bindGroupLayouts.js +8 -8
  15. package/lib/module/shaders/bindGroupLayouts.js.map +1 -1
  16. package/lib/module/shaders/bindGroupUtils.js +18 -40
  17. package/lib/module/shaders/bindGroupUtils.js.map +1 -1
  18. package/lib/module/shaders/fragmentShaders/glareFragment.js +8 -7
  19. package/lib/module/shaders/fragmentShaders/glareFragment.js.map +1 -1
  20. package/lib/module/shaders/fragmentShaders/holoFragment.js +5 -10
  21. package/lib/module/shaders/fragmentShaders/holoFragment.js.map +1 -1
  22. package/lib/module/shaders/fragmentShaders/reverseHoloFragment.js +3 -3
  23. package/lib/module/shaders/fragmentShaders/reverseHoloFragment.js.map +1 -1
  24. package/lib/module/shaders/pipelineSetups.js +29 -43
  25. package/lib/module/shaders/pipelineSetups.js.map +1 -1
  26. package/lib/module/shaders/resourceManagement/textures.js +7 -0
  27. package/lib/module/shaders/resourceManagement/textures.js.map +1 -1
  28. package/lib/module/shaders/utils.js +8 -22
  29. package/lib/module/shaders/utils.js.map +1 -1
  30. package/lib/module/shaders/vertexShaders/mainRotationEffectVertex.js +2 -2
  31. package/lib/module/shaders/vertexShaders/mainRotationEffectVertex.js.map +1 -1
  32. package/lib/module/types/size.js +2 -0
  33. package/lib/module/types/size.js.map +1 -0
  34. package/lib/module/types/typeUtils.js +0 -14
  35. package/lib/module/types/typeUtils.js.map +1 -1
  36. package/lib/module/types/vector.js +2 -0
  37. package/lib/module/types/vector.js.map +1 -0
  38. package/lib/module/utils/size.js +25 -0
  39. package/lib/module/utils/size.js.map +1 -0
  40. package/lib/module/utils/vector.js +168 -0
  41. package/lib/module/utils/vector.js.map +1 -0
  42. package/lib/typescript/src/components/Content.d.ts +23 -0
  43. package/lib/typescript/src/components/Content.d.ts.map +1 -0
  44. package/lib/typescript/src/components/Shine.d.ts +3 -13
  45. package/lib/typescript/src/components/Shine.d.ts.map +1 -1
  46. package/lib/typescript/src/components/ShineGroup.d.ts +3 -5
  47. package/lib/typescript/src/components/ShineGroup.d.ts.map +1 -1
  48. package/lib/typescript/src/hooks/useAnimationFrame.d.ts +2 -0
  49. package/lib/typescript/src/hooks/useAnimationFrame.d.ts.map +1 -0
  50. package/lib/typescript/src/hooks/useOrientation.d.ts +3 -1
  51. package/lib/typescript/src/hooks/useOrientation.d.ts.map +1 -1
  52. package/lib/typescript/src/index.d.ts +4 -2
  53. package/lib/typescript/src/index.d.ts.map +1 -1
  54. package/lib/typescript/src/shaders/bindGroupLayouts.d.ts +9 -9
  55. package/lib/typescript/src/shaders/bindGroupLayouts.d.ts.map +1 -1
  56. package/lib/typescript/src/shaders/bindGroupUtils.d.ts +3 -3
  57. package/lib/typescript/src/shaders/bindGroupUtils.d.ts.map +1 -1
  58. package/lib/typescript/src/shaders/fragmentShaders/glareFragment.d.ts.map +1 -1
  59. package/lib/typescript/src/shaders/fragmentShaders/holoFragment.d.ts.map +1 -1
  60. package/lib/typescript/src/shaders/pipelineSetups.d.ts +7 -7
  61. package/lib/typescript/src/shaders/pipelineSetups.d.ts.map +1 -1
  62. package/lib/typescript/src/shaders/resourceManagement/textures.d.ts +2 -1
  63. package/lib/typescript/src/shaders/resourceManagement/textures.d.ts.map +1 -1
  64. package/lib/typescript/src/shaders/utils.d.ts +3 -4
  65. package/lib/typescript/src/shaders/utils.d.ts.map +1 -1
  66. package/lib/typescript/src/types/size.d.ts +5 -0
  67. package/lib/typescript/src/types/size.d.ts.map +1 -0
  68. package/lib/typescript/src/types/typeUtils.d.ts +1 -4
  69. package/lib/typescript/src/types/typeUtils.d.ts.map +1 -1
  70. package/lib/typescript/src/types/types.d.ts +3 -1
  71. package/lib/typescript/src/types/types.d.ts.map +1 -1
  72. package/lib/typescript/src/types/vector.d.ts +11 -0
  73. package/lib/typescript/src/types/vector.d.ts.map +1 -0
  74. package/lib/typescript/src/utils/size.d.ts +5 -0
  75. package/lib/typescript/src/utils/size.d.ts.map +1 -0
  76. package/lib/typescript/src/utils/vector.d.ts +33 -0
  77. package/lib/typescript/src/utils/vector.d.ts.map +1 -0
  78. package/package.json +4 -3
  79. package/src/components/Content.tsx +403 -0
  80. package/src/components/Shine.tsx +24 -466
  81. package/src/components/ShineGroup.tsx +17 -24
  82. package/src/hooks/useAnimationFrame.ts +21 -0
  83. package/src/hooks/useOrientation.ts +11 -13
  84. package/src/index.tsx +9 -1
  85. package/src/shaders/bindGroupLayouts.ts +11 -11
  86. package/src/shaders/bindGroupUtils.ts +31 -61
  87. package/src/shaders/fragmentShaders/glareFragment.ts +8 -7
  88. package/src/shaders/fragmentShaders/holoFragment.ts +5 -13
  89. package/src/shaders/fragmentShaders/reverseHoloFragment.ts +4 -4
  90. package/src/shaders/pipelineSetups.ts +54 -69
  91. package/src/shaders/resourceManagement/textures.ts +13 -1
  92. package/src/shaders/utils.ts +13 -27
  93. package/src/shaders/vertexShaders/mainRotationEffectVertex.ts +2 -2
  94. package/src/types/size.ts +4 -0
  95. package/src/types/typeUtils.ts +0 -28
  96. package/src/types/types.ts +11 -1
  97. package/src/types/vector.ts +13 -0
  98. package/src/utils/size.ts +12 -0
  99. package/src/utils/vector.ts +132 -0
@@ -1,6 +1,6 @@
1
1
  import { type TgpuBuffer, type TgpuRoot, type UniformFlag } from 'typegpu';
2
2
  import * as d from 'typegpu/data';
3
- import { glareOptionsSchema, colorMaskSchema } from './bindGroupLayouts';
3
+ import { type ColorMaskSchema, type GlareSchema } from './bindGroupLayouts';
4
4
  import type { GlareOptions, ColorMask, PartiallyOptional } from '../types/types';
5
5
  export declare const createRotationBuffer: (root: TgpuRoot, initValues?: {
6
6
  x: number;
@@ -20,7 +20,7 @@ export declare const createGlareOptionsBuffer: (root: TgpuRoot, initValues?: Par
20
20
  lightIntensity: d.F32;
21
21
  glareIntensity: d.F32;
22
22
  }>> & UniformFlag;
23
- export declare const createGlareOptionsBindGroup: (root: TgpuRoot, buffer: TgpuBuffer<glareOptionsSchema> & UniformFlag) => import("typegpu").TgpuBindGroup<{
23
+ export declare const createGlareBindGroup: (root: TgpuRoot, buffer: TgpuBuffer<GlareSchema> & UniformFlag) => import("typegpu").TgpuBindGroup<{
24
24
  glareOptions: {
25
25
  uniform: d.WgslStruct<{
26
26
  glowPower: d.F32;
@@ -39,7 +39,7 @@ export declare const createColorMaskBuffer: (root: TgpuRoot, initValues: Partial
39
39
  lower: d.Vec3f;
40
40
  }>;
41
41
  }>> & UniformFlag;
42
- export declare const createColorMaskBindGroup: (root: TgpuRoot, buffer: TgpuBuffer<colorMaskSchema> & UniformFlag) => import("typegpu").TgpuBindGroup<{
42
+ export declare const createColorMaskBindGroup: (root: TgpuRoot, buffer: TgpuBuffer<ColorMaskSchema> & UniformFlag) => import("typegpu").TgpuBindGroup<{
43
43
  mask: {
44
44
  uniform: d.WgslStruct<{
45
45
  baseColor: d.Vec3f;
@@ -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,k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MAAM,gBAAgB,CAAC;AASxB,eAAO,MAAM,oBAAoB,GAAI,MAAM,QAAQ,EAAE;;;;CAAoB,sCAGnD,CAAC;AAEvB,eAAO,MAAM,6BAA6B,GACxC,MAAM,QAAQ,EACd,QAAQ,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;;;;EAIzB,CAAC;AAEL,eAAO,MAAM,wBAAwB,GACnC,MAAM,QAAQ,EACd,aAAa,OAAO,CAAC,YAAY,CAAC;;;;;;;iBAId,CAAC;AAEvB,eAAO,MAAM,oBAAoB,GAC/B,MAAM,QAAQ,EACd,QAAQ,UAAU,CAAC,WAAW,CAAC,GAAG,WAAW;;;;;;;;;;;EAI3C,CAAC;AAEL,eAAO,MAAM,qBAAqB,GAChC,MAAM,QAAQ,EACd,YAAY,iBAAiB,CAAC,SAAS,EAAE,WAAW,CAAC;;;;;;iBAOjC,CAAC;AAEvB,eAAO,MAAM,wBAAwB,GACnC,MAAM,QAAQ,EACd,QAAQ,UAAU,CAAC,eAAe,CAAC,GAAG,WAAW;;;;;;;;;;EAI/C,CAAC"}
@@ -1 +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"}
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;;WA4D3B,CAAC"}
@@ -1 +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"}
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;;WAwBvB,CAAC"}
@@ -1,13 +1,13 @@
1
- import type { TgpuRenderPipeline, TgpuRoot, TgpuTexture } from 'typegpu';
1
+ import type { TgpuBindGroup, 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").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">>[]>;
3
+ export declare const attachBindGroups: (pipeline: TgpuRenderPipeline, bindGroups: TgpuBindGroup[]) => 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").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<"clip_distances" | "position" | "frag_depth" | "sample_mask" | "front_facing" | "sample_index" | "subgroup_invocation_id" | "subgroup_size" | "vertex_index" | "instance_index" | "local_invocation_id" | "local_invocation_index" | "global_invocation_id" | "workgroup_id" | "num_workgroups" | "fragment">>[]> | import("typegpu/data").BuiltinClipDistances) | {
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").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<"clip_distances" | "position" | "frag_depth" | "sample_mask" | "front_facing" | "sample_index" | "subgroup_invocation_id" | "subgroup_size" | "vertex_index" | "instance_index" | "local_invocation_id" | "local_invocation_index" | "global_invocation_id" | "workgroup_id" | "num_workgroups" | "fragment">>[]> | import("typegpu/data").BuiltinClipDistances;
5
5
  }>;
6
6
  export declare const blend: GPUBlendState;
7
7
  export declare const getDefaultTarget: (presentationFormat: GPUTextureFormat, blendMode?: GPUBlendState) => GPUColorTargetState;
8
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;
9
+ export declare const createMaskPipeline: (root: TgpuRoot, maskTexture: TgpuTexture | undefined, bindGroups: TgpuBindGroup[], sampler: GPUSampler, presentationFormat: GPUTextureFormat) => TgpuRenderPipeline | void;
10
+ export declare const createReverseHoloPipeline: (root: TgpuRoot, texture: TgpuTexture | undefined, bindGroups: TgpuBindGroup[], sampler: GPUSampler, presentationFormat: GPUTextureFormat) => TgpuRenderPipeline | void;
11
+ export declare const createRainbowHoloPipeline: (root: TgpuRoot, texture: TgpuTexture | undefined, bindGroups: TgpuBindGroup[], sampler: GPUSampler, presentationFormat: GPUTextureFormat) => TgpuRenderPipeline | void;
12
+ export declare function renderPipelinesInSinglePass(root: TgpuRoot, pipelines: TgpuRenderPipeline[], view: GPUTextureView): void;
13
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,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,kBAAk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B,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,kBAAkB,EAAE,EAC/B,IAAI,EAAE,cAAc,QAsBrB"}
@@ -1,7 +1,8 @@
1
- import { type TgpuRoot, type TgpuTexture } from 'typegpu';
1
+ import { type TextureProps, type TgpuRoot, type TgpuTexture } from 'typegpu';
2
2
  export declare const createTexture: (root: TgpuRoot, size: {
3
3
  width: number;
4
4
  height: number;
5
5
  }) => Promise<TgpuTexture>;
6
6
  export declare const loadTexture: (root: TgpuRoot, imageBitmap: ImageBitmap, texture: TgpuTexture) => Promise<void>;
7
+ export declare function loadBitmap(root: TgpuRoot, imageURI: string, setTexture: (texture: TgpuTexture<TextureProps>) => void): Promise<void>;
7
8
  //# sourceMappingURL=textures.d.ts.map
@@ -1 +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
+ {"version":3,"file":"textures.d.ts","sourceRoot":"","sources":["../../../../../src/shaders/resourceManagement/textures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAG7E,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;AAEF,wBAAsB,UAAU,CAC9B,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC,KAAK,IAAI,iBAMzD"}
@@ -1,7 +1,6 @@
1
1
  import type { quaternion, vec3 } from '../types/types';
2
2
  export declare const rotateVectorByQuaternion: (vec: vec3, quaternion: quaternion) => vec3;
3
- export declare const clamp: (v: number, min?: number, max?: number) => number;
4
- export declare const rotate2D: ([x, y]: [number, number], angleDeg: number) => [number, number];
5
- export declare function getAngleFromDimensions(): 90 | 0;
6
- export declare function subscribeToOrientationChange(callback: (angleDeg: number) => void): () => void;
3
+ export declare function getAngleFromDimensions(): number;
4
+ export declare function isLandscapeMode(): boolean;
5
+ export declare function subscribeToOrientationChange(callback: (isLandscape: boolean) => void): () => void;
7
6
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/shaders/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAGvD,eAAO,MAAM,wBAAwB,GACnC,KAAK,IAAI,EACT,YAAY,UAAU,KACrB,IA6BF,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,EAAE,YAAQ,EAAE,YAAO,WAGjD,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,EACxB,UAAU,MAAM,KACf,CAAC,MAAM,EAAE,MAAM,CAMjB,CAAC;AAGF,wBAAgB,sBAAsB,WAGrC;AAGD,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,cAWrC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/shaders/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEvD,eAAO,MAAM,wBAAwB,GACnC,KAAK,IAAI,EACT,YAAY,UAAU,KACrB,IA6BF,CAAC;AAGF,wBAAgB,sBAAsB,WAErC;AAED,wBAAgB,eAAe,YAI9B;AAGD,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,cAQzC"}
@@ -0,0 +1,5 @@
1
+ export interface Size {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ //# sourceMappingURL=size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../../../src/types/size.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -1,6 +1,5 @@
1
1
  import { f32 } from 'typegpu/data';
2
- import type { BindGroupPair, GlareOptions, ColorMask, DeepPartiallyOptional, HoloOptions } from './types';
3
- import type { TgpuBindGroup, TgpuBindGroupLayout } from 'typegpu';
2
+ import type { GlareOptions, ColorMask, DeepPartiallyOptional, HoloOptions } from './types';
4
3
  export declare const createGlareOptions: (options: Partial<GlareOptions>) => GlareOptions;
5
4
  export declare const mapToF32: <T extends Record<string, number>>(obj: T) => { [K in keyof T]: ReturnType<typeof f32>; };
6
5
  export declare const createColorMask: (colorMask: DeepPartiallyOptional<ColorMask, "baseColor">) => ColorMask;
@@ -13,6 +12,4 @@ export declare const colorMaskToTyped: (colorMask: ColorMask) => {
13
12
  };
14
13
  export declare const createHoloOptions: (options: Partial<HoloOptions>) => HoloOptions;
15
14
  export declare const numberArrToTyped: (vec: number[]) => any;
16
- export declare const createBindGroupPair: (bindGroupLayout: TgpuBindGroupLayout, bindGroup: TgpuBindGroup) => BindGroupPair;
17
- export declare const createBindGroupPairs: (bindGroupLayouts: TgpuBindGroupLayout[], bindGroups: TgpuBindGroup[]) => BindGroupPair[];
18
15
  //# sourceMappingURL=typeUtils.d.ts.map
@@ -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,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
+ {"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,YAAY,EACZ,SAAS,EACT,qBAAqB,EAErB,WAAW,EACZ,MAAM,SAAS,CAAC;AAIjB,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"}
@@ -1,4 +1,4 @@
1
- import type { TgpuBindGroup, TgpuBindGroupLayout } from 'typegpu';
1
+ import type { TgpuBindGroup, TgpuBindGroupLayout, TgpuRenderPipeline } from 'typegpu';
2
2
  import type { WaveCallbackFn } from '../enums/waveCallback';
3
3
  export type vec2 = [number, number];
4
4
  export type vec3 = [number, number, number];
@@ -35,4 +35,6 @@ export type BindGroupPair = {
35
35
  layout: TgpuBindGroupLayout;
36
36
  group: TgpuBindGroup;
37
37
  };
38
+ export type ColorAttachment = Parameters<TgpuRenderPipeline['withColorAttachment']>[0];
39
+ export type PipelineAttachmentPair = [TgpuRenderPipeline, ColorAttachment];
38
40
  //# sourceMappingURL=types.d.ts.map
@@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U,CACtC,kBAAkB,CAAC,qBAAqB,CAAC,CAC1C,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MAAM,sBAAsB,GAAG,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export interface V1d {
2
+ x: number;
3
+ }
4
+ export interface V2d extends V1d {
5
+ y: number;
6
+ }
7
+ export interface V3d extends V2d {
8
+ z: number;
9
+ }
10
+ export type Transformer = (value: number) => number;
11
+ //# sourceMappingURL=vector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../../../src/types/vector.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,GAAI,SAAQ,GAAG;IAC9B,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,GAAI,SAAQ,GAAG;IAC9B,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Size } from '../types/size';
2
+ import type { V2d } from '../types/vector';
3
+ export declare function sizeToV2d({ width: x, height: y }: Size): V2d;
4
+ export declare function sizeFromV2d({ x: width, y: height }: V2d): Size;
5
+ //# sourceMappingURL=size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../../../src/utils/size.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE3C,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,IAAI,GAAG,GAAG,CAG5D;AAED,wBAAgB,WAAW,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,GAAG,IAAI,CAG9D"}
@@ -0,0 +1,33 @@
1
+ import type { Transformer, V2d, V3d } from '../types/vector';
2
+ export declare function scaleV2d(a: V2d, value: number): V2d;
3
+ export declare const multiplyV2d: typeof scaleV2d;
4
+ export declare function addV2d(a: V2d, b: V2d): V2d;
5
+ export declare function angleToV2d(angle: number): V2d;
6
+ export declare function rotateV2d({ x, y }: V2d, rad: number): V2d;
7
+ export declare function negateV2dX({ x, y }: V2d): V2d;
8
+ export declare function negateV2dY({ x, y }: V2d): V2d;
9
+ export declare function transformV2d({ x, y }: V2d, transformer: Transformer): V2d;
10
+ export declare function clampV2d(v2d: V2d, min: number, max: number): V2d;
11
+ export declare function round2D(v2d: V2d): V2d;
12
+ export declare function areV2dEqual(a: V2d, b: V2d): boolean;
13
+ export declare const zeroV2d: {
14
+ x: number;
15
+ y: number;
16
+ };
17
+ export declare function scaleV3d(a: V3d, value: number): V3d;
18
+ export declare const multiplyV3d: typeof scaleV3d;
19
+ export declare function divV3d(a: V3d, value: number): V3d;
20
+ export declare function negateV3d(a: V3d): V3d;
21
+ export declare function addV3d(a: V3d, b: V3d): V3d;
22
+ export declare function subtractV3d(a: V3d, b: V3d): V3d;
23
+ export declare function componentsFromV3d({ x, y, z }: V3d): [number, number, number];
24
+ export declare function transformV3d(v3d: V3d, transformer: Transformer): V3d;
25
+ export declare function clamp(v: number, min?: number, max?: number): number;
26
+ export declare function clampV3d(v3d: V3d, min: number, max: number): V3d;
27
+ export declare function degToRad(deg: number): number;
28
+ export declare const zeroV3d: {
29
+ x: number;
30
+ y: number;
31
+ z: number;
32
+ };
33
+ //# sourceMappingURL=vector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../../../src/utils/vector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC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GAAG,GAAG,CAGrC;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,CAM1C;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,CAG/C;AAED,wBAAgB,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAG5E;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,WAAW,GAAG,GAAG,CAMpE;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,SAAK,EAAE,GAAG,SAAI,GAAG,MAAM,CAG1D;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAGhE;AAID,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG5C;AAED,eAAO,MAAM,OAAO;;;;CAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-shine",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
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",
@@ -81,13 +81,14 @@
81
81
  "jest": "^29.7.0",
82
82
  "prettier": "^3.0.3",
83
83
  "react": "19.0.0",
84
+ "react-dom": "19.0.0",
84
85
  "react-native": "0.79.5",
85
86
  "react-native-builder-bob": "^0.40.13",
86
87
  "react-native-reanimated": "^4.0.1",
87
88
  "react-native-wgpu": "^0.2.8",
88
89
  "react-native-worklets": "^0.4.1",
89
90
  "release-it": "^17.10.0",
90
- "typegpu": "^0.7.0",
91
+ "typegpu": "^0.7.1",
91
92
  "typescript": "^5.8.3",
92
93
  "unplugin-typegpu": "^0.2.2"
93
94
  },
@@ -97,7 +98,7 @@
97
98
  "react-native-reanimated": "^4.0.1",
98
99
  "react-native-wgpu": "^0.2.8",
99
100
  "react-native-worklets": "^0.4.1",
100
- "typegpu": "^0.7.0"
101
+ "typegpu": "^0.7.1"
101
102
  },
102
103
  "workspaces": [
103
104
  "example"