From b16249e7c2d3657a95d38fa3c41286afcfe08764 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Mon, 2 Feb 2026 08:46:12 +0100 Subject: [PATCH] Implement noBackground prop in Character3D component: Add functionality to conditionally render the background and background image based on the noBackground prop. Update OverviewView to utilize the new prop, enhancing the character display logic and improving visual customization options. --- frontend/src/components/Character3D.vue | 13 ++- frontend/src/views/falukant/OverviewView.vue | 105 +++++-------------- 2 files changed, 37 insertions(+), 81 deletions(-) diff --git a/frontend/src/components/Character3D.vue b/frontend/src/components/Character3D.vue index deda777..5b8dc82 100644 --- a/frontend/src/components/Character3D.vue +++ b/frontend/src/components/Character3D.vue @@ -24,6 +24,10 @@ export default { type: Number, default: null, validator: (value) => value === null || (value >= 0 && value <= 120) + }, + noBackground: { + type: Boolean, + default: false } }, data() { @@ -114,11 +118,10 @@ export default { // Scene erstellen - markRaw verwenden, um Vue's Reactivity zu vermeiden this.scene = markRaw(new THREE.Scene()); - // Hintergrund wird später geladen - this.scene.background = new THREE.Color(0xf0f0f0); - - // Hintergrundbild laden - this.loadBackground(); + if (!this.noBackground) { + this.scene.background = new THREE.Color(0xf0f0f0); + this.loadBackground(); + } // Camera erstellen const aspect = container.clientWidth / container.clientHeight; diff --git a/frontend/src/views/falukant/OverviewView.vue b/frontend/src/views/falukant/OverviewView.vue index d5c987a..010e9d9 100644 --- a/frontend/src/views/falukant/OverviewView.vue +++ b/frontend/src/views/falukant/OverviewView.vue @@ -117,58 +117,31 @@
-
-
+
+
+
+ +
+