diff --git a/.gitattributes b/.gitattributes index e76630ea9..a9a72f5c3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,10 @@ *.svg -diff -text *.psd -diff -text *.ai -diff -text +*.mqo -diff -text +*.glb -diff -text +*.blend -diff -text +*.afdesign -diff -text *.zip filter=lfs diff=lfs merge=lfs -text *.xcf filter=lfs diff=lfs merge=lfs -text *.ai filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index e438ad890..4baefc147 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,10 @@ api-docs.json .DS_Store /files ormconfig.json + +# blender backups +*.blend1 +*.blend2 +*.blend3 +*.blend4 +*.blend5 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba45f5d23..0c3bfa42f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,6 +38,16 @@ Documentation of Vue I18n is available at http://kazupon.github.io/vue-i18n/intr Misskey uses CircleCI for executing automated tests. Configuration files are located in [`/.circleci`](/.circleci). +## Adding MisskeyRoom items +Currently, we accept only 3D models created with [Blender](https://www.blender.org/). + +* Use English for material, object and texture names +* Use meter for unit of length +* Your PR must include all source files of your models (for later editing) +* Your PR must include the glTF binary files (.glb) of your models + +You can find information on glTF 2.0 at [glTF 2.0 — Blender Manual]( https://docs.blender.org/manual/en/dev/addons/io_scene_gltf2.html). + ## FAQ ### How to resolve conflictions occurred at yarn.lock? diff --git a/gulpfile.ts b/gulpfile.ts index 85305cd0e..6ed597731 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -47,7 +47,11 @@ gulp.task('build:copy:views', () => gulp.src('./src/server/web/views/**/*').pipe(gulp.dest('./built/server/web/views')) ); -gulp.task('build:copy', gulp.parallel('build:copy:views', () => +gulp.task('build:copy:fonts', () => + gulp.src('./node_modules/three/examples/fonts/**/*').pipe(gulp.dest('./built/client/assets/fonts/')) +); + +gulp.task('build:copy', gulp.parallel('build:copy:views', 'build:copy:fonts', () => gulp.src([ './src/const.json', './src/server/web/views/**/*', diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index dc9dd87a7..8a34ea935 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -308,6 +308,16 @@ common: saved: "保存しました" home-profile: "ホームのプロファイル" deck-profile: "デッキのプロファイル" + room: "ルーム" + _room: + graphicsQuality: "グラフィックの品質" + _graphicsQuality: + ultra: "最高" + high: "高" + medium: "中" + low: "低" + cheep: "最低" + useOrthographicCamera: "平行投影カメラを使用" search: "検索" delete: "削除" @@ -1250,6 +1260,7 @@ desktop/views/components/ui.header.account.vue: groups: "グループ" follow-requests: "フォロー申請" admin: "管理" + room: "ルーム" desktop/views/components/ui.header.nav.vue: game: "ゲーム" @@ -2281,3 +2292,55 @@ pages: enviromentVariables: "環境変数" pageVariables: "ページ要素" argVariables: "入力スロット" + +room: + add-furniture: "家具を置く" + translate: "移動" + rotate: "回転" + exit: "戻る" + remove: "しまう" + save: "保存" + chooseImage: "画像を選択" + room-type: "部屋のタイプ" + carpet-color: "床の色" + rooms: + default: "デフォルト" + washitsu: "和室" + furnitures: + milk: "牛乳パック" + bed: "ベッド" + low-table: "ローテーブル" + desk: "デスク" + chair: "チェア" + chair2: "チェア2" + fan: "換気扇" + pc: "パソコン" + plant: "観葉植物" + plant2: "観葉植物2" + eraser: "消しゴム" + pencil: "鉛筆" + pudding: "プリン" + cardboard-box: "段ボール箱" + cardboard-box2: "段ボール箱2" + cardboard-box3: "段ボール箱3" + book: "本" + book2: "本2" + piano: "ピアノ" + facial-tissue: "ティッシュボックス" + server: "サーバー" + moon: "月" + corkboard: "コルクボード" + mousepad: "マウスパッド" + monitor: "モニター" + keyboard: "キーボード" + carpet-stripe: "カーペット(縞)" + mat: "マット" + color-box: "カラーボックス" + wall-clock: "壁掛け時計" + photoframe: "額縁" + cube: "キューブ" + tv: "テレビ" + pinguin: "ピンギン" + rubik-cube: "ルービックキューブ" + poster-h: "ポスター(横長)" + poster-v: "ポスター(縦長)" diff --git a/migration/1565634203341-room.ts b/migration/1565634203341-room.ts new file mode 100644 index 000000000..783b375ff --- /dev/null +++ b/migration/1565634203341-room.ts @@ -0,0 +1,13 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class room1565634203341 implements MigrationInterface { + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "user_profile" ADD "room" jsonb NOT NULL DEFAULT '{}'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "room"`); + } + +} diff --git a/package.json b/package.json index 5cd0299c0..85beac348 100644 --- a/package.json +++ b/package.json @@ -223,6 +223,7 @@ "syuilo-password-strength": "0.0.1", "terser-webpack-plugin": "1.3.0", "textarea-caret": "3.1.0", + "three": "0.107.0", "tinycolor2": "1.4.1", "tmp": "0.1.0", "ts-loader": "5.3.3", diff --git a/src/client/app/common/scripts/room/furniture.ts b/src/client/app/common/scripts/room/furniture.ts new file mode 100644 index 000000000..7734e3266 --- /dev/null +++ b/src/client/app/common/scripts/room/furniture.ts @@ -0,0 +1,21 @@ +export type RoomInfo = { + roomType: string; + carpetColor: string; + furnitures: Furniture[]; +}; + +export type Furniture = { + id: string; // 同じ家具が複数ある場合にそれぞれを識別するためのIDであり、家具IDではない + type: string; // こっちが家具ID(chairとか) + position: { + x: number; + y: number; + z: number; + }; + rotation: { + x: number; + y: number; + z: number; + }; + props?: Record; +}; diff --git a/src/client/app/common/scripts/room/furnitures.json5 b/src/client/app/common/scripts/room/furnitures.json5 new file mode 100644 index 000000000..d88228ca3 --- /dev/null +++ b/src/client/app/common/scripts/room/furnitures.json5 @@ -0,0 +1,324 @@ +// 家具メタデータ + +// 家具にはユーザーが設定できるプロパティを設定可能です: +// +// props: { +// : +// } +// +// proptype一覧: +// * image ... 画像選択ダイアログを出し、その画像のURLが格納されます +// * color ... 色選択コントロールを出し、選択された色が格納されます + +// 家具にカスタムテクスチャを適用できるようにするには、textureプロパティに以下の追加の情報を含めます: +// 便宜上そのUVのどの部分にカスタムテクスチャを貼り合わせるかのエリアをテクスチャエリアと呼びます。 +// UVは1024*1024だと仮定します。 +// +// : { +// prop: <プロパティ名>, +// uv: { +// x: <テクスチャエリアX座標>, +// y: <テクスチャエリアY座標>, +// width: <テクスチャエリアの幅>, +// height: <テクスチャエリアの高さ>, +// }, +// } +// +// には、カスタムテクスチャを適用したいメッシュ名を指定します +// <プロパティ名>には、カスタムテクスチャとして使用する画像を格納するプロパティ(前述)名を指定します + +// 家具にカスタムカラーを適用できるようにするには、colorプロパティに以下の追加の情報を含めます: +// +// : <プロパティ名> +// +// には、カスタムカラーを適用したいマテリアル名を指定します +// <プロパティ名>には、カスタムカラーとして使用する色を格納するプロパティ(前述)名を指定します + +[ + { + id: "milk", + place: "floor" + }, + { + id: "bed", + place: "floor" + }, + { + id: "low-table", + place: "floor", + props: { + color: 'color' + }, + color: { + Table: 'color' + } + }, + { + id: "desk", + place: "floor", + props: { + color: 'color' + }, + color: { + Board: 'color' + } + }, + { + id: "chair", + place: "floor", + props: { + color: 'color' + }, + color: { + Chair: 'color' + } + }, + { + id: "chair2", + place: "floor", + props: { + color1: 'color', + color2: 'color' + }, + color: { + Cushion: 'color1', + Leg: 'color2' + } + }, + { + id: "fan", + place: "wall" + }, + { + id: "pc", + place: "floor" + }, + { + id: "plant", + place: "floor" + }, + { + id: "plant2", + place: "floor" + }, + { + id: "eraser", + place: "floor" + }, + { + id: "pencil", + place: "floor" + }, + { + id: "pudding", + place: "floor" + }, + { + id: "cardboard-box", + place: "floor" + }, + { + id: "cardboard-box2", + place: "floor" + }, + { + id: "cardboard-box3", + place: "floor" + }, + { + id: "book", + place: "floor", + props: { + color: 'color' + }, + color: { + Cover: 'color' + } + }, + { + id: "book2", + place: "floor" + }, + { + id: "piano", + place: "floor" + }, + { + id: "facial-tissue", + place: "floor" + }, + { + id: "server", + place: "floor" + }, + { + id: "moon", + place: "floor" + }, + { + id: "corkboard", + place: "wall" + }, + { + id: "mousepad", + place: "floor", + props: { + color: 'color' + }, + color: { + Pad: 'color' + } + }, + { + id: "monitor", + place: "floor", + props: { + screen: 'image' + }, + texture: { + Screen: { + prop: 'screen', + uv: { + x: 0, + y: 434, + width: 1024, + height: 588, + }, + }, + }, + }, + { + id: "tv", + place: "floor", + props: { + screen: 'image' + }, + texture: { + Screen: { + prop: 'screen', + uv: { + x: 0, + y: 434, + width: 1024, + height: 588, + }, + }, + }, + }, + { + id: "keyboard", + place: "floor" + }, + { + id: "carpet-stripe", + place: "floor", + props: { + color1: 'color', + color2: 'color' + }, + color: { + CarpetAreaA: 'color1', + CarpetAreaB: 'color2' + }, + }, + { + id: "mat", + place: "floor", + props: { + color: 'color' + }, + color: { + Mat: 'color' + } + }, + { + id: "color-box", + place: "floor", + props: { + color: 'color' + }, + color: { + main: 'color' + } + }, + { + id: "wall-clock", + place: "wall" + }, + { + id: "cube", + place: "floor", + props: { + color: 'color' + }, + color: { + Cube: 'color' + } + }, + { + id: "photoframe", + place: "wall", + props: { + photo: 'image', + color: 'color' + }, + texture: { + Photo: { + prop: 'photo', + uv: { + x: 0, + y: 342, + width: 1024, + height: 683, + }, + }, + }, + color: { + Frame: 'color' + } + }, + { + id: "pinguin", + place: "floor" + }, + { + id: "rubik-cube", + place: "floor", + }, + { + id: "poster-h", + place: "wall", + props: { + picture: 'image' + }, + texture: { + Poster: { + prop: 'picture', + uv: { + x: 0, + y: 277, + width: 1024, + height: 745, + }, + }, + }, + }, + { + id: "poster-v", + place: "wall", + props: { + picture: 'image' + }, + texture: { + Poster: { + prop: 'picture', + uv: { + x: 0, + y: 0, + width: 745, + height: 1024, + }, + }, + }, + }, +] diff --git a/src/client/app/common/scripts/room/room.ts b/src/client/app/common/scripts/room/room.ts new file mode 100644 index 000000000..2a06f5bc5 --- /dev/null +++ b/src/client/app/common/scripts/room/room.ts @@ -0,0 +1,690 @@ +import autobind from 'autobind-decorator'; +import * as THREE from 'three'; +import { GLTFLoader, GLTF } from 'three/examples/jsm/loaders/GLTFLoader'; +import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; +import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js'; +import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js'; +import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'; +import { BloomPass } from 'three/examples/jsm/postprocessing/BloomPass.js'; +import { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js'; +import { TransformControls } from 'three/examples/jsm/controls/TransformControls.js'; +import { Furniture, RoomInfo } from './furniture'; +import { v4 as uuid } from 'uuid'; +const furnitureDefs = require('./furnitures.json5'); + +THREE.ImageUtils.crossOrigin = ''; + +type Options = { + graphicsQuality: Room['graphicsQuality']; + onChangeSelect: Room['onChangeSelect']; + useOrthographicCamera: boolean; +}; + +export class Room { + private clock: THREE.Clock; + private scene: THREE.Scene; + private renderer: THREE.WebGLRenderer; + private camera: THREE.PerspectiveCamera | THREE.OrthographicCamera; + private controls: OrbitControls; + private composer: EffectComposer; + private mixers: THREE.AnimationMixer[] = []; + private furnitureControl: TransformControls; + private roomInfo: RoomInfo; + private graphicsQuality: 'cheep' | 'low' | 'medium' | 'high' | 'ultra'; + private roomObj: THREE.Object3D; + private objects: THREE.Object3D[] = []; + private selectedObject: THREE.Object3D = null; + private onChangeSelect: Function; + private isTransformMode = false; + public canvas: HTMLCanvasElement; + + private get furnitures(): Furniture[] { + return this.roomInfo.furnitures; + } + + private set furnitures(furnitures: Furniture[]) { + this.roomInfo.furnitures = furnitures; + } + + private get enableShadow() { + return this.graphicsQuality != 'cheep'; + } + + private get usePostFXs() { + return this.graphicsQuality !== 'cheep' && this.graphicsQuality !== 'low'; + } + + private get shadowQuality() { + return ( + this.graphicsQuality === 'ultra' ? 16384 : + this.graphicsQuality === 'high' ? 8192 : + this.graphicsQuality === 'medium' ? 4096 : + this.graphicsQuality === 'low' ? 1024 : + 0); // cheep + } + + constructor(user, isMyRoom, roomInfo: RoomInfo, container, options: Options) { + this.roomInfo = roomInfo; + this.graphicsQuality = options.graphicsQuality; + this.onChangeSelect = options.onChangeSelect; + + this.clock = new THREE.Clock(true); + + //#region Init a scene + this.scene = new THREE.Scene(); + + const width = window.innerWidth; + const height = window.innerHeight; + + //#region Init a renderer + this.renderer = new THREE.WebGLRenderer({ + antialias: false, + stencil: false, + alpha: false, + powerPreference: + this.graphicsQuality === 'ultra' ? 'high-performance' : + this.graphicsQuality === 'high' ? 'high-performance' : + this.graphicsQuality === 'medium' ? 'default' : + this.graphicsQuality === 'low' ? 'low-power' : + 'low-power' // cheep + }); + + this.renderer.setPixelRatio(window.devicePixelRatio); + this.renderer.setSize(width, height); + this.renderer.autoClear = false; + this.renderer.setClearColor(new THREE.Color(0x051f2d)); + this.renderer.shadowMap.enabled = this.enableShadow; + this.renderer.gammaOutput = true; + this.renderer.shadowMap.type = + this.graphicsQuality === 'ultra' ? THREE.PCFSoftShadowMap : + this.graphicsQuality === 'high' ? THREE.PCFSoftShadowMap : + this.graphicsQuality === 'medium' ? THREE.PCFShadowMap : + this.graphicsQuality === 'low' ? THREE.BasicShadowMap : + THREE.BasicShadowMap; // cheep + + this.canvas = this.renderer.domElement; + container.appendChild(this.renderer.domElement); + //#endregion + + //#region Init a camera + this.camera = options.useOrthographicCamera + ? new THREE.OrthographicCamera( + width / - 2, width / 2, height / 2, height / - 2, -10, 10) + : new THREE.PerspectiveCamera(45, width / height); + + if (options.useOrthographicCamera) { + this.camera.position.x = 2; + this.camera.position.y = 2; + this.camera.position.z = 2; + this.camera.zoom = 100; + this.camera.updateProjectionMatrix(); + } else { + this.camera.position.x = 5; + this.camera.position.y = 2; + this.camera.position.z = 5; + } + + this.scene.add(this.camera); + //#endregion + + //#region AmbientLight + const ambientLight = new THREE.AmbientLight(0xffffff, 1); + this.scene.add(ambientLight); + //#endregion + + if (this.graphicsQuality !== 'cheep') { + //#region Room light + const roomLight = new THREE.SpotLight(0xffffff, 0.1); + + roomLight.position.set(0, 8, 0); + roomLight.castShadow = this.enableShadow; + roomLight.shadow.bias = -0.0001; + roomLight.shadow.mapSize.width = this.shadowQuality; + roomLight.shadow.mapSize.height = this.shadowQuality; + roomLight.shadow.camera.near = 0.1; + roomLight.shadow.camera.far = 9; + roomLight.shadow.camera.fov = 45; + + this.scene.add(roomLight); + //#endregion + } + + //#region Out light + const outLight = new THREE.SpotLight(0xffffff, 0.4); + + outLight.position.set(9, 3, -2); + outLight.castShadow = this.enableShadow; + outLight.shadow.bias = -0.001; // アクネ、アーチファクト対策 その代わりピーターパンが発生する可能性がある + outLight.shadow.mapSize.width = this.shadowQuality; + outLight.shadow.mapSize.height = this.shadowQuality; + outLight.shadow.camera.near = 6; + outLight.shadow.camera.far = 15; + outLight.shadow.camera.fov = 45; + + this.scene.add(outLight); + //#endregion + + //#region Init a controller + this.controls = new OrbitControls(this.camera, this.renderer.domElement); + + this.controls.target.set(0, 1, 0); + this.controls.enableZoom = true; + this.controls.enablePan = isMyRoom; + this.controls.minPolarAngle = 0; + this.controls.maxPolarAngle = Math.PI / 2; + this.controls.minAzimuthAngle = 0; + this.controls.maxAzimuthAngle = Math.PI / 2; + this.controls.enableDamping = true; + this.controls.dampingFactor = 0.2; + this.controls.mouseButtons.LEFT = 1; + this.controls.mouseButtons.MIDDLE = 2; + this.controls.mouseButtons.RIGHT = 0; + //#endregion + + //#region POST FXs + if (!this.usePostFXs) { + this.composer = null; + } else { + const renderTarget = new THREE.WebGLRenderTarget(width, height, { + minFilter: THREE.LinearFilter, + magFilter: THREE.LinearFilter, + format: THREE.RGBFormat, + stencilBuffer: false, + }); + + const fxaa = new ShaderPass(FXAAShader); + fxaa.uniforms['resolution'].value = new THREE.Vector2(1 / width, 1 / height); + fxaa.renderToScreen = true; + + this.composer = new EffectComposer(this.renderer, renderTarget); + this.composer.addPass(new RenderPass(this.scene, this.camera)); + if (this.graphicsQuality === 'ultra') { + this.composer.addPass(new BloomPass(0.25, 30, 128.0, 512)); + } + this.composer.addPass(fxaa); + } + //#endregion + //#endregion + + //#region Label + //#region Avatar + const avatarUrl = user.avatarUrl; + + const iconTexture = new THREE.TextureLoader().load(avatarUrl); + iconTexture.wrapS = THREE.RepeatWrapping; + iconTexture.wrapT = THREE.RepeatWrapping; + iconTexture.anisotropy = 16; + + const avatarMaterial = new THREE.MeshLambertMaterial({ + emissive: 0x111111, + map: iconTexture, + side: THREE.DoubleSide, + alphaTest: 0.5 + }); + + const iconGeometry = new THREE.PlaneGeometry(1, 1); + + const avatarObject = new THREE.Mesh(iconGeometry, avatarMaterial); + avatarObject.position.set(-3, 2.5, 2); + avatarObject.rotation.y = Math.PI / 2; + avatarObject.castShadow = false; + + this.scene.add(avatarObject); + //#endregion + + //#region Username + const name = user.username; + + new THREE.FontLoader().load('/assets/fonts/helvetiker_regular.typeface.json', font => { + const nameGeometry = new THREE.TextGeometry(name, { + size: 0.5, + height: 0, + curveSegments: 8, + font: font, + bevelThickness: 0, + bevelSize: 0, + bevelEnabled: false + }); + + const nameMaterial = new THREE.MeshLambertMaterial({ + color: 0xffffff + }); + + const nameObject = new THREE.Mesh(nameGeometry, nameMaterial); + nameObject.position.set(-3, 2.25, 1.25); + nameObject.rotation.y = Math.PI / 2; + nameObject.castShadow = false; + + this.scene.add(nameObject); + }); + //#endregion + //#endregion + + //#region Interaction + if (isMyRoom) { + this.furnitureControl = new TransformControls(this.camera, this.renderer.domElement); + this.scene.add(this.furnitureControl); + + // Hover highlight + this.renderer.domElement.onmousemove = this.onmousemove; + + // Click + this.renderer.domElement.onmousedown = this.onmousedown; + } + //#endregion + + //#region Init room + this.loadRoom(); + //#endregion + + //#region Load furnitures + for (const furniture of this.furnitures) { + this.loadFurniture(furniture).then(obj => { + this.scene.add(obj.scene); + this.objects.push(obj.scene); + }); + } + //#endregion + + // Start render + if (this.usePostFXs) { + this.renderWithPostFXs(); + } else { + this.renderWithoutPostFXs(); + } + } + + @autobind + private renderWithoutPostFXs() { + requestAnimationFrame(this.renderWithoutPostFXs); + + // Update animations + const clock = this.clock.getDelta(); + for (const mixer of this.mixers) { + mixer.update(clock); + } + + this.controls.update(); + this.renderer.render(this.scene, this.camera); + } + + @autobind + private renderWithPostFXs() { + requestAnimationFrame(this.renderWithPostFXs); + + // Update animations + const clock = this.clock.getDelta(); + for (const mixer of this.mixers) { + mixer.update(clock); + } + + this.controls.update(); + this.renderer.clear(); + this.composer.render(); + } + + @autobind + private loadRoom() { + new GLTFLoader().load(`/assets/room/rooms/${this.roomInfo.roomType}/${this.roomInfo.roomType}.glb`, gltf => { + gltf.scene.traverse(child => { + if (!(child instanceof THREE.Mesh)) return; + + child.receiveShadow = this.enableShadow; + + child.material = new THREE.MeshLambertMaterial({ + color: (child.material as THREE.MeshStandardMaterial).color, + map: (child.material as THREE.MeshStandardMaterial).map, + name: (child.material as THREE.MeshStandardMaterial).name, + }); + + // 異方性フィルタリング + if ((child.material as THREE.MeshLambertMaterial).map && this.graphicsQuality !== 'cheep') { + (child.material as THREE.MeshLambertMaterial).map.minFilter = THREE.LinearMipMapLinearFilter; + (child.material as THREE.MeshLambertMaterial).map.magFilter = THREE.LinearMipMapLinearFilter; + (child.material as THREE.MeshLambertMaterial).map.anisotropy = 8; + } + }); + + gltf.scene.position.set(0, 0, 0); + + this.scene.add(gltf.scene); + this.roomObj = gltf.scene; + if (this.roomInfo.roomType === 'default') { + this.applyCarpetColor(); + } + }); + } + + @autobind + private loadFurniture(furniture: Furniture) { + const def = furnitureDefs.find(d => d.id === furniture.type); + return new Promise((res, rej) => { + const loader = new GLTFLoader(); + loader.load(`/assets/room/furnitures/${furniture.type}/${furniture.type}.glb`, gltf => { + const model = gltf.scene; + + // Load animation + if (gltf.animations.length > 0) { + const mixer = new THREE.AnimationMixer(model); + this.mixers.push(mixer); + for (const clip of gltf.animations) { + mixer.clipAction(clip).play(); + } + } + + model.name = furniture.id; + model.position.x = furniture.position.x; + model.position.y = furniture.position.y; + model.position.z = furniture.position.z; + model.rotation.x = furniture.rotation.x; + model.rotation.y = furniture.rotation.y; + model.rotation.z = furniture.rotation.z; + + model.traverse(child => { + if (!(child instanceof THREE.Mesh)) return; + child.castShadow = this.enableShadow; + child.receiveShadow = this.enableShadow; + child.material = new THREE.MeshLambertMaterial({ + color: (child.material as THREE.MeshStandardMaterial).color, + map: (child.material as THREE.MeshStandardMaterial).map, + name: (child.material as THREE.MeshStandardMaterial).name, + }); + + // 異方性フィルタリング + if ((child.material as THREE.MeshLambertMaterial).map && this.graphicsQuality !== 'cheep') { + (child.material as THREE.MeshLambertMaterial).map.minFilter = THREE.LinearMipMapLinearFilter; + (child.material as THREE.MeshLambertMaterial).map.magFilter = THREE.LinearMipMapLinearFilter; + (child.material as THREE.MeshLambertMaterial).map.anisotropy = 8; + } + }); + + if (def.color) { // カスタムカラー + this.applyCustomColor(model); + } + + if (def.texture) { // カスタムテクスチャ + this.applyCustomTexture(model); + } + + res(gltf); + }, null, rej); + }); + } + + @autobind + private applyCarpetColor() { + this.roomObj.traverse(child => { + if (!(child instanceof THREE.Mesh)) return; + if (child.material && (child.material as THREE.MeshStandardMaterial).name && (child.material as THREE.MeshStandardMaterial).name === 'Carpet') { + (child.material as THREE.MeshStandardMaterial).color.setHex(parseInt(this.roomInfo.carpetColor.substr(1), 16)); + } + }); + } + + @autobind + public applyCustomColor(model: THREE.Object3D) { + const furniture = this.furnitures.find(furniture => furniture.id === model.name); + const def = furnitureDefs.find(d => d.id === furniture.type); + if (def.color == null) return; + model.traverse(child => { + if (!(child instanceof THREE.Mesh)) return; + for (const t of Object.keys(def.color)) { + if (!child.material || !(child.material as THREE.MeshStandardMaterial).name || (child.material as THREE.MeshStandardMaterial).name !== t) continue; + + const prop = def.color[t]; + const val = furniture.props ? furniture.props[prop] : undefined; + + if (val == null) continue; + + (child.material as THREE.MeshStandardMaterial).color.setHex(parseInt(val.substr(1), 16)); + } + }); + } + + @autobind + public applyCustomTexture(model: THREE.Object3D) { + const furniture = this.furnitures.find(furniture => furniture.id === model.name); + const def = furnitureDefs.find(d => d.id === furniture.type); + if (def.texture == null) return; + model.traverse(child => { + if (!(child instanceof THREE.Mesh)) return; + for (const t of Object.keys(def.texture)) { + if (child.name !== t) continue; + + const prop = def.texture[t].prop; + const val = furniture.props ? furniture.props[prop] : undefined; + + if (val == null) continue; + + const canvas = document.createElement('canvas'); + canvas.height = 1024; + canvas.width = 1024; + + child.material = new THREE.MeshLambertMaterial({ + emissive: 0x111111, + side: THREE.DoubleSide, + alphaTest: 0.5, + }); + + const img = new Image(); + img.onload = () => { + const uvInfo = def.texture[t].uv; + + const ctx = canvas.getContext('2d'); + ctx.drawImage(img, 0, 0, img.width, img.height, uvInfo.x, uvInfo.y, uvInfo.width, uvInfo.height); + + const texture = new THREE.Texture(canvas); + texture.wrapS = THREE.RepeatWrapping; + texture.wrapT = THREE.RepeatWrapping; + texture.anisotropy = 16; + texture.flipY = false; + + (child.material as THREE.MeshLambertMaterial).map = texture; + (child.material as THREE.MeshLambertMaterial).needsUpdate = true; + (child.material as THREE.MeshLambertMaterial).map.needsUpdate = true; + }; + img.src = val; + } + }); + } + + @autobind + private onmousemove(ev: MouseEvent) { + if (this.isTransformMode) return; + + const rect = (ev.target as HTMLElement).getBoundingClientRect(); + const x = (((ev.clientX * window.devicePixelRatio) - rect.left) / this.renderer.domElement.width) * 2 - 1; + const y = -(((ev.clientY * window.devicePixelRatio) - rect.top) / this.renderer.domElement.height) * 2 + 1; + const pos = new THREE.Vector2(x, y); + + this.camera.updateMatrixWorld(); + + const raycaster = new THREE.Raycaster(); + raycaster.setFromCamera(pos, this.camera); + + const intersects = raycaster.intersectObjects(this.objects, true); + + for (const object of this.objects) { + if (this.isSelectedObject(object)) continue; + object.traverse(child => { + if (child instanceof THREE.Mesh) { + (child.material as THREE.MeshStandardMaterial).emissive.setHex(0x000000); + } + }); + } + + if (intersects.length > 0) { + const intersected = this.getRoot(intersects[0].object); + if (!this.isSelectedObject(intersected)) { + intersected.traverse(child => { + if (child instanceof THREE.Mesh) { + (child.material as THREE.MeshStandardMaterial).emissive.setHex(0x191919); + } + }); + } + } + } + + @autobind + private onmousedown(ev: MouseEvent) { + if (this.isTransformMode) return; + if (ev.target !== this.renderer.domElement || ev.button !== 0) return; + + const rect = (ev.target as HTMLElement).getBoundingClientRect(); + const x = (((ev.clientX * window.devicePixelRatio) - rect.left) / this.renderer.domElement.width) * 2 - 1; + const y = -(((ev.clientY * window.devicePixelRatio) - rect.top) / this.renderer.domElement.height) * 2 + 1; + const pos = new THREE.Vector2(x, y); + + this.camera.updateMatrixWorld(); + + const raycaster = new THREE.Raycaster(); + raycaster.setFromCamera(pos, this.camera); + + const intersects = raycaster.intersectObjects(this.objects, true); + + for (const object of this.objects) { + object.traverse(child => { + if (child instanceof THREE.Mesh) { + (child.material as THREE.MeshStandardMaterial).emissive.setHex(0x000000); + } + }); + } + + if (intersects.length > 0) { + const selectedObj = this.getRoot(intersects[0].object); + this.selectFurniture(selectedObj); + } else { + this.selectedObject = null; + this.onChangeSelect(null); + } + } + + @autobind + private getRoot(obj: THREE.Object3D): THREE.Object3D { + let found = false; + let x = obj.parent; + while (!found) { + if (x.parent.parent == null) { + found = true; + } else { + x = x.parent; + } + } + return x; + } + + @autobind + private isSelectedObject(obj: THREE.Object3D): boolean { + if (this.selectedObject == null) { + return false; + } else { + return obj.name === this.selectedObject.name; + } + } + + @autobind + private selectFurniture(obj: THREE.Object3D) { + this.selectedObject = obj; + this.onChangeSelect(obj); + obj.traverse(child => { + if (child instanceof THREE.Mesh) { + (child.material as THREE.MeshStandardMaterial).emissive.setHex(0xff0000); + } + }); + } + + @autobind + public enterTransformMode(type: 'translate' | 'rotate') { + this.isTransformMode = true; + this.furnitureControl.setMode(type); + this.furnitureControl.attach(this.selectedObject); + } + + @autobind + public exitTransformMode() { + this.isTransformMode = false; + this.furnitureControl.detach(); + } + + @autobind + public updateProp(key: string, value: any) { + const furniture = this.furnitures.find(furniture => furniture.id === this.selectedObject.name); + if (furniture.props == null) furniture.props = {}; + furniture.props[key] = value; + this.applyCustomColor(this.selectedObject); + this.applyCustomTexture(this.selectedObject); + } + + @autobind + public addFurniture(type: string) { + const furniture = { + id: uuid(), + type: type, + position: { + x: 0, + y: 0, + z: 0, + }, + rotation: { + x: 0, + y: 0, + z: 0, + }, + }; + + this.furnitures.push(furniture); + + this.loadFurniture(furniture).then(obj => { + this.scene.add(obj.scene); + this.objects.push(obj.scene); + }); + } + + @autobind + public removeFurniture() { + const obj = this.selectedObject; + this.scene.remove(obj); + this.objects = this.objects.filter(object => object.name !== obj.name); + this.furnitures = this.furnitures.filter(furniture => furniture.id !== obj.name); + this.selectedObject = null; + this.onChangeSelect(null); + } + + @autobind + public updateCarpetColor(color: string) { + this.roomInfo.carpetColor = color; + this.applyCarpetColor(); + } + + @autobind + public changeRoomType(type: string) { + this.roomInfo.roomType = type; + this.scene.remove(this.roomObj); + this.loadRoom(); + } + + @autobind + public getRoomInfo() { + for (const obj of this.objects) { + const furniture = this.furnitures.find(f => f.id === obj.name); + furniture.position.x = obj.position.x; + furniture.position.y = obj.position.y; + furniture.position.z = obj.position.z; + furniture.rotation.x = obj.rotation.x; + furniture.rotation.y = obj.rotation.y; + furniture.rotation.z = obj.rotation.z; + } + + return this.roomInfo; + } + + @autobind + public getSelectedObject() { + return this.selectedObject; + } + + @autobind + public findFurnitureById(id: string) { + return this.furnitures.find(furniture => furniture.id === id); + } +} diff --git a/src/client/app/common/views/components/settings/settings.vue b/src/client/app/common/views/components/settings/settings.vue index c609a9672..914d5bf84 100644 --- a/src/client/app/common/views/components/settings/settings.vue +++ b/src/client/app/common/views/components/settings/settings.vue @@ -159,6 +159,19 @@ + +
+
{{ $t('@._settings.room') }}
+ + + + + + + + + {{ $t('@._settings._room.useOrthographicCamera') }} +
@@ -503,6 +516,16 @@ export default Vue.extend({ set(value) { this.$store.dispatch('settings/set', { key: 'iLikeSushi', value }); } }, + roomUseOrthographicCamera: { + get() { return this.$store.state.device.roomUseOrthographicCamera; }, + set(value) { this.$store.commit('device/set', { key: 'roomUseOrthographicCamera', value }); } + }, + + roomGraphicsQuality: { + get() { return this.$store.state.device.roomGraphicsQuality; }, + set(value) { this.$store.commit('device/set', { key: 'roomGraphicsQuality', value }); } + }, + games_reversi_showBoardLabels: { get() { return this.$store.state.settings.gamesReversiShowBoardLabels; }, set(value) { this.$store.dispatch('settings/set', { key: 'gamesReversiShowBoardLabels', value }); } diff --git a/src/client/app/common/views/pages/room/preview.vue b/src/client/app/common/views/pages/room/preview.vue new file mode 100644 index 000000000..3f849d8c0 --- /dev/null +++ b/src/client/app/common/views/pages/room/preview.vue @@ -0,0 +1,98 @@ + + + diff --git a/src/client/app/common/views/pages/room/room.vue b/src/client/app/common/views/pages/room/room.vue new file mode 100644 index 000000000..955e35701 --- /dev/null +++ b/src/client/app/common/views/pages/room/room.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts index 32e4886de..f77a00ae6 100644 --- a/src/client/app/desktop/script.ts +++ b/src/client/app/desktop/script.ts @@ -187,6 +187,7 @@ init(async (launch, os) => { { path: '/i/drive/folder/:folder', component: MkDrive }, { path: '/i/settings', component: MkSettings }, { path: '/selectdrive', component: MkSelectDrive }, + { path: '/@:acct/room', props: true, component: () => import('../common/views/pages/room/room.vue').then(m => m.default) }, { path: '/share', component: MkShare }, { path: '/games/reversi/:game?', component: MkReversi }, { path: '/authorize-follow', component: MkFollow }, diff --git a/src/client/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue index 5d7ed8c30..690f3a558 100644 --- a/src/client/app/desktop/views/components/ui.header.account.vue +++ b/src/client/app/desktop/views/components/ui.header.account.vue @@ -56,6 +56,13 @@ +
  • + + + {{ $t('room') }} + + +
    • @@ -106,7 +113,7 @@ import i18n from '../../../i18n'; // import MkSettingsWindow from './settings-window.vue'; import MkDriveWindow from './drive-window.vue'; import contains from '../../../common/scripts/contains'; -import { faHome, faColumns, faUsers } from '@fortawesome/free-solid-svg-icons'; +import { faHome, faColumns, faUsers, faDoorOpen } from '@fortawesome/free-solid-svg-icons'; import { faMoon, faSun, faStickyNote } from '@fortawesome/free-regular-svg-icons'; export default Vue.extend({ @@ -114,7 +121,7 @@ export default Vue.extend({ data() { return { isOpen: false, - faHome, faColumns, faMoon, faSun, faStickyNote, faUsers + faHome, faColumns, faMoon, faSun, faStickyNote, faUsers, faDoorOpen }; }, computed: { diff --git a/src/client/app/store.ts b/src/client/app/store.ts index d9f1631a8..92fb1568b 100644 --- a/src/client/app/store.ts +++ b/src/client/app/store.ts @@ -76,6 +76,8 @@ const defaultDeviceSettings = { expandUsersPhotos: true, expandUsersActivity: true, enableMobileQuickNotificationView: false, + roomGraphicsQuality: 'medium', + roomUseOrthographicCamera: true, }; export default (os: MiOS) => new Vuex.Store({ diff --git a/src/client/app/tsconfig.json b/src/client/app/tsconfig.json index 8605da75a..3ec0271f6 100644 --- a/src/client/app/tsconfig.json +++ b/src/client/app/tsconfig.json @@ -11,11 +11,17 @@ "sourceMap": false, "target": "es2017", "module": "esnext", + "moduleResolution": "node", "removeComments": false, "noLib": false, "strict": true, "strictNullChecks": false, - "experimentalDecorators": true + "experimentalDecorators": true, + "resolveJsonModule": true, + "typeRoots": [ + "node_modules/@types", + "src/@types" + ] }, "compileOnSave": false, "include": [ diff --git a/src/client/assets/room/furnitures/bed/bed.blend b/src/client/assets/room/furnitures/bed/bed.blend new file mode 100644 index 000000000..d29f77477 --- /dev/null +++ b/src/client/assets/room/furnitures/bed/bed.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15ccf449b85d73ef668a7742b6d1c7123c622061685644ba3acd7a179cb2abea +size 573584 diff --git a/src/client/assets/room/furnitures/bed/bed.glb b/src/client/assets/room/furnitures/bed/bed.glb new file mode 100644 index 000000000..deed11583 --- /dev/null +++ b/src/client/assets/room/furnitures/bed/bed.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b29c807a0128c4e11e8acf2c523f8932102491a9d25fffad08ac2e46d2accdb7 +size 8944 diff --git a/src/client/assets/room/furnitures/book/book.blend b/src/client/assets/room/furnitures/book/book.blend new file mode 100644 index 000000000..c3414b35d --- /dev/null +++ b/src/client/assets/room/furnitures/book/book.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82b4157520423c3c3f400bf2773814530083fcb978b2777e5b20fe7945807cd3 +size 511864 diff --git a/src/client/assets/room/furnitures/book/book.glb b/src/client/assets/room/furnitures/book/book.glb new file mode 100644 index 000000000..e4267889f --- /dev/null +++ b/src/client/assets/room/furnitures/book/book.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b0018d07eb02779d2d4df30832cf5dea8093f2e7c8e192c022088b81e2309f3 +size 4304 diff --git a/src/client/assets/room/furnitures/book2/barcode.png b/src/client/assets/room/furnitures/book2/barcode.png new file mode 100644 index 000000000..f02286bf6 --- /dev/null +++ b/src/client/assets/room/furnitures/book2/barcode.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ee1f98f2f9817f33852b8e22fb94383c4320b2d419353b1c09bebb49a5ca9fe +size 8924 diff --git a/src/client/assets/room/furnitures/book2/book2.blend b/src/client/assets/room/furnitures/book2/book2.blend new file mode 100644 index 000000000..69d04347d --- /dev/null +++ b/src/client/assets/room/furnitures/book2/book2.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8add369aaa438e5ca9dda18240b2b132485af5e737629f0ec955f35266b27b1 +size 521456 diff --git a/src/client/assets/room/furnitures/book2/book2.glb b/src/client/assets/room/furnitures/book2/book2.glb new file mode 100644 index 000000000..398bcbde9 --- /dev/null +++ b/src/client/assets/room/furnitures/book2/book2.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:013351dfcbfa131ffe1df7d6fe01085f72ba3fd01fa5492ed1f68927a4ede0e8 +size 82920 diff --git a/src/client/assets/room/furnitures/book2/texture.afdesign b/src/client/assets/room/furnitures/book2/texture.afdesign new file mode 100644 index 000000000..b352ea18c --- /dev/null +++ b/src/client/assets/room/furnitures/book2/texture.afdesign @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f63668362fe42fde57e982c7211fdcca0af9791d646db3bd1ae18aca7e63733b +size 875434 diff --git a/src/client/assets/room/furnitures/book2/texture.png b/src/client/assets/room/furnitures/book2/texture.png new file mode 100644 index 000000000..57c8e3fb1 --- /dev/null +++ b/src/client/assets/room/furnitures/book2/texture.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:854f14c4bd8287929bf0d7fe271900e9dd8ee19a0c89735fdb13577f199fa1d1 +size 65589 diff --git a/src/client/assets/room/furnitures/book2/uv.png b/src/client/assets/room/furnitures/book2/uv.png new file mode 100644 index 000000000..45ecc7763 --- /dev/null +++ b/src/client/assets/room/furnitures/book2/uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96509da2fb939c26dd67e81b961dd1d5659c7aae6eb30a5576c4d3e9f013135d +size 38259 diff --git a/src/client/assets/room/furnitures/cardboard-box/cardboard-box.blend b/src/client/assets/room/furnitures/cardboard-box/cardboard-box.blend new file mode 100644 index 000000000..4d0af51ee --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box/cardboard-box.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65f5cac6531dc9b862c37f03998038f924f15bb8a71c709f73c2b0dcced74430 +size 515036 diff --git a/src/client/assets/room/furnitures/cardboard-box/cardboard-box.glb b/src/client/assets/room/furnitures/cardboard-box/cardboard-box.glb new file mode 100644 index 000000000..8b80cff8e --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box/cardboard-box.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56b4c466557325b1a2e301f0f241e9e7b1698ab2b01800a9f2d264f330c87de2 +size 4568 diff --git a/src/client/assets/room/furnitures/cardboard-box2/cardboard-box2.blend b/src/client/assets/room/furnitures/cardboard-box2/cardboard-box2.blend new file mode 100644 index 000000000..b241853e6 --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box2/cardboard-box2.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e23e45111feb3947b2d1dec2fc7a084b4fb0c24f9bb316f99a415f565e7e6f35 +size 545788 diff --git a/src/client/assets/room/furnitures/cardboard-box2/cardboard-box2.glb b/src/client/assets/room/furnitures/cardboard-box2/cardboard-box2.glb new file mode 100644 index 000000000..844bf0c17 --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box2/cardboard-box2.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c6e8ccda401f74612e46635879d218bcef7bf9eabf3ab855e4d3ab87a33e87b +size 24084 diff --git a/src/client/assets/room/furnitures/cardboard-box2/texture.png b/src/client/assets/room/furnitures/cardboard-box2/texture.png new file mode 100644 index 000000000..91fb91673 --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box2/texture.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e0b2217ee89c2aa0a257d1706a47fc2675b9b64e0e9a5761a2e253afa9840fb +size 19086 diff --git a/src/client/assets/room/furnitures/cardboard-box2/uv.png b/src/client/assets/room/furnitures/cardboard-box2/uv.png new file mode 100644 index 000000000..30e9db386 --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box2/uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5ee2db6e4ffb40b7e1a4bd83a39a5cef6ce7dbdc8b15332c7a48385d624d588 +size 22896 diff --git a/src/client/assets/room/furnitures/cardboard-box3/cardboard-box3.blend b/src/client/assets/room/furnitures/cardboard-box3/cardboard-box3.blend new file mode 100644 index 000000000..4a401ebd4 --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box3/cardboard-box3.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a9d8aec2b62d5b83c0c208f3fedbc9869e5bfcf88db36a88d8eb222287f3d28 +size 547868 diff --git a/src/client/assets/room/furnitures/cardboard-box3/cardboard-box3.glb b/src/client/assets/room/furnitures/cardboard-box3/cardboard-box3.glb new file mode 100644 index 000000000..10b8f258d --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box3/cardboard-box3.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e894027574234de83b4cd00c793b03f6a61928c206d2360e8b8797e354e89f03 +size 23668 diff --git a/src/client/assets/room/furnitures/cardboard-box3/texture.png b/src/client/assets/room/furnitures/cardboard-box3/texture.png new file mode 100644 index 000000000..59ec1952d --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box3/texture.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7ec2d1ede6f37e1bbc810bd06f9aefb37634ebb18f93b206a53a595024c5b14 +size 18670 diff --git a/src/client/assets/room/furnitures/cardboard-box3/texture.xcf b/src/client/assets/room/furnitures/cardboard-box3/texture.xcf new file mode 100644 index 000000000..50c9a6ddb --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box3/texture.xcf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6b5379f1e847686aeae3cb3d427e9bb36b28ea3641097b2c83441379a0d551f +size 242066 diff --git a/src/client/assets/room/furnitures/cardboard-box3/uv.png b/src/client/assets/room/furnitures/cardboard-box3/uv.png new file mode 100644 index 000000000..2163d966d --- /dev/null +++ b/src/client/assets/room/furnitures/cardboard-box3/uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdbffe4e2105b1de997ebcddf74236333424ad40704998383f4ce13aa419e3cb +size 22098 diff --git a/src/client/assets/room/furnitures/carpet-stripe/carpet-stripe.blend b/src/client/assets/room/furnitures/carpet-stripe/carpet-stripe.blend new file mode 100644 index 000000000..f38c7b382 --- /dev/null +++ b/src/client/assets/room/furnitures/carpet-stripe/carpet-stripe.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c67916c00bbb2238fd8801bd33ddd8619aaf2f58a53da8dd5b4c096279487613 +size 481784 diff --git a/src/client/assets/room/furnitures/carpet-stripe/carpet-stripe.glb b/src/client/assets/room/furnitures/carpet-stripe/carpet-stripe.glb new file mode 100644 index 000000000..9970d95bc --- /dev/null +++ b/src/client/assets/room/furnitures/carpet-stripe/carpet-stripe.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1885b00a8c0a89d2e3900ef050ab6fa7fdb09f8b210708d566dc8ea2478ca8f4 +size 4956 diff --git a/src/client/assets/room/furnitures/chair/chair.blend b/src/client/assets/room/furnitures/chair/chair.blend new file mode 100644 index 000000000..723d3e930 --- /dev/null +++ b/src/client/assets/room/furnitures/chair/chair.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88e68d22f3aca5ca26a2511dbbb99720d882081f89dee424379b2641d4479014 +size 500696 diff --git a/src/client/assets/room/furnitures/chair/chair.glb b/src/client/assets/room/furnitures/chair/chair.glb new file mode 100644 index 000000000..6a70ec971 --- /dev/null +++ b/src/client/assets/room/furnitures/chair/chair.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fda0768a319578ba7a672d8ca6ca950998e1f84ba35e4b0e15a4808a5f1fddd4 +size 4252 diff --git a/src/client/assets/room/furnitures/chair2/chair2.blend b/src/client/assets/room/furnitures/chair2/chair2.blend new file mode 100644 index 000000000..a8bc3c0f6 --- /dev/null +++ b/src/client/assets/room/furnitures/chair2/chair2.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe61ce7c2c55624aab45345ef014b23437f4b30a30f251ab7e8967b18bb9f760 +size 523036 diff --git a/src/client/assets/room/furnitures/chair2/chair2.glb b/src/client/assets/room/furnitures/chair2/chair2.glb new file mode 100644 index 000000000..b7a8d57f0 --- /dev/null +++ b/src/client/assets/room/furnitures/chair2/chair2.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:086182612b99abb5f710d5794caab88a858e8b8e9756f1b14c2e002cf330cc6b +size 6140 diff --git a/src/client/assets/room/furnitures/color-box/color-box.blend b/src/client/assets/room/furnitures/color-box/color-box.blend new file mode 100644 index 000000000..492609d74 --- /dev/null +++ b/src/client/assets/room/furnitures/color-box/color-box.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:894eec14bb5cfd5ef12222c741f740b0a183748aefc2803d16e5afda52387677 +size 631168 diff --git a/src/client/assets/room/furnitures/color-box/color-box.glb b/src/client/assets/room/furnitures/color-box/color-box.glb new file mode 100644 index 000000000..b4ff5818b --- /dev/null +++ b/src/client/assets/room/furnitures/color-box/color-box.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd09a7d9b7b3430d375bb4d670740b28a3ecb43c0013d8611abf2c4408ca2116 +size 7492 diff --git a/src/client/assets/room/furnitures/corkboard/corkboard.blend b/src/client/assets/room/furnitures/corkboard/corkboard.blend new file mode 100644 index 000000000..f0b32a1f2 --- /dev/null +++ b/src/client/assets/room/furnitures/corkboard/corkboard.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a7f3e3c3716f284a89f09392f50c4a8c9988ef9905f08749c08e5e6b93d58a2 +size 565404 diff --git a/src/client/assets/room/furnitures/corkboard/corkboard.glb b/src/client/assets/room/furnitures/corkboard/corkboard.glb new file mode 100644 index 000000000..42b5bbd81 --- /dev/null +++ b/src/client/assets/room/furnitures/corkboard/corkboard.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9036429f384589d5154960ba23852a031d3b8c67e21f983879335ae71895dc57 +size 7180 diff --git a/src/client/assets/room/furnitures/cube/cube.blend b/src/client/assets/room/furnitures/cube/cube.blend new file mode 100644 index 000000000..3e39d13b2 --- /dev/null +++ b/src/client/assets/room/furnitures/cube/cube.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acda43ccfbc21f46076a14cb12a22f1d246244835922015541f6f4930012893b +size 646184 diff --git a/src/client/assets/room/furnitures/cube/cube.glb b/src/client/assets/room/furnitures/cube/cube.glb new file mode 100644 index 000000000..e7582ade5 --- /dev/null +++ b/src/client/assets/room/furnitures/cube/cube.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f70817e90861ddc17173e79986f5ac02447635c0cc6edd8eec8f8eabd685678a +size 188392 diff --git a/src/client/assets/room/furnitures/desk/desk.blend b/src/client/assets/room/furnitures/desk/desk.blend new file mode 100644 index 000000000..500e42ef9 --- /dev/null +++ b/src/client/assets/room/furnitures/desk/desk.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a69dcce9ae9e36d023681d6ef5662b90150f97a7feeca496483963285f4d4718 +size 541980 diff --git a/src/client/assets/room/furnitures/desk/desk.glb b/src/client/assets/room/furnitures/desk/desk.glb new file mode 100644 index 000000000..553fdce70 --- /dev/null +++ b/src/client/assets/room/furnitures/desk/desk.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5225fd9d3b6888182b6a68e79178cf56354687124db3ffc75f2de0ccaca3459b +size 10184 diff --git a/src/client/assets/room/furnitures/eraser/cover.png b/src/client/assets/room/furnitures/eraser/cover.png new file mode 100644 index 000000000..88b0d9bd8 --- /dev/null +++ b/src/client/assets/room/furnitures/eraser/cover.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c05c1fc364cd26c42bc5bee2d4306b7ad09289a8fe9554c9505155ca5080c941 +size 11006 diff --git a/src/client/assets/room/furnitures/eraser/cover.psd b/src/client/assets/room/furnitures/eraser/cover.psd new file mode 100644 index 000000000..9e02d8714 --- /dev/null +++ b/src/client/assets/room/furnitures/eraser/cover.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12d9201023121b13d2b3a19530e8d1252f09a7a00676f644456f35d6d720174a +size 219123 diff --git a/src/client/assets/room/furnitures/eraser/eraser-uv.png b/src/client/assets/room/furnitures/eraser/eraser-uv.png new file mode 100644 index 000000000..765189fa7 --- /dev/null +++ b/src/client/assets/room/furnitures/eraser/eraser-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5611e4c7d08edac4813176b629a9c5e15f5bc95067138dc381a6f84aad7b6c50 +size 28597 diff --git a/src/client/assets/room/furnitures/eraser/eraser.blend b/src/client/assets/room/furnitures/eraser/eraser.blend new file mode 100644 index 000000000..7f2cd84c3 --- /dev/null +++ b/src/client/assets/room/furnitures/eraser/eraser.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c68e2a5505488f81acd5fb852b59c0f5d8803870be279b3852351007df544e76 +size 527996 diff --git a/src/client/assets/room/furnitures/eraser/eraser.glb b/src/client/assets/room/furnitures/eraser/eraser.glb new file mode 100644 index 000000000..82787c52a --- /dev/null +++ b/src/client/assets/room/furnitures/eraser/eraser.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61d06064718cc9e3c076dbd2b4d2945600074585716acda49c29cf51d8613dd3 +size 15748 diff --git a/src/client/assets/room/furnitures/facial-tissue/facial-tissue-uv.png b/src/client/assets/room/furnitures/facial-tissue/facial-tissue-uv.png new file mode 100644 index 000000000..6b2b3970a --- /dev/null +++ b/src/client/assets/room/furnitures/facial-tissue/facial-tissue-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66c84c2d76ca7db8c0e8d7deb9307112e52502a96de8ebda6bfe99f913bd6cbe +size 23516 diff --git a/src/client/assets/room/furnitures/facial-tissue/facial-tissue.blend b/src/client/assets/room/furnitures/facial-tissue/facial-tissue.blend new file mode 100644 index 000000000..8d1bb2dfe --- /dev/null +++ b/src/client/assets/room/furnitures/facial-tissue/facial-tissue.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7b7737cff040c95291d6707569f8aa03a7aa5e52b0c15f0b8e1082d0346f7e7 +size 533220 diff --git a/src/client/assets/room/furnitures/facial-tissue/facial-tissue.glb b/src/client/assets/room/furnitures/facial-tissue/facial-tissue.glb new file mode 100644 index 000000000..c76a1dae7 --- /dev/null +++ b/src/client/assets/room/furnitures/facial-tissue/facial-tissue.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e59f36a617f6b8f7bea5a1ae7e8830a58e2cc549796a6054190523a7211d89f0 +size 8332 diff --git a/src/client/assets/room/furnitures/facial-tissue/facial-tissue.png b/src/client/assets/room/furnitures/facial-tissue/facial-tissue.png new file mode 100644 index 000000000..705748762 --- /dev/null +++ b/src/client/assets/room/furnitures/facial-tissue/facial-tissue.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f764cadd106fb2bb848d2433f95f687a71184d39df7e180bfed2a876b9c74cf +size 3888 diff --git a/src/client/assets/room/furnitures/facial-tissue/facial-tissue.psd b/src/client/assets/room/furnitures/facial-tissue/facial-tissue.psd new file mode 100644 index 000000000..733fc38ee --- /dev/null +++ b/src/client/assets/room/furnitures/facial-tissue/facial-tissue.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c4786393a8c9236f8d7f37d59987827005663a4a474bd4956a1e29cb8ac26ab +size 111968 diff --git a/src/client/assets/room/furnitures/fan/fan.blend b/src/client/assets/room/furnitures/fan/fan.blend new file mode 100644 index 000000000..b1882b468 --- /dev/null +++ b/src/client/assets/room/furnitures/fan/fan.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23dc5ce38f127c0a840839ce8e47708e3ef1765242a28455fd883e6dbd081d66 +size 772732 diff --git a/src/client/assets/room/furnitures/fan/fan.glb b/src/client/assets/room/furnitures/fan/fan.glb new file mode 100644 index 000000000..e872ec6e3 --- /dev/null +++ b/src/client/assets/room/furnitures/fan/fan.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65593e078bbb6861788cade8525b170364243780e2abf522f190691b4c87c46c +size 51612 diff --git a/src/client/assets/room/furnitures/keyboard/keyboard.blend b/src/client/assets/room/furnitures/keyboard/keyboard.blend new file mode 100644 index 000000000..4b869ead4 --- /dev/null +++ b/src/client/assets/room/furnitures/keyboard/keyboard.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b11fabed75497140328006c5c7c0be1f31e11222c6b0b488c75457ad31266b7 +size 1005588 diff --git a/src/client/assets/room/furnitures/keyboard/keyboard.glb b/src/client/assets/room/furnitures/keyboard/keyboard.glb new file mode 100644 index 000000000..4acc8175d --- /dev/null +++ b/src/client/assets/room/furnitures/keyboard/keyboard.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aee2c2a48cfe9cc328412d738722f0ce0cab9cc4d7dc4ebe31c526248849f269 +size 132360 diff --git a/src/client/assets/room/furnitures/low-table/low-table.blend b/src/client/assets/room/furnitures/low-table/low-table.blend new file mode 100644 index 000000000..2dd52b263 --- /dev/null +++ b/src/client/assets/room/furnitures/low-table/low-table.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7daed384e1c2e124f1c4f24a61b3de81e891a1831246fb9680418b9a4a4ff7b5 +size 497336 diff --git a/src/client/assets/room/furnitures/low-table/low-table.glb b/src/client/assets/room/furnitures/low-table/low-table.glb new file mode 100644 index 000000000..4f00633ca --- /dev/null +++ b/src/client/assets/room/furnitures/low-table/low-table.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a233469453c623733b34ec4812a8ce2212d90e5f80922d2b4361fdec6d1bb852 +size 2364 diff --git a/src/client/assets/room/furnitures/mat/mat.blend b/src/client/assets/room/furnitures/mat/mat.blend new file mode 100644 index 000000000..4071fee17 --- /dev/null +++ b/src/client/assets/room/furnitures/mat/mat.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3e76888ad544ef6b08cefef5d3dbf0f197f847dd49ded0b116e3cab887390db +size 489304 diff --git a/src/client/assets/room/furnitures/mat/mat.glb b/src/client/assets/room/furnitures/mat/mat.glb new file mode 100644 index 000000000..f443fd812 --- /dev/null +++ b/src/client/assets/room/furnitures/mat/mat.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:191fc3f4da2323cce9148168e9e324f640a1143036a39b22905fa77ee98225c2 +size 1700 diff --git a/src/client/assets/room/furnitures/milk/milk-uv.png b/src/client/assets/room/furnitures/milk/milk-uv.png new file mode 100644 index 000000000..fcdd08ab8 --- /dev/null +++ b/src/client/assets/room/furnitures/milk/milk-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:110906edad9c5e13d77e8599387480e7f6242912f6f8246ba8f2b9fe278625ee +size 50388 diff --git a/src/client/assets/room/furnitures/milk/milk.blend b/src/client/assets/room/furnitures/milk/milk.blend new file mode 100644 index 000000000..09edab85d --- /dev/null +++ b/src/client/assets/room/furnitures/milk/milk.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cd53f03bc3693a02f4e39687f208ac00dccb4bfbdbf322ad7bbae0e64bce340 +size 539836 diff --git a/src/client/assets/room/furnitures/milk/milk.glb b/src/client/assets/room/furnitures/milk/milk.glb new file mode 100644 index 000000000..e8b39ebf9 --- /dev/null +++ b/src/client/assets/room/furnitures/milk/milk.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3d012ad177ecb771bab7a9e746800ed09a31db9b6106632c4777a97544301a6 +size 8456 diff --git a/src/client/assets/room/furnitures/milk/milk.png b/src/client/assets/room/furnitures/milk/milk.png new file mode 100644 index 000000000..36ecf4d27 --- /dev/null +++ b/src/client/assets/room/furnitures/milk/milk.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82a8272e4e255275bf65e17a6d92d30163d9a4ffa23d1d00e396e6430da042d9 +size 3846 diff --git a/src/client/assets/room/furnitures/milk/milk.psd b/src/client/assets/room/furnitures/milk/milk.psd new file mode 100644 index 000000000..f606cd52c --- /dev/null +++ b/src/client/assets/room/furnitures/milk/milk.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e68dd2bcf0f4b0794b1acea8e38d8f38ff83c3c9c1ac68c3112845c3ed9cba9 +size 125415 diff --git a/src/client/assets/room/furnitures/monitor/monitor.blend b/src/client/assets/room/furnitures/monitor/monitor.blend new file mode 100644 index 000000000..7af937c0a --- /dev/null +++ b/src/client/assets/room/furnitures/monitor/monitor.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e297b367395337531dd2a12880756690d9e0bcb1b6967cad12c041a9515302b +size 586836 diff --git a/src/client/assets/room/furnitures/monitor/monitor.glb b/src/client/assets/room/furnitures/monitor/monitor.glb new file mode 100644 index 000000000..128a24dd9 --- /dev/null +++ b/src/client/assets/room/furnitures/monitor/monitor.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:598c40620794c3537d48fec112c715f26df4701da975454f738c5135720da335 +size 40092 diff --git a/src/client/assets/room/furnitures/monitor/monitor.psd b/src/client/assets/room/furnitures/monitor/monitor.psd new file mode 100644 index 000000000..4bc2c729c --- /dev/null +++ b/src/client/assets/room/furnitures/monitor/monitor.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d825d08c1f18906f3a16137a9fc7a25a057517a85971f9782363559cf121b5b0 +size 3692204 diff --git a/src/client/assets/room/furnitures/monitor/screen-uv.png b/src/client/assets/room/furnitures/monitor/screen-uv.png new file mode 100644 index 000000000..964787c91 --- /dev/null +++ b/src/client/assets/room/furnitures/monitor/screen-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5eaf4413c7fcd3b42c7b45269120047332b3cf0900b3a0ae7b53cb63714b4ede +size 5951 diff --git a/src/client/assets/room/furnitures/monitor/screen.jpg b/src/client/assets/room/furnitures/monitor/screen.jpg new file mode 100644 index 000000000..eeb072bb8 --- /dev/null +++ b/src/client/assets/room/furnitures/monitor/screen.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c533a8b9110fc597650f9112702103da1956a6cbe8acead3211186610dbc4e2 +size 29629 diff --git a/src/client/assets/room/furnitures/moon/moon.blend b/src/client/assets/room/furnitures/moon/moon.blend new file mode 100644 index 000000000..d899afb66 --- /dev/null +++ b/src/client/assets/room/furnitures/moon/moon.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc9289bebf658662e17b537f4004894861de229a0ca2b81aa47388cc18885bc6 +size 725536 diff --git a/src/client/assets/room/furnitures/moon/moon.glb b/src/client/assets/room/furnitures/moon/moon.glb new file mode 100644 index 000000000..f675d0d27 --- /dev/null +++ b/src/client/assets/room/furnitures/moon/moon.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c8e31e99fc62a29b493749f6b94fa46c8284e76bd758f8324ad1d617843cb1f +size 122112 diff --git a/src/client/assets/room/furnitures/moon/moon.jpg b/src/client/assets/room/furnitures/moon/moon.jpg new file mode 100644 index 000000000..51e079c4e --- /dev/null +++ b/src/client/assets/room/furnitures/moon/moon.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca01865033efc6e1a880ef8946fe59a1a700594d0f26272eb18e5c1a41c4fedc +size 87155 diff --git a/src/client/assets/room/furnitures/mousepad/mousepad.blend b/src/client/assets/room/furnitures/mousepad/mousepad.blend new file mode 100644 index 000000000..036d13acd --- /dev/null +++ b/src/client/assets/room/furnitures/mousepad/mousepad.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4097bfccab88175370b49a6daa8cf54dcf205eeb15e4c1d44d194f7d80db4545 +size 495008 diff --git a/src/client/assets/room/furnitures/mousepad/mousepad.glb b/src/client/assets/room/furnitures/mousepad/mousepad.glb new file mode 100644 index 000000000..55dfd155f --- /dev/null +++ b/src/client/assets/room/furnitures/mousepad/mousepad.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d98174d1f2b2981d1c0c6b74e97caf9fc99fec996da05b8a804a32ebb8c46c7a +size 4360 diff --git a/src/client/assets/room/furnitures/pc/motherboard-uv.png b/src/client/assets/room/furnitures/pc/motherboard-uv.png new file mode 100644 index 000000000..40b55d49d --- /dev/null +++ b/src/client/assets/room/furnitures/pc/motherboard-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1792015f0d347f27e41cdc8e208f413f8506d15229661ef7b68be82fadf6c7b4 +size 21944 diff --git a/src/client/assets/room/furnitures/pc/motherboard-uv.psd b/src/client/assets/room/furnitures/pc/motherboard-uv.psd new file mode 100644 index 000000000..5c713c38c --- /dev/null +++ b/src/client/assets/room/furnitures/pc/motherboard-uv.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f954199f4edec36aed779b0fc961d04689f11957e872af3ba6f5cefd5997735 +size 7131432 diff --git a/src/client/assets/room/furnitures/pc/motherboard.jpg b/src/client/assets/room/furnitures/pc/motherboard.jpg new file mode 100644 index 000000000..51bbcca8c --- /dev/null +++ b/src/client/assets/room/furnitures/pc/motherboard.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf55000141da087d4e1b774ccfaa6693b8612e3566f67c17963bf672a3b56e02 +size 68860 diff --git a/src/client/assets/room/furnitures/pc/pc.blend b/src/client/assets/room/furnitures/pc/pc.blend new file mode 100644 index 000000000..cfa3d417f --- /dev/null +++ b/src/client/assets/room/furnitures/pc/pc.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:881e55e5ea3865aee9c25431c71333ffc676ed21b6d64353762f459942fbcc29 +size 818152 diff --git a/src/client/assets/room/furnitures/pc/pc.glb b/src/client/assets/room/furnitures/pc/pc.glb new file mode 100644 index 000000000..1d24ac276 --- /dev/null +++ b/src/client/assets/room/furnitures/pc/pc.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:449583fc86a14ef45f944f521f0a451a4bb2f9fd13504d74c115b0270cae13a8 +size 103620 diff --git a/src/client/assets/room/furnitures/pencil/pencil.blend b/src/client/assets/room/furnitures/pencil/pencil.blend new file mode 100644 index 000000000..5830e254c --- /dev/null +++ b/src/client/assets/room/furnitures/pencil/pencil.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c398fb62ca47b5c3a28dc3e1b6be4be033103d47b89a50747f52c2c15b41098 +size 683032 diff --git a/src/client/assets/room/furnitures/pencil/pencil.glb b/src/client/assets/room/furnitures/pencil/pencil.glb new file mode 100644 index 000000000..f14504941 --- /dev/null +++ b/src/client/assets/room/furnitures/pencil/pencil.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e07e8d7fdc061604bcb94a4fbbd7350a0dbad5eff4805204133c5f0af432e0ca +size 7788 diff --git a/src/client/assets/room/furnitures/photoframe/photo-uv.png b/src/client/assets/room/furnitures/photoframe/photo-uv.png new file mode 100644 index 000000000..7b72caa4d --- /dev/null +++ b/src/client/assets/room/furnitures/photoframe/photo-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:edfe5880be397ac68672c26470fcb28ea5b25dc74e5c37ffca66a3f21b4e6bbe +size 20828 diff --git a/src/client/assets/room/furnitures/photoframe/photo.jpg b/src/client/assets/room/furnitures/photoframe/photo.jpg new file mode 100644 index 000000000..7dd3f87fc --- /dev/null +++ b/src/client/assets/room/furnitures/photoframe/photo.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc6f08f8939a657ce9c62ac6c4bb7f7d58375a2be8421373aa612331f99357d5 +size 31845 diff --git a/src/client/assets/room/furnitures/photoframe/photoframe.blend b/src/client/assets/room/furnitures/photoframe/photoframe.blend new file mode 100644 index 000000000..5e6b7e2bc --- /dev/null +++ b/src/client/assets/room/furnitures/photoframe/photoframe.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfac50eea15c1856c1da46adbbe5e9553a8a791cb2b45bdf2085d11c6f98a719 +size 551416 diff --git a/src/client/assets/room/furnitures/photoframe/photoframe.glb b/src/client/assets/room/furnitures/photoframe/photoframe.glb new file mode 100644 index 000000000..0743635ff --- /dev/null +++ b/src/client/assets/room/furnitures/photoframe/photoframe.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3c8230e48a2d992e7c65d002bff6c354fb3ddd4abfbafda986e4da918d457f5 +size 37612 diff --git a/src/client/assets/room/furnitures/piano/piano.blend b/src/client/assets/room/furnitures/piano/piano.blend new file mode 100644 index 000000000..bfc08201c --- /dev/null +++ b/src/client/assets/room/furnitures/piano/piano.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46118c3e67e8da35293804ada926f6e894b5d5e38f5bda147ccfa84c03a97ea9 +size 713228 diff --git a/src/client/assets/room/furnitures/piano/piano.glb b/src/client/assets/room/furnitures/piano/piano.glb new file mode 100644 index 000000000..da65c7c71 --- /dev/null +++ b/src/client/assets/room/furnitures/piano/piano.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3eaf2446b3c9feba2d42bc65d5c494dc8221d63b62641bfe17e44820cb97314a +size 73320 diff --git a/src/client/assets/room/furnitures/pinguin/pinguin.glb b/src/client/assets/room/furnitures/pinguin/pinguin.glb new file mode 100644 index 000000000..dd444fc50 --- /dev/null +++ b/src/client/assets/room/furnitures/pinguin/pinguin.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60963376ddbcf4635e73880ee29107ab8951c6a97314f03727900416c0e7db3b +size 60192 diff --git a/src/client/assets/room/furnitures/plant/plant-soil-uv.png b/src/client/assets/room/furnitures/plant/plant-soil-uv.png new file mode 100644 index 000000000..4a683cb58 --- /dev/null +++ b/src/client/assets/room/furnitures/plant/plant-soil-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c445bdf43090600d440e7e0a110fe21b4d09039d2b3d51a1d78bb9a69ca8f10 +size 23726 diff --git a/src/client/assets/room/furnitures/plant/plant-soil.png b/src/client/assets/room/furnitures/plant/plant-soil.png new file mode 100644 index 000000000..142a657ef --- /dev/null +++ b/src/client/assets/room/furnitures/plant/plant-soil.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1818398303e8c7eb3b61cf9eac28f1927180826827c15ff7728d5739bc5ef041 +size 13370 diff --git a/src/client/assets/room/furnitures/plant/plant-soil.psd b/src/client/assets/room/furnitures/plant/plant-soil.psd new file mode 100644 index 000000000..475223756 --- /dev/null +++ b/src/client/assets/room/furnitures/plant/plant-soil.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be4adb11ca27fca4e50c8e464d6f0355df3dfecd3dbf7b3b59c028d9bc6860c3 +size 390188 diff --git a/src/client/assets/room/furnitures/plant/plant.blend b/src/client/assets/room/furnitures/plant/plant.blend new file mode 100644 index 000000000..1194cbe66 --- /dev/null +++ b/src/client/assets/room/furnitures/plant/plant.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25ca98b542b8cfc603b44d457d09c121407e91839ae418386ac5c80b2bab572e +size 604488 diff --git a/src/client/assets/room/furnitures/plant/plant.glb b/src/client/assets/room/furnitures/plant/plant.glb new file mode 100644 index 000000000..668ced52d --- /dev/null +++ b/src/client/assets/room/furnitures/plant/plant.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e096bae7ddda7eabf6714785a09d9ac25c1096ce3dc292eb8877209504d4899b +size 27664 diff --git a/src/client/assets/room/furnitures/plant2/plant2.blend b/src/client/assets/room/furnitures/plant2/plant2.blend new file mode 100644 index 000000000..c1e480975 --- /dev/null +++ b/src/client/assets/room/furnitures/plant2/plant2.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23f6471d3adb31d2a74f70f353deeed037a7b22625d7a45ca99a6f1980024be9 +size 1060816 diff --git a/src/client/assets/room/furnitures/plant2/plant2.glb b/src/client/assets/room/furnitures/plant2/plant2.glb new file mode 100644 index 000000000..c994c7c8c --- /dev/null +++ b/src/client/assets/room/furnitures/plant2/plant2.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03e9638fd2f24dca928e8dccab9528f32e085660a2734348018a5448ec8b70bc +size 133212 diff --git a/src/client/assets/room/furnitures/plant2/soil.png b/src/client/assets/room/furnitures/plant2/soil.png new file mode 100644 index 000000000..142a657ef --- /dev/null +++ b/src/client/assets/room/furnitures/plant2/soil.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1818398303e8c7eb3b61cf9eac28f1927180826827c15ff7728d5739bc5ef041 +size 13370 diff --git a/src/client/assets/room/furnitures/poster-h/poster-h.blend b/src/client/assets/room/furnitures/poster-h/poster-h.blend new file mode 100644 index 000000000..c7cf70009 --- /dev/null +++ b/src/client/assets/room/furnitures/poster-h/poster-h.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:039f7a2b65fb905c46c4736732362dbb6c64b7cb3617faf8c5ad9c913079ec89 +size 667604 diff --git a/src/client/assets/room/furnitures/poster-h/poster-h.glb b/src/client/assets/room/furnitures/poster-h/poster-h.glb new file mode 100644 index 000000000..934f87fe0 --- /dev/null +++ b/src/client/assets/room/furnitures/poster-h/poster-h.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87308bdcb4e98c61a5e53460347fae2dc018decf50c6584ced794a8f192c2c1b +size 1280 diff --git a/src/client/assets/room/furnitures/poster-h/uv.png b/src/client/assets/room/furnitures/poster-h/uv.png new file mode 100644 index 000000000..f069b4a22 --- /dev/null +++ b/src/client/assets/room/furnitures/poster-h/uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8893515b92e941bdae4f5bbb43ba3a1c8a703ddb0741d18a49fec2fc4ac954d +size 20629 diff --git a/src/client/assets/room/furnitures/poster-v/poster-v.blend b/src/client/assets/room/furnitures/poster-v/poster-v.blend new file mode 100644 index 000000000..a166ec7d1 --- /dev/null +++ b/src/client/assets/room/furnitures/poster-v/poster-v.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7cb8d48ff1603f0218e2af2cafdc7fbcca56b83e6d2ef1a39c385ccb3ec481f9 +size 650740 diff --git a/src/client/assets/room/furnitures/poster-v/poster-v.glb b/src/client/assets/room/furnitures/poster-v/poster-v.glb new file mode 100644 index 000000000..40a649b4b --- /dev/null +++ b/src/client/assets/room/furnitures/poster-v/poster-v.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b44189cfa637c6297aa554ffe05024f240456de820658140d7f5e1a3e92bd5f0 +size 1280 diff --git a/src/client/assets/room/furnitures/poster-v/uv.png b/src/client/assets/room/furnitures/poster-v/uv.png new file mode 100644 index 000000000..9595e8e7e --- /dev/null +++ b/src/client/assets/room/furnitures/poster-v/uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6252cc21e43622847fa97ceecff19898caacdd75cad40968bc8d5efc1c3b792 +size 22374 diff --git a/src/client/assets/room/furnitures/pudding/pudding.blend b/src/client/assets/room/furnitures/pudding/pudding.blend new file mode 100644 index 000000000..7158460ef --- /dev/null +++ b/src/client/assets/room/furnitures/pudding/pudding.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:741b69f79bebf9c3eef976db2ff58cbfc0d0928629d8fb92f929c1a16596b54d +size 694784 diff --git a/src/client/assets/room/furnitures/pudding/pudding.glb b/src/client/assets/room/furnitures/pudding/pudding.glb new file mode 100644 index 000000000..6a0ab36b5 --- /dev/null +++ b/src/client/assets/room/furnitures/pudding/pudding.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2256f5143f5dceebb3e18b04ecf2ff8664cfe0515a2f562adafce169305133d +size 10612 diff --git a/src/client/assets/room/furnitures/rubik-cube/rubik-cube.blend b/src/client/assets/room/furnitures/rubik-cube/rubik-cube.blend new file mode 100644 index 000000000..b0b3e0282 --- /dev/null +++ b/src/client/assets/room/furnitures/rubik-cube/rubik-cube.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fe55c423b8757b54f75a21acc205de741cb145874fc8cb9faccd891a6262eea +size 745960 diff --git a/src/client/assets/room/furnitures/rubik-cube/rubik-cube.glb b/src/client/assets/room/furnitures/rubik-cube/rubik-cube.glb new file mode 100644 index 000000000..b7f35471f --- /dev/null +++ b/src/client/assets/room/furnitures/rubik-cube/rubik-cube.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:340684678592e28c95db89e413b3cab18d4ace5dc677acc8e7659a40c8b80ebd +size 67688 diff --git a/src/client/assets/room/furnitures/server/rack-uv.png b/src/client/assets/room/furnitures/server/rack-uv.png new file mode 100644 index 000000000..85992eafc --- /dev/null +++ b/src/client/assets/room/furnitures/server/rack-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da2feb4a66dbc5f0b6f5312648df4e3c32c5a557c4b3030474904b50b10a64b3 +size 27318 diff --git a/src/client/assets/room/furnitures/server/rack.png b/src/client/assets/room/furnitures/server/rack.png new file mode 100644 index 000000000..bbf54ae5c --- /dev/null +++ b/src/client/assets/room/furnitures/server/rack.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b2de1f1ec01d3b575226c4098160784caaeb9bc84fd24fcf7ac52e457c847d3 +size 9641 diff --git a/src/client/assets/room/furnitures/server/server.blend b/src/client/assets/room/furnitures/server/server.blend new file mode 100644 index 000000000..63b2b8c5e --- /dev/null +++ b/src/client/assets/room/furnitures/server/server.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd9217f211f78447fbf82c7b431f94bbb6fb64996e8fe2abc40dbd8e5a28ad69 +size 684372 diff --git a/src/client/assets/room/furnitures/server/server.glb b/src/client/assets/room/furnitures/server/server.glb new file mode 100644 index 000000000..d142b162d --- /dev/null +++ b/src/client/assets/room/furnitures/server/server.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2847517cf2f45e0d60e05d346320e5147461632dd99bbfee4fbbdf461e722ad0 +size 149480 diff --git a/src/client/assets/room/furnitures/server/server.png b/src/client/assets/room/furnitures/server/server.png new file mode 100644 index 000000000..cc5a23738 --- /dev/null +++ b/src/client/assets/room/furnitures/server/server.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eed84c2395eb2d08e3b10280f6d847d19ae89d5be14f49ebc421a18d6b151f66 +size 124668 diff --git a/src/client/assets/room/furnitures/server/uv.png b/src/client/assets/room/furnitures/server/uv.png new file mode 100644 index 000000000..299e994e8 --- /dev/null +++ b/src/client/assets/room/furnitures/server/uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec4efcd1de627bf6a063f56554083f5beceb2a0177b0a4520d82f01498a98209 +size 22827 diff --git a/src/client/assets/room/furnitures/tv/screen-uv.png b/src/client/assets/room/furnitures/tv/screen-uv.png new file mode 100644 index 000000000..c422bf3ab --- /dev/null +++ b/src/client/assets/room/furnitures/tv/screen-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdc6c52f09d98c4a696549219dce7dfb0c0733f21a1ea80153790ab1a14f73fa +size 21040 diff --git a/src/client/assets/room/furnitures/tv/tv.blend b/src/client/assets/room/furnitures/tv/tv.blend new file mode 100644 index 000000000..29042aed7 --- /dev/null +++ b/src/client/assets/room/furnitures/tv/tv.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49a76fbe08f8cbe581d917d4e267ae35e37bc6ee43307ed39b394b334ecb6dc7 +size 587640 diff --git a/src/client/assets/room/furnitures/tv/tv.glb b/src/client/assets/room/furnitures/tv/tv.glb new file mode 100644 index 000000000..a82b9497c --- /dev/null +++ b/src/client/assets/room/furnitures/tv/tv.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba430e92df220721d8665977957963ffc5d2265094dc017623a6fc2c0dba3db6 +size 8580 diff --git a/src/client/assets/room/furnitures/wall-clock/wall-clock.blend b/src/client/assets/room/furnitures/wall-clock/wall-clock.blend new file mode 100644 index 000000000..297bca096 --- /dev/null +++ b/src/client/assets/room/furnitures/wall-clock/wall-clock.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c311d9471f14b26a35de4a068a6772c63439788a3826fea8d4672de7909d3d95 +size 574128 diff --git a/src/client/assets/room/furnitures/wall-clock/wall-clock.glb b/src/client/assets/room/furnitures/wall-clock/wall-clock.glb new file mode 100644 index 000000000..ab7eddea8 --- /dev/null +++ b/src/client/assets/room/furnitures/wall-clock/wall-clock.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d74cccebf9fee11716e379913bf92fdf0f7cb899fb4bdf146903da9c893a7f9a +size 47848 diff --git a/src/client/assets/room/rooms/default/default.blend b/src/client/assets/room/rooms/default/default.blend new file mode 100644 index 000000000..cdd716b0b --- /dev/null +++ b/src/client/assets/room/rooms/default/default.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98e8f50c0f456faf7601e699a7865782381faba56c357e33a1a491f1e0c622ed +size 618364 diff --git a/src/client/assets/room/rooms/default/default.glb b/src/client/assets/room/rooms/default/default.glb new file mode 100644 index 000000000..7c4a6b945 --- /dev/null +++ b/src/client/assets/room/rooms/default/default.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:027d6c86e3cc4617adad8555ef94d7165ee0dbc4a38260e2bfbc107b8f2734b7 +size 12280 diff --git a/src/client/assets/room/rooms/washitsu/husuma-uv.png b/src/client/assets/room/rooms/washitsu/husuma-uv.png new file mode 100644 index 000000000..7c81ab3f2 --- /dev/null +++ b/src/client/assets/room/rooms/washitsu/husuma-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b8691294e7a9519acbccd33b27c08b189cd28f75f60c898c05c58e86be58b0 +size 22586 diff --git a/src/client/assets/room/rooms/washitsu/husuma.png b/src/client/assets/room/rooms/washitsu/husuma.png new file mode 100644 index 000000000..d1e6d6339 --- /dev/null +++ b/src/client/assets/room/rooms/washitsu/husuma.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60fc7d397904552e4bd99856f362daacbe90eccd3ac7dbe316ab589d0b28e9b0 +size 4336 diff --git a/src/client/assets/room/rooms/washitsu/tatami-single1600.png b/src/client/assets/room/rooms/washitsu/tatami-single1600.png new file mode 100644 index 000000000..1738295af --- /dev/null +++ b/src/client/assets/room/rooms/washitsu/tatami-single1600.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3c859b872e4046a672b38ad9b0e6c5e992143a2845cbee2f3ae5aaab9b963a3 +size 1191346 diff --git a/src/client/assets/room/rooms/washitsu/tatami-uv.png b/src/client/assets/room/rooms/washitsu/tatami-uv.png new file mode 100644 index 000000000..45edd4883 --- /dev/null +++ b/src/client/assets/room/rooms/washitsu/tatami-uv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d9f282b6b9dff8af4f72c3cd713063ed72a883a94fc6e237f86b29c71551610 +size 22804 diff --git a/src/client/assets/room/rooms/washitsu/tatami.afdesign b/src/client/assets/room/rooms/washitsu/tatami.afdesign new file mode 100644 index 000000000..5ce6206e7 --- /dev/null +++ b/src/client/assets/room/rooms/washitsu/tatami.afdesign @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:288912fa868a162258a314b108beda8e85a6faebfa9103dfab9fb8a96e5ee71d +size 2501804 diff --git a/src/client/assets/room/rooms/washitsu/tatami.png b/src/client/assets/room/rooms/washitsu/tatami.png new file mode 100644 index 000000000..9d4196098 --- /dev/null +++ b/src/client/assets/room/rooms/washitsu/tatami.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21fc5c7c6eff2d85426a038a637132f7421d1800422c08e921efa6934982b164 +size 315585 diff --git a/src/client/assets/room/rooms/washitsu/washitsu.blend b/src/client/assets/room/rooms/washitsu/washitsu.blend new file mode 100644 index 000000000..40e61285f --- /dev/null +++ b/src/client/assets/room/rooms/washitsu/washitsu.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:236a2bf548e309cd6eeb34efd91632a8c75c2019703c9ac634b3f66b45a74370 +size 664000 diff --git a/src/client/assets/room/rooms/washitsu/washitsu.glb b/src/client/assets/room/rooms/washitsu/washitsu.glb new file mode 100644 index 000000000..09d28db44 --- /dev/null +++ b/src/client/assets/room/rooms/washitsu/washitsu.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:148217d1fe7602645840f68dc834abc21ebaa2ad03ae3c9135776259ecd7ec95 +size 415180 diff --git a/src/models/entities/user-profile.ts b/src/models/entities/user-profile.ts index 61e80049c..1244fa439 100644 --- a/src/models/entities/user-profile.ts +++ b/src/models/entities/user-profile.ts @@ -99,6 +99,12 @@ export class UserProfile { }) public clientData: Record; + @Column('jsonb', { + default: {}, + comment: 'The room data of the User.' + }) + public room: Record; + @Column('boolean', { default: false, }) diff --git a/src/server/api/endpoints/room/show.ts b/src/server/api/endpoints/room/show.ts new file mode 100644 index 000000000..17634834a --- /dev/null +++ b/src/server/api/endpoints/room/show.ts @@ -0,0 +1,92 @@ +import $ from 'cafy'; +import define from '../../define'; +import { ApiError } from '../../error'; +import { Users, UserProfiles } from '../../../../models'; +import { ID } from '../../../../misc/cafy-id'; +import { ensure } from '../../../../prelude/ensure'; +import { toPunyNullable } from '../../../../misc/convert-host'; + +export const meta = { + desc: { + 'ja-JP': '指定した部屋の情報を取得します。', + }, + + tags: ['room'], + + requireCredential: false, + + params: { + userId: { + validator: $.optional.type(ID), + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } + }, + + username: { + validator: $.optional.str + }, + + host: { + validator: $.optional.nullable.str + }, + }, + + errors: { + noSuchUser: { + message: 'No such user.', + code: 'NO_SUCH_USER', + id: '7ad3fa3e-5e12-42f0-b23a-f3d13f10ee4b' + } + } +}; + +export default define(meta, async (ps, me) => { + const user = await Users.findOne(ps.userId != null + ? { id: ps.userId } + : { usernameLower: ps.username!.toLowerCase(), host: toPunyNullable(ps.host) }); + + if (user == null) { + throw new ApiError(meta.errors.noSuchUser); + } + + const profile = await UserProfiles.findOne(user.id).then(ensure); + + if (profile.room.furnitures == null) { + await UserProfiles.update({ userId: user.id }, { + room: { + furnitures: [], + ...profile.room + } + }); + + profile.room.furnitures = []; + } + + if (profile.room.roomType == null) { + const initialType = 'default'; + await UserProfiles.update({ userId: user.id }, { + room: { + roomType: initialType as any, + ...profile.room + } + }); + + profile.room.roomType = initialType; + } + + if (profile.room.carpetColor == null) { + const initialColor = '#85CAF0'; + await UserProfiles.update({ userId: user.id }, { + room: { + carpetColor: initialColor as any, + ...profile.room + } + }); + + profile.room.carpetColor = initialColor; + } + + return profile.room; +}); diff --git a/src/server/api/endpoints/room/update.ts b/src/server/api/endpoints/room/update.ts new file mode 100644 index 000000000..897f65f2d --- /dev/null +++ b/src/server/api/endpoints/room/update.ts @@ -0,0 +1,48 @@ +import $ from 'cafy'; +import { publishMainStream } from '../../../../services/stream'; +import define from '../../define'; +import { Users, UserProfiles } from '../../../../models'; + +export const meta = { + requireCredential: true, + + params: { + room: { + validator: $.obj({ + furnitures: $.arr($.obj({ + id: $.str, + type: $.str, + position: $.obj({ + x: $.num, + y: $.num, + z: $.num, + }), + rotation: $.obj({ + x: $.num, + y: $.num, + z: $.num, + }), + props: $.optional.nullable.obj(), + })), + roomType: $.str, + carpetColor: $.str + }) + }, + }, +}; + +export default define(meta, async (ps, user) => { + await UserProfiles.update({ userId: user.id }, { + room: ps.room as any + }); + + const iObj = await Users.pack(user.id, user, { + detail: true, + includeSecrets: true + }); + + // Publish meUpdated event + publishMainStream(user.id, 'meUpdated', iObj); + + return iObj; +}); diff --git a/tsconfig.json b/tsconfig.json index 4f1d1b9cd..62107507a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,7 @@ "sourceMap": true, "target": "es2017", "module": "commonjs", + "moduleResolution": "node", "removeComments": false, "noLib": false, "strict": true, diff --git a/yarn.lock b/yarn.lock index 1ac9e145f..1d5bf3226 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10994,6 +10994,11 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +three@0.107.0: + version "0.107.0" + resolved "https://registry.yarnpkg.com/three/-/three-0.107.0.tgz#0c862c348d61bd3f22058e01f5e771c1294315a1" + integrity sha512-vqbKJRLBEviPVa7poEzXocobicwxzsctr5mnymA7n8fEzcVS49rYP0RrwqZ98JqujRoruK+/YzcchNpRP+kXsQ== + through2-concurrent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/through2-concurrent/-/through2-concurrent-2.0.0.tgz#c9dd2c146504ec9962dbc86a5168b63d662669fa"