This commit is contained in:
syuilo 2026-03-04 09:59:06 +09:00
commit 0157dd6b41
4 changed files with 7 additions and 4 deletions

View file

@ -13,6 +13,7 @@
* - __TOP__ / __SIDE__ Array Modifierなどを適用した状態では正しく動作しません
* - __COLLISION__ 使
* -
* - 使normalのエクスポートが有効だと面のレンダリングがおかしくなる場合があります
*/
// TODO: 家具設置時のコリジョン判定(めりこんで設置されないようにする)

View file

@ -5,7 +5,9 @@
import * as BABYLON from '@babylonjs/core';
import { defineObject } from '../engine.js';
import { createPlaneUvMapper, getPlaneUvIndexes } from '../utility.js';
import { createPlaneUvMapper } from '../utility.js';
// NOTE: シェイプキーのnormalのエクスポートは無効にしないとmatを大きくしたときに面のレンダリングがグリッチする
export const pictureFrame = defineObject({
id: 'pictureFrame',
@ -66,15 +68,15 @@ export const pictureFrame = defineObject({
width: 0.15,
height: 0.15,
frameThickness: 0.3,
matHThickness: 0.5,
matVThickness: 0.5,
matHThickness: 0.35,
matVThickness: 0.35,
customPicture: null,
fit: 'cover',
},
},
placement: 'side',
createInstance: ({ room, root, options, findMaterial, findMesh, meshUpdated }) => {
const MAT_THICKNESS_FACTOR = 0.49; // 0.5を超えるとなんかメッシュのレンダリングがグリッチするため
const MAT_THICKNESS_FACTOR = 0.9;
const frameMesh = findMesh('__X_FRAME__');
frameMesh.rotationQuaternion = null;