mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
wip
This commit is contained in:
@@ -204,8 +204,70 @@ function onWheel(ev: WheelEvent) {
|
||||
}
|
||||
}
|
||||
|
||||
const data = localStorage.getItem('roomData') != null ? JSON.parse(localStorage.getItem('roomData')!) : {
|
||||
roomType: 'default',
|
||||
const data = localStorage.getItem('roomData') != null ? { ...JSON.parse(localStorage.getItem('roomData')!), ...{
|
||||
heya: {
|
||||
type: 'simple',
|
||||
options: {
|
||||
dimension: [300, 300],
|
||||
window: 'demado',
|
||||
wallN: {
|
||||
material: null,
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
wallE: {
|
||||
material: null,
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
wallS: {
|
||||
material: null,
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
wallW: {
|
||||
material: null,
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
flooring: {
|
||||
material: 'wood',
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
ceiling: {
|
||||
material: null,
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
},
|
||||
},
|
||||
} } : {
|
||||
heya: {
|
||||
type: 'simple',
|
||||
options: {
|
||||
dimension: [300, 300],
|
||||
window: 'demado',
|
||||
wallN: {
|
||||
material: null,
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
wallE: {
|
||||
material: null,
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
wallS: {
|
||||
material: null,
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
wallW: {
|
||||
material: null,
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
flooring: {
|
||||
material: 'wood',
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
ceiling: {
|
||||
material: null,
|
||||
color: [0.9, 0.9, 0.9],
|
||||
},
|
||||
},
|
||||
},
|
||||
installedObjects: [{
|
||||
id: 'a',
|
||||
type: 'cardboardBox',
|
||||
|
||||
@@ -56,7 +56,7 @@ type SimpleHeyaWallBase = {
|
||||
type Heya = {
|
||||
type: 'simple';
|
||||
options: {
|
||||
size: [number, number];
|
||||
dimension: [number, number];
|
||||
window: 'none' | 'kosidakamado' | 'demado' | 'hakidasimado';
|
||||
wallN: SimpleHeyaWallBase;
|
||||
wallE: SimpleHeyaWallBase;
|
||||
@@ -542,7 +542,7 @@ export class RoomEngine {
|
||||
}
|
||||
|
||||
public async init() {
|
||||
await this.loadRoomModel(this.roomState.roomType);
|
||||
await this.loadRoomModel(this.roomState.heya.type);
|
||||
await this.loadEnvModel();
|
||||
await Promise.all(this.roomState.installedObjects.map(o => this.loadObject({
|
||||
id: o.id,
|
||||
|
||||
Reference in New Issue
Block a user