1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-24 19:44:05 +02:00

variable iron-frame-shelf

This commit is contained in:
syuilo
2026-04-13 11:11:14 +09:00
parent e989c4b1a5
commit baad4ae929
9 changed files with 54 additions and 57 deletions

View File

@@ -331,6 +331,14 @@ export function defineObject<const OpSc extends OptionsSchema>(def: ObjectDef<Op
return def;
}
export function defineObjectClass<const OpSc extends OptionsSchema>(baseDef: Partial<ObjectDef<OpSc>>): {
extend: (childDef: Partial<ObjectDef<OpSc>>) => ObjectDef<OpSc>;
} {
return {
extend: (childDef) => ({ ...baseDef, ...childDef }) as ObjectDef<OpSc>,
};
}
// この実装方法だとマイナスの座標をうまく処理できず結果がおかしくなるので応急処置で全体を+10000cmオフセットしてから計算している
function getMeshesBoundingBox(meshes: BABYLON.Mesh[]): BABYLON.BoundingBox {
let min = new BABYLON.Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);