1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-22 19:54:03 +02:00
This commit is contained in:
syuilo
2026-02-20 16:33:35 +09:00
parent aae03a914d
commit bba7076eca
6 changed files with 32 additions and 5 deletions

View File

@@ -212,7 +212,13 @@ export class RoomEngine {
constructor(roomState: RoomState, options: {
canvas: HTMLCanvasElement;
}) {
this.roomState = roomState;
this.roomState = {
...roomState,
installedObjects: roomState.installedObjects.map(o => ({
...o,
options: { ...getObjectDef(o.type).options.default, ...o.options },
})),
};
this.canvas = options.canvas;
registerBuiltInLoaders();
@@ -904,7 +910,7 @@ export class RoomEngine {
const objectInstance = def.createInstance({
room: this,
root,
options: args.options, // todo: merge with default options
options: args.options,
loaderResult: loaderResult,
meshUpdated: () => {
meshUpdated(this.objectMeshs.get(args.id)!.getChildMeshes() as BABYLON.Mesh[]);