From 240c055b4558a8d4c58aacbccdbaa59a04975ff4 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:43:40 +0900 Subject: [PATCH] collision --- packages/frontend/src/utility/room/engine.ts | 66 +++++++++++++------ .../src/utility/room/objects/a4Case.ts | 1 + .../src/utility/room/objects/aircon.ts | 1 + .../src/utility/room/objects/aquarium.ts | 1 + .../utility/room/objects/aromaReedDiffuser.ts | 1 + .../src/utility/room/objects/banknote.ts | 1 + .../src/utility/room/objects/beamLamp.ts | 1 + .../src/utility/room/objects/blind.ts | 1 + .../frontend/src/utility/room/objects/book.ts | 1 + .../src/utility/room/objects/books.ts | 1 + .../src/utility/room/objects/cactusS.ts | 1 + .../utility/room/objects/ceilingFanLight.ts | 1 + .../src/utility/room/objects/coffeeCup.ts | 1 + .../src/utility/room/objects/cupNoodle.ts | 1 + .../utility/room/objects/custardPudding.ts | 1 + .../src/utility/room/objects/djMixer.ts | 1 + .../src/utility/room/objects/djPlayer.ts | 1 + .../src/utility/room/objects/ductTape.ts | 1 + .../src/utility/room/objects/emptyBento.ts | 1 + .../src/utility/room/objects/energyDrink.ts | 1 + .../src/utility/room/objects/envelope.ts | 1 + .../src/utility/room/objects/facialTissue.ts | 1 + .../src/utility/room/objects/hangingTShirt.ts | 1 + .../src/utility/room/objects/icosahedron.ts | 1 + .../src/utility/room/objects/keyboard.ts | 1 + .../src/utility/room/objects/laptopPc.ts | 1 + .../src/utility/room/objects/lavaLamp.ts | 1 + .../src/utility/room/objects/miPlate.ts | 1 + .../utility/room/objects/miPlateDisplayed.ts | 1 + .../frontend/src/utility/room/objects/milk.ts | 1 + .../src/utility/room/objects/mixer.ts | 1 + .../utility/room/objects/monitorSpeaker.ts | 1 + .../src/utility/room/objects/monstera.ts | 1 + .../frontend/src/utility/room/objects/mug.ts | 1 + .../src/utility/room/objects/newtonsCradle.ts | 1 + .../src/utility/room/objects/petBottle.ts | 1 + .../src/utility/room/objects/pictureFrame.ts | 1 + .../src/utility/room/objects/pizza.ts | 1 + .../src/utility/room/objects/plant.ts | 1 + .../src/utility/room/objects/poster.ts | 1 + .../src/utility/room/objects/powerStrip.ts | 1 + .../src/utility/room/objects/radiometer.ts | 1 + .../src/utility/room/objects/randomBooks.ts | 1 + .../utility/room/objects/rolledUpPoster.ts | 1 + .../src/utility/room/objects/roundRug.ts | 1 + .../src/utility/room/objects/router.ts | 1 + .../src/utility/room/objects/siphon.ts | 1 + .../src/utility/room/objects/snakeplant.ts | 1 + .../src/utility/room/objects/speaker.ts | 1 + .../src/utility/room/objects/sprayer.ts | 1 + .../utility/room/objects/tabletopCalendar.ts | 1 + .../room/objects/tabletopDigitalClock.ts | 1 + .../src/utility/room/objects/tabletopFlag.ts | 1 + .../room/objects/tabletopGlassPictureFrame.ts | 1 + .../room/objects/tabletopIronFrameStand.ts | 1 + .../room/objects/tabletopPictureFrame.ts | 1 + .../src/utility/room/objects/tapestry.ts | 1 + .../src/utility/room/objects/tetrapod.ts | 1 + .../utility/room/objects/twistedCubeObjet.ts | 1 + .../src/utility/room/objects/usedTissue.ts | 1 + .../src/utility/room/objects/wallCanvas.ts | 1 + .../src/utility/room/objects/wallClock.ts | 1 + .../room/objects/wallGlassPictureFrame.ts | 1 + .../src/utility/room/objects/wallMirror.ts | 1 + .../room/objects/woodRingsPendantLight.ts | 1 + .../room/objects/woodSoundAbsorbingPanel.ts | 1 + 66 files changed, 111 insertions(+), 20 deletions(-) diff --git a/packages/frontend/src/utility/room/engine.ts b/packages/frontend/src/utility/room/engine.ts index 6301c428a7..e6a8aac4f1 100644 --- a/packages/frontend/src/utility/room/engine.ts +++ b/packages/frontend/src/utility/room/engine.ts @@ -17,8 +17,9 @@ * - メッシュ名を __TOP__ で始めると、その面の上にモノを置けることを示す。当該メッシュはレンダリングでは表示されません。 * - メッシュ名を __SIDE__ で始めると、その面にモノを貼り付けられることを示す。当該メッシュはレンダリングでは表示されません。 * - なお、現状 __TOP__ / __SIDE__ メッシュは単一の面でなければなりません。つまりArray Modifierなどを適用した状態では正しく動作しません。 - * - メッシュ名を __COLLISION__ で始めると、コリジョン用メッシュとして扱われます。このメッシュはシーク時のレイのヒットチェックにも使われます。当該メッシュはレンダリングでは表示されません。 - * - コリジョン用メッシュが無い場合、すべてのメッシュがコリジョン用メッシュとして扱われますが、例えば網目のようなメッシュではレイが隙間を通り抜けて後ろにあるオブジェクトにヒットしてしまうなどの問題が発生します。 + * - メッシュ名を __COLLISION__ で始めると、コリジョン用メッシュとして扱われます。当該メッシュはレンダリングでは表示されません。 + * - メッシュ名を __PICK__ で始めると、レイのヒットチェック用メッシュとして扱われます。当該メッシュはレンダリングでは表示されません。 + * - __PICK__が無い場合、すべてのメッシュをヒットチェックメッシュとして扱いますが、例えば網目のようなメッシュではレイが隙間を通り抜けて後ろにあるオブジェクトにヒットしてしまうなどの問題が発生します。 * - シェイプキーを使用する場合、normalのエクスポートが有効だと面のレンダリングがおかしくなる場合があります。その場合は無効化してください。 * - 後からモデルを調整したくなった時に備え、モディファイアを駆使するなどして、なるべく非破壊的なモデリングを心がけることを推奨します。 * - パーツ的に分かれていることが自然なメッシュについても、できるだけマージせす、別々のメッシュのままにしてください。 @@ -39,6 +40,8 @@ const SNAPSHOT_RENDERING = false; // 実験的 const SNAPSHOT_RENDERING_NON_SUPPORTED_OBJECTS = ['tv', 'aquarium', 'lavaLamp']; const IGNORE_OBJECTS: string[] = []; // for debug +const SYSTEM_MESH_NAMES = ['__TOP__', '__SIDE__', '__PICK__', '__COLLISION__', '__COLLISION_AUTO_GENERATED_INTERNALY__']; + import * as BABYLON from '@babylonjs/core'; import { AxesViewer } from '@babylonjs/core/Debug/axesViewer'; import { registerBuiltInLoaders } from '@babylonjs/loaders/dynamic'; @@ -209,7 +212,7 @@ class ModelManager { } this.bakedMeshes = []; - const excludeMeshes = [...this.bakeExcludeMeshes, ...this.root.getChildMeshes().filter(m => m.name.includes('__TOP__') || m.name.includes('__SIDE__') || m.name.includes('__COLLISION__'))]; + const excludeMeshes = [...this.bakeExcludeMeshes, ...this.root.getChildMeshes().filter(m => SYSTEM_MESH_NAMES.some(s => m.name.includes(s)))]; const childMeshes = this.root.getChildMeshes().filter(m => !excludeMeshes.some(x => x === m) && m.isVisible); @@ -308,6 +311,7 @@ type ObjectDef = { default: GetOptionsSchemaValues; }; placement: 'top' | 'side' | 'bottom' | 'wall' | 'ceiling' | 'floor'; + noCollisions?: boolean; //groupingMeshes: string[]; // multi-materialなメッシュは複数のメッシュに分割されるが、それだと不便な場合に追加の親メッシュでグルーピングするための指定 isChair?: boolean; treatLoaderResult?: (loaderResult: BABYLON.AssetContainer) => void; @@ -386,24 +390,33 @@ function enableObjectCollision(meshes: BABYLON.Mesh[]) { } } - if (!hasCollisionMesh) { - for (const mesh of meshes) { - mesh.checkCollisions = true; - mesh.metadata ??= {}; - mesh.metadata.isCollision = true; - } - } else { + if (hasCollisionMesh) { for (const mesh of meshes) { if (mesh.name.includes('__COLLISION__')) { mesh.checkCollisions = true; - mesh.metadata ??= {}; - mesh.metadata.isCollision = true; } else { mesh.checkCollisions = false; - mesh.metadata ??= {}; - mesh.metadata.isCollision = false; } } + + return; + } + + // なんかうまくいかない + //const boundingInfo = getMeshesBoundingBox(meshes.filter(m => m.isEnabled() && m.isVisible)); + //const collider = meshes.find(m => m.name.includes('__COLLISION_AUTO_GENERATED_INTERNALY__'))!; + //if (collider == null) return; + ////collider.position.y = ((boundingInfo.maximum.y + boundingInfo.minimum.y) / 2) / WORLD_SCALE; + //collider.scaling = new BABYLON.Vector3( + // (boundingInfo.maximum.x - boundingInfo.minimum.x) || 1, + // (boundingInfo.maximum.y - boundingInfo.minimum.y) || 1, + // (boundingInfo.maximum.z - boundingInfo.minimum.z) || 1, + //); + //collider.checkCollisions = true; + //collider.isVisible = true; + + for (const mesh of meshes) { + mesh.checkCollisions = true; } } @@ -709,8 +722,9 @@ export class RoomEngine { this.selectObject(null); + // TODO: __PICK__考慮 const pickingInfo = this.scene.pick(this.scene.pointerX, this.scene.pointerY, - (m) => m.metadata?.isCollision && m.metadata?.objectId != null && this.objectEntities.has(m.metadata.objectId)); + (m) => m.metadata?.objectId != null && this.objectEntities.has(m.metadata.objectId)); if (pickingInfo.pickedMesh != null) { const oid = pickingInfo.pickedMesh.metadata.objectId; @@ -1063,6 +1077,7 @@ export class RoomEngine { options: any; }) { const def = getObjectDef(args.type); + const collisionsDisabled = def.placement === 'ceiling' || def.noCollisions; const root = new BABYLON.TransformNode(`object_${args.id}_${args.type}`, this.scene); @@ -1213,6 +1228,10 @@ export class RoomEngine { root.addChild(subRoot); } + //const internalCollider = BABYLON.MeshBuilder.CreateBox(`__COLLISION_AUTO_GENERATED_INTERNALY__${root.name}`, { width: 0, height: 0, depth: 0 }, this.scene); + //internalCollider.isVisible = false; + //internalCollider.parent = root; + root.position = args.position.clone(); root.rotation = args.rotation.clone(); root.metadata = metadata; @@ -1228,7 +1247,7 @@ export class RoomEngine { mesh.metadata = metadata; - if (mesh.name.includes('__COLLISION__') || mesh.name.includes('__TOP__') || mesh.name.includes('__SIDE__')) { + if (SYSTEM_MESH_NAMES.some(n => mesh.name.includes(n))) { mesh.receiveShadows = false; mesh.isVisible = false; } else { @@ -1269,7 +1288,9 @@ export class RoomEngine { if (!this.scene.meshes.includes(mesh)) this.scene.addMesh(mesh); } - enableObjectCollision(meshes); + if (!collisionsDisabled) { + enableObjectCollision(meshes); + } }); const objectInstance = await def.createInstance({ @@ -1307,7 +1328,9 @@ export class RoomEngine { model.bakeMesh(); - enableObjectCollision(root.getChildMeshes()); + if (!collisionsDisabled) { + enableObjectCollision(root.getChildMeshes()); + } this.objectEntities.set(args.id, { instance: objectInstance, rootMesh: root, model }); @@ -1575,6 +1598,7 @@ export class RoomEngine { const id = genId(); const def = getObjectDef(type); + const collisionsDisabled = def.placement === 'ceiling' || def.noCollisions; const options = deepClone(def.options.default); @@ -1617,7 +1641,9 @@ export class RoomEngine { // todo }, onDone: () => { // todo: sticky状態などを引数でもらうようにしたい - enableObjectCollision(root.getChildMeshes()); + if (!collisionsDisabled) { + enableObjectCollision(root.getChildMeshes()); + } this.ui.isGrabbingForInstall = false; @@ -1956,7 +1982,7 @@ export class RoomObjectPreviewEngine { // シェイプキー(morph)を考慮してbounding boxを更新するために必要 mesh.refreshBoundingInfo({ applyMorph: true }); - if (mesh.name.includes('__COLLISION__') || mesh.name.includes('__TOP__') || mesh.name.includes('__SIDE__')) { + if (SYSTEM_MESH_NAMES.some(n => mesh.name.includes(n))) { mesh.receiveShadows = false; mesh.isVisible = false; } else { diff --git a/packages/frontend/src/utility/room/objects/a4Case.ts b/packages/frontend/src/utility/room/objects/a4Case.ts index 19a4c92b24..61d9d3055b 100644 --- a/packages/frontend/src/utility/room/objects/a4Case.ts +++ b/packages/frontend/src/utility/room/objects/a4Case.ts @@ -21,6 +21,7 @@ export const a4Case = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ options, model }) => { const bodyMesh = model.findMesh('__X_BODY__'); const bodyMaterial = bodyMesh.material as BABYLON.PBRMaterial; diff --git a/packages/frontend/src/utility/room/objects/aircon.ts b/packages/frontend/src/utility/room/objects/aircon.ts index d8a7c4fa08..8b8b6dc08a 100644 --- a/packages/frontend/src/utility/room/objects/aircon.ts +++ b/packages/frontend/src/utility/room/objects/aircon.ts @@ -13,6 +13,7 @@ export const aircon = defineObject({ default: {}, }, placement: 'wall', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/aquarium.ts b/packages/frontend/src/utility/room/objects/aquarium.ts index 097e6d4bad..246fd549df 100644 --- a/packages/frontend/src/utility/room/objects/aquarium.ts +++ b/packages/frontend/src/utility/room/objects/aquarium.ts @@ -14,6 +14,7 @@ export const aquarium = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: ({ scene, root }) => { return { onInited: () => { diff --git a/packages/frontend/src/utility/room/objects/aromaReedDiffuser.ts b/packages/frontend/src/utility/room/objects/aromaReedDiffuser.ts index 275461553a..ff595ffa0c 100644 --- a/packages/frontend/src/utility/room/objects/aromaReedDiffuser.ts +++ b/packages/frontend/src/utility/room/objects/aromaReedDiffuser.ts @@ -26,6 +26,7 @@ export const aromaReedDiffuser = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ options, model }) => { const bottleMesh = model.findMesh('__X_BOTTLE__'); const bottleMaterial = bottleMesh.material as BABYLON.PBRMaterial; diff --git a/packages/frontend/src/utility/room/objects/banknote.ts b/packages/frontend/src/utility/room/objects/banknote.ts index 493d040228..f3fea3ad15 100644 --- a/packages/frontend/src/utility/room/objects/banknote.ts +++ b/packages/frontend/src/utility/room/objects/banknote.ts @@ -13,6 +13,7 @@ export const banknote = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/beamLamp.ts b/packages/frontend/src/utility/room/objects/beamLamp.ts index 172cb37388..121cf174f4 100644 --- a/packages/frontend/src/utility/room/objects/beamLamp.ts +++ b/packages/frontend/src/utility/room/objects/beamLamp.ts @@ -14,6 +14,7 @@ export const beamLamp = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: ({ room, root, scene }) => { return { onInited: () => { diff --git a/packages/frontend/src/utility/room/objects/blind.ts b/packages/frontend/src/utility/room/objects/blind.ts index 0619c499e6..d5b3e2f6cc 100644 --- a/packages/frontend/src/utility/room/objects/blind.ts +++ b/packages/frontend/src/utility/room/objects/blind.ts @@ -40,6 +40,7 @@ export const blind = defineObject({ }, }, placement: 'bottom', + noCollisions: true, createInstance: ({ options, model }) => { const temp = createOverridedStates({ angle: () => options.angle, diff --git a/packages/frontend/src/utility/room/objects/book.ts b/packages/frontend/src/utility/room/objects/book.ts index 2edd2f2472..a7c36f02ec 100644 --- a/packages/frontend/src/utility/room/objects/book.ts +++ b/packages/frontend/src/utility/room/objects/book.ts @@ -45,6 +45,7 @@ export const book = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ options, model }) => { const bodyMesh = model.findMesh('__X_BODY__'); diff --git a/packages/frontend/src/utility/room/objects/books.ts b/packages/frontend/src/utility/room/objects/books.ts index b602c16441..3c7aec76db 100644 --- a/packages/frontend/src/utility/room/objects/books.ts +++ b/packages/frontend/src/utility/room/objects/books.ts @@ -22,6 +22,7 @@ export const books = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ scene, options, model }) => { const coverMaterial = model.findMaterial('__X_COVER__'); diff --git a/packages/frontend/src/utility/room/objects/cactusS.ts b/packages/frontend/src/utility/room/objects/cactusS.ts index d433d77475..0caf59b5b6 100644 --- a/packages/frontend/src/utility/room/objects/cactusS.ts +++ b/packages/frontend/src/utility/room/objects/cactusS.ts @@ -21,6 +21,7 @@ export const cactusS = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ options, model }) => { const potMesh = model.findMesh('__X_POT__'); const potMaterial = potMesh.material as BABYLON.PBRMaterial; diff --git a/packages/frontend/src/utility/room/objects/ceilingFanLight.ts b/packages/frontend/src/utility/room/objects/ceilingFanLight.ts index b9daf33193..93b8d38986 100644 --- a/packages/frontend/src/utility/room/objects/ceilingFanLight.ts +++ b/packages/frontend/src/utility/room/objects/ceilingFanLight.ts @@ -14,6 +14,7 @@ export const ceilingFanLight = defineObject({ default: {}, }, placement: 'ceiling', + noCollisions: true, receiveShadows: false, castShadows: false, createInstance: ({ scene, model }) => { diff --git a/packages/frontend/src/utility/room/objects/coffeeCup.ts b/packages/frontend/src/utility/room/objects/coffeeCup.ts index 644484ba5b..450bb4e1e3 100644 --- a/packages/frontend/src/utility/room/objects/coffeeCup.ts +++ b/packages/frontend/src/utility/room/objects/coffeeCup.ts @@ -13,6 +13,7 @@ export const coffeeCup = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/cupNoodle.ts b/packages/frontend/src/utility/room/objects/cupNoodle.ts index 58a11a6e03..d45d70882c 100644 --- a/packages/frontend/src/utility/room/objects/cupNoodle.ts +++ b/packages/frontend/src/utility/room/objects/cupNoodle.ts @@ -15,6 +15,7 @@ export const cupNoodle = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: ({ scene, root }) => { let yugeDispose: (() => void) | null = null; diff --git a/packages/frontend/src/utility/room/objects/custardPudding.ts b/packages/frontend/src/utility/room/objects/custardPudding.ts index 4c67d4c9e2..92232872b0 100644 --- a/packages/frontend/src/utility/room/objects/custardPudding.ts +++ b/packages/frontend/src/utility/room/objects/custardPudding.ts @@ -13,6 +13,7 @@ export const custardPudding = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/djMixer.ts b/packages/frontend/src/utility/room/objects/djMixer.ts index 86ad166397..f82424a4cd 100644 --- a/packages/frontend/src/utility/room/objects/djMixer.ts +++ b/packages/frontend/src/utility/room/objects/djMixer.ts @@ -13,6 +13,7 @@ export const djMixer = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/djPlayer.ts b/packages/frontend/src/utility/room/objects/djPlayer.ts index 8f10a73af0..fd658d6bc8 100644 --- a/packages/frontend/src/utility/room/objects/djPlayer.ts +++ b/packages/frontend/src/utility/room/objects/djPlayer.ts @@ -36,6 +36,7 @@ export const djPlayer = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: async ({ model, options, scene }) => { const screenMesh = model.findMesh('__X_SCREEN__'); const screenMaterial = model.findMaterial('__X_SCREEN__'); diff --git a/packages/frontend/src/utility/room/objects/ductTape.ts b/packages/frontend/src/utility/room/objects/ductTape.ts index 080398c0f3..cdd0d805c3 100644 --- a/packages/frontend/src/utility/room/objects/ductTape.ts +++ b/packages/frontend/src/utility/room/objects/ductTape.ts @@ -13,6 +13,7 @@ export const ductTape = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/emptyBento.ts b/packages/frontend/src/utility/room/objects/emptyBento.ts index c7540658de..e48902776e 100644 --- a/packages/frontend/src/utility/room/objects/emptyBento.ts +++ b/packages/frontend/src/utility/room/objects/emptyBento.ts @@ -13,6 +13,7 @@ export const emptyBento = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/energyDrink.ts b/packages/frontend/src/utility/room/objects/energyDrink.ts index 51cb061a88..7d047a1072 100644 --- a/packages/frontend/src/utility/room/objects/energyDrink.ts +++ b/packages/frontend/src/utility/room/objects/energyDrink.ts @@ -13,6 +13,7 @@ export const energyDrink = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/envelope.ts b/packages/frontend/src/utility/room/objects/envelope.ts index c8fc0215e6..a30fec6ebb 100644 --- a/packages/frontend/src/utility/room/objects/envelope.ts +++ b/packages/frontend/src/utility/room/objects/envelope.ts @@ -13,6 +13,7 @@ export const envelope = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/facialTissue.ts b/packages/frontend/src/utility/room/objects/facialTissue.ts index ad058df0df..e03a3d3316 100644 --- a/packages/frontend/src/utility/room/objects/facialTissue.ts +++ b/packages/frontend/src/utility/room/objects/facialTissue.ts @@ -13,6 +13,7 @@ export const facialTissue = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/hangingTShirt.ts b/packages/frontend/src/utility/room/objects/hangingTShirt.ts index bf00961716..b6cff9c81d 100644 --- a/packages/frontend/src/utility/room/objects/hangingTShirt.ts +++ b/packages/frontend/src/utility/room/objects/hangingTShirt.ts @@ -13,6 +13,7 @@ export const hangingTShirt = defineObject({ default: {}, }, placement: 'side', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/icosahedron.ts b/packages/frontend/src/utility/room/objects/icosahedron.ts index 0f89007a74..7908716789 100644 --- a/packages/frontend/src/utility/room/objects/icosahedron.ts +++ b/packages/frontend/src/utility/room/objects/icosahedron.ts @@ -13,6 +13,7 @@ export const icosahedron = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/keyboard.ts b/packages/frontend/src/utility/room/objects/keyboard.ts index 5a10691a88..487be8f619 100644 --- a/packages/frontend/src/utility/room/objects/keyboard.ts +++ b/packages/frontend/src/utility/room/objects/keyboard.ts @@ -13,6 +13,7 @@ export const keyboard = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/laptopPc.ts b/packages/frontend/src/utility/room/objects/laptopPc.ts index bc723160f9..21b697ef74 100644 --- a/packages/frontend/src/utility/room/objects/laptopPc.ts +++ b/packages/frontend/src/utility/room/objects/laptopPc.ts @@ -54,6 +54,7 @@ export const laptopPc = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: async ({ room, scene, options, model }) => { const matrix = model.root.getWorldMatrix(true); const scale = new BABYLON.Vector3(); diff --git a/packages/frontend/src/utility/room/objects/lavaLamp.ts b/packages/frontend/src/utility/room/objects/lavaLamp.ts index 72cfd5857a..9b1af76a92 100644 --- a/packages/frontend/src/utility/room/objects/lavaLamp.ts +++ b/packages/frontend/src/utility/room/objects/lavaLamp.ts @@ -13,6 +13,7 @@ export const lavaLamp = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: ({ room, scene, root }) => { return { onInited: () => { diff --git a/packages/frontend/src/utility/room/objects/miPlate.ts b/packages/frontend/src/utility/room/objects/miPlate.ts index c92b420e0f..70b8264bbd 100644 --- a/packages/frontend/src/utility/room/objects/miPlate.ts +++ b/packages/frontend/src/utility/room/objects/miPlate.ts @@ -13,6 +13,7 @@ export const miPlate = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/miPlateDisplayed.ts b/packages/frontend/src/utility/room/objects/miPlateDisplayed.ts index e9780ea7d2..39addd75fc 100644 --- a/packages/frontend/src/utility/room/objects/miPlateDisplayed.ts +++ b/packages/frontend/src/utility/room/objects/miPlateDisplayed.ts @@ -13,6 +13,7 @@ export const miPlateDisplayed = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/milk.ts b/packages/frontend/src/utility/room/objects/milk.ts index 38ed82da03..16e8392358 100644 --- a/packages/frontend/src/utility/room/objects/milk.ts +++ b/packages/frontend/src/utility/room/objects/milk.ts @@ -13,6 +13,7 @@ export const milk = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/mixer.ts b/packages/frontend/src/utility/room/objects/mixer.ts index 6511a580b2..27e4b796d3 100644 --- a/packages/frontend/src/utility/room/objects/mixer.ts +++ b/packages/frontend/src/utility/room/objects/mixer.ts @@ -13,6 +13,7 @@ export const mixer = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/monitorSpeaker.ts b/packages/frontend/src/utility/room/objects/monitorSpeaker.ts index 7c5035f2b5..536617e231 100644 --- a/packages/frontend/src/utility/room/objects/monitorSpeaker.ts +++ b/packages/frontend/src/utility/room/objects/monitorSpeaker.ts @@ -21,6 +21,7 @@ export const monitorSpeaker = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ options, model }) => { const bodyMesh = model.findMesh('__X_BODY__'); const bodyMaterial = bodyMesh.material as BABYLON.PBRMaterial; diff --git a/packages/frontend/src/utility/room/objects/monstera.ts b/packages/frontend/src/utility/room/objects/monstera.ts index aa508072ef..f221be0ec4 100644 --- a/packages/frontend/src/utility/room/objects/monstera.ts +++ b/packages/frontend/src/utility/room/objects/monstera.ts @@ -13,6 +13,7 @@ export const monstera = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/mug.ts b/packages/frontend/src/utility/room/objects/mug.ts index a015c8f9f6..56d91a88c8 100644 --- a/packages/frontend/src/utility/room/objects/mug.ts +++ b/packages/frontend/src/utility/room/objects/mug.ts @@ -15,6 +15,7 @@ export const mug = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: ({ scene, root }) => { let yugeDispose: (() => void) | null = null; diff --git a/packages/frontend/src/utility/room/objects/newtonsCradle.ts b/packages/frontend/src/utility/room/objects/newtonsCradle.ts index 9ce7514b8d..5f009cdccb 100644 --- a/packages/frontend/src/utility/room/objects/newtonsCradle.ts +++ b/packages/frontend/src/utility/room/objects/newtonsCradle.ts @@ -21,6 +21,7 @@ export const newtonsCradle = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ options, model }) => { const frameMaterial = model.findMaterial('__X_FRAME__'); diff --git a/packages/frontend/src/utility/room/objects/petBottle.ts b/packages/frontend/src/utility/room/objects/petBottle.ts index ac3a1c7f04..d4d097c3dd 100644 --- a/packages/frontend/src/utility/room/objects/petBottle.ts +++ b/packages/frontend/src/utility/room/objects/petBottle.ts @@ -26,6 +26,7 @@ export const petBottle = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ model, options }) => { const capMesh = model.findMesh('__X_CAP__'); const liquidMesh = model.findMesh('__X_LIQUID__'); diff --git a/packages/frontend/src/utility/room/objects/pictureFrame.ts b/packages/frontend/src/utility/room/objects/pictureFrame.ts index 63f48d35f6..db48a2f3b7 100644 --- a/packages/frontend/src/utility/room/objects/pictureFrame.ts +++ b/packages/frontend/src/utility/room/objects/pictureFrame.ts @@ -83,6 +83,7 @@ export const pictureFrame = defineObject({ }, }, placement: 'side', + noCollisions: true, createInstance: async ({ scene, options, model }) => { const frameMesh = model.findMesh('__X_FRAME__'); frameMesh.rotationQuaternion = null; diff --git a/packages/frontend/src/utility/room/objects/pizza.ts b/packages/frontend/src/utility/room/objects/pizza.ts index 5b1635b7da..e840509203 100644 --- a/packages/frontend/src/utility/room/objects/pizza.ts +++ b/packages/frontend/src/utility/room/objects/pizza.ts @@ -13,6 +13,7 @@ export const pizza = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/plant.ts b/packages/frontend/src/utility/room/objects/plant.ts index 9bc54e73da..7c17e6a47d 100644 --- a/packages/frontend/src/utility/room/objects/plant.ts +++ b/packages/frontend/src/utility/room/objects/plant.ts @@ -13,6 +13,7 @@ export const plant = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/poster.ts b/packages/frontend/src/utility/room/objects/poster.ts index bd1b12dad4..c254a70ff3 100644 --- a/packages/frontend/src/utility/room/objects/poster.ts +++ b/packages/frontend/src/utility/room/objects/poster.ts @@ -48,6 +48,7 @@ export const poster = defineObject({ }, }, placement: 'side', + noCollisions: true, createInstance: async ({ scene, options, model }) => { const pictureMesh = model.findMesh('__X_PICTURE__'); pictureMesh.rotationQuaternion = null; diff --git a/packages/frontend/src/utility/room/objects/powerStrip.ts b/packages/frontend/src/utility/room/objects/powerStrip.ts index e5ad749db0..900d894c88 100644 --- a/packages/frontend/src/utility/room/objects/powerStrip.ts +++ b/packages/frontend/src/utility/room/objects/powerStrip.ts @@ -13,6 +13,7 @@ export const powerStrip = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/radiometer.ts b/packages/frontend/src/utility/room/objects/radiometer.ts index 875be5f1d6..da88c55d3f 100644 --- a/packages/frontend/src/utility/room/objects/radiometer.ts +++ b/packages/frontend/src/utility/room/objects/radiometer.ts @@ -14,6 +14,7 @@ export const radiometer = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: ({ scene, model }) => { const vanes = model.findTransformNode('__X_VANES__'); model.bakeExcludeMeshes = [...vanes.getChildMeshes()]; diff --git a/packages/frontend/src/utility/room/objects/randomBooks.ts b/packages/frontend/src/utility/room/objects/randomBooks.ts index 93c0be7eb6..ed64cf1bbd 100644 --- a/packages/frontend/src/utility/room/objects/randomBooks.ts +++ b/packages/frontend/src/utility/room/objects/randomBooks.ts @@ -42,6 +42,7 @@ export const randomBooks = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ options, model, scene, id }) => { const bodyMesh = model.findMesh('__X_BODY__'); const tex = new BABYLON.Texture('/client-assets/room/objects/random-books/texture.png', scene, { diff --git a/packages/frontend/src/utility/room/objects/rolledUpPoster.ts b/packages/frontend/src/utility/room/objects/rolledUpPoster.ts index b67eb22b52..c34121dfd0 100644 --- a/packages/frontend/src/utility/room/objects/rolledUpPoster.ts +++ b/packages/frontend/src/utility/room/objects/rolledUpPoster.ts @@ -13,6 +13,7 @@ export const rolledUpPoster = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/roundRug.ts b/packages/frontend/src/utility/room/objects/roundRug.ts index 8b4c1f589b..49edc789ba 100644 --- a/packages/frontend/src/utility/room/objects/roundRug.ts +++ b/packages/frontend/src/utility/room/objects/roundRug.ts @@ -13,6 +13,7 @@ export const roundRug = defineObject({ default: {}, }, placement: 'floor', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/router.ts b/packages/frontend/src/utility/room/objects/router.ts index 5542b482a9..eeb7242b49 100644 --- a/packages/frontend/src/utility/room/objects/router.ts +++ b/packages/frontend/src/utility/room/objects/router.ts @@ -13,6 +13,7 @@ export const router = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/siphon.ts b/packages/frontend/src/utility/room/objects/siphon.ts index 1f716a7c11..c152e3c9e9 100644 --- a/packages/frontend/src/utility/room/objects/siphon.ts +++ b/packages/frontend/src/utility/room/objects/siphon.ts @@ -13,6 +13,7 @@ export const siphon = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/snakeplant.ts b/packages/frontend/src/utility/room/objects/snakeplant.ts index e0654cc92a..87dc8f5034 100644 --- a/packages/frontend/src/utility/room/objects/snakeplant.ts +++ b/packages/frontend/src/utility/room/objects/snakeplant.ts @@ -13,6 +13,7 @@ export const snakeplant = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/speaker.ts b/packages/frontend/src/utility/room/objects/speaker.ts index afb3a60fd1..4851766166 100644 --- a/packages/frontend/src/utility/room/objects/speaker.ts +++ b/packages/frontend/src/utility/room/objects/speaker.ts @@ -26,6 +26,7 @@ export const speaker = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ options, model }) => { const outerMesh = model.findMesh('__X_COVER__'); const outerMaterial = outerMesh.material as BABYLON.PBRMaterial; diff --git a/packages/frontend/src/utility/room/objects/sprayer.ts b/packages/frontend/src/utility/room/objects/sprayer.ts index 1b459ff65b..d79b24c0bd 100644 --- a/packages/frontend/src/utility/room/objects/sprayer.ts +++ b/packages/frontend/src/utility/room/objects/sprayer.ts @@ -13,6 +13,7 @@ export const sprayer = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/tabletopCalendar.ts b/packages/frontend/src/utility/room/objects/tabletopCalendar.ts index d060bff0c1..725bc2dc5d 100644 --- a/packages/frontend/src/utility/room/objects/tabletopCalendar.ts +++ b/packages/frontend/src/utility/room/objects/tabletopCalendar.ts @@ -13,6 +13,7 @@ export const tabletopCalendar = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts b/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts index 1f0bbcf60b..cd389846b5 100644 --- a/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts +++ b/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts @@ -33,6 +33,7 @@ export const tabletopDigitalClock = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ root, room, options, model, scene }) => { const light = new BABYLON.SpotLight('', new BABYLON.Vector3(0, 3/*cm*/, 1/*cm*/), new BABYLON.Vector3(0, 0, 1), Math.PI / 1, 2, scene, room?.lightContainer != null); light.parent = root; diff --git a/packages/frontend/src/utility/room/objects/tabletopFlag.ts b/packages/frontend/src/utility/room/objects/tabletopFlag.ts index 27c4f2342f..3933b205f4 100644 --- a/packages/frontend/src/utility/room/objects/tabletopFlag.ts +++ b/packages/frontend/src/utility/room/objects/tabletopFlag.ts @@ -28,6 +28,7 @@ export const tabletopFlag = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: async ({ model, options, scene }) => { const flagMesh = model.findMesh('__X_FLAG__'); const flagMaterial = model.findMaterial('__X_FLAG__'); diff --git a/packages/frontend/src/utility/room/objects/tabletopGlassPictureFrame.ts b/packages/frontend/src/utility/room/objects/tabletopGlassPictureFrame.ts index 99bd171a57..3f45044eb0 100644 --- a/packages/frontend/src/utility/room/objects/tabletopGlassPictureFrame.ts +++ b/packages/frontend/src/utility/room/objects/tabletopGlassPictureFrame.ts @@ -48,6 +48,7 @@ export const tabletopGlassPictureFrame = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: async ({ scene, options, model }) => { const pictureMesh = model.findMesh('__X_PICTURE__'); const frameMesh = model.findMesh('__X_FRAME__'); diff --git a/packages/frontend/src/utility/room/objects/tabletopIronFrameStand.ts b/packages/frontend/src/utility/room/objects/tabletopIronFrameStand.ts index 7f9129be26..72a30cca9d 100644 --- a/packages/frontend/src/utility/room/objects/tabletopIronFrameStand.ts +++ b/packages/frontend/src/utility/room/objects/tabletopIronFrameStand.ts @@ -50,6 +50,7 @@ export const tabletopIronFrameStand = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: ({ options, model }) => { const frameMaterial = model.findMaterial('__X_FRAME__'); const boardMaterial = model.findMaterial('__X_BOARD__'); diff --git a/packages/frontend/src/utility/room/objects/tabletopPictureFrame.ts b/packages/frontend/src/utility/room/objects/tabletopPictureFrame.ts index b09e04dfdd..340dc8256f 100644 --- a/packages/frontend/src/utility/room/objects/tabletopPictureFrame.ts +++ b/packages/frontend/src/utility/room/objects/tabletopPictureFrame.ts @@ -83,6 +83,7 @@ export const tabletopPictureFrame = defineObject({ }, }, placement: 'top', + noCollisions: true, createInstance: async ({ scene, options, model }) => { const frameMesh = model.findMesh('__X_FRAME__'); frameMesh.rotationQuaternion = null; diff --git a/packages/frontend/src/utility/room/objects/tapestry.ts b/packages/frontend/src/utility/room/objects/tapestry.ts index 8e21dc82f7..a939988a22 100644 --- a/packages/frontend/src/utility/room/objects/tapestry.ts +++ b/packages/frontend/src/utility/room/objects/tapestry.ts @@ -48,6 +48,7 @@ export const tapestry = defineObject({ }, }, placement: 'side', + noCollisions: true, createInstance: async ({ scene, options, model }) => { const pictureMesh = model.findMesh('__X_PICTURE__'); pictureMesh.rotationQuaternion = null; diff --git a/packages/frontend/src/utility/room/objects/tetrapod.ts b/packages/frontend/src/utility/room/objects/tetrapod.ts index 5a680f9259..770ccfc2c3 100644 --- a/packages/frontend/src/utility/room/objects/tetrapod.ts +++ b/packages/frontend/src/utility/room/objects/tetrapod.ts @@ -13,6 +13,7 @@ export const tetrapod = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/twistedCubeObjet.ts b/packages/frontend/src/utility/room/objects/twistedCubeObjet.ts index 937ca1afa4..fe6ded512d 100644 --- a/packages/frontend/src/utility/room/objects/twistedCubeObjet.ts +++ b/packages/frontend/src/utility/room/objects/twistedCubeObjet.ts @@ -13,6 +13,7 @@ export const twistedCubeObjet = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/usedTissue.ts b/packages/frontend/src/utility/room/objects/usedTissue.ts index 1fe27f6506..73fe0a51ac 100644 --- a/packages/frontend/src/utility/room/objects/usedTissue.ts +++ b/packages/frontend/src/utility/room/objects/usedTissue.ts @@ -13,6 +13,7 @@ export const usedTissue = defineObject({ default: {}, }, placement: 'top', + noCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/wallCanvas.ts b/packages/frontend/src/utility/room/objects/wallCanvas.ts index 6c1e9dc61d..063938f3a3 100644 --- a/packages/frontend/src/utility/room/objects/wallCanvas.ts +++ b/packages/frontend/src/utility/room/objects/wallCanvas.ts @@ -44,6 +44,7 @@ export const wallCanvas = defineObject({ }, }, placement: 'side', + noCollisions: true, createInstance: async ({ scene, options, model }) => { const canvasMesh = model.findMesh('__X_CANVAS__'); canvasMesh.rotationQuaternion = null; diff --git a/packages/frontend/src/utility/room/objects/wallClock.ts b/packages/frontend/src/utility/room/objects/wallClock.ts index bd7db58f30..e5a5d7dad0 100644 --- a/packages/frontend/src/utility/room/objects/wallClock.ts +++ b/packages/frontend/src/utility/room/objects/wallClock.ts @@ -21,6 +21,7 @@ export const wallClock = defineObject({ }, }, placement: 'side', + noCollisions: true, createInstance: ({ room, root, options, model }) => { const hourHand = model.findMesh('HandH'); const minuteHand = model.findMesh('HandM'); diff --git a/packages/frontend/src/utility/room/objects/wallGlassPictureFrame.ts b/packages/frontend/src/utility/room/objects/wallGlassPictureFrame.ts index 88aac4548c..ac8b43f457 100644 --- a/packages/frontend/src/utility/room/objects/wallGlassPictureFrame.ts +++ b/packages/frontend/src/utility/room/objects/wallGlassPictureFrame.ts @@ -48,6 +48,7 @@ export const wallGlassPictureFrame = defineObject({ }, }, placement: 'wall', + noCollisions: true, createInstance: async ({ scene, options, model }) => { const pictureMesh = model.findMesh('__X_PICTURE__'); const frameMesh = model.findMesh('__X_FRAME__'); diff --git a/packages/frontend/src/utility/room/objects/wallMirror.ts b/packages/frontend/src/utility/room/objects/wallMirror.ts index b9513e8f5e..3745bd11e4 100644 --- a/packages/frontend/src/utility/room/objects/wallMirror.ts +++ b/packages/frontend/src/utility/room/objects/wallMirror.ts @@ -45,6 +45,7 @@ export const wallMirror = defineObject({ }, }, placement: 'side', + noCollisions: true, createInstance: async ({ options, model }) => { const frameMaterial = model.findMaterial('__X_FRAME__'); const frameMesh = model.findMesh('__X_FRAME__'); diff --git a/packages/frontend/src/utility/room/objects/woodRingsPendantLight.ts b/packages/frontend/src/utility/room/objects/woodRingsPendantLight.ts index 54fb905109..f6ea433d50 100644 --- a/packages/frontend/src/utility/room/objects/woodRingsPendantLight.ts +++ b/packages/frontend/src/utility/room/objects/woodRingsPendantLight.ts @@ -51,6 +51,7 @@ export const woodRingsPendantLight = defineObject({ }, }, placement: 'ceiling', + noCollisions: true, createInstance: ({ room, scene, options, model }) => { const shadeMaterial = model.findMaterial('__X_SHADE__'); diff --git a/packages/frontend/src/utility/room/objects/woodSoundAbsorbingPanel.ts b/packages/frontend/src/utility/room/objects/woodSoundAbsorbingPanel.ts index d9762c1fa9..5837eb08b6 100644 --- a/packages/frontend/src/utility/room/objects/woodSoundAbsorbingPanel.ts +++ b/packages/frontend/src/utility/room/objects/woodSoundAbsorbingPanel.ts @@ -13,6 +13,7 @@ export const woodSoundAbsorbingPanel = defineObject({ default: {}, }, placement: 'side', + noCollisions: true, createInstance: () => { return { interactions: {},