1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-13 16:25:44 +02:00
This commit is contained in:
syuilo
2026-04-08 10:06:36 +09:00
parent 3356cf36d3
commit 64fd4b7c0a
11 changed files with 52 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -10,6 +10,7 @@
* - BlenderならYがマイナスになる方向が手前。(=スザンヌを設置してデフォルトで顔が向いている方向が手前)
* - 壁面設置の場合は壁面に接する面のY軸座標が0になるように設計すること。
* - ポリゴン数は、極端にハイポリでない限りはパフォーマンスに影響を及ぼすことは少ないです(必要ドローコール数の多寡の方が重要)。とはいえ、モデリングのし易さを考えると低〜中ポリゴン程度を推奨します。
* 目安として、例えば円柱を考えると、直径20cm程度以下なら頂点数16、直径2cm程度以下なら頂点数8、0.5cm程度以下なら頂点数4程度を推奨します。(2の乗数を推奨)
* - メッシュ名を __TOP__ で始めると、その面の上にモノを置けることを示す。当該メッシュはレンダリングでは表示されません。
* - メッシュ名を __SIDE__ で始めると、その面にモノを貼り付けられることを示す。当該メッシュはレンダリングでは表示されません。
* - なお、現状 __TOP__ / __SIDE__ メッシュは単一の面でなければなりません。つまりArray Modifierなどを適用した状態では正しく動作しません。
@@ -251,6 +252,11 @@ class ModelManager {
const uvs = new Array(vertexCount * 2).fill(0);
newMesh.setVerticesData(BABYLON.VertexBuffer.UVKind, uvs, false, 2);
}
if (newMesh.getVerticesData(BABYLON.VertexBuffer.UV2Kind) == null) {
const vertexCount = newMesh.getTotalVertices();
const uvs = new Array(vertexCount * 2).fill(0);
newMesh.setVerticesData(BABYLON.VertexBuffer.UV2Kind, uvs, false, 2);
}
toMerge.push(newMesh);
}

View File

@@ -18,6 +18,7 @@ import { cactusS } from './objects/cactusS.js';
import { cardboardBox } from './objects/cardboardBox.js';
import { ceilingFanLight } from './objects/ceilingFanLight.js';
import { chair } from './objects/chair.js';
import { coffeeCup } from './objects/coffeeCup.js';
import { colorBox } from './objects/colorBox.js';
import { cupNoodle } from './objects/cupNoodle.js';
import { debugHipoly } from './objects/debugHipoly.js';
@@ -51,6 +52,7 @@ import { powerStrip } from './objects/powerStrip.js';
import { rolledUpPoster } from './objects/rolledUpPoster.js';
import { roundRug } from './objects/roundRug.js';
import { router } from './objects/router.js';
import { siphon } from './objects/siphon.js';
import { snakeplant } from './objects/snakeplant.js';
import { speaker } from './objects/speaker.js';
import { steelRack } from './objects/steelRack.js';
@@ -81,6 +83,7 @@ export const OBJECT_DEFS = [
cardboardBox,
ceilingFanLight,
chair,
coffeeCup,
colorBox,
cupNoodle,
desk,
@@ -113,6 +116,7 @@ export const OBJECT_DEFS = [
rolledUpPoster,
roundRug,
router,
siphon,
snakeplant,
speaker,
steelRack,

View File

@@ -0,0 +1,21 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineObject } from '../engine.js';
export const coffeeCup = defineObject({
id: 'coffeeCup',
name: 'Coffee Cup',
options: {
schema: {},
default: {},
},
placement: 'top',
createInstance: () => {
return {
interactions: {},
};
},
});

View File

@@ -0,0 +1,21 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineObject } from '../engine.js';
export const siphon = defineObject({
id: 'siphon',
name: 'Siphon',
options: {
schema: {},
default: {},
},
placement: 'top',
createInstance: () => {
return {
interactions: {},
};
},
});