diff --git a/assets/main.scss b/assets/main.scss
index 8bc2216..c283eb8 100644
--- a/assets/main.scss
+++ b/assets/main.scss
@@ -205,4 +205,14 @@ button {
.fallback {
@apply absolute bg-neutral-600 top-0 left-0 w-full h-full z-20 flex justify-center items-center text-black font-mono
+}
+
+.canvas-icons {
+ @apply absolute text-3xl top-0 left-0 flex flex-col;
+ a {
+ @apply cursor-pointer;
+ &.disabled {
+ @apply cursor-not-allowed opacity-50 pointer-events-none;
+ }
+ }
}
\ No newline at end of file
diff --git a/components/expDiagram.vue b/components/expDiagram.vue
index 80a5817..dde8634 100644
--- a/components/expDiagram.vue
+++ b/components/expDiagram.vue
@@ -2,8 +2,9 @@
import { TresCanvas } from '@tresjs/core'
import { OrbitControls, Environment, Html } from '@tresjs/cientos'
+const camera = ref()
const controlsState = reactive({
- minDistance: 1,
+ minDistance: 2,
maxDistance: 10,
enablePan: false,
// enableZoom: false,
@@ -40,6 +41,13 @@ const loadAll = async () => {
secondary_light.value.shadow.bias = -0.01
// secondary_light.value.intensity = 50
}
+
+const changeDistance = (v = 1) => {
+ if(camera.value) {
+ console.log(camera.value.position.normalize())
+ camera.value.position.z += v
+ }
+}
onMounted(() => {
loadAll()
})
@@ -53,7 +61,7 @@ onMounted(() => {