@3driseai/3drise-viewer 0.1.16 → 0.1.18

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 (145) hide show
  1. package/README.md +4 -3
  2. package/dist/components/ChladniGrid.d.ts +15 -0
  3. package/dist/components/ChladniGrid.d.ts.map +1 -0
  4. package/dist/components/ChladniGrid.js +62 -0
  5. package/dist/components/CustomPrimitive.d.ts +2 -0
  6. package/dist/components/CustomPrimitive.d.ts.map +1 -1
  7. package/dist/components/CustomPrimitive.js +2 -2
  8. package/dist/components/EffectsGenerator.d.ts.map +1 -1
  9. package/dist/components/EffectsGenerator.js +26 -2
  10. package/dist/components/FlowNetGrid.d.ts +15 -0
  11. package/dist/components/FlowNetGrid.d.ts.map +1 -0
  12. package/dist/components/FlowNetGrid.js +61 -0
  13. package/dist/components/Galaxy.d.ts.map +1 -1
  14. package/dist/components/Galaxy.js +2 -0
  15. package/dist/components/GirihGrid.d.ts +15 -0
  16. package/dist/components/GirihGrid.d.ts.map +1 -0
  17. package/dist/components/GirihGrid.js +62 -0
  18. package/dist/components/GravWaveGrid.d.ts +15 -0
  19. package/dist/components/GravWaveGrid.d.ts.map +1 -0
  20. package/dist/components/GravWaveGrid.js +62 -0
  21. package/dist/components/GridsGenerator.d.ts +2 -2
  22. package/dist/components/GridsGenerator.d.ts.map +1 -1
  23. package/dist/components/GridsGenerator.js +21 -0
  24. package/dist/components/HyperbolicGrid.d.ts +15 -0
  25. package/dist/components/HyperbolicGrid.d.ts.map +1 -0
  26. package/dist/components/HyperbolicGrid.js +61 -0
  27. package/dist/components/LayoutInstances.d.ts +13 -0
  28. package/dist/components/LayoutInstances.d.ts.map +1 -0
  29. package/dist/components/LayoutInstances.js +39 -0
  30. package/dist/components/ModelPrimitive.d.ts +2 -0
  31. package/dist/components/ModelPrimitive.d.ts.map +1 -1
  32. package/dist/components/ModelPrimitive.js +3 -3
  33. package/dist/components/ObjectNode.d.ts.map +1 -1
  34. package/dist/components/ObjectNode.js +44 -9
  35. package/dist/components/ParticlesGenerator.d.ts +10 -0
  36. package/dist/components/ParticlesGenerator.d.ts.map +1 -0
  37. package/dist/components/ParticlesGenerator.js +23 -0
  38. package/dist/components/ReactionDiffusionGrid.d.ts +15 -0
  39. package/dist/components/ReactionDiffusionGrid.d.ts.map +1 -0
  40. package/dist/components/ReactionDiffusionGrid.js +376 -0
  41. package/dist/components/WallpaperGrid.d.ts +15 -0
  42. package/dist/components/WallpaperGrid.d.ts.map +1 -0
  43. package/dist/components/WallpaperGrid.js +555 -0
  44. package/dist/components/cursor/CursorController.d.ts.map +1 -1
  45. package/dist/components/effects/BlackHoleEffect.d.ts +3 -3
  46. package/dist/components/effects/BlackHoleEffect.d.ts.map +1 -1
  47. package/dist/components/effects/BlackHoleEffect.js +293 -163
  48. package/dist/components/effects/DandelionSeedsEffect.d.ts +13 -0
  49. package/dist/components/effects/DandelionSeedsEffect.d.ts.map +1 -0
  50. package/dist/components/effects/DandelionSeedsEffect.js +510 -0
  51. package/dist/components/effects/FallingLeavesEffect.d.ts +13 -0
  52. package/dist/components/effects/FallingLeavesEffect.d.ts.map +1 -0
  53. package/dist/components/effects/FallingLeavesEffect.js +446 -0
  54. package/dist/components/effects/FieldLinesEffect.d.ts +11 -0
  55. package/dist/components/effects/FieldLinesEffect.d.ts.map +1 -0
  56. package/dist/components/effects/FieldLinesEffect.js +260 -0
  57. package/dist/components/effects/FireflySwarmEffect.d.ts +13 -0
  58. package/dist/components/effects/FireflySwarmEffect.d.ts.map +1 -0
  59. package/dist/components/effects/FireflySwarmEffect.js +408 -0
  60. package/dist/components/effects/GalaxyEffect.d.ts +13 -0
  61. package/dist/components/effects/GalaxyEffect.d.ts.map +1 -0
  62. package/dist/components/effects/GalaxyEffect.js +374 -0
  63. package/dist/components/effects/HarmonicShellEffect.d.ts +11 -0
  64. package/dist/components/effects/HarmonicShellEffect.d.ts.map +1 -0
  65. package/dist/components/effects/HarmonicShellEffect.js +209 -0
  66. package/dist/components/effects/IceCrystalsEffect.d.ts +3 -3
  67. package/dist/components/effects/IceCrystalsEffect.d.ts.map +1 -1
  68. package/dist/components/effects/IceCrystalsEffect.js +286 -166
  69. package/dist/components/effects/IceHaloEffect.d.ts +13 -0
  70. package/dist/components/effects/IceHaloEffect.d.ts.map +1 -0
  71. package/dist/components/effects/IceHaloEffect.js +306 -0
  72. package/dist/components/effects/LichtenbergEffect.d.ts +13 -0
  73. package/dist/components/effects/LichtenbergEffect.d.ts.map +1 -0
  74. package/dist/components/effects/LichtenbergEffect.js +517 -0
  75. package/dist/components/effects/MoleculesEffect.d.ts +3 -3
  76. package/dist/components/effects/MoleculesEffect.d.ts.map +1 -1
  77. package/dist/components/effects/MoleculesEffect.js +322 -164
  78. package/dist/components/effects/MurmurationEffect.d.ts +13 -0
  79. package/dist/components/effects/MurmurationEffect.d.ts.map +1 -0
  80. package/dist/components/effects/MurmurationEffect.js +539 -0
  81. package/dist/components/effects/PlanetaryRingsEffect.d.ts +13 -0
  82. package/dist/components/effects/PlanetaryRingsEffect.d.ts.map +1 -0
  83. package/dist/components/effects/PlanetaryRingsEffect.js +458 -0
  84. package/dist/components/effects/PortalEffect.d.ts +3 -3
  85. package/dist/components/effects/PortalEffect.d.ts.map +1 -1
  86. package/dist/components/effects/PortalEffect.js +240 -163
  87. package/dist/components/effects/ShockwaveEffect.d.ts +5 -3
  88. package/dist/components/effects/ShockwaveEffect.d.ts.map +1 -1
  89. package/dist/components/effects/ShockwaveEffect.js +538 -142
  90. package/dist/components/effects/SmokePlumeEffect.d.ts +3 -3
  91. package/dist/components/effects/SmokePlumeEffect.d.ts.map +1 -1
  92. package/dist/components/effects/SmokePlumeEffect.js +180 -116
  93. package/dist/components/effects/SmokeRingEffect.d.ts +3 -3
  94. package/dist/components/effects/SmokeRingEffect.d.ts.map +1 -1
  95. package/dist/components/effects/SmokeRingEffect.js +260 -135
  96. package/dist/components/effects/StrangeAttractorEffect.d.ts +11 -0
  97. package/dist/components/effects/StrangeAttractorEffect.d.ts.map +1 -0
  98. package/dist/components/effects/StrangeAttractorEffect.js +229 -0
  99. package/dist/components/effects/VolumetricFogEffect.d.ts +5 -3
  100. package/dist/components/effects/VolumetricFogEffect.d.ts.map +1 -1
  101. package/dist/components/effects/VolumetricFogEffect.js +211 -93
  102. package/dist/components/effects/WaterCausticsEffect.d.ts +13 -0
  103. package/dist/components/effects/WaterCausticsEffect.d.ts.map +1 -0
  104. package/dist/components/effects/WaterCausticsEffect.js +308 -0
  105. package/dist/components/effects/index.d.ts +9 -0
  106. package/dist/components/effects/index.d.ts.map +1 -1
  107. package/dist/components/effects/index.js +9 -0
  108. package/dist/components/index.d.ts +19 -0
  109. package/dist/components/index.d.ts.map +1 -1
  110. package/dist/components/index.js +10 -0
  111. package/dist/components/particles/BioluminescentWakeParticles.d.ts +12 -0
  112. package/dist/components/particles/BioluminescentWakeParticles.d.ts.map +1 -0
  113. package/dist/components/particles/BioluminescentWakeParticles.js +1123 -0
  114. package/dist/components/particles/BrownianDustParticles.d.ts +12 -0
  115. package/dist/components/particles/BrownianDustParticles.d.ts.map +1 -0
  116. package/dist/components/particles/BrownianDustParticles.js +757 -0
  117. package/dist/components/particles/ElectronOrbitalsParticles.d.ts +12 -0
  118. package/dist/components/particles/ElectronOrbitalsParticles.d.ts.map +1 -0
  119. package/dist/components/particles/ElectronOrbitalsParticles.js +944 -0
  120. package/dist/components/particles/GrinderSparksParticles.d.ts +12 -0
  121. package/dist/components/particles/GrinderSparksParticles.d.ts.map +1 -0
  122. package/dist/components/particles/GrinderSparksParticles.js +744 -0
  123. package/dist/components/particles/TidalStreamParticles.d.ts +12 -0
  124. package/dist/components/particles/TidalStreamParticles.d.ts.map +1 -0
  125. package/dist/components/particles/TidalStreamParticles.js +788 -0
  126. package/dist/components/particles/index.d.ts +11 -0
  127. package/dist/components/particles/index.d.ts.map +1 -0
  128. package/dist/components/particles/index.js +6 -0
  129. package/dist/constants.d.ts +1 -1
  130. package/dist/constants.d.ts.map +1 -1
  131. package/dist/constants.js +1 -1
  132. package/dist/hooks/useModelObject.d.ts +6 -1
  133. package/dist/hooks/useModelObject.d.ts.map +1 -1
  134. package/dist/hooks/useModelObject.js +19 -6
  135. package/dist/types/gridConfigs.d.ts +98 -0
  136. package/dist/types/gridConfigs.d.ts.map +1 -1
  137. package/dist/types/index.d.ts +1 -1
  138. package/dist/types/index.d.ts.map +1 -1
  139. package/dist/utils/particleTrails.d.ts +70 -0
  140. package/dist/utils/particleTrails.d.ts.map +1 -0
  141. package/dist/utils/particleTrails.js +369 -0
  142. package/dist/utils/pointerField.d.ts +28 -0
  143. package/dist/utils/pointerField.d.ts.map +1 -0
  144. package/dist/utils/pointerField.js +103 -0
  145. package/package.json +2 -2
@@ -0,0 +1,11 @@
1
+ export { default as TidalStreamParticles } from './TidalStreamParticles';
2
+ export type { TidalStreamParticlesProps } from './TidalStreamParticles';
3
+ export { default as BrownianDustParticles } from './BrownianDustParticles';
4
+ export type { BrownianDustParticlesProps } from './BrownianDustParticles';
5
+ export { default as BioluminescentWakeParticles } from './BioluminescentWakeParticles';
6
+ export type { BioluminescentWakeParticlesProps } from './BioluminescentWakeParticles';
7
+ export { default as ElectronOrbitalsParticles } from './ElectronOrbitalsParticles';
8
+ export type { ElectronOrbitalsParticlesProps } from './ElectronOrbitalsParticles';
9
+ export { default as GrinderSparksParticles } from './GrinderSparksParticles';
10
+ export type { GrinderSparksParticlesProps } from './GrinderSparksParticles';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/particles/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACvF,YAAY,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACnF,YAAY,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Generative particle objects (type 'particles'), dispatched by ParticlesGenerator.
2
+ export { default as TidalStreamParticles } from './TidalStreamParticles.js';
3
+ export { default as BrownianDustParticles } from './BrownianDustParticles.js';
4
+ export { default as BioluminescentWakeParticles } from './BioluminescentWakeParticles.js';
5
+ export { default as ElectronOrbitalsParticles } from './ElectronOrbitalsParticles.js';
6
+ export { default as GrinderSparksParticles } from './GrinderSparksParticles.js';
@@ -1,3 +1,3 @@
1
- export declare const dataCenterServer = "https://3drise.ai/api/data/";
1
+ export declare const dataCenterServer = "http://localhost:3001/api/data/";
2
2
  export declare const SELF_MANAGED_MATERIAL: Set<string>;
3
3
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,gCAAgC,CAAC;AAC9D,eAAO,MAAM,qBAAqB,aAchC,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,oCAA2B,CAAC;AACzD,eAAO,MAAM,qBAAqB,aAchC,CAAC"}
package/dist/constants.js CHANGED
@@ -3,7 +3,7 @@ const PRODUCTION_DATA_CENTER_SERVER = 'https://3drise.ai/api/data/';
3
3
  const isLocalHostRuntime = typeof window !== 'undefined' &&
4
4
  (window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1');
5
5
  // export const dataCenterServer = isLocalHostRuntime ? LOCAL_DATA_CENTER_SERVER : PRODUCTION_DATA_CENTER_SERVER;
6
- export const dataCenterServer = PRODUCTION_DATA_CENTER_SERVER;
6
+ export const dataCenterServer = LOCAL_DATA_CENTER_SERVER;
7
7
  export const SELF_MANAGED_MATERIAL = new Set([
8
8
  // The landscape owns its shader: splat arrays, height blending and the
9
9
  // heightmap displacement are the material. useMaterialApplication would
@@ -19,7 +19,12 @@ import type { CreatedObjectSettings } from '@3driseai/3drise-core';
19
19
  * Instances the hook creates are its own — registered on mount, unregistered and disposed
20
20
  * on unmount. An instance it merely found belongs to whoever preloaded it and is left
21
21
  * alone.
22
+ *
23
+ * `slot` > 0 is an extra copy placed by `meshSettings.layout`. It always gets a fresh clone
24
+ * of the cached master — never the registered instance, which can only be mounted once, and
25
+ * never a clone of slot 0, whose tracked material instances would be released twice — and it
26
+ * is not registered in ObjectManager: `ObjectManager.getObject(id)` stays slot 0.
22
27
  */
23
- export declare function useModelObject(createdObject: CreatedObjectSettings): Object3D | null;
28
+ export declare function useModelObject(createdObject: CreatedObjectSettings, slot?: number): Object3D | null;
24
29
  export default useModelObject;
25
30
  //# sourceMappingURL=useModelObject.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useModelObject.d.ts","sourceRoot":"","sources":["../../src/hooks/useModelObject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAAE,qBAAqB,GAAG,QAAQ,GAAG,IAAI,CAuDpF;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"useModelObject.d.ts","sourceRoot":"","sources":["../../src/hooks/useModelObject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAAE,qBAAqB,EAAE,IAAI,GAAE,MAAU,GAAG,QAAQ,GAAG,IAAI,CA+DtG;AAED,eAAe,cAAc,CAAC"}
@@ -19,11 +19,17 @@ import { ObjectManager, cloneModelAsset, readModelAsset, releaseModelInstance, r
19
19
  * Instances the hook creates are its own — registered on mount, unregistered and disposed
20
20
  * on unmount. An instance it merely found belongs to whoever preloaded it and is left
21
21
  * alone.
22
+ *
23
+ * `slot` > 0 is an extra copy placed by `meshSettings.layout`. It always gets a fresh clone
24
+ * of the cached master — never the registered instance, which can only be mounted once, and
25
+ * never a clone of slot 0, whose tracked material instances would be released twice — and it
26
+ * is not registered in ObjectManager: `ObjectManager.getObject(id)` stays slot 0.
22
27
  */
23
- export function useModelObject(createdObject) {
28
+ export function useModelObject(createdObject, slot = 0) {
24
29
  const id = createdObject.id;
25
30
  const url = createdObject.userData?.url;
26
- const registered = ObjectManager.getObject(id)?.object ?? null;
31
+ const isPrimary = slot === 0;
32
+ const registered = isPrimary ? ObjectManager.getObject(id)?.object ?? null : null;
27
33
  // Suspension point. Nothing above this line may be a hook: the throw discards the
28
34
  // render entirely, and only committed renders need a consistent hook order.
29
35
  const asset = !registered && url ? readModelAsset(url) : null;
@@ -41,7 +47,7 @@ export function useModelObject(createdObject) {
41
47
  instanceRef.current = { object: null, owned: false };
42
48
  }
43
49
  }
44
- const { object, owned } = instanceRef.current;
50
+ const { object } = instanceRef.current;
45
51
  // Layout, not passive: the registry entry has to be in place by the time the host
46
52
  // application reacts to onObjectReady and looks the object up by id.
47
53
  useLayoutEffect(() => {
@@ -53,11 +59,18 @@ export function useModelObject(createdObject) {
53
59
  // the same Object3D in the same commit. A dispose owned by this component would free
54
60
  // materials that the replacement is about to render.
55
61
  retainModelInstance(object);
56
- if (owned && !ObjectManager.getObject(id)) {
62
+ // Register whenever the primary slot finds no entry — not only for an instance this
63
+ // leaf cloned. Turning a layout on or off re-parents slot 0, so its leaf remounts:
64
+ // the new leaf renders while the old entry still exists and takes the object as
65
+ // found, then the old leaf's cleanup removes the entry. Without this, the object
66
+ // would be left on screen with no ObjectManager entry.
67
+ let registeredHere = false;
68
+ if (isPrimary && !ObjectManager.getObject(id)) {
57
69
  ObjectManager.addObject({ id, name: object.name, object });
70
+ registeredHere = true;
58
71
  }
59
72
  return () => {
60
- if (owned) {
73
+ if (registeredHere) {
61
74
  const current = ObjectManager.getObject(id);
62
75
  // After an id remap this lookup misses, which is the answer we want: the
63
76
  // entry now lives under the real id and belongs to the leaf that replaced us.
@@ -67,7 +80,7 @@ export function useModelObject(createdObject) {
67
80
  }
68
81
  releaseModelInstance(object);
69
82
  };
70
- }, [id, object, owned]);
83
+ }, [id, object, isPrimary]);
71
84
  return object;
72
85
  }
73
86
  export default useModelObject;
@@ -181,7 +181,91 @@ export interface QuasiGridConfig extends GridSurfaceConfig {
181
181
  /** shifts every family's offset together, sliding the pattern through itself */
182
182
  phase: number;
183
183
  }
184
+ /**
185
+ * Potential flow past a cylinder, drawn as a flow net. `cellSize` is the net
186
+ * spacing; the cylinder sits at the focus point, so `followMouse` drags it.
187
+ */
188
+ export interface FlowNetGridConfig extends GridSurfaceConfig {
189
+ /** cylinder radius, in cells */
190
+ obstacleRadius: number;
191
+ /** circulation around the cylinder, in whole units; shifts the flow to one side (lift) */
192
+ circulation: number;
193
+ /** direction of the free-stream flow, in radians */
194
+ flowAngle: number;
195
+ }
196
+ /**
197
+ * Chladni plates: sand on the nodal lines of a standing wave. `cellSize` is
198
+ * the size of one plate; `sectionSize` plates make one outlined group.
199
+ * `displace` vibrates the plate with the wave itself.
200
+ */
201
+ export interface ChladniGridConfig extends GridSurfaceConfig {
202
+ /** first mode number of the standing wave, 1..12 */
203
+ modeN: number;
204
+ /** second mode number of the standing wave, 1..12 */
205
+ modeM: number;
206
+ /** how fast the plate drifts to the neighbouring resonance; 0 holds the pattern */
207
+ morph: number;
208
+ /** 0..1 amount of sand on the plate */
209
+ grain: number;
210
+ }
211
+ /**
212
+ * A {p,q} tiling of the Poincare disk. `cellSize` is the disk radius in world
213
+ * units; `lineWidth` / `sectionWidth` are hyperbolic widths, so edges thin
214
+ * toward the rim; every `sectionSize`-th generation of polygons is accented.
215
+ */
216
+ export interface HyperbolicGridConfig extends GridSurfaceConfig {
217
+ /** sides of each polygon (p), 3..12 */
218
+ sides: number;
219
+ /** polygons around each vertex (q), 3..12; raised until (p-2)(q-2) > 4 */
220
+ valence: number;
221
+ /** 0..1, how far the tiling glides through itself */
222
+ drift: number;
223
+ }
184
224
  /** Every grid config this package can render, tagged by `type`. */
225
+ /** A spacetime lattice around a binary black-hole inspiral. The Newtonian wells pinch the lines, and quadrupole waves, evaluated at the retarded time, spiral outward and chirp toward the merger before the remnant rings down. */
226
+ export interface GravWaveGridConfig extends GridSurfaceConfig {
227
+ /** wave amplitude multiplier; 0 leaves only the static wells */
228
+ strain: number;
229
+ /** seconds per inspiral-merger-ringdown cycle (clamped to at least 4 in the shader) */
230
+ chirpTime: number;
231
+ /** wave speed c in cells per second; sets the wavelength and the retardation delay */
232
+ waveSpeed: number;
233
+ /** mass ratio q = m2/m1 in 0.1..1; sets the orbit offsets, well depths and wave strength */
234
+ massRatio: number;
235
+ }
236
+ /** An Islamic star pattern drawn by Hankin polygons-in-contact. One ray per dihedral sector, from the edge midpoint to the sector bisector, generates the whole interlaced star-and-rosette strapwork over an octagon-square, hexagonal or trihexagonal tiling. */
237
+ export interface GirihGridConfig extends GridSurfaceConfig {
238
+ /** base tiling: 0 = 4.8.8, 1 = regular hexagons, 2 = 3.6.3.6 (trihexagonal) */
239
+ tiling: number;
240
+ /** Hankin contact angle in degrees (20..85); 67.5 is the classic 8-point star */
241
+ contactAngle: number;
242
+ /** width of the strapwork band, in cell units */
243
+ strapWidth: number;
244
+ /** degrees the contact angle drifts around its value, morphing the pattern */
245
+ angleDrift: number;
246
+ }
247
+ /** Wallpaper-group kaleidoscope: a drifting lattice-periodic Fourier motif summed over the coset representatives of one of the 17 plane crystallographic groups. The runtime builds the group tables and crossfades from group to group. */
248
+ export interface WallpaperGridConfig extends GridSurfaceConfig {
249
+ /** Wallpaper group index (-1 cycles), read by the runtime */
250
+ group: number;
251
+ /** Seconds per group while cycling, read by the runtime */
252
+ cycleTime: number;
253
+ /** Motif complexity 0..1, read by the runtime */
254
+ motif: number;
255
+ /** Number of contour levels */
256
+ levels: number;
257
+ }
258
+ /** A Gray-Scott reaction-diffusion field simulated on the GPU and sampled by the plane: coral, labyrinths and dividing spots grow, merge and keep evolving, wrapped seamlessly as a torus. */
259
+ export interface ReactionDiffusionGridConfig extends GridSurfaceConfig {
260
+ /** Gray-Scott feed rate F. */
261
+ feed: number;
262
+ /** Gray-Scott kill rate k. */
263
+ kill: number;
264
+ /** Periodic spatial spread of F and k across the tile, so several morphologies coexist. */
265
+ variation: number;
266
+ /** Cells covered by one simulation tile before it repeats. */
267
+ tileCells: number;
268
+ }
185
269
  export type AnyGridConfig = (HexGridConfig & {
186
270
  type: 'hexGrid';
187
271
  }) | (CircuitGridConfig & {
@@ -198,5 +282,19 @@ export type AnyGridConfig = (HexGridConfig & {
198
282
  type: 'contourGrid';
199
283
  }) | (QuasiGridConfig & {
200
284
  type: 'quasiGrid';
285
+ }) | (FlowNetGridConfig & {
286
+ type: 'flowNetGrid';
287
+ }) | (ChladniGridConfig & {
288
+ type: 'chladniGrid';
289
+ }) | (HyperbolicGridConfig & {
290
+ type: 'hyperbolicGrid';
291
+ }) | (GravWaveGridConfig & {
292
+ type: 'gravWaveGrid';
293
+ }) | (GirihGridConfig & {
294
+ type: 'girihGrid';
295
+ }) | (WallpaperGridConfig & {
296
+ type: 'wallpaperGrid';
297
+ }) | (ReactionDiffusionGridConfig & {
298
+ type: 'reactionDiffusionGrid';
201
299
  });
202
300
  //# sourceMappingURL=gridConfigs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gridConfigs.d.ts","sourceRoot":"","sources":["../../src/types/gridConfigs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,6EAA6E;AAC7E,MAAM,MAAM,YAAY;AACpB,aAAa;AACX,CAAC;AACH,0CAA0C;GACxC,CAAC;AACH,kDAAkD;GAChD,CAAC;AACH,4CAA4C;GAC1C,CAAC;AACH,kDAAkD;GAChD,CAAC,CAAC;AAER,6EAA6E;AAC7E,MAAM,MAAM,YAAY;AACpB,UAAU;AACR,CAAC;AACH,8CAA8C;GAC5C,CAAC;AACH,kDAAkD;GAChD,CAAC;AACH,4DAA4D;GAC1D,CAAC;AACH,yDAAyD;GACvD,CAAC,CAAC;AAER,kEAAkE;AAClE,MAAM,WAAW,iBAAiB;IAC9B,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,IAAI,EAAE,OAAO,CAAC;IACd,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAA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AAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC,GAC7C,CAAC,iBAAiB,GAAG;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC,GAC7C,CAAC,oBAAoB,GAAG;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAAC,GACnD,CAAC,kBAAkB,GAAG;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC,GAC/C,CAAC,eAAe,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC,GACzC,CAAC,mBAAmB,GAAG;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,CAAC,GACjD,CAAC,2BAA2B,GAAG;IAAE,IAAI,EAAE,uBAAuB,CAAA;CAAE,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export type { ObjectReadyProps, ObjectReadySource, OnObjectDispose, OnObjectReady, } from './objectReady';
2
- export type { AnyGridConfig, CircuitGridConfig, ContourGridConfig, FractalGridConfig, GridCellMode, GridLineMode, GridSurfaceConfig, HexGridConfig, MoireGridConfig, QuasiGridConfig, RadarGridConfig, VoronoiGridConfig, } from './gridConfigs';
2
+ export type { AnyGridConfig, ChladniGridConfig, CircuitGridConfig, ContourGridConfig, FlowNetGridConfig, FractalGridConfig, GridCellMode, GridLineMode, GridSurfaceConfig, HexGridConfig, HyperbolicGridConfig, MoireGridConfig, QuasiGridConfig, RadarGridConfig, VoronoiGridConfig, GravWaveGridConfig, GirihGridConfig, WallpaperGridConfig, ReactionDiffusionGridConfig, } from './gridConfigs';
3
3
  export type { CirrusLayerConfig, CloudAnimatableProperty, CloudDeckConfig, CloudDeckSurfaceConfig, CloudDeckType, CloudPropertyGroup, CloudPropertySchema, CloudsQualityConfig, ThunderConfig, VolumetricCloudsSettings, } from './cloudConfigs';
4
4
  export type { ProceduralTerrainSettings, TerrainConfig, TerrainPropertyGroup, TerrainPropertySchema, TerrainQualityConfig, TerrainSurfaceConfig, TerrainType, } from './terrainConfigs';
5
5
  export { TERRAIN_DEFAULTS, TERRAIN_QUALITY_SCHEMA, TERRAIN_SCHEMA, defaultCanyonConfig, defaultDunesConfig, defaultHillsConfig, defaultMountainsConfig, defaultProceduralTerrainSettings, defaultTerrainQuality, normalizeTerrain, normalizeTerrainQuality, normalizeTerrainSettings, } from './terrainConfigs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,eAAe,EACf,eAAe,EACf,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,yBAAyB,EACzB,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,gCAAgC,EAChC,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,+BAA+B,EAC/B,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EACzB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,SAAS,GACV,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,eAAe,EACf,cAAc,EACd,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,E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AAc,EACd,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,eAAe,EACf,cAAc,EACd,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,70 @@
1
+ import * as THREE from 'three';
2
+ export declare const TRAIL_MODES: string[];
3
+ export declare function createTrailUniforms(): {
4
+ uTrailLength: {
5
+ value: number;
6
+ };
7
+ uTrailOpacity: {
8
+ value: number;
9
+ };
10
+ uTrailColor: {
11
+ value: THREE.Color;
12
+ };
13
+ uTrailShare: {
14
+ value: number;
15
+ };
16
+ uTrailHead: {
17
+ value: number;
18
+ };
19
+ uTrailAcc: {
20
+ value: number;
21
+ };
22
+ uTrailTime: {
23
+ value: number;
24
+ };
25
+ uVelScale: {
26
+ value: number;
27
+ };
28
+ };
29
+ export declare function applyTrailConfig(u: any, c: any): void;
30
+ /** GUI spec for the trail knobs; `labels` names the three types for this object. */
31
+ export declare function trailSpec(labels: any): {
32
+ trailMode: {
33
+ options: {
34
+ [labels.streak]: string;
35
+ [labels.comet]: string;
36
+ [labels.echo]: string;
37
+ Off: string;
38
+ };
39
+ };
40
+ trailLength: {
41
+ min: number;
42
+ max: number;
43
+ step: number;
44
+ };
45
+ trailOpacity: {
46
+ min: number;
47
+ max: number;
48
+ step: number;
49
+ };
50
+ trailColor: string;
51
+ trailShare: {
52
+ min: number;
53
+ max: number;
54
+ step: number;
55
+ };
56
+ };
57
+ /**
58
+ * Build a trail for a CPU particle set.
59
+ * opts: { u, n, pos (Float32Array n*3, sim units), vel (Float32Array n*3), glsl, sizePx, spacing }
60
+ * `vel` is in sim units per sim-time unit; the component keeps u.uVelScale = sim-time per real second.
61
+ */
62
+ export declare function createCpuTrail(mode: any, opts: any): {
63
+ object: THREE.Group<THREE.Object3DEventMap>;
64
+ materials: any[];
65
+ nSub: number;
66
+ reset(i: any): void;
67
+ update(dt: any): void;
68
+ dispose(): void;
69
+ };
70
+ //# sourceMappingURL=particleTrails.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"particleTrails.d.ts","sourceRoot":"","sources":["../../src/utils/particleTrails.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,eAAO,MAAM,WAAW,UAAsC,CAAC;AAK/D,wBAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;EAWlC;AAED,wBAAgB,gBAAgB,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,QAKpC;AAED,oFAAoF;AACpF,wBAAgB,SAAS,CAAC,MAAM,KAAA;;;YAES,CAAC,MAAM,CAAC,MAAM,CAAC,SAAU;YAAE,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS;YAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAQ;;;;;;;;;;;;;;;;;;;;EAMjH;AA6HD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA;;;;;;;EAyJxC"}