From ed4ff3b16359e50fae6b64f35b1d1dac841d7c69 Mon Sep 17 00:00:00 2001
From: Darrell
Date: Mon, 30 Dec 2024 19:01:24 -0500
Subject: [PATCH 1/2] Add 3d view (#927)
---
.clinerules | 2 +-
src/ui/package-lock.json | 58 ++++
src/ui/package.json | 2 +
src/ui/src/lib/images/cube.svg | 3 +
src/ui/src/routes/+layout.svelte | 2 +
src/ui/src/routes/3d/+page.svelte | 527 ++++++++++++++++++++++++++++++
6 files changed, 593 insertions(+), 1 deletion(-)
create mode 100644 src/ui/src/lib/images/cube.svg
create mode 100644 src/ui/src/routes/3d/+page.svelte
diff --git a/.clinerules b/.clinerules
index 3fbdcfad..4c2cf0e8 100644
--- a/.clinerules
+++ b/.clinerules
@@ -1,3 +1,3 @@
Test via `dotnet watch --project src`
Don't fix warnings and typescript issues unless it relates to your task
-src/ui is svelete 5 please don't use old syntax
\ No newline at end of file
+src/ui is svelete 4
diff --git a/src/ui/package-lock.json b/src/ui/package-lock.json
index 9669ed85..2791e87c 100644
--- a/src/ui/package-lock.json
+++ b/src/ui/package-lock.json
@@ -18,6 +18,7 @@
"@tailwindcss/forms": "^0.5.9",
"@types/d3": "^7.4.3",
"@types/node": "^22.9.1",
+ "@types/three": "^0.171.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"autoprefixer": "^10.4.20",
@@ -35,6 +36,7 @@
"svelte-check": "^4.1.1",
"svelte-eslint-parser": "^0.43.0",
"svelte-table": "^0.6.3",
+ "three": "^0.171.0",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.2",
@@ -1193,6 +1195,12 @@
"tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20"
}
},
+ "node_modules/@tweenjs/tween.js": {
+ "version": "23.1.3",
+ "resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz",
+ "integrity": "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==",
+ "dev": true
+ },
"node_modules/@types/d3": {
"version": "7.4.3",
"resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz",
@@ -1473,6 +1481,32 @@
"undici-types": "~6.19.8"
}
},
+ "node_modules/@types/stats.js": {
+ "version": "0.17.3",
+ "resolved": "https://registry.npmjs.org/@types/stats.js/-/stats.js-0.17.3.tgz",
+ "integrity": "sha512-pXNfAD3KHOdif9EQXZ9deK82HVNaXP5ZIF5RP2QG6OQFNTaY2YIetfrE9t528vEreGQvEPRDDc8muaoYeK0SxQ==",
+ "dev": true
+ },
+ "node_modules/@types/three": {
+ "version": "0.171.0",
+ "resolved": "https://registry.npmjs.org/@types/three/-/three-0.171.0.tgz",
+ "integrity": "sha512-oLuT1SAsT+CUg/wxUTFHo0K3NtJLnx9sJhZWQJp/0uXqFpzSk1hRHmvWvpaAWSfvx2db0lVKZ5/wV0I0isD2mQ==",
+ "dev": true,
+ "dependencies": {
+ "@tweenjs/tween.js": "~23.1.3",
+ "@types/stats.js": "*",
+ "@types/webxr": "*",
+ "@webgpu/types": "*",
+ "fflate": "~0.8.2",
+ "meshoptimizer": "~0.18.1"
+ }
+ },
+ "node_modules/@types/webxr": {
+ "version": "0.5.20",
+ "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.20.tgz",
+ "integrity": "sha512-JGpU6qiIJQKUuVSKx1GtQnHJGxRjtfGIhzO2ilq43VZZS//f1h1Sgexbdk+Lq+7569a6EYhOWrUpIruR/1Enmg==",
+ "dev": true
+ },
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.18.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.2.tgz",
@@ -1763,6 +1797,12 @@
"url": "https://opencollective.com/vitest"
}
},
+ "node_modules/@webgpu/types": {
+ "version": "0.1.52",
+ "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.52.tgz",
+ "integrity": "sha512-eI883Nlag2hGIkhXxAnq8s4APpqXWuPL3Gbn2ghiU12UjLvfCbVqHK4XfXl3eLRTatqcMmeK7jws7IwWsGfbzw==",
+ "dev": true
+ },
"node_modules/acorn": {
"version": "8.14.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
@@ -3176,6 +3216,12 @@
"reusify": "^1.0.4"
}
},
+ "node_modules/fflate": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz",
+ "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==",
+ "dev": true
+ },
"node_modules/file-entry-cache": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
@@ -3688,6 +3734,12 @@
"node": ">= 8"
}
},
+ "node_modules/meshoptimizer": {
+ "version": "0.18.1",
+ "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.18.1.tgz",
+ "integrity": "sha512-ZhoIoL7TNV4s5B6+rx5mC//fw8/POGyNxS/DZyCJeiZ12ScLfVwRE/GfsxwiTkMYYD5DmK2/JXnEVXqL4rF+Sw==",
+ "dev": true
+ },
"node_modules/micromatch": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
@@ -5038,6 +5090,12 @@
"node": ">=0.8"
}
},
+ "node_modules/three": {
+ "version": "0.171.0",
+ "resolved": "https://registry.npmjs.org/three/-/three-0.171.0.tgz",
+ "integrity": "sha512-Y/lAXPaKZPcEdkKjh0JOAHVv8OOnv/NDJqm0wjfCzyQmfKxV7zvkwsnBgPBKTzJHToSOhRGQAGbPJObT59B/PQ==",
+ "dev": true
+ },
"node_modules/tiny-glob": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz",
diff --git a/src/ui/package.json b/src/ui/package.json
index 05f1f263..1ff8b5ed 100644
--- a/src/ui/package.json
+++ b/src/ui/package.json
@@ -23,6 +23,7 @@
"@tailwindcss/forms": "^0.5.9",
"@types/d3": "^7.4.3",
"@types/node": "^22.9.1",
+ "@types/three": "^0.171.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"autoprefixer": "^10.4.20",
@@ -40,6 +41,7 @@
"svelte-check": "^4.1.1",
"svelte-eslint-parser": "^0.43.0",
"svelte-table": "^0.6.3",
+ "three": "^0.171.0",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.2",
diff --git a/src/ui/src/lib/images/cube.svg b/src/ui/src/lib/images/cube.svg
new file mode 100644
index 00000000..8b493238
--- /dev/null
+++ b/src/ui/src/lib/images/cube.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/src/ui/src/routes/+layout.svelte b/src/ui/src/routes/+layout.svelte
index 3a0fe504..dd7143f3 100644
--- a/src/ui/src/routes/+layout.svelte
+++ b/src/ui/src/routes/+layout.svelte
@@ -12,6 +12,7 @@
import devices from '$lib/images/devices.svg';
import calibration from '$lib/images/calibration.svg';
import settings from '$lib/images/settings.svg';
+ import cube from '$lib/images/cube.svg';
initializeStores();
@@ -25,6 +26,7 @@
{ href: '/devices', name: 'devices', icon: devices, alt: 'Devices' },
{ href: '/nodes', name: 'nodes', icon: nodes, alt: 'Nodes' },
{ href: '/calibration', name: 'calibration', icon: calibration, alt: 'Calibration' },
+ { href: '/3d', name: '3d', icon: cube, alt: '3D View' },
];
diff --git a/src/ui/src/routes/3d/+page.svelte b/src/ui/src/routes/3d/+page.svelte
new file mode 100644
index 00000000..521131da
--- /dev/null
+++ b/src/ui/src/routes/3d/+page.svelte
@@ -0,0 +1,527 @@
+
+
+
+
+
\ No newline at end of file
From 68213546a584e6971a9ce27e5ec6afd986a7fe07 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 31 Dec 2024 00:02:30 +0000
Subject: [PATCH 2/2] Bump @types/node from 22.9.1 to 22.10.2 in /src/ui
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.9.1 to 22.10.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/node"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
src/ui/package-lock.json | 16 ++++++++--------
src/ui/package.json | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/ui/package-lock.json b/src/ui/package-lock.json
index 2791e87c..7c86e47b 100644
--- a/src/ui/package-lock.json
+++ b/src/ui/package-lock.json
@@ -17,7 +17,7 @@
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tailwindcss/forms": "^0.5.9",
"@types/d3": "^7.4.3",
- "@types/node": "^22.9.1",
+ "@types/node": "^22.10.2",
"@types/three": "^0.171.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
@@ -1473,12 +1473,12 @@
"dev": true
},
"node_modules/@types/node": {
- "version": "22.9.1",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.1.tgz",
- "integrity": "sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==",
+ "version": "22.10.2",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz",
+ "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==",
"dev": true,
"dependencies": {
- "undici-types": "~6.19.8"
+ "undici-types": "~6.20.0"
}
},
"node_modules/@types/stats.js": {
@@ -5239,9 +5239,9 @@
}
},
"node_modules/undici-types": {
- "version": "6.19.8",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
- "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
+ "version": "6.20.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
+ "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
"dev": true
},
"node_modules/update-browserslist-db": {
diff --git a/src/ui/package.json b/src/ui/package.json
index 1ff8b5ed..62aef643 100644
--- a/src/ui/package.json
+++ b/src/ui/package.json
@@ -22,7 +22,7 @@
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tailwindcss/forms": "^0.5.9",
"@types/d3": "^7.4.3",
- "@types/node": "^22.9.1",
+ "@types/node": "^22.10.2",
"@types/three": "^0.171.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",