diff --git a/packages/frontend/assets/room/objects/monstera/monstera.blend b/packages/frontend/assets/room/objects/monstera/monstera.blend new file mode 100644 index 0000000000..ec11e5d1f6 Binary files /dev/null and b/packages/frontend/assets/room/objects/monstera/monstera.blend differ diff --git a/packages/frontend/assets/room/objects/monstera/monstera.glb b/packages/frontend/assets/room/objects/monstera/monstera.glb new file mode 100644 index 0000000000..68daaf163d Binary files /dev/null and b/packages/frontend/assets/room/objects/monstera/monstera.glb differ diff --git a/packages/frontend/src/pages/room.vue b/packages/frontend/src/pages/room.vue index de950f9f2a..6e5b2f974e 100644 --- a/packages/frontend/src/pages/room.vue +++ b/packages/frontend/src/pages/room.vue @@ -73,6 +73,11 @@ onMounted(() => { type: 'plant', position: [-60, 90, 165], rotation: [0, 0, 0], + }, { + id: 'f2', + type: 'monstera', + position: [-55, 90, 175], + rotation: [0, 0, 0], }, { id: 'g', type: 'mug', diff --git a/packages/frontend/src/utility/room/engine.ts b/packages/frontend/src/utility/room/engine.ts index df0181113a..12da463270 100644 --- a/packages/frontend/src/utility/room/engine.ts +++ b/packages/frontend/src/utility/room/engine.ts @@ -171,6 +171,21 @@ const OBJECTS = { aircon: { placement: 'side', }, + 'monstera': { + placement: 'top', + }, + 'color-box': { + placement: 'top', + }, + 'steel-rack': { + placement: 'top', + }, + 'plant2': { + placement: 'top', + }, + 'tv': { + placement: 'top', + }, } as Record; function vecToLocal(vector: BABYLON.Vector3, mesh: BABYLON.Mesh): BABYLON.Vector3 { @@ -337,6 +352,8 @@ export class RoomEngine { } else { this.scene.clearColor = new BABYLON.Color4(0.05, 0.05, 0.2, 0); } + this.scene.ambientColor = new BABYLON.Color3(1.0, 0.9, 0.8); + this.scene.collisionsEnabled = true; //new MmdOutlineRenderer(this.scene); @@ -364,6 +381,7 @@ export class RoomEngine { const ambientLight = new BABYLON.HemisphericLight('ambientLight', new BABYLON.Vector3(0, 1, -0.5), this.scene); ambientLight.diffuse = new BABYLON.Color3(1.0, 1.0, 1.0); ambientLight.intensity = 0.5; + //ambientLight.intensity = 0; const roomLight = new BABYLON.SpotLight('roomLight', new BABYLON.Vector3(0, 249/*cm*/, 0), new BABYLON.Vector3(0, -1, 0), 16, 8, this.scene); roomLight.diffuse = new BABYLON.Color3(1.0, 0.9, 0.8); @@ -718,6 +736,7 @@ export class RoomEngine { mesh.receiveShadows = true; this.shadowGenerator1.addShadowCaster(mesh); this.shadowGenerator2.addShadowCaster(mesh); + //if (mesh.material) (mesh.material as BABYLON.PBRMaterial).ambientColor = new BABYLON.Color3(1, 1, 1); } } @@ -751,6 +770,7 @@ export class RoomEngine { mesh.renderOutline = false; mesh.outlineWidth = 0.003; mesh.outlineColor = new BABYLON.Color3(1, 0, 0); + //if (mesh.material) (mesh.material as BABYLON.PBRMaterial).ambientColor = new BABYLON.Color3(0.2, 0.2, 0.2); } this.objectMeshs.set(o.id, obj.meshes[0]);