@tableslayer/ui 0.1.4 → 0.1.5

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 (206) hide show
  1. package/dist/components/PropsTable/PropsTable.svelte +1 -1
  2. package/package.json +9 -9
  3. package/src/lib/components/Avatar/Avatar.svelte +0 -82
  4. package/src/lib/components/Avatar/AvatarFileInput.svelte +0 -85
  5. package/src/lib/components/Avatar/AvatarPopover.svelte +0 -34
  6. package/src/lib/components/Avatar/index.ts +0 -4
  7. package/src/lib/components/Avatar/types.ts +0 -24
  8. package/src/lib/components/BrushSizeSlider/BrushSizeSlider.svelte +0 -174
  9. package/src/lib/components/BrushSizeSlider/index.ts +0 -1
  10. package/src/lib/components/Button/Button.svelte +0 -182
  11. package/src/lib/components/Button/ConfirmActionButton.svelte +0 -98
  12. package/src/lib/components/Button/IconButton.svelte +0 -121
  13. package/src/lib/components/Button/RadioButton.svelte +0 -93
  14. package/src/lib/components/Button/index.ts +0 -5
  15. package/src/lib/components/Button/types.ts +0 -54
  16. package/src/lib/components/CardFan/CardFan.svelte +0 -165
  17. package/src/lib/components/CardFan/index.ts +0 -2
  18. package/src/lib/components/CardFan/types.ts +0 -6
  19. package/src/lib/components/CodeBlock/Code.svelte +0 -7
  20. package/src/lib/components/CodeBlock/CodeBlock.svelte +0 -102
  21. package/src/lib/components/CodeBlock/index.ts +0 -3
  22. package/src/lib/components/CodeBlock/types.ts +0 -10
  23. package/src/lib/components/ColorMode/ColorMode.svelte +0 -8
  24. package/src/lib/components/ColorMode/index.ts +0 -2
  25. package/src/lib/components/ColorMode/types.ts +0 -12
  26. package/src/lib/components/ColorPicker/ColorPicker.svelte +0 -838
  27. package/src/lib/components/ColorPicker/ColorPickerSwatch.svelte +0 -32
  28. package/src/lib/components/ColorPicker/index.ts +0 -3
  29. package/src/lib/components/ColorPicker/types.ts +0 -51
  30. package/src/lib/components/ContextMenu/ContextMenu.svelte +0 -86
  31. package/src/lib/components/ContextMenu/index.ts +0 -2
  32. package/src/lib/components/ContextMenu/types.ts +0 -15
  33. package/src/lib/components/DrawingSliders/DrawingSliders.svelte +0 -379
  34. package/src/lib/components/DrawingSliders/index.ts +0 -1
  35. package/src/lib/components/Editor/Editor.svelte +0 -825
  36. package/src/lib/components/Editor/index.ts +0 -1
  37. package/src/lib/components/FogSliders/FogSliders.svelte +0 -33
  38. package/src/lib/components/FogSliders/index.ts +0 -1
  39. package/src/lib/components/Hr/Hr.svelte +0 -15
  40. package/src/lib/components/Hr/index.ts +0 -1
  41. package/src/lib/components/Icon/Icon.svelte +0 -6
  42. package/src/lib/components/Icon/index.ts +0 -2
  43. package/src/lib/components/Icon/types.ts +0 -20
  44. package/src/lib/components/Input/DualInputSlider.svelte +0 -126
  45. package/src/lib/components/Input/FileInput.svelte +0 -176
  46. package/src/lib/components/Input/FormControl.svelte +0 -150
  47. package/src/lib/components/Input/FormError.svelte +0 -37
  48. package/src/lib/components/Input/Input.svelte +0 -56
  49. package/src/lib/components/Input/InputCheckbox.svelte +0 -99
  50. package/src/lib/components/Input/InputSlider.svelte +0 -86
  51. package/src/lib/components/Input/Label.svelte +0 -19
  52. package/src/lib/components/Input/index.ts +0 -9
  53. package/src/lib/components/Input/types.ts +0 -39
  54. package/src/lib/components/Link/Link.svelte +0 -41
  55. package/src/lib/components/Link/LinkBox.svelte +0 -20
  56. package/src/lib/components/Link/LinkOverlay.svelte +0 -23
  57. package/src/lib/components/Link/index.ts +0 -4
  58. package/src/lib/components/Link/types.ts +0 -17
  59. package/src/lib/components/Loading/Loader.svelte +0 -60
  60. package/src/lib/components/Loading/Skeleton.svelte +0 -9
  61. package/src/lib/components/Loading/index.ts +0 -2
  62. package/src/lib/components/Logo/Logo.svelte +0 -16
  63. package/src/lib/components/Logo/index.ts +0 -1
  64. package/src/lib/components/MarkerTooltip/MarkerTooltip.svelte +0 -435
  65. package/src/lib/components/MarkerTooltip/index.ts +0 -1
  66. package/src/lib/components/Menu/SelectorMenu.svelte +0 -280
  67. package/src/lib/components/Menu/index.ts +0 -2
  68. package/src/lib/components/Menu/types.ts +0 -17
  69. package/src/lib/components/MyCounterButton.svelte +0 -11
  70. package/src/lib/components/Panel/index.ts +0 -2
  71. package/src/lib/components/Panel/panel.svelte +0 -18
  72. package/src/lib/components/Panel/types.ts +0 -8
  73. package/src/lib/components/PersistButton/PersistButton.svelte +0 -100
  74. package/src/lib/components/PersistButton/index.ts +0 -1
  75. package/src/lib/components/Popover/Popover.svelte +0 -81
  76. package/src/lib/components/Popover/index.ts +0 -2
  77. package/src/lib/components/Popover/types.ts +0 -19
  78. package/src/lib/components/PropsTable/PropsTable.svelte +0 -107
  79. package/src/lib/components/RadialMenu/EffectPreview.svelte +0 -36
  80. package/src/lib/components/RadialMenu/EffectPreviewScene.svelte +0 -194
  81. package/src/lib/components/RadialMenu/RadialMenu.svelte +0 -503
  82. package/src/lib/components/RadialMenu/RadialMenuItem.svelte +0 -176
  83. package/src/lib/components/RadialMenu/index.ts +0 -2
  84. package/src/lib/components/RadialMenu/types.ts +0 -35
  85. package/src/lib/components/Select/Select.svelte +0 -342
  86. package/src/lib/components/Select/index.ts +0 -2
  87. package/src/lib/components/Select/types.ts +0 -22
  88. package/src/lib/components/Spacer/Spacer.svelte +0 -14
  89. package/src/lib/components/Spacer/index.ts +0 -2
  90. package/src/lib/components/Spacer/types.ts +0 -5
  91. package/src/lib/components/Stage/components/AnnotationLayer/AnnotationLayer.svelte +0 -445
  92. package/src/lib/components/Stage/components/AnnotationLayer/AnnotationMaterial.svelte +0 -167
  93. package/src/lib/components/Stage/components/AnnotationLayer/types.ts +0 -196
  94. package/src/lib/components/Stage/components/CursorLayer/CursorLayer.svelte +0 -148
  95. package/src/lib/components/Stage/components/CursorLayer/cursor.svg +0 -26
  96. package/src/lib/components/Stage/components/CursorLayer/index.ts +0 -2
  97. package/src/lib/components/Stage/components/CursorLayer/types.ts +0 -23
  98. package/src/lib/components/Stage/components/DrawingLayer/DrawingMaterial.svelte +0 -364
  99. package/src/lib/components/Stage/components/DrawingLayer/types.ts +0 -65
  100. package/src/lib/components/Stage/components/EdgeOverlayLayer/EdgeOverlayLayer.svelte +0 -72
  101. package/src/lib/components/Stage/components/EdgeOverlayLayer/types.ts +0 -34
  102. package/src/lib/components/Stage/components/FogLayer/FogLayer.svelte +0 -75
  103. package/src/lib/components/Stage/components/FogLayer/types.ts +0 -51
  104. package/src/lib/components/Stage/components/FogOfWarLayer/FogOfWarLayer.svelte +0 -249
  105. package/src/lib/components/Stage/components/FogOfWarLayer/FogOfWarMaterial.svelte +0 -200
  106. package/src/lib/components/Stage/components/FogOfWarLayer/types.ts +0 -116
  107. package/src/lib/components/Stage/components/GridLayer/GridLayer.svelte +0 -20
  108. package/src/lib/components/Stage/components/GridLayer/GridMaterial.svelte +0 -69
  109. package/src/lib/components/Stage/components/GridLayer/types.ts +0 -79
  110. package/src/lib/components/Stage/components/LayerInput/LayerInput.svelte +0 -300
  111. package/src/lib/components/Stage/components/MapLayer/MapLayer.svelte +0 -196
  112. package/src/lib/components/Stage/components/MapLayer/dataSources/GifDataSource.ts +0 -265
  113. package/src/lib/components/Stage/components/MapLayer/dataSources/IMapDataSource.ts +0 -55
  114. package/src/lib/components/Stage/components/MapLayer/dataSources/ImageDataSource.ts +0 -87
  115. package/src/lib/components/Stage/components/MapLayer/dataSources/VideoDataSource.ts +0 -150
  116. package/src/lib/components/Stage/components/MapLayer/dataSources/dataSourceFactory.ts +0 -48
  117. package/src/lib/components/Stage/components/MapLayer/dataSources/index.ts +0 -16
  118. package/src/lib/components/Stage/components/MapLayer/types.ts +0 -58
  119. package/src/lib/components/Stage/components/MarkerLayer/MarkerLayer.svelte +0 -398
  120. package/src/lib/components/Stage/components/MarkerLayer/MarkerToken.svelte +0 -262
  121. package/src/lib/components/Stage/components/MarkerLayer/types.ts +0 -126
  122. package/src/lib/components/Stage/components/MeasurementLayer/MeasurementLayer.svelte +0 -364
  123. package/src/lib/components/Stage/components/MeasurementLayer/MeasurementManager.svelte +0 -473
  124. package/src/lib/components/Stage/components/MeasurementLayer/measurements/BaseMeasurement.ts +0 -427
  125. package/src/lib/components/Stage/components/MeasurementLayer/measurements/BeamMeasurement.ts +0 -105
  126. package/src/lib/components/Stage/components/MeasurementLayer/measurements/CircleMeasurement.ts +0 -98
  127. package/src/lib/components/Stage/components/MeasurementLayer/measurements/ConeMeasurement.ts +0 -163
  128. package/src/lib/components/Stage/components/MeasurementLayer/measurements/LineMeasurement.ts +0 -102
  129. package/src/lib/components/Stage/components/MeasurementLayer/measurements/RectangleMeasurement.ts +0 -120
  130. package/src/lib/components/Stage/components/MeasurementLayer/measurements/index.ts +0 -7
  131. package/src/lib/components/Stage/components/MeasurementLayer/types.ts +0 -94
  132. package/src/lib/components/Stage/components/MeasurementLayer/utils/canvasDrawing.ts +0 -357
  133. package/src/lib/components/Stage/components/MeasurementLayer/utils/distanceCalculations.ts +0 -170
  134. package/src/lib/components/Stage/components/ParticleSystem/ParticleSystem.svelte +0 -220
  135. package/src/lib/components/Stage/components/ParticleSystem/particles/atlases/ash.png +0 -0
  136. package/src/lib/components/Stage/components/ParticleSystem/particles/atlases/leaves.png +0 -0
  137. package/src/lib/components/Stage/components/ParticleSystem/particles/atlases/rain.png +0 -0
  138. package/src/lib/components/Stage/components/ParticleSystem/particles/atlases/snow.png +0 -0
  139. package/src/lib/components/Stage/components/ParticleSystem/rng.js +0 -20
  140. package/src/lib/components/Stage/components/ParticleSystem/types.ts +0 -95
  141. package/src/lib/components/Stage/components/PerformanceDebugger/PerformanceDebugger.svelte +0 -144
  142. package/src/lib/components/Stage/components/PerformanceDebugger/index.ts +0 -1
  143. package/src/lib/components/Stage/components/PerformanceOverlay/PerformanceOverlay.svelte +0 -208
  144. package/src/lib/components/Stage/components/PerformanceOverlay/index.ts +0 -1
  145. package/src/lib/components/Stage/components/PointerInputManager/PointerInputManager.svelte +0 -201
  146. package/src/lib/components/Stage/components/Scene/Scene.svelte +0 -651
  147. package/src/lib/components/Stage/components/Scene/luts.ts +0 -24
  148. package/src/lib/components/Stage/components/Scene/types.ts +0 -225
  149. package/src/lib/components/Stage/components/Stage/Stage.svelte +0 -332
  150. package/src/lib/components/Stage/components/Stage/types.ts +0 -136
  151. package/src/lib/components/Stage/components/WeatherLayer/WeatherLayer.svelte +0 -135
  152. package/src/lib/components/Stage/components/WeatherLayer/presets/AshPreset.ts +0 -71
  153. package/src/lib/components/Stage/components/WeatherLayer/presets/LeavesPreset.ts +0 -70
  154. package/src/lib/components/Stage/components/WeatherLayer/presets/RainPreset.ts +0 -68
  155. package/src/lib/components/Stage/components/WeatherLayer/presets/SnowPreset.ts +0 -70
  156. package/src/lib/components/Stage/components/WeatherLayer/presets/index.ts +0 -6
  157. package/src/lib/components/Stage/components/WeatherLayer/types.ts +0 -35
  158. package/src/lib/components/Stage/helpers/clippingPlaneStore.svelte.ts +0 -28
  159. package/src/lib/components/Stage/helpers/debugState.svelte.ts +0 -18
  160. package/src/lib/components/Stage/helpers/grid.ts +0 -548
  161. package/src/lib/components/Stage/helpers/lazyBrush.ts +0 -171
  162. package/src/lib/components/Stage/helpers/performanceMetrics.svelte.ts +0 -220
  163. package/src/lib/components/Stage/helpers/utils.ts +0 -21
  164. package/src/lib/components/Stage/index.ts +0 -49
  165. package/src/lib/components/Stage/shaders/AnnotationEffects.frag +0 -1070
  166. package/src/lib/components/Stage/shaders/Annotations.frag +0 -29
  167. package/src/lib/components/Stage/shaders/Drawing.frag +0 -83
  168. package/src/lib/components/Stage/shaders/Drawing.vert +0 -5
  169. package/src/lib/components/Stage/shaders/Fog.frag +0 -147
  170. package/src/lib/components/Stage/shaders/FractalNoise.frag +0 -96
  171. package/src/lib/components/Stage/shaders/GridShader.frag +0 -174
  172. package/src/lib/components/Stage/shaders/Overlay.frag +0 -23
  173. package/src/lib/components/Stage/shaders/Overlay.vert +0 -0
  174. package/src/lib/components/Stage/shaders/Particles.frag +0 -27
  175. package/src/lib/components/Stage/shaders/Particles.vert +0 -51
  176. package/src/lib/components/Stage/shaders/ToolOutline.frag +0 -59
  177. package/src/lib/components/Stage/shaders/default.vert +0 -8
  178. package/src/lib/components/Stage/types.ts +0 -4
  179. package/src/lib/components/Table/Table.svelte +0 -16
  180. package/src/lib/components/Table/Td.svelte +0 -17
  181. package/src/lib/components/Table/Th.svelte +0 -18
  182. package/src/lib/components/Table/index.ts +0 -4
  183. package/src/lib/components/Table/types.ts +0 -14
  184. package/src/lib/components/Text/Text.svelte +0 -23
  185. package/src/lib/components/Text/index.ts +0 -2
  186. package/src/lib/components/Text/types.ts +0 -12
  187. package/src/lib/components/Title/Title.svelte +0 -54
  188. package/src/lib/components/Title/index.ts +0 -2
  189. package/src/lib/components/Title/types.ts +0 -9
  190. package/src/lib/components/Toast/Toast.svelte +0 -155
  191. package/src/lib/components/Toast/index.ts +0 -5
  192. package/src/lib/components/Toast/toastCookie.ts +0 -24
  193. package/src/lib/components/Toast/types.ts +0 -6
  194. package/src/lib/components/ToolTip/ToolTip.svelte +0 -70
  195. package/src/lib/components/ToolTip/index.ts +0 -2
  196. package/src/lib/components/ToolTip/types.ts +0 -14
  197. package/src/lib/components/index.ts +0 -32
  198. package/src/lib/components/types.ts +0 -0
  199. package/src/lib/index.ts +0 -2
  200. package/src/lib/styles/globals.css +0 -108
  201. package/src/lib/styles/normalize.css +0 -9
  202. package/src/lib/styles/reset.css +0 -133
  203. package/src/lib/styles/utilities.css +0 -179
  204. package/src/lib/styles/vars.css +0 -1103
  205. package/src/lib/types/awareness.ts +0 -17
  206. package/src/lib/utils/rle.ts +0 -217
@@ -1,135 +0,0 @@
1
- <script lang="ts">
2
- import * as THREE from 'three';
3
- import { onMount, onDestroy, untrack } from 'svelte';
4
- import { T, useTask, useThrelte, type Props as ThrelteProps } from '@threlte/core';
5
- import { WeatherType, type WeatherLayerPreset } from './types';
6
- import ParticleSystem from '../ParticleSystem/ParticleSystem.svelte';
7
- import type { StageProps } from '../Stage/types';
8
-
9
- import SnowPreset from './presets/SnowPreset';
10
- import RainPreset from './presets/RainPreset';
11
- import LeavesPreset from './presets/LeavesPreset';
12
- import AshPreset from './presets/AshPreset';
13
-
14
- interface Props extends ThrelteProps<typeof THREE.Mesh> {
15
- props: StageProps;
16
- size: { x: number; y: number };
17
- }
18
-
19
- const { props, size, ...meshProps }: Props = $props();
20
-
21
- const { renderer, renderStage } = useThrelte();
22
- let weatherType: WeatherType | null = $state(null);
23
- let weatherPreset: WeatherLayerPreset = $state(RainPreset);
24
- let mesh: THREE.Mesh = $state(new THREE.Mesh());
25
- let particleScene = $state(new THREE.Scene());
26
- let particleCamera = $state(new THREE.PerspectiveCamera(90, 1, 0.01, 10));
27
- particleCamera.position.set(0, 0, -1);
28
- particleCamera.rotation.x = Math.PI;
29
-
30
- // Render target for particle scene
31
- const renderTarget = new THREE.WebGLRenderTarget(1, 1, {
32
- format: THREE.RGBAFormat,
33
- minFilter: THREE.LinearFilter,
34
- magFilter: THREE.LinearFilter
35
- });
36
-
37
- // Material for displaying particles
38
- const quadMaterial = new THREE.MeshBasicMaterial({
39
- map: renderTarget.texture,
40
- transparent: true,
41
- blending: THREE.NormalBlending
42
- });
43
-
44
- onMount(() => {
45
- if (particleCamera && particleScene) {
46
- renderTarget.setSize(size.x, size.y);
47
- }
48
- });
49
-
50
- onDestroy(() => {
51
- renderTarget.dispose();
52
- quadMaterial.dispose();
53
- });
54
-
55
- // If weather type changes, update the preset
56
- $effect(() => {
57
- if (props.weather.type === weatherType) {
58
- return;
59
- }
60
-
61
- untrack(() => {
62
- weatherType = props.weather.type;
63
- switch (weatherType) {
64
- case WeatherType.Snow:
65
- weatherPreset = { ...SnowPreset };
66
- break;
67
- case WeatherType.Rain:
68
- weatherPreset = { ...RainPreset };
69
- break;
70
- case WeatherType.Leaves:
71
- weatherPreset = { ...LeavesPreset };
72
- break;
73
- case WeatherType.Custom:
74
- weatherPreset = { ...(props.weather.custom || RainPreset) };
75
- break;
76
- case WeatherType.Ash:
77
- weatherPreset = { ...AshPreset };
78
- break;
79
- default:
80
- // Fallback to rain preset
81
- weatherPreset = { ...RainPreset };
82
- }
83
- });
84
- });
85
-
86
- // Overrides for fov, intensity, and opacity set in the UI
87
- $effect(() => {
88
- if (props.weather.fov) {
89
- weatherPreset.fov = props.weather.fov;
90
- }
91
-
92
- if (props.weather.intensity) {
93
- weatherPreset.intensity = props.weather.intensity;
94
- }
95
-
96
- if (props.weather.opacity) {
97
- weatherPreset.opacity = props.weather.opacity;
98
- }
99
- });
100
-
101
- // Update the camera and render target when size changes
102
- $effect(() => {
103
- particleCamera.aspect = size.x / size.y;
104
- particleCamera.fov = weatherPreset.fov;
105
- particleCamera.updateProjectionMatrix();
106
- renderTarget.setSize(size.x, size.y);
107
- });
108
-
109
- // Render particle scene directly to render target (bypasses unnecessary EffectComposer overhead)
110
- useTask(
111
- () => {
112
- if (!particleScene || !particleCamera || !size) return;
113
-
114
- particleScene.visible = true;
115
- renderer.setRenderTarget(renderTarget);
116
- renderer.clear();
117
- renderer.render(particleScene, particleCamera);
118
- renderer.setRenderTarget(null);
119
- particleScene.visible = false;
120
- quadMaterial.needsUpdate = true;
121
- },
122
- { stage: renderStage }
123
- );
124
- </script>
125
-
126
- <!-- Remove the stencil mesh and keep only the particle scenes -->
127
- <T.Scene is={particleScene} visible={false}>
128
- <T.PerspectiveCamera is={particleCamera} manual />
129
- <ParticleSystem props={weatherPreset.particles} opacity={weatherPreset.opacity} intensity={weatherPreset.intensity} />
130
- </T.Scene>
131
-
132
- <T.Mesh bind:ref={mesh} {...meshProps} visible={props.weather.type !== WeatherType.None}>
133
- <T.MeshBasicMaterial is={quadMaterial} />
134
- <T.PlaneGeometry args={[size.x, size.y]} />
135
- </T.Mesh>
@@ -1,71 +0,0 @@
1
- import { KernelSize } from 'postprocessing';
2
- import type { WeatherLayerPreset } from '../types';
3
-
4
- export default {
5
- fov: 20,
6
- intensity: 0.5,
7
- opacity: 0.8,
8
- depthOfField: {
9
- enabled: true,
10
- focus: 0.75,
11
- focalLength: 6.6,
12
- bokehScale: 250.0,
13
- kernelSize: KernelSize.LARGE
14
- },
15
- particles: {
16
- maxParticleCount: 500,
17
- opacity: 0.5,
18
- type: 4,
19
- color: '#404040',
20
- fadeInTime: 5,
21
- fadeOutTime: 2,
22
- lifetime: 10,
23
- spawnArea: {
24
- minRadius: 0.01,
25
- maxRadius: 0.08
26
- },
27
- initialVelocity: {
28
- x: 0,
29
- y: 0,
30
- z: 0
31
- },
32
- force: {
33
- linear: {
34
- x: 0,
35
- y: 0,
36
- z: 0.01
37
- },
38
- exponential: {
39
- x: 0,
40
- y: 0,
41
- z: 0
42
- },
43
- sinusoidal: {
44
- amplitude: {
45
- x: 0.015,
46
- y: 0.014,
47
- z: 0
48
- },
49
- frequency: {
50
- x: 0.002,
51
- y: 0.0025,
52
- z: 0
53
- }
54
- }
55
- },
56
- rotation: {
57
- alignRadially: false,
58
- offset: 0,
59
- velocity: 1,
60
- randomize: true
61
- },
62
- scale: {
63
- x: 1,
64
- y: 1
65
- },
66
- size: {
67
- min: 0.001,
68
- max: 0.0013
69
- }
70
- }
71
- } as WeatherLayerPreset;
@@ -1,70 +0,0 @@
1
- import { KernelSize } from 'postprocessing';
2
- import type { WeatherLayerPreset } from '../types';
3
-
4
- export default {
5
- fov: 30,
6
- intensity: 0.5,
7
- opacity: 1,
8
- depthOfField: {
9
- enabled: true,
10
- focus: 0.7,
11
- focalLength: 4,
12
- bokehScale: 50,
13
- kernelSize: KernelSize.VERY_LARGE
14
- },
15
- particles: {
16
- maxParticleCount: 50,
17
- type: 3,
18
- color: '#ffffff',
19
- fadeInTime: 7,
20
- fadeOutTime: 1,
21
- lifetime: 15,
22
- spawnArea: {
23
- minRadius: 0.20142663043478262,
24
- maxRadius: 0.27751358695652173
25
- },
26
- initialVelocity: {
27
- x: 0,
28
- y: 0,
29
- z: 0
30
- },
31
- force: {
32
- linear: {
33
- x: 0,
34
- y: 0,
35
- z: 0.02
36
- },
37
- exponential: {
38
- x: 0,
39
- y: 0,
40
- z: 0
41
- },
42
- sinusoidal: {
43
- amplitude: {
44
- x: 0.01,
45
- y: 0.015,
46
- z: 0
47
- },
48
- frequency: {
49
- x: 0.3,
50
- y: 0.5,
51
- z: 0
52
- }
53
- }
54
- },
55
- rotation: {
56
- alignRadially: false,
57
- offset: 0,
58
- velocity: 0.9,
59
- randomize: true
60
- },
61
- scale: {
62
- x: 1,
63
- y: 1
64
- },
65
- size: {
66
- min: 0.025611413043478262,
67
- max: 0.0484375
68
- }
69
- }
70
- } as WeatherLayerPreset;
@@ -1,68 +0,0 @@
1
- import type { WeatherLayerPreset } from '../types';
2
- export default {
3
- fov: 70,
4
- intensity: 0.7,
5
- opacity: 1.0,
6
- depthOfField: {
7
- enabled: false,
8
- focus: 0,
9
- focalLength: 0,
10
- bokehScale: 0,
11
- kernelSize: 0
12
- },
13
- particles: {
14
- maxParticleCount: 5000,
15
- type: 2,
16
- color: '#e0e0e0',
17
- fadeInTime: 1,
18
- fadeOutTime: 3,
19
- lifetime: 3,
20
- spawnArea: {
21
- minRadius: 0.008,
22
- maxRadius: 0.02
23
- },
24
- initialVelocity: {
25
- x: 0,
26
- y: 0,
27
- z: 0
28
- },
29
- force: {
30
- linear: {
31
- x: 0,
32
- y: 0,
33
- z: 0.02
34
- },
35
- exponential: {
36
- x: 0,
37
- y: 0,
38
- z: 0
39
- },
40
- sinusoidal: {
41
- amplitude: {
42
- x: 0,
43
- y: 0,
44
- z: 0
45
- },
46
- frequency: {
47
- x: 5,
48
- y: 5,
49
- z: 5
50
- }
51
- }
52
- },
53
- rotation: {
54
- alignRadially: true,
55
- offset: 270,
56
- velocity: 0,
57
- randomize: false
58
- },
59
- scale: {
60
- x: 0.2,
61
- y: 1
62
- },
63
- size: {
64
- min: 0.001,
65
- max: 0.001
66
- }
67
- }
68
- } as WeatherLayerPreset;
@@ -1,70 +0,0 @@
1
- import { KernelSize } from 'postprocessing';
2
- import type { WeatherLayerPreset } from '../types';
3
-
4
- export default {
5
- fov: 90,
6
- intensity: 0.2,
7
- opacity: 0.8,
8
- depthOfField: {
9
- enabled: true,
10
- focus: 0.7,
11
- focalLength: 5.0,
12
- bokehScale: 50.0,
13
- kernelSize: KernelSize.LARGE
14
- },
15
- particles: {
16
- maxParticleCount: 1000,
17
- type: 1,
18
- color: '#ffffff',
19
- fadeInTime: 8,
20
- fadeOutTime: 2,
21
- lifetime: 10,
22
- spawnArea: {
23
- minRadius: 0.02,
24
- maxRadius: 0.5
25
- },
26
- initialVelocity: {
27
- x: 0,
28
- y: 0,
29
- z: 0
30
- },
31
- force: {
32
- linear: {
33
- x: 0,
34
- y: 0,
35
- z: 0.005
36
- },
37
- exponential: {
38
- x: 0,
39
- y: 0,
40
- z: 0
41
- },
42
- sinusoidal: {
43
- amplitude: {
44
- x: 0.002,
45
- y: 0.003,
46
- z: 0
47
- },
48
- frequency: {
49
- x: 2,
50
- y: 1,
51
- z: 0
52
- }
53
- }
54
- },
55
- rotation: {
56
- alignRadially: false,
57
- offset: 0,
58
- velocity: 0,
59
- randomize: true
60
- },
61
- scale: {
62
- x: 1,
63
- y: 1
64
- },
65
- size: {
66
- min: 0.001,
67
- max: 0.005
68
- }
69
- }
70
- } as WeatherLayerPreset;
@@ -1,6 +0,0 @@
1
- import AshPreset from './AshPreset';
2
- import LeavesPreset from './LeavesPreset';
3
- import RainPreset from './RainPreset';
4
- import SnowPreset from './SnowPreset';
5
-
6
- export { AshPreset, LeavesPreset, RainPreset, SnowPreset };
@@ -1,35 +0,0 @@
1
- import type { KernelSize } from 'postprocessing';
2
- import type { ParticleSystemProps } from '../ParticleSystem/types';
3
-
4
- export enum WeatherType {
5
- None = 0,
6
- Rain = 1,
7
- Snow = 2,
8
- Leaves = 3,
9
- Ash = 4,
10
- Custom = 99
11
- }
12
-
13
- export interface DepthOfFieldConfig {
14
- enabled: boolean;
15
- focus: number;
16
- focalLength: number;
17
- bokehScale: number;
18
- kernelSize: KernelSize;
19
- }
20
-
21
- export interface WeatherLayerPreset {
22
- fov: number;
23
- intensity: number;
24
- opacity: number;
25
- depthOfField: DepthOfFieldConfig;
26
- particles: ParticleSystemProps;
27
- }
28
-
29
- export interface WeatherLayerProps {
30
- type: WeatherType;
31
- fov?: number;
32
- intensity?: number;
33
- opacity?: number;
34
- custom?: WeatherLayerPreset;
35
- }
@@ -1,28 +0,0 @@
1
- import * as THREE from 'three';
2
- import type { SceneLayerProps } from '../components/Scene/types';
3
- import type { DisplayProps } from '../components/Stage/types';
4
-
5
- export const clippingPlaneStore: { value: THREE.Plane[] } = $state({
6
- value: [
7
- new THREE.Plane(new THREE.Vector3(-1, 0, 0)),
8
- new THREE.Plane(new THREE.Vector3(1, 0, 0)),
9
- new THREE.Plane(new THREE.Vector3(0, 1, 0)),
10
- new THREE.Plane(new THREE.Vector3(0, -1, 0))
11
- ]
12
- });
13
-
14
- export function updateClippingPlanes(sceneProps: SceneLayerProps, displayProps: DisplayProps) {
15
- // Whenever the scene is translated/zoomed, update the clipping planes
16
- const { x, y } = sceneProps.offset;
17
- const worldExtents = {
18
- x: sceneProps.zoom * (displayProps.resolution.x / 2),
19
- y: sceneProps.zoom * (displayProps.resolution.y / 2)
20
- };
21
-
22
- clippingPlaneStore.value = [
23
- new THREE.Plane(new THREE.Vector3(-1, 0, 0), worldExtents.x + x),
24
- new THREE.Plane(new THREE.Vector3(1, 0, 0), worldExtents.x - x),
25
- new THREE.Plane(new THREE.Vector3(0, 1, 0), worldExtents.y - y),
26
- new THREE.Plane(new THREE.Vector3(0, -1, 0), worldExtents.y + y)
27
- ];
28
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Global debug state that persists independently of stageProps.
3
- * This prevents debug settings from being reset when stageProps are rebuilt.
4
- */
5
- export const debugState: {
6
- enableMetrics: boolean;
7
- logMetricsToConsole: boolean;
8
- } = $state({
9
- enableMetrics: false,
10
- logMetricsToConsole: false
11
- });
12
-
13
- export const setDebugEnabled = (enabled: boolean) => {
14
- debugState.enableMetrics = enabled;
15
- debugState.logMetricsToConsole = enabled;
16
- };
17
-
18
- export const isDebugEnabled = () => debugState.enableMetrics;