mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-24 23:14:06 +02: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')!) : {
|
const data = localStorage.getItem('roomData') != null ? { ...JSON.parse(localStorage.getItem('roomData')!), ...{
|
||||||
roomType: 'default',
|
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: [{
|
installedObjects: [{
|
||||||
id: 'a',
|
id: 'a',
|
||||||
type: 'cardboardBox',
|
type: 'cardboardBox',
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ type SimpleHeyaWallBase = {
|
|||||||
type Heya = {
|
type Heya = {
|
||||||
type: 'simple';
|
type: 'simple';
|
||||||
options: {
|
options: {
|
||||||
size: [number, number];
|
dimension: [number, number];
|
||||||
window: 'none' | 'kosidakamado' | 'demado' | 'hakidasimado';
|
window: 'none' | 'kosidakamado' | 'demado' | 'hakidasimado';
|
||||||
wallN: SimpleHeyaWallBase;
|
wallN: SimpleHeyaWallBase;
|
||||||
wallE: SimpleHeyaWallBase;
|
wallE: SimpleHeyaWallBase;
|
||||||
@@ -542,7 +542,7 @@ export class RoomEngine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async init() {
|
public async init() {
|
||||||
await this.loadRoomModel(this.roomState.roomType);
|
await this.loadRoomModel(this.roomState.heya.type);
|
||||||
await this.loadEnvModel();
|
await this.loadEnvModel();
|
||||||
await Promise.all(this.roomState.installedObjects.map(o => this.loadObject({
|
await Promise.all(this.roomState.installedObjects.map(o => this.loadObject({
|
||||||
id: o.id,
|
id: o.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user