Merge pull request #109 from storytold/feature/character-and-bugfix

Added new character and fixed the loading of GLBS.
This commit is contained in:
ArEnSc authored and GitHub committed 2024-04-07 20:06:24 -04:00
commit 5552c91dba
4 files changed
+18 -7

No files matched your search

+2 -2
View File
@@ -521,7 +521,7 @@ class Editor {
// note the database from the server is the source of truth for all the data.
// Test code here
const object: THREE.Object3D = await this.activeScene.load_glb(
"m_fmxy8wjnep1hdaz7qdg4n7y15d2bsp",
"m_4wva09qznapzk5rcvbxy671d1qx2pr",
);
object.uuid = "CH1";
@@ -1088,7 +1088,7 @@ class Editor {
this.activeScene.scene.children.forEach((child: THREE.Object3D) => {
// console.log(child);
if (child.name != "") {
if (child.type == "Mesh" || child.type == "Object3D") {
if (child.type == "Mesh" || child.type == "Object3D" || child.type == "Group") {
interactable.push(child);
}
}
+9 -5
View File
@@ -138,14 +138,18 @@ class Scene {
c.material.specular = 0.5;
c.castShadow = true;
c.receiveShadow = true;
c.frustumCulled = false;
c.material.transparent = false;
}
});
if (child.type == "Group") {
if (auto_add) { this.scene.add(child.children[0]); }
resolve(child.children[0]);
return;
}
//console.log(child);
//if (child.type == "Group") {
// if (auto_add) { child.children.forEach(element => {
// this.scene.add(element);
// }); }
// resolve(child);
//}
child.frustumCulled = false;
child.userData["media_id"] = media_id;
if (auto_add) { this.scene.add(child); }
resolve(child);
+7
View File
@@ -120,6 +120,13 @@ export const characterItems = signal<MediaItem[]>([
name: "Male Doll",
thumbnail: "resources/characters/img03.png",
},
{
version: 1,
media_id: "m_fmxy8wjnep1hdaz7qdg4n7y15d2bsp ",
type: AssetType.CHARACTER,
name: "Story Girl",
thumbnail: "resources/characters/img13.png",
},
]);
export const objectItems = signal<MediaItem[]>([
Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB