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.

This commit is contained in:
Torsten Schulz (local)
2026-02-02 08:46:12 +01:00
parent 8b63344bc2
commit b16249e7c2
2 changed files with 37 additions and 81 deletions

View File

@@ -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;