From d8cdd9ec7f7e28c244f661cc005a387e1870a277 Mon Sep 17 00:00:00 2001
From: Thimo <68739517+ThimoDEV@users.noreply.github.com>
Date: Sun, 16 Mar 2025 13:27:55 +0100
Subject: [PATCH 1/2] chore: WIP init presentationcontrols
---
package.json | 1 +
playground/vue/components.d.ts | 3 -
.../controls/PresentationControlsDemo.vue | 43 ++++
playground/vue/src/router/routes/controls.ts | 5 +
pnpm-lock.yaml | 14 ++
src/core/controls/PresentationControls.vue | 196 ++++++++++++++++++
src/core/controls/index.ts | 2 +
7 files changed, 261 insertions(+), 3 deletions(-)
create mode 100644 playground/vue/src/pages/controls/PresentationControlsDemo.vue
create mode 100644 src/core/controls/PresentationControls.vue
diff --git a/package.json b/package.json
index 94b19b951..6c64cbb08 100644
--- a/package.json
+++ b/package.json
@@ -63,6 +63,7 @@
"dependencies": {
"@vueuse/core": "^12.0.0",
"camera-controls": "^2.9.0",
+ "maath": "^0.10.8",
"stats-gl": "^2.0.1",
"stats.js": "^0.17.0",
"three-custom-shader-material": "^5.4.0",
diff --git a/playground/vue/components.d.ts b/playground/vue/components.d.ts
index 06f78b111..5d6524bde 100644
--- a/playground/vue/components.d.ts
+++ b/playground/vue/components.d.ts
@@ -7,13 +7,10 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
- AkuAku: typeof import('./src/components/gltf/BlenderCube.vue')['default']
BlenderCube: typeof import('./src/components/gltf/BlenderCube.vue')['default']
FboCube: typeof import('./src/components/FboCube.vue')['default']
- Gltf: typeof import('./src/components/gltf/index.vue')['default']
GraphPane: typeof import('./src/components/GraphPane.vue')['default']
Jeep: typeof import('./src/components/fbx/Jeep.vue')['default']
- ModelsDemo: typeof import('./src/components/ModelsDemo.vue')['default']
OverlayInfo: typeof import('./src/components/OverlayInfo.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
diff --git a/playground/vue/src/pages/controls/PresentationControlsDemo.vue b/playground/vue/src/pages/controls/PresentationControlsDemo.vue
new file mode 100644
index 000000000..97c6f457b
--- /dev/null
+++ b/playground/vue/src/pages/controls/PresentationControlsDemo.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/playground/vue/src/router/routes/controls.ts b/playground/vue/src/router/routes/controls.ts
index 931aa55f6..4a06c3923 100644
--- a/playground/vue/src/router/routes/controls.ts
+++ b/playground/vue/src/router/routes/controls.ts
@@ -34,4 +34,9 @@ export const controlsRoutes = [
name: 'ScrollControls',
component: () => import('../../pages/controls/ScrollControlsDemo.vue'),
},
+ {
+ path: '/controls/presentation-controls',
+ name: 'PresentationControls',
+ component: () => import('../../pages/controls/PresentationControlsDemo.vue'),
+ },
]
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9e91749ac..51fb7da67 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -14,6 +14,9 @@ importers:
camera-controls:
specifier: ^2.9.0
version: 2.9.0(three@0.173.0)
+ maath:
+ specifier: ^0.10.8
+ version: 0.10.8(@types/three@0.172.0)(three@0.173.0)
stats-gl:
specifier: ^2.0.1
version: 2.4.2(@types/three@0.172.0)(three@0.173.0)
@@ -3150,6 +3153,12 @@ packages:
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
engines: {node: '>=12'}
+ maath@0.10.8:
+ resolution: {integrity: sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g==}
+ peerDependencies:
+ '@types/three': '>=0.134.0'
+ three: '>=0.134.0'
+
macos-release@3.3.0:
resolution: {integrity: sha512-tPJQ1HeyiU2vRruNGhZ+VleWuMQRro8iFtJxYgnS4NQe+EukKF6aGiIT+7flZhISAt2iaXBCfFGvAyif7/f8nQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -7691,6 +7700,11 @@ snapshots:
lru-cache@7.18.3: {}
+ maath@0.10.8(@types/three@0.172.0)(three@0.173.0):
+ dependencies:
+ '@types/three': 0.172.0
+ three: 0.173.0
+
macos-release@3.3.0: {}
magic-string@0.30.12:
diff --git a/src/core/controls/PresentationControls.vue b/src/core/controls/PresentationControls.vue
new file mode 100644
index 000000000..593d64650
--- /dev/null
+++ b/src/core/controls/PresentationControls.vue
@@ -0,0 +1,196 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/core/controls/index.ts b/src/core/controls/index.ts
index d803b2af3..7b4db595f 100644
--- a/src/core/controls/index.ts
+++ b/src/core/controls/index.ts
@@ -5,6 +5,7 @@ import OrbitControls from './OrbitControls.vue'
import PointerLockControls from './PointerLockControls.vue'
import ScrollControls from './ScrollControls.vue'
import TransformControls from './TransformControls.vue'
+import PresentationControls from './PresentationControls.vue'
export {
BaseCameraControls,
@@ -13,6 +14,7 @@ export {
MapControls,
OrbitControls,
PointerLockControls,
+ PresentationControls,
ScrollControls,
TransformControls,
}
From d9cb54435ebf7f7d54304237cbfcf8a44203960a Mon Sep 17 00:00:00 2001
From: Thimo <68739517+ThimoDEV@users.noreply.github.com>
Date: Mon, 22 Sep 2025 19:04:10 +0200
Subject: [PATCH 2/2] fix: wip presentationcontrols
---
.../controls/PresentationControlsDemo.vue | 64 +--
pnpm-lock.yaml | 14 +
src/core/controls/PresentationControls.vue | 436 ++++++++++++------
3 files changed, 351 insertions(+), 163 deletions(-)
diff --git a/playground/vue/src/pages/controls/PresentationControlsDemo.vue b/playground/vue/src/pages/controls/PresentationControlsDemo.vue
index 97c6f457b..c9012653b 100644
--- a/playground/vue/src/pages/controls/PresentationControlsDemo.vue
+++ b/playground/vue/src/pages/controls/PresentationControlsDemo.vue
@@ -1,43 +1,51 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e1664973b..d260274b6 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -14,6 +14,9 @@ importers:
camera-controls:
specifier: ^2.9.0
version: 2.10.1(three@0.180.0)
+ maath:
+ specifier: ^0.10.8
+ version: 0.10.8(@types/three@0.180.0)(three@0.180.0)
stats-gl:
specifier: ^2.0.1
version: 2.4.2(@types/three@0.180.0)(three@0.180.0)
@@ -3264,6 +3267,12 @@ packages:
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
engines: {node: '>=12'}
+ maath@0.10.8:
+ resolution: {integrity: sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g==}
+ peerDependencies:
+ '@types/three': '>=0.134.0'
+ three: '>=0.134.0'
+
macos-release@3.3.0:
resolution: {integrity: sha512-tPJQ1HeyiU2vRruNGhZ+VleWuMQRro8iFtJxYgnS4NQe+EukKF6aGiIT+7flZhISAt2iaXBCfFGvAyif7/f8nQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -7910,6 +7919,11 @@ snapshots:
lru-cache@7.18.3: {}
+ maath@0.10.8(@types/three@0.180.0)(three@0.180.0):
+ dependencies:
+ '@types/three': 0.180.0
+ three: 0.180.0
+
macos-release@3.3.0: {}
magic-string@0.30.17:
diff --git a/src/core/controls/PresentationControls.vue b/src/core/controls/PresentationControls.vue
index 593d64650..24d29b470 100644
--- a/src/core/controls/PresentationControls.vue
+++ b/src/core/controls/PresentationControls.vue
@@ -1,195 +1,361 @@
-
-
-
-