@buley/hexgrid-3d 1.0.0 → 1.1.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 (58) hide show
  1. package/build_log.txt +500 -0
  2. package/build_src_log.txt +8 -0
  3. package/examples/basic-usage.tsx +19 -19
  4. package/package.json +1 -1
  5. package/public/hexgrid-worker.js +2350 -1638
  6. package/site/.eslintrc.json +3 -0
  7. package/site/DEPLOYMENT.md +196 -0
  8. package/site/INDEX.md +127 -0
  9. package/site/QUICK_START.md +86 -0
  10. package/site/README.md +85 -0
  11. package/site/SITE_SUMMARY.md +180 -0
  12. package/site/next.config.js +12 -0
  13. package/site/package.json +26 -0
  14. package/site/src/app/docs/page.tsx +148 -0
  15. package/site/src/app/examples/page.tsx +133 -0
  16. package/site/src/app/globals.css +160 -0
  17. package/site/src/app/layout.tsx +29 -0
  18. package/site/src/app/page.tsx +163 -0
  19. package/site/tsconfig.json +29 -0
  20. package/site/vercel.json +6 -0
  21. package/src/Snapshot.ts +790 -585
  22. package/src/adapters/DashAdapter.ts +57 -0
  23. package/src/adapters.ts +16 -18
  24. package/src/algorithms/AdvancedStatistics.ts +58 -24
  25. package/src/algorithms/BayesianStatistics.ts +43 -12
  26. package/src/algorithms/FlowField.ts +30 -6
  27. package/src/algorithms/FlowField3D.ts +573 -0
  28. package/src/algorithms/FluidSimulation.ts +19 -3
  29. package/src/algorithms/FluidSimulation3D.ts +664 -0
  30. package/src/algorithms/GraphAlgorithms.ts +19 -12
  31. package/src/algorithms/OutlierDetection.ts +72 -38
  32. package/src/algorithms/ParticleSystem.ts +12 -2
  33. package/src/algorithms/ParticleSystem3D.ts +567 -0
  34. package/src/algorithms/index.ts +14 -8
  35. package/src/compat.ts +10 -10
  36. package/src/components/HexGrid.tsx +10 -23
  37. package/src/components/NarrationOverlay.tsx +140 -52
  38. package/src/components/index.ts +2 -1
  39. package/src/features.ts +31 -31
  40. package/src/index.ts +11 -11
  41. package/src/lib/narration.ts +17 -0
  42. package/src/lib/stats-tracker.ts +25 -0
  43. package/src/lib/theme-colors.ts +12 -0
  44. package/src/math/HexCoordinates.ts +849 -4
  45. package/src/math/Matrix4.ts +2 -12
  46. package/src/math/Vector3.ts +49 -1
  47. package/src/math/index.ts +6 -6
  48. package/src/note-adapter.ts +50 -42
  49. package/src/ontology-adapter.ts +30 -23
  50. package/src/stores/uiStore.ts +34 -34
  51. package/src/types/shared-utils.d.ts +10 -0
  52. package/src/types.ts +110 -98
  53. package/src/utils/image-utils.ts +9 -6
  54. package/src/wasm/HexGridWasmWrapper.ts +436 -388
  55. package/src/wasm/index.ts +2 -2
  56. package/src/workers/hexgrid-math.ts +40 -35
  57. package/src/workers/hexgrid-worker.worker.ts +1992 -1018
  58. package/tsconfig.json +21 -14
@@ -1,5 +1,6 @@
1
- import React, { useState } from 'react'
2
- import { HexGrid, Photo } from '@buley/hexgrid-3d'
1
+ import React, { useState } from 'react';
2
+ import { HexGrid } from '@buley/hexgrid-3d';
3
+ import type { Photo } from '@buley/hexgrid-3d';
3
4
 
4
5
  /**
5
6
  * Example usage of the HexGrid visualization component
@@ -8,45 +9,44 @@ export default function HexGridExample() {
8
9
  const [photos, setPhotos] = useState<Photo[]>([
9
10
  {
10
11
  id: '1',
12
+ imageUrl: 'https://example.com/photo1.jpg',
11
13
  url: 'https://example.com/photo1.jpg',
12
14
  thumbnailUrl: 'https://example.com/photo1_thumb.jpg',
13
15
  title: 'Example Photo 1',
16
+ alt: 'Example Photo 1',
17
+ category: 'example',
14
18
  description: 'First example photo',
15
19
  source: 'example',
16
20
  createdAt: new Date().toISOString(),
17
- userId: 'user123'
21
+ userId: 'user123',
18
22
  },
19
23
  {
20
24
  id: '2',
25
+ imageUrl: 'https://example.com/photo2.jpg',
21
26
  url: 'https://example.com/photo2.jpg',
22
27
  thumbnailUrl: 'https://example.com/photo2_thumb.jpg',
23
28
  title: 'Example Photo 2',
29
+ alt: 'Example Photo 2',
30
+ category: 'example',
24
31
  description: 'Second example photo',
25
32
  source: 'example',
26
33
  createdAt: new Date().toISOString(),
27
- userId: 'user123'
28
- }
29
- ])
34
+ userId: 'user123',
35
+ },
36
+ ]);
30
37
 
31
38
  const handleHexClick = (photo: Photo) => {
32
- console.log('Clicked photo:', photo)
39
+ console.log('Clicked photo:', photo);
33
40
  // Handle photo click - open modal, navigate, etc.
34
- }
41
+ };
35
42
 
36
43
  const handleLeaderboardUpdate = (leaderboard: any) => {
37
- console.log('Leaderboard updated:', leaderboard)
38
- }
44
+ console.log('Leaderboard updated:', leaderboard);
45
+ };
39
46
 
40
47
  return (
41
48
  <div style={{ width: '100vw', height: '100vh' }}>
42
- <HexGrid
43
- photos={photos}
44
- onHexClick={handleHexClick}
45
- spacing={1.0}
46
- onLeaderboardUpdate={handleLeaderboardUpdate}
47
- autoplayQueueLimit={100}
48
- modalOpen={false}
49
- />
49
+ <HexGrid photos={photos} onPhotoClick={handleHexClick} />
50
50
  </div>
51
- )
51
+ );
52
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buley/hexgrid-3d",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "3D hexagonal grid visualization component for React",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",