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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user