This commit is contained in:
Saifeddine ALOUI 2023-12-08 02:47:13 +01:00
parent e21d192f44
commit 8eaded6234
5 changed files with 18 additions and 10 deletions

File diff suppressed because one or more lines are too long

2
web/dist/index.html vendored
View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI - Welcome</title>
<script type="module" crossorigin src="/assets/index-2875d455.js"></script>
<script type="module" crossorigin src="/assets/index-b2f552bf.js"></script>
<link rel="stylesheet" href="/assets/index-4ffd8c20.css">
</head>
<body>

View File

@ -35,8 +35,8 @@
await new Promise((resolve) => setTimeout(resolve, 100)); // Wait for 100ms
}
console.log("ready")
this.updatePersonality();
this.initWebGLScene();
this.updatePersonality();
},
beforeDestroy() {
// Clean up WebGL resources here
@ -70,12 +70,17 @@
},
updatePersonality() {
const { mountedPersArr, config } = this.$store.state;
// Get the active personality based on active_personality_id
const activePersonality = mountedPersArr[config.active_personality_id];
console.log("activePersonality:",activePersonality)
// Check if the active personality has an avatar
if (activePersonality.avatar) {
this.showBoxWithAvatar(activePersonality.avatar);
} else {
this.showDefaultCube();
}
// Update the personality property
this.$emit('update:personality', activePersonality);
},
@ -91,8 +96,11 @@
});
},
showBoxWithAvatar(avatarUrl) {
// Remove existing cube
this.scene.remove(this.cube);
// Check if the cube exists in the scene
if (this.cube) {
// Remove existing cube
this.scene.remove(this.cube);
}
// Create a box with avatar texture
const geometry = new THREE.BoxGeometry();

@ -1 +1 @@
Subproject commit cf08de77a73d737584a979a61652878134d7ce0b
Subproject commit 4b3bd0b21937a4618edcf45c0e5ee736360bc38b

@ -1 +1 @@
Subproject commit 3a686417015113168c7dcb3fdd9943347d4088de
Subproject commit da337352ac0d4f77ea3057bf1b086a1288b8ae85