diff --git a/packages/frontend/src/utility/room/engine.ts b/packages/frontend/src/utility/room/engine.ts index 228ae2ca24..d6e6fa2834 100644 --- a/packages/frontend/src/utility/room/engine.ts +++ b/packages/frontend/src/utility/room/engine.ts @@ -337,7 +337,7 @@ export type ObjectDef = { default: GetOptionsSchemaValues; }; placement: 'top' | 'side' | 'bottom' | 'wall' | 'ceiling' | 'floor'; - noCollisions?: boolean; + hasCollisions?: boolean; //groupingMeshes: string[]; // multi-materialなメッシュは複数のメッシュに分割されるが、それだと不便な場合に追加の親メッシュでグルーピングするための指定 isChair?: boolean; treatLoaderResult?: (loaderResult: BABYLON.AssetContainer) => void; @@ -379,43 +379,14 @@ function getMeshesBoundingBox(meshes: BABYLON.Mesh[]): BABYLON.BoundingBox { } function enableObjectCollision(meshes: BABYLON.Mesh[]) { - let hasCollisionMesh = false; for (const mesh of meshes) { if (mesh.name.includes('__COLLISION__')) { - hasCollisionMesh = true; - break; + mesh.checkCollisions = true; + //mesh.isVisible = true; // debug + } else { + mesh.checkCollisions = false; } } - - if (hasCollisionMesh) { - for (const mesh of meshes) { - if (mesh.name.includes('__COLLISION__')) { - mesh.checkCollisions = true; - //mesh.isVisible = true; // debug - } else { - mesh.checkCollisions = 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; - } } export type RoomEngineEvents = { @@ -1191,7 +1162,6 @@ export class RoomEngine extends EventEmitter { 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); @@ -1402,7 +1372,7 @@ export class RoomEngine extends EventEmitter { if (!this.scene.meshes.includes(mesh)) this.scene.addMesh(mesh); } - if (!collisionsDisabled) { + if (def.hasCollisions) { enableObjectCollision(meshes); } }); @@ -1442,7 +1412,7 @@ export class RoomEngine extends EventEmitter { model.bakeMesh(); - if (!collisionsDisabled) { + if (def.hasCollisions) { enableObjectCollision(root.getChildMeshes()); } @@ -1710,7 +1680,6 @@ export class RoomEngine extends EventEmitter { const id = genId(); const def = getObjectDef(type); - const collisionsDisabled = def.placement === 'ceiling' || def.noCollisions; const options = deepClone(def.options.default); @@ -1750,7 +1719,7 @@ export class RoomEngine extends EventEmitter { // todo }, onDone: () => { // todo: sticky状態などを引数でもらうようにしたい - if (!collisionsDisabled) { + if (def.hasCollisions) { enableObjectCollision(root.getChildMeshes()); } diff --git a/packages/frontend/src/utility/room/objects/a4Case.ts b/packages/frontend/src/utility/room/objects/a4Case.ts index 61d9d3055b..3b5c89808b 100644 --- a/packages/frontend/src/utility/room/objects/a4Case.ts +++ b/packages/frontend/src/utility/room/objects/a4Case.ts @@ -21,7 +21,7 @@ export const a4Case = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 8b8b6dc08a..547a72da0e 100644 --- a/packages/frontend/src/utility/room/objects/aircon.ts +++ b/packages/frontend/src/utility/room/objects/aircon.ts @@ -13,7 +13,7 @@ export const aircon = defineObject({ default: {}, }, placement: 'wall', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/aquarium.ts b/packages/frontend/src/utility/room/objects/aquarium.ts index 281b849edf..4f9c861edf 100644 --- a/packages/frontend/src/utility/room/objects/aquarium.ts +++ b/packages/frontend/src/utility/room/objects/aquarium.ts @@ -15,7 +15,7 @@ export const aquarium = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 ff595ffa0c..c961efa206 100644 --- a/packages/frontend/src/utility/room/objects/aromaReedDiffuser.ts +++ b/packages/frontend/src/utility/room/objects/aromaReedDiffuser.ts @@ -26,7 +26,7 @@ export const aromaReedDiffuser = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 f3fea3ad15..99d0734d24 100644 --- a/packages/frontend/src/utility/room/objects/banknote.ts +++ b/packages/frontend/src/utility/room/objects/banknote.ts @@ -13,7 +13,7 @@ export const banknote = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/beamLamp.ts b/packages/frontend/src/utility/room/objects/beamLamp.ts index baca974372..1011532da3 100644 --- a/packages/frontend/src/utility/room/objects/beamLamp.ts +++ b/packages/frontend/src/utility/room/objects/beamLamp.ts @@ -15,7 +15,7 @@ export const beamLamp = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: ({ room, root, scene }) => { return { onInited: () => { diff --git a/packages/frontend/src/utility/room/objects/bed.ts b/packages/frontend/src/utility/room/objects/bed.ts index 43132a5f0b..f7566912cb 100644 --- a/packages/frontend/src/utility/room/objects/bed.ts +++ b/packages/frontend/src/utility/room/objects/bed.ts @@ -21,6 +21,7 @@ export const bed = defineObject({ }, }, placement: 'floor', + hasCollisions: 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/blind.ts b/packages/frontend/src/utility/room/objects/blind.ts index 7fd749d054..c0e7351b52 100644 --- a/packages/frontend/src/utility/room/objects/blind.ts +++ b/packages/frontend/src/utility/room/objects/blind.ts @@ -40,7 +40,7 @@ export const blind = defineObject({ }, }, placement: 'bottom', - noCollisions: true, + hasCollisions: false, 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 a7c36f02ec..acb804c925 100644 --- a/packages/frontend/src/utility/room/objects/book.ts +++ b/packages/frontend/src/utility/room/objects/book.ts @@ -45,7 +45,7 @@ export const book = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 f8d41cfa06..29e5a36f02 100644 --- a/packages/frontend/src/utility/room/objects/books.ts +++ b/packages/frontend/src/utility/room/objects/books.ts @@ -23,7 +23,7 @@ export const books = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 0caf59b5b6..9e7867aab7 100644 --- a/packages/frontend/src/utility/room/objects/cactusS.ts +++ b/packages/frontend/src/utility/room/objects/cactusS.ts @@ -21,7 +21,7 @@ export const cactusS = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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/cardboardBox.ts b/packages/frontend/src/utility/room/objects/cardboardBox.ts index 88e83f5a35..2b93c4311f 100644 --- a/packages/frontend/src/utility/room/objects/cardboardBox.ts +++ b/packages/frontend/src/utility/room/objects/cardboardBox.ts @@ -22,6 +22,7 @@ export const cardboardBox = defineObject({ }, }, placement: 'top', + hasCollisions: true, createInstance: ({ scene, options, model }) => { return { onInited: () => { diff --git a/packages/frontend/src/utility/room/objects/ceilingFanLight.ts b/packages/frontend/src/utility/room/objects/ceilingFanLight.ts index 93b8d38986..aa7631cf4a 100644 --- a/packages/frontend/src/utility/room/objects/ceilingFanLight.ts +++ b/packages/frontend/src/utility/room/objects/ceilingFanLight.ts @@ -14,7 +14,7 @@ export const ceilingFanLight = defineObject({ default: {}, }, placement: 'ceiling', - noCollisions: true, + hasCollisions: false, receiveShadows: false, castShadows: false, createInstance: ({ scene, model }) => { diff --git a/packages/frontend/src/utility/room/objects/chair.ts b/packages/frontend/src/utility/room/objects/chair.ts index 48c0027245..e8a43c0ae3 100644 --- a/packages/frontend/src/utility/room/objects/chair.ts +++ b/packages/frontend/src/utility/room/objects/chair.ts @@ -26,6 +26,7 @@ export const chair = defineObject({ }, }, placement: 'floor', + hasCollisions: true, isChair: true, createInstance: ({ model, options }) => { const primaryMesh = model.findMesh('__X_PRIMARY__'); diff --git a/packages/frontend/src/utility/room/objects/coffeeCup.ts b/packages/frontend/src/utility/room/objects/coffeeCup.ts index 450bb4e1e3..857824480a 100644 --- a/packages/frontend/src/utility/room/objects/coffeeCup.ts +++ b/packages/frontend/src/utility/room/objects/coffeeCup.ts @@ -13,7 +13,7 @@ export const coffeeCup = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/colorBox.ts b/packages/frontend/src/utility/room/objects/colorBox.ts index 8361c2399d..1ac9008708 100644 --- a/packages/frontend/src/utility/room/objects/colorBox.ts +++ b/packages/frontend/src/utility/room/objects/colorBox.ts @@ -21,6 +21,7 @@ export const colorBox = defineObject({ }, }, placement: 'floor', + hasCollisions: 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/cupNoodle.ts b/packages/frontend/src/utility/room/objects/cupNoodle.ts index 16b4092590..aa89b6706d 100644 --- a/packages/frontend/src/utility/room/objects/cupNoodle.ts +++ b/packages/frontend/src/utility/room/objects/cupNoodle.ts @@ -15,7 +15,7 @@ export const cupNoodle = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 92232872b0..743a5449bf 100644 --- a/packages/frontend/src/utility/room/objects/custardPudding.ts +++ b/packages/frontend/src/utility/room/objects/custardPudding.ts @@ -13,7 +13,7 @@ export const custardPudding = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/desk.ts b/packages/frontend/src/utility/room/objects/desk.ts index 5e6b9d3820..a166d96c9d 100644 --- a/packages/frontend/src/utility/room/objects/desk.ts +++ b/packages/frontend/src/utility/room/objects/desk.ts @@ -42,6 +42,7 @@ export const desk = defineObject({ }, }, placement: 'floor', + hasCollisions: 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/desktopPc.ts b/packages/frontend/src/utility/room/objects/desktopPc.ts index dd6c82ec3d..320b96d359 100644 --- a/packages/frontend/src/utility/room/objects/desktopPc.ts +++ b/packages/frontend/src/utility/room/objects/desktopPc.ts @@ -47,6 +47,7 @@ export const desktopPc = defineObject({ }, }, placement: 'top', + hasCollisions: true, createInstance: ({ options, model, root, scene, room }) => { const light1 = new BABYLON.SpotLight('', new BABYLON.Vector3(0, cm(10), cm(22)), new BABYLON.Vector3(0, 0, 1), Math.PI / 1, 2, scene, room?.lightContainer != null); light1.parent = root; diff --git a/packages/frontend/src/utility/room/objects/djMixer.ts b/packages/frontend/src/utility/room/objects/djMixer.ts index f82424a4cd..57089a9a7c 100644 --- a/packages/frontend/src/utility/room/objects/djMixer.ts +++ b/packages/frontend/src/utility/room/objects/djMixer.ts @@ -13,7 +13,7 @@ export const djMixer = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/djPlayer.ts b/packages/frontend/src/utility/room/objects/djPlayer.ts index fd658d6bc8..6e17e5b94e 100644 --- a/packages/frontend/src/utility/room/objects/djPlayer.ts +++ b/packages/frontend/src/utility/room/objects/djPlayer.ts @@ -36,7 +36,7 @@ export const djPlayer = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 cdd0d805c3..356605fb22 100644 --- a/packages/frontend/src/utility/room/objects/ductTape.ts +++ b/packages/frontend/src/utility/room/objects/ductTape.ts @@ -13,7 +13,7 @@ export const ductTape = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/emptyBento.ts b/packages/frontend/src/utility/room/objects/emptyBento.ts index e48902776e..51b176c6c5 100644 --- a/packages/frontend/src/utility/room/objects/emptyBento.ts +++ b/packages/frontend/src/utility/room/objects/emptyBento.ts @@ -13,7 +13,7 @@ export const emptyBento = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/energyDrink.ts b/packages/frontend/src/utility/room/objects/energyDrink.ts index 7d047a1072..626d936033 100644 --- a/packages/frontend/src/utility/room/objects/energyDrink.ts +++ b/packages/frontend/src/utility/room/objects/energyDrink.ts @@ -13,7 +13,7 @@ export const energyDrink = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/envelope.ts b/packages/frontend/src/utility/room/objects/envelope.ts index a30fec6ebb..1143d6ccdd 100644 --- a/packages/frontend/src/utility/room/objects/envelope.ts +++ b/packages/frontend/src/utility/room/objects/envelope.ts @@ -13,7 +13,7 @@ export const envelope = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/facialTissue.ts b/packages/frontend/src/utility/room/objects/facialTissue.ts index e03a3d3316..a747afd572 100644 --- a/packages/frontend/src/utility/room/objects/facialTissue.ts +++ b/packages/frontend/src/utility/room/objects/facialTissue.ts @@ -13,7 +13,7 @@ export const facialTissue = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/hangingTShirt.ts b/packages/frontend/src/utility/room/objects/hangingTShirt.ts index b6cff9c81d..ebcfffb4f8 100644 --- a/packages/frontend/src/utility/room/objects/hangingTShirt.ts +++ b/packages/frontend/src/utility/room/objects/hangingTShirt.ts @@ -13,7 +13,7 @@ export const hangingTShirt = defineObject({ default: {}, }, placement: 'side', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/icosahedron.ts b/packages/frontend/src/utility/room/objects/icosahedron.ts index 7908716789..69bb62b1b0 100644 --- a/packages/frontend/src/utility/room/objects/icosahedron.ts +++ b/packages/frontend/src/utility/room/objects/icosahedron.ts @@ -13,7 +13,7 @@ export const icosahedron = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/ironFrameShelf.ts b/packages/frontend/src/utility/room/objects/ironFrameShelf.ts index 321895dfa9..0df184942a 100644 --- a/packages/frontend/src/utility/room/objects/ironFrameShelf.ts +++ b/packages/frontend/src/utility/room/objects/ironFrameShelf.ts @@ -32,6 +32,7 @@ const base = defineObjectClass({ }, }, placement: 'floor', + hasCollisions: 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/ironFrameTable.ts b/packages/frontend/src/utility/room/objects/ironFrameTable.ts index 55b661f9ee..0a32d685ce 100644 --- a/packages/frontend/src/utility/room/objects/ironFrameTable.ts +++ b/packages/frontend/src/utility/room/objects/ironFrameTable.ts @@ -50,6 +50,7 @@ export const ironFrameTable = defineObject({ }, }, placement: 'top', + hasCollisions: true, createInstance: ({ options, model, stickyMarkerMeshUpdated }) => { const frameMaterial = model.findMaterial('__X_FRAME__'); const boardMaterial = model.findMaterial('__X_BOARD__'); diff --git a/packages/frontend/src/utility/room/objects/keyboard.ts b/packages/frontend/src/utility/room/objects/keyboard.ts index 487be8f619..8e5095b4ab 100644 --- a/packages/frontend/src/utility/room/objects/keyboard.ts +++ b/packages/frontend/src/utility/room/objects/keyboard.ts @@ -13,7 +13,7 @@ export const keyboard = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/laptopPc.ts b/packages/frontend/src/utility/room/objects/laptopPc.ts index 02a0a38172..030252294d 100644 --- a/packages/frontend/src/utility/room/objects/laptopPc.ts +++ b/packages/frontend/src/utility/room/objects/laptopPc.ts @@ -54,7 +54,7 @@ export const laptopPc = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 7bb5041ba1..a36538ef6f 100644 --- a/packages/frontend/src/utility/room/objects/lavaLamp.ts +++ b/packages/frontend/src/utility/room/objects/lavaLamp.ts @@ -14,7 +14,7 @@ export const lavaLamp = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 70b8264bbd..5dc451bbe8 100644 --- a/packages/frontend/src/utility/room/objects/miPlate.ts +++ b/packages/frontend/src/utility/room/objects/miPlate.ts @@ -13,7 +13,7 @@ export const miPlate = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/miPlateDisplayed.ts b/packages/frontend/src/utility/room/objects/miPlateDisplayed.ts index 39addd75fc..63329511ee 100644 --- a/packages/frontend/src/utility/room/objects/miPlateDisplayed.ts +++ b/packages/frontend/src/utility/room/objects/miPlateDisplayed.ts @@ -13,7 +13,7 @@ export const miPlateDisplayed = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/milk.ts b/packages/frontend/src/utility/room/objects/milk.ts index 16e8392358..bbd4b14975 100644 --- a/packages/frontend/src/utility/room/objects/milk.ts +++ b/packages/frontend/src/utility/room/objects/milk.ts @@ -13,7 +13,7 @@ export const milk = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/mixer.ts b/packages/frontend/src/utility/room/objects/mixer.ts index 27e4b796d3..d0d2f95e2f 100644 --- a/packages/frontend/src/utility/room/objects/mixer.ts +++ b/packages/frontend/src/utility/room/objects/mixer.ts @@ -13,7 +13,7 @@ export const mixer = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/monitorSpeaker.ts b/packages/frontend/src/utility/room/objects/monitorSpeaker.ts index 536617e231..3cb8a589cb 100644 --- a/packages/frontend/src/utility/room/objects/monitorSpeaker.ts +++ b/packages/frontend/src/utility/room/objects/monitorSpeaker.ts @@ -21,7 +21,7 @@ export const monitorSpeaker = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 f221be0ec4..1b0447ce0d 100644 --- a/packages/frontend/src/utility/room/objects/monstera.ts +++ b/packages/frontend/src/utility/room/objects/monstera.ts @@ -13,7 +13,7 @@ export const monstera = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/mug.ts b/packages/frontend/src/utility/room/objects/mug.ts index b3c3bc4d3e..b6a0f3d4c4 100644 --- a/packages/frontend/src/utility/room/objects/mug.ts +++ b/packages/frontend/src/utility/room/objects/mug.ts @@ -15,7 +15,7 @@ export const mug = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 5f009cdccb..9d08c2f61a 100644 --- a/packages/frontend/src/utility/room/objects/newtonsCradle.ts +++ b/packages/frontend/src/utility/room/objects/newtonsCradle.ts @@ -21,7 +21,7 @@ export const newtonsCradle = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: ({ options, model }) => { const frameMaterial = model.findMaterial('__X_FRAME__'); diff --git a/packages/frontend/src/utility/room/objects/pachira.ts b/packages/frontend/src/utility/room/objects/pachira.ts index 9e69dc5039..3d627b4756 100644 --- a/packages/frontend/src/utility/room/objects/pachira.ts +++ b/packages/frontend/src/utility/room/objects/pachira.ts @@ -13,6 +13,7 @@ export const pachira = defineObject({ default: {}, }, placement: 'top', + hasCollisions: true, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/petBottle.ts b/packages/frontend/src/utility/room/objects/petBottle.ts index d4d097c3dd..f8d3d7ac3b 100644 --- a/packages/frontend/src/utility/room/objects/petBottle.ts +++ b/packages/frontend/src/utility/room/objects/petBottle.ts @@ -26,7 +26,7 @@ export const petBottle = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: ({ model, options }) => { const capMesh = model.findMesh('__X_CAP__'); const liquidMesh = model.findMesh('__X_LIQUID__'); diff --git a/packages/frontend/src/utility/room/objects/piano.ts b/packages/frontend/src/utility/room/objects/piano.ts index 2877f08f60..992650f0f4 100644 --- a/packages/frontend/src/utility/room/objects/piano.ts +++ b/packages/frontend/src/utility/room/objects/piano.ts @@ -21,6 +21,7 @@ export const piano = defineObject({ }, }, placement: 'floor', + hasCollisions: true, createInstance: ({ options, model }) => { const bodyMaterial = model.findMaterial('__X_BODY__'); diff --git a/packages/frontend/src/utility/room/objects/pictureFrame.ts b/packages/frontend/src/utility/room/objects/pictureFrame.ts index db48a2f3b7..265f056958 100644 --- a/packages/frontend/src/utility/room/objects/pictureFrame.ts +++ b/packages/frontend/src/utility/room/objects/pictureFrame.ts @@ -83,7 +83,7 @@ export const pictureFrame = defineObject({ }, }, placement: 'side', - noCollisions: true, + hasCollisions: false, 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 e840509203..22827503f0 100644 --- a/packages/frontend/src/utility/room/objects/pizza.ts +++ b/packages/frontend/src/utility/room/objects/pizza.ts @@ -13,7 +13,7 @@ export const pizza = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/plant.ts b/packages/frontend/src/utility/room/objects/plant.ts index 7c17e6a47d..a6f1948290 100644 --- a/packages/frontend/src/utility/room/objects/plant.ts +++ b/packages/frontend/src/utility/room/objects/plant.ts @@ -13,7 +13,7 @@ export const plant = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/poster.ts b/packages/frontend/src/utility/room/objects/poster.ts index c254a70ff3..23578d4b45 100644 --- a/packages/frontend/src/utility/room/objects/poster.ts +++ b/packages/frontend/src/utility/room/objects/poster.ts @@ -48,7 +48,7 @@ export const poster = defineObject({ }, }, placement: 'side', - noCollisions: true, + hasCollisions: false, 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 900d894c88..275bddfaf8 100644 --- a/packages/frontend/src/utility/room/objects/powerStrip.ts +++ b/packages/frontend/src/utility/room/objects/powerStrip.ts @@ -13,7 +13,7 @@ export const powerStrip = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/radiometer.ts b/packages/frontend/src/utility/room/objects/radiometer.ts index da88c55d3f..60a689bf7e 100644 --- a/packages/frontend/src/utility/room/objects/radiometer.ts +++ b/packages/frontend/src/utility/room/objects/radiometer.ts @@ -14,7 +14,7 @@ export const radiometer = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 ed64cf1bbd..63f3dbfb93 100644 --- a/packages/frontend/src/utility/room/objects/randomBooks.ts +++ b/packages/frontend/src/utility/room/objects/randomBooks.ts @@ -42,7 +42,7 @@ export const randomBooks = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 c34121dfd0..df077abfd6 100644 --- a/packages/frontend/src/utility/room/objects/rolledUpPoster.ts +++ b/packages/frontend/src/utility/room/objects/rolledUpPoster.ts @@ -13,7 +13,7 @@ export const rolledUpPoster = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/roundRug.ts b/packages/frontend/src/utility/room/objects/roundRug.ts index 49edc789ba..ac3a246b2f 100644 --- a/packages/frontend/src/utility/room/objects/roundRug.ts +++ b/packages/frontend/src/utility/room/objects/roundRug.ts @@ -13,7 +13,7 @@ export const roundRug = defineObject({ default: {}, }, placement: 'floor', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/router.ts b/packages/frontend/src/utility/room/objects/router.ts index eeb7242b49..d7cabf38ec 100644 --- a/packages/frontend/src/utility/room/objects/router.ts +++ b/packages/frontend/src/utility/room/objects/router.ts @@ -13,7 +13,7 @@ export const router = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/siphon.ts b/packages/frontend/src/utility/room/objects/siphon.ts index c152e3c9e9..929ee0f3ca 100644 --- a/packages/frontend/src/utility/room/objects/siphon.ts +++ b/packages/frontend/src/utility/room/objects/siphon.ts @@ -13,7 +13,7 @@ export const siphon = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/snakeplant.ts b/packages/frontend/src/utility/room/objects/snakeplant.ts index 87dc8f5034..486b894cef 100644 --- a/packages/frontend/src/utility/room/objects/snakeplant.ts +++ b/packages/frontend/src/utility/room/objects/snakeplant.ts @@ -13,7 +13,7 @@ export const snakeplant = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/speaker.ts b/packages/frontend/src/utility/room/objects/speaker.ts index 4851766166..369bb8e85a 100644 --- a/packages/frontend/src/utility/room/objects/speaker.ts +++ b/packages/frontend/src/utility/room/objects/speaker.ts @@ -26,7 +26,7 @@ export const speaker = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 d79b24c0bd..4e02c049df 100644 --- a/packages/frontend/src/utility/room/objects/sprayer.ts +++ b/packages/frontend/src/utility/room/objects/sprayer.ts @@ -13,7 +13,7 @@ export const sprayer = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/steelRack.ts b/packages/frontend/src/utility/room/objects/steelRack.ts index b2d1420af5..0514e0417e 100644 --- a/packages/frontend/src/utility/room/objects/steelRack.ts +++ b/packages/frontend/src/utility/room/objects/steelRack.ts @@ -13,6 +13,7 @@ export const steelRack = defineObject({ default: {}, }, placement: 'floor', + hasCollisions: 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 725bc2dc5d..6bcb7b7441 100644 --- a/packages/frontend/src/utility/room/objects/tabletopCalendar.ts +++ b/packages/frontend/src/utility/room/objects/tabletopCalendar.ts @@ -13,7 +13,7 @@ export const tabletopCalendar = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts b/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts index 42faf48774..5fddcf8e12 100644 --- a/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts +++ b/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts @@ -33,7 +33,7 @@ export const tabletopDigitalClock = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: ({ root, room, options, model, scene }) => { const light = new BABYLON.SpotLight('', new BABYLON.Vector3(0, cm(3), cm(1)), 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 3933b205f4..92b7ec8812 100644 --- a/packages/frontend/src/utility/room/objects/tabletopFlag.ts +++ b/packages/frontend/src/utility/room/objects/tabletopFlag.ts @@ -28,7 +28,7 @@ export const tabletopFlag = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 3f45044eb0..1769a8e675 100644 --- a/packages/frontend/src/utility/room/objects/tabletopGlassPictureFrame.ts +++ b/packages/frontend/src/utility/room/objects/tabletopGlassPictureFrame.ts @@ -48,7 +48,7 @@ export const tabletopGlassPictureFrame = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 72a30cca9d..6e4ec3904e 100644 --- a/packages/frontend/src/utility/room/objects/tabletopIronFrameStand.ts +++ b/packages/frontend/src/utility/room/objects/tabletopIronFrameStand.ts @@ -50,7 +50,7 @@ export const tabletopIronFrameStand = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 340dc8256f..963e43c1c1 100644 --- a/packages/frontend/src/utility/room/objects/tabletopPictureFrame.ts +++ b/packages/frontend/src/utility/room/objects/tabletopPictureFrame.ts @@ -83,7 +83,7 @@ export const tabletopPictureFrame = defineObject({ }, }, placement: 'top', - noCollisions: true, + hasCollisions: false, 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 a939988a22..a50d13c841 100644 --- a/packages/frontend/src/utility/room/objects/tapestry.ts +++ b/packages/frontend/src/utility/room/objects/tapestry.ts @@ -48,7 +48,7 @@ export const tapestry = defineObject({ }, }, placement: 'side', - noCollisions: true, + hasCollisions: false, 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 770ccfc2c3..a9b4c7ca73 100644 --- a/packages/frontend/src/utility/room/objects/tetrapod.ts +++ b/packages/frontend/src/utility/room/objects/tetrapod.ts @@ -13,7 +13,7 @@ export const tetrapod = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/tv.ts b/packages/frontend/src/utility/room/objects/tv.ts index 1571516e3a..6cce178fba 100644 --- a/packages/frontend/src/utility/room/objects/tv.ts +++ b/packages/frontend/src/utility/room/objects/tv.ts @@ -30,6 +30,7 @@ export const tv = defineObject({ }, }, placement: 'top', + hasCollisions: true, createInstance: ({ options, room, model, scene }) => { const matrix = model.root.getWorldMatrix(true); const scale = new BABYLON.Vector3(); diff --git a/packages/frontend/src/utility/room/objects/twistedCubeObjet.ts b/packages/frontend/src/utility/room/objects/twistedCubeObjet.ts index fe6ded512d..66f3236902 100644 --- a/packages/frontend/src/utility/room/objects/twistedCubeObjet.ts +++ b/packages/frontend/src/utility/room/objects/twistedCubeObjet.ts @@ -13,7 +13,7 @@ export const twistedCubeObjet = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/usedTissue.ts b/packages/frontend/src/utility/room/objects/usedTissue.ts index 73fe0a51ac..870391d891 100644 --- a/packages/frontend/src/utility/room/objects/usedTissue.ts +++ b/packages/frontend/src/utility/room/objects/usedTissue.ts @@ -13,7 +13,7 @@ export const usedTissue = defineObject({ default: {}, }, placement: 'top', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {}, diff --git a/packages/frontend/src/utility/room/objects/wallCanvas.ts b/packages/frontend/src/utility/room/objects/wallCanvas.ts index 063938f3a3..79bac84b2f 100644 --- a/packages/frontend/src/utility/room/objects/wallCanvas.ts +++ b/packages/frontend/src/utility/room/objects/wallCanvas.ts @@ -44,7 +44,7 @@ export const wallCanvas = defineObject({ }, }, placement: 'side', - noCollisions: true, + hasCollisions: false, 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 92cf5a93b6..306543fecc 100644 --- a/packages/frontend/src/utility/room/objects/wallClock.ts +++ b/packages/frontend/src/utility/room/objects/wallClock.ts @@ -21,7 +21,7 @@ export const wallClock = defineObject({ }, }, placement: 'side', - noCollisions: true, + hasCollisions: false, 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 ac8b43f457..26f0cf8d84 100644 --- a/packages/frontend/src/utility/room/objects/wallGlassPictureFrame.ts +++ b/packages/frontend/src/utility/room/objects/wallGlassPictureFrame.ts @@ -48,7 +48,7 @@ export const wallGlassPictureFrame = defineObject({ }, }, placement: 'wall', - noCollisions: true, + hasCollisions: false, 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 3745bd11e4..26756c53ee 100644 --- a/packages/frontend/src/utility/room/objects/wallMirror.ts +++ b/packages/frontend/src/utility/room/objects/wallMirror.ts @@ -45,7 +45,7 @@ export const wallMirror = defineObject({ }, }, placement: 'side', - noCollisions: true, + hasCollisions: false, 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/woodRingFloorLamp.ts b/packages/frontend/src/utility/room/objects/woodRingFloorLamp.ts index 56d4bf9233..de5c0ab6e1 100644 --- a/packages/frontend/src/utility/room/objects/woodRingFloorLamp.ts +++ b/packages/frontend/src/utility/room/objects/woodRingFloorLamp.ts @@ -40,6 +40,7 @@ export const woodRingFloorLamp = defineObject({ }, }, placement: 'floor', + hasCollisions: true, createInstance: ({ room, scene, options, model }) => { const shadeMaterial = model.findMaterial('__X_SHADE__'); diff --git a/packages/frontend/src/utility/room/objects/woodRingsPendantLight.ts b/packages/frontend/src/utility/room/objects/woodRingsPendantLight.ts index e72e12987f..6c41f8a6b2 100644 --- a/packages/frontend/src/utility/room/objects/woodRingsPendantLight.ts +++ b/packages/frontend/src/utility/room/objects/woodRingsPendantLight.ts @@ -52,7 +52,7 @@ export const woodRingsPendantLight = defineObject({ }, }, placement: 'ceiling', - noCollisions: true, + hasCollisions: false, 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 5837eb08b6..f9381a64f2 100644 --- a/packages/frontend/src/utility/room/objects/woodSoundAbsorbingPanel.ts +++ b/packages/frontend/src/utility/room/objects/woodSoundAbsorbingPanel.ts @@ -13,7 +13,7 @@ export const woodSoundAbsorbingPanel = defineObject({ default: {}, }, placement: 'side', - noCollisions: true, + hasCollisions: false, createInstance: () => { return { interactions: {},