1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-28 07:24:38 +02:00
This commit is contained in:
syuilo
2026-06-15 16:18:20 +09:00
parent a26d78d573
commit c1eb67a4ce
125 changed files with 341 additions and 341 deletions

View File

@@ -541,7 +541,7 @@ export class WorldEngine extends EngineBase<{
this.fixedCamera.position = new BABYLON.Vector3(0, cm(120), 0);
this.fixedCamera.rotation = new BABYLON.Vector3(0, 0, 0);
this.scene.activeCamera = this.fixedCamera;
this.selectFuniture(null);
this.selectFurniture(null);
}
public standUp() {

View File

@@ -9,7 +9,7 @@ import { scaleMorph, Timer } from '../utility.js';
import { convertRawOptions, type ConvertedOptions, type RawOptions } from '../mono.js';
import { getFurnitureDef } from './furniture-defs.js';
import { ModelManager, SYSTEM_MESH_NAMES } from './utility.js';
import type { RoomFunitureInstance } from './furniture.js';
import type { RoomFurnitureInstance } from './furniture.js';
import type { RoomAttachments } from 'misskey-world/src/room/type.js';
function mergeMeshes(meshes: BABYLON.Mesh[], root: BABYLON.Mesh, hasTexture: boolean) {
@@ -60,7 +60,7 @@ export class FurnitureContainer {
private options: ConvertedOptions;
public root: BABYLON.TransformNode;
private subRoot: BABYLON.TransformNode | null = null;
public instance: RoomFunitureInstance | null = null;
public instance: RoomFurnitureInstance | null = null;
public model: ModelManager | null = null;
private scene: BABYLON.Scene;
public registerMeshes: (meshes: BABYLON.Mesh[]) => void = () => {};
@@ -203,8 +203,8 @@ export class FurnitureContainer {
// mesh.unfreezeWorldMatrix();
// mesh.computeWorldMatrix(true);
// const updateChildStickyObjectPosition = (furnitureId: string) => {
// const stickyFunitureIds = Array.from(this.roomState.installedFurnitures.filter(o => o.sticky === furnitureId)).map(o => o.id);
// for (const soid of stickyFunitureIds) {
// const stickyFurnitureIds = Array.from(this.roomState.installedFurnitures.filter(o => o.sticky === furnitureId)).map(o => o.id);
// for (const soid of stickyFurnitureIds) {
// const soMesh = this.objectEntities.get(soid)!.rootMesh;
// soMesh.unfreezeWorldMatrix();
// for (const m of soMesh.getChildMeshes()) {

View File

@@ -43,7 +43,7 @@ const BAKE_TRANSFORM = false; // 実験的
const IGNORE_FUNITURES: string[] = ['aquarium']; // for debug
const IN_WEB_WORKER = typeof window === 'undefined';
function enableFunitureCollision(meshes: BABYLON.Mesh[]) {
function enableFurnitureCollision(meshes: BABYLON.Mesh[]) {
for (const mesh of meshes) {
if (mesh.name.includes('__COLLISION__')) {
mesh.checkCollisions = true;
@@ -66,7 +66,7 @@ export class RoomEngine extends EngineBase<{
'changeSelectedState': (ctx: {
selected: {
furnitureId: string;
funitureState: RoomState_InstalledFurniture;
furnitureState: RoomState_InstalledFurniture;
interacions: {
id: string;
label: string;
@@ -102,7 +102,7 @@ export class RoomEngine extends EngineBase<{
// TODO: たぶんオブジェクト内の値のmutateはsetで検知できないので、そのような操作を実際に行うようになった & それを検知する必要性が出てきたら専用の設定関数などを新設してそれを使わせる
private _grabbingCtx: {
furnitureId: string;
funitureType: string;
furnitureType: string;
forInstall: boolean;
mesh: BABYLON.TransformNode;
originalDiffOfPosition: BABYLON.Vector3;
@@ -110,7 +110,7 @@ export class RoomEngine extends EngineBase<{
distance: number;
rotation: number;
ghost: BABYLON.TransformNode;
descendantStickyFunitureIds: string[];
descendantStickyFurnitureIds: string[];
onMove?: (info: { position: BABYLON.Vector3; rotation: BABYLON.Vector3; stickyFurnitureId: string | null; stickyPlaneId: string | null; }) => void;
onCancel?: () => void;
onDone?: () => void;
@@ -127,8 +127,8 @@ export class RoomEngine extends EngineBase<{
private _selected: {
furnitureId: string;
furnitureContainer: RoomEngine['furnitureContainers'] extends Map<string, infer V> ? V : never;
funitureState: RoomState_InstalledFurniture;
funitureDef: FurnitureDef;
furnitureState: RoomState_InstalledFurniture;
furnitureDef: FurnitureDef;
} | null = null;
get selected() {
return this._selected;
@@ -141,7 +141,7 @@ export class RoomEngine extends EngineBase<{
}
this.ev('changeSelectedState', { selected: {
furnitureId: v.furnitureId,
funitureState: v.funitureState,
furnitureState: v.furnitureState,
interacions: Object.entries(v.furnitureContainer.instance.interactions).map(([interactionId, interactionInfo]) => ({
id: interactionId,
label: interactionInfo.label,
@@ -377,11 +377,11 @@ export class RoomEngine extends EngineBase<{
public async init() {
await this.loadEnv();
const funitures = this.roomState.installedFurnitures.filter(o => !IGNORE_FUNITURES.includes(o.type));
const furnitures = this.roomState.installedFurnitures.filter(o => !IGNORE_FUNITURES.includes(o.type));
let loadedCount = 0;
if (this.roomState.worldScale !== WORLD_SCALE) {
for (const o of funitures) {
for (const o of furnitures) {
o.position = [
remap(o.position[0], 0, this.roomState.worldScale, 0, WORLD_SCALE),
remap(o.position[1], 0, this.roomState.worldScale, 0, WORLD_SCALE),
@@ -392,7 +392,7 @@ export class RoomEngine extends EngineBase<{
this.ev('changeRoomState', { roomState: this.roomState });
}
await Promise.all(funitures.map(o => this.loadFuniture({
await Promise.all(furnitures.map(o => this.loadFurniture({
id: o.id,
type: o.type,
position: new BABYLON.Vector3(...o.position),
@@ -400,7 +400,7 @@ export class RoomEngine extends EngineBase<{
options: o.options,
}).then(() => {
loadedCount++;
this.ev('loadingProgress', { progress: loadedCount / funitures.length });
this.ev('loadingProgress', { progress: loadedCount / furnitures.length });
})));
// 不具合のもと
@@ -427,7 +427,7 @@ export class RoomEngine extends EngineBase<{
if (this.grabbingCtx != null) {
this.endGrabbing();
} else {
this.beginSelectedInstalledFunitureGrabbing();
this.beginSelectedInstalledFurnitureGrabbing();
}
} else if (this.selected != null) {
this.interact(this.selected.furnitureId);
@@ -480,7 +480,7 @@ export class RoomEngine extends EngineBase<{
this.inputs.on('click', (ev) => {
if (this.grabbingCtx != null) return;
this.selectFuniture(null);
this.selectFurniture(null);
// TODO: GPUPickerを使いたいが、なぜか一部のメッシュが反応しない
const pickingInfo = this.scene.pick(ev.x, ev.y,
@@ -491,7 +491,7 @@ export class RoomEngine extends EngineBase<{
if (oid != null && this.furnitureContainers.has(oid)) {
const o = this.furnitureContainers.get(oid)!;
const boundingInfo = getMeshesBoundingBox(o.root.getChildMeshes().filter(m => m.isEnabled() && m.isVisible && !m.isDisposed()), true);
this.selectFuniture(oid);
this.selectFurniture(oid);
this.look(boundingInfo.center);
return;
}
@@ -612,7 +612,7 @@ export class RoomEngine extends EngineBase<{
await this.changeEnvType(this.roomState.env.type, this.roomState.env.options, true);
}
private async loadFuniture(args: {
private async loadFurniture(args: {
type: string;
id: string;
position: BABYLON.Vector3;
@@ -622,9 +622,9 @@ export class RoomEngine extends EngineBase<{
const def = getFurnitureDef(args.type);
const metadata = {
isFuniture: true,
isFurniture: true,
furnitureId: args.id,
funitureType: args.type,
furnitureType: args.type,
};
const container = new FurnitureContainer({
@@ -701,7 +701,7 @@ export class RoomEngine extends EngineBase<{
}
if (def.hasCollisions) {
enableFunitureCollision(meshes);
enableFurnitureCollision(meshes);
}
/* なんかバグる
@@ -719,7 +719,7 @@ export class RoomEngine extends EngineBase<{
container!.model!.bakeMesh();
if (def.hasCollisions) {
enableFunitureCollision(container.root.getChildMeshes());
enableFurnitureCollision(container.root.getChildMeshes());
}
this.furnitureContainers.set(args.id, container);
@@ -735,7 +735,7 @@ export class RoomEngine extends EngineBase<{
(this.camera.inputs.attached.manual as FreeCameraManualInput).setMoveVector(vector);
}
public selectFuniture(furnitureId: string | null) {
public selectFurniture(furnitureId: string | null) {
this.sr.disableSnapshotRendering(); // snapshot rendering中にbake/unbakeするとエラーになる。なおこのメソッドは参照カウント方式な点に留意
const currentSelected = this.selected;
@@ -754,8 +754,8 @@ export class RoomEngine extends EngineBase<{
this.selected = {
furnitureId,
furnitureContainer: container,
funitureState: state,
funitureDef: getFurnitureDef(state.type),
furnitureState: state,
furnitureDef: getFurnitureDef(state.type),
};
}
}
@@ -769,7 +769,7 @@ export class RoomEngine extends EngineBase<{
if (this.grabbingCtx == null) return;
const grabbing = this.grabbingCtx;
const placement = getFurnitureDef(grabbing.funitureType).placement;
const placement = getFurnitureDef(grabbing.furnitureType).placement;
const dir = this.camera.getDirection(BABYLON.Axis.Z).scale(this.scene.useRightHandedSystem ? -1 : 1);
let newPos = this.camera.position.add(dir.scale(grabbing.distance)).add(grabbing.originalDiffOfPosition);
@@ -791,14 +791,14 @@ export class RoomEngine extends EngineBase<{
bb.min.subtractInPlace(rootPos);
bb.max.subtractInPlace(rootPos);
let stickyOtherFuniture: string | null = null;
let stickyOtherFurniture: string | null = null;
let stickyPlaneId: string | null = null;
let sticky = false;
const isCollisionTarget = (m: BABYLON.AbstractMesh) => {
return m.metadata?.furnitureId !== grabbing.furnitureId &&
!m.metadata?.isGhost &&
!grabbing.descendantStickyFunitureIds.includes(m.metadata?.furnitureId);
!grabbing.descendantStickyFurnitureIds.includes(m.metadata?.furnitureId);
};
const pos = new BABYLON.Vector3(this.camera.position.x, this.camera.position.y, this.camera.position.z);
@@ -820,7 +820,7 @@ export class RoomEngine extends EngineBase<{
newRotation.y = targetRotationY;
newRotation.z = grabbing.originalDiffOfRotation.z + grabbing.rotation;
newPos = hit.pickedPoint;
stickyOtherFuniture = hit.pickedMesh.metadata?.furnitureId ?? null;
stickyOtherFurniture = hit.pickedMesh.metadata?.furnitureId ?? null;
stickyPlaneId = hit.pickedMesh.name.includes('<') ? hit.pickedMesh.name.split('<')[1].split('>')[0] : null;
if (this.gridSnapping.enabled) {
@@ -851,7 +851,7 @@ export class RoomEngine extends EngineBase<{
if (hit != null && hit.pickedPoint != null && hit.pickedMesh != null) {
sticky = true;
newPos = hit.pickedPoint;
stickyOtherFuniture = hit.pickedMesh.metadata?.furnitureId ?? null;
stickyOtherFurniture = hit.pickedMesh.metadata?.furnitureId ?? null;
stickyPlaneId = hit.pickedMesh.name.includes('<') ? hit.pickedMesh.name.split('<')[1].split('>')[0] : null;
if (this.gridSnapping.enabled) {
@@ -893,7 +893,7 @@ export class RoomEngine extends EngineBase<{
sticky = true;
newPos = hit.pickedPoint;
stickyOtherFuniture = hit.pickedMesh.metadata?.furnitureId ?? null;
stickyOtherFurniture = hit.pickedMesh.metadata?.furnitureId ?? null;
stickyPlaneId = hit.pickedMesh.name.includes('<') ? hit.pickedMesh.name.split('<')[1].split('>')[0] : null;
if (this.gridSnapping.enabled) {
@@ -946,7 +946,7 @@ export class RoomEngine extends EngineBase<{
grabbing.onMove?.({
position: newPos,
rotation: newRotation,
stickyFurnitureId: stickyOtherFuniture,
stickyFurnitureId: stickyOtherFurniture,
stickyPlaneId: stickyPlaneId,
});
}
@@ -997,21 +997,21 @@ export class RoomEngine extends EngineBase<{
this.sr.enableSnapshotRendering(); // このメソッドは参照カウント方式な点に留意
}
public beginSelectedInstalledFunitureGrabbing() {
public beginSelectedInstalledFurnitureGrabbing() {
if (this.selected == null) return;
this.sr.disableSnapshotRendering();
const selectedFuniture = this.selected.furnitureContainer.root;
const selectedFurniture = this.selected.furnitureContainer.root;
this.clearHighlight();
const initialPosition = selectedFuniture.position.clone();
const initialRotation = selectedFuniture.rotation.clone();
const initialPosition = selectedFurniture.position.clone();
const initialRotation = selectedFurniture.rotation.clone();
// 子から先に適用していく
const setStickyParentRecursively = (mesh: BABYLON.AbstractMesh) => {
const stickyFunitureIds = Array.from(this.roomState.installedFurnitures.filter(o => o.sticky === mesh.metadata.furnitureId)).map(o => o.id);
for (const soid of stickyFunitureIds) {
const stickyFurnitureIds = Array.from(this.roomState.installedFurnitures.filter(o => o.sticky === mesh.metadata.furnitureId)).map(o => o.id);
for (const soid of stickyFurnitureIds) {
const soMesh = this.furnitureContainers.get(soid)!.root;
setStickyParentRecursively(soMesh);
soMesh.setParent(mesh);
@@ -1021,27 +1021,27 @@ export class RoomEngine extends EngineBase<{
}
}
};
setStickyParentRecursively(selectedFuniture);
setStickyParentRecursively(selectedFurniture);
const descendantStickyFunitureIds: string[] = [];
const collectDescendantStickyFunitureIds = (parentId: string) => {
const descendantStickyFurnitureIds: string[] = [];
const collectDescendantStickyFurnitureIds = (parentId: string) => {
const childIds = Array.from(this.roomState.installedFurnitures.filter(o => o.sticky === parentId)).map(o => o.id);
for (const cid of childIds) {
descendantStickyFunitureIds.push(cid);
collectDescendantStickyFunitureIds(cid);
descendantStickyFurnitureIds.push(cid);
collectDescendantStickyFurnitureIds(cid);
}
};
collectDescendantStickyFunitureIds(selectedFuniture.metadata.furnitureId);
collectDescendantStickyFurnitureIds(selectedFurniture.metadata.furnitureId);
const placement = getFurnitureDef(selectedFuniture.metadata.funitureType).placement;
const placement = getFurnitureDef(selectedFurniture.metadata.furnitureType).placement;
if (placement === 'top') {
// stickyな場合にsticky先とのレイの距離が0になりstickyされていない初期状態でgrabbingが始まってしまうのでちょっと浮かす
selectedFuniture.position.y += cm(1);
selectedFurniture.position.y += cm(1);
}
const distance = BABYLON.Vector3.Distance(this.camera.position, selectedFuniture.position);
const ghost = this.createGhost(selectedFuniture);
const distance = BABYLON.Vector3.Distance(this.camera.position, selectedFurniture.position);
const ghost = this.createGhost(selectedFurniture);
const dir = this.camera.getDirection(BABYLON.Axis.Z).scale(this.scene.useRightHandedSystem ? -1 : 1);
@@ -1050,16 +1050,16 @@ export class RoomEngine extends EngineBase<{
let grabbingEnded = false;
this.grabbingCtx = {
furnitureId: selectedFuniture.metadata.furnitureId,
funitureType: selectedFuniture.metadata.funitureType,
furnitureId: selectedFurniture.metadata.furnitureId,
furnitureType: selectedFurniture.metadata.furnitureType,
forInstall: false,
mesh: selectedFuniture,
originalDiffOfPosition: selectedFuniture.position.subtract(this.camera.position.add(dir.scale(distance))),
originalDiffOfRotation: selectedFuniture.rotation.subtract(this.camera.rotation),
mesh: selectedFurniture,
originalDiffOfPosition: selectedFurniture.position.subtract(this.camera.position.add(dir.scale(distance))),
originalDiffOfRotation: selectedFurniture.rotation.subtract(this.camera.rotation),
distance: distance,
rotation: 0,
ghost: ghost,
descendantStickyFunitureIds,
descendantStickyFurnitureIds,
onMove: (info) => {
stickyFurnitureId = info.stickyFurnitureId;
stickyPlaneId = info.stickyPlaneId;
@@ -1067,23 +1067,23 @@ export class RoomEngine extends EngineBase<{
onCancel: () => {
grabbingEnded = true;
this.sr.disableSnapshotRendering();
selectedFuniture.position = initialPosition.clone();
selectedFuniture.rotation = initialRotation.clone();
selectedFurniture.position = initialPosition.clone();
selectedFurniture.rotation = initialRotation.clone();
// 親から先に外していく
const removeStickyParentRecursively = (mesh: BABYLON.Mesh) => {
const stickyFunitureIds = Array.from(this.roomState.installedFurnitures.filter(o => o.sticky === mesh.metadata.furnitureId)).map(o => o.id);
for (const soid of stickyFunitureIds) {
const stickyFurnitureIds = Array.from(this.roomState.installedFurnitures.filter(o => o.sticky === mesh.metadata.furnitureId)).map(o => o.id);
for (const soid of stickyFurnitureIds) {
const soMesh = this.furnitureContainers.get(soid)!.root;
soMesh.setParent(null);
removeStickyParentRecursively(soMesh);
}
};
removeStickyParentRecursively(selectedFuniture);
removeStickyParentRecursively(selectedFurniture);
this.sr.enableSnapshotRendering();
this.furnitureContainers.get(selectedFuniture.metadata.furnitureId)!.calcBoundingBox();
this.furnitureContainers.get(selectedFurniture.metadata.furnitureId)!.calcBoundingBox();
this.envManager.renderShadow();
},
@@ -1092,7 +1092,7 @@ export class RoomEngine extends EngineBase<{
// 場合によってはなぜかSRが効かなくなる
//const putParticleSystem = this.getPutParticleSystem();
//putParticleSystem.emitter = selectedFuniture.position.clone();
//putParticleSystem.emitter = selectedFurniture.position.clone();
//putParticleSystem.start();
this.playSfxUrl('/client-assets/room/sfx/put.mp3', {
@@ -1101,12 +1101,12 @@ export class RoomEngine extends EngineBase<{
});
// put animation
selectedFuniture.animations.push(placement === 'side' || placement === 'wall' ? this.putAnimH : this.putAnimV);
selectedFurniture.animations.push(placement === 'side' || placement === 'wall' ? this.putAnimH : this.putAnimV);
const animating = Promise.withResolvers<void>();
const animationObserver = this.scene.onAfterAnimationsObservable.add(() => {
this.sr.updateMesh(selectedFuniture.getChildMeshes().filter(m => m.isEnabled()), true);
this.sr.updateMesh(selectedFurniture.getChildMeshes().filter(m => m.isEnabled()), true);
});
this.scene.beginAnimation(selectedFuniture, 0, 60, false, 3, () => { animating.resolve(); });
this.scene.beginAnimation(selectedFurniture, 0, 60, false, 3, () => { animating.resolve(); });
// TODO: アニメーションの完了まで親子関係の解除を遅延するため、一瞬「grabbingが終わっているのに親子関係が解除されていない」状態が発生する。その間に新たにgrabbingを開始するなどの別の操作が発生すると不具合のもとになるのでそれを防止する仕組みを作る
animating.promise.then(() => {
@@ -1114,8 +1114,8 @@ export class RoomEngine extends EngineBase<{
// 親から先に外していく
const removeStickyParentRecursively = (mesh: BABYLON.Mesh) => {
const stickyFunitureIds = Array.from(this.roomState.installedFurnitures.filter(o => o.sticky === mesh.metadata.furnitureId)).map(o => o.id);
for (const soid of stickyFunitureIds) {
const stickyFurnitureIds = Array.from(this.roomState.installedFurnitures.filter(o => o.sticky === mesh.metadata.furnitureId)).map(o => o.id);
for (const soid of stickyFurnitureIds) {
const soMesh = this.furnitureContainers.get(soid)!.root;
soMesh.setParent(null);
@@ -1127,18 +1127,18 @@ export class RoomEngine extends EngineBase<{
removeStickyParentRecursively(soMesh);
}
};
removeStickyParentRecursively(selectedFuniture);
removeStickyParentRecursively(selectedFurniture);
this.furnitureContainers.get(selectedFuniture.metadata.furnitureId)!.calcBoundingBox();
this.furnitureContainers.get(selectedFurniture.metadata.furnitureId)!.calcBoundingBox();
this.envManager.renderShadow();
const pos = selectedFuniture.position.clone();
const rotation = selectedFuniture.rotation.clone();
this.roomState.installedFurnitures.find(o => o.id === selectedFuniture.metadata.furnitureId)!.sticky = stickyFurnitureId;
this.roomState.installedFurnitures.find(o => o.id === selectedFuniture.metadata.furnitureId)!.stickyPlaneId = stickyPlaneId;
this.roomState.installedFurnitures.find(o => o.id === selectedFuniture.metadata.furnitureId)!.position = [pos.x, pos.y, pos.z];
this.roomState.installedFurnitures.find(o => o.id === selectedFuniture.metadata.furnitureId)!.rotation = [rotation.x, rotation.y, rotation.z];
const pos = selectedFurniture.position.clone();
const rotation = selectedFurniture.rotation.clone();
this.roomState.installedFurnitures.find(o => o.id === selectedFurniture.metadata.furnitureId)!.sticky = stickyFurnitureId;
this.roomState.installedFurnitures.find(o => o.id === selectedFurniture.metadata.furnitureId)!.stickyPlaneId = stickyPlaneId;
this.roomState.installedFurnitures.find(o => o.id === selectedFurniture.metadata.furnitureId)!.position = [pos.x, pos.y, pos.z];
this.roomState.installedFurnitures.find(o => o.id === selectedFurniture.metadata.furnitureId)!.rotation = [rotation.x, rotation.y, rotation.z];
this.ev('changeRoomState', { roomState: this.roomState });
});
@@ -1211,7 +1211,7 @@ export class RoomEngine extends EngineBase<{
this.fixedCamera.position = new BABYLON.Vector3(0, cm(120), 0);
this.fixedCamera.rotation = new BABYLON.Vector3(0, 0, 0);
this.scene.activeCamera = this.fixedCamera;
this.selectFuniture(null);
this.selectFurniture(null);
}
public sit() {
@@ -1284,18 +1284,18 @@ export class RoomEngine extends EngineBase<{
return root;
}
public async addFuniture(type: string, _options?: RawOptions, attachments?: RoomAttachments) {
public async addFurniture(type: string, _options?: RawOptions, attachments?: RoomAttachments) {
if (!this.isEditMode) return;
if (this.grabbingCtx != null) return;
if (attachments != null) this.roomAttachments = attachments;
this.selectFuniture(null);
this.selectFurniture(null);
const id = genId();
const def = getFurnitureDef(type);
const options = _options != null ? deepClone(_options) : deepClone(def.options.default);
const container = await this.loadFuniture({
const container = await this.loadFurniture({
id: id,
type,
position: new BABYLON.Vector3(0, 0, 0),
@@ -1318,7 +1318,7 @@ export class RoomEngine extends EngineBase<{
this.grabbingCtx = {
furnitureId: id,
funitureType: type,
furnitureType: type,
forInstall: true,
mesh: container.root,
originalDiffOfPosition: new BABYLON.Vector3(0, 0, 0),
@@ -1326,7 +1326,7 @@ export class RoomEngine extends EngineBase<{
distance: distance,
rotation: 0,
ghost: ghost,
descendantStickyFunitureIds: [],
descendantStickyFurnitureIds: [],
onMove: (info) => {
stickyFurnitureId = info.stickyFurnitureId;
stickyPlaneId = info.stickyPlaneId;
@@ -1339,7 +1339,7 @@ export class RoomEngine extends EngineBase<{
grabbingEnded = true;
if (def.hasCollisions) {
enableFunitureCollision(container.root.getChildMeshes());
enableFurnitureCollision(container.root.getChildMeshes());
}
const pos = container.root.position.clone();
@@ -1429,7 +1429,7 @@ export class RoomEngine extends EngineBase<{
}
public async exitEditMode() {
this.selectFuniture(null);
this.selectFurniture(null);
this.isEditMode = false;
await this.envManager.renderShadow();
@@ -1464,7 +1464,7 @@ export class RoomEngine extends EngineBase<{
reflectionProbe.renderList = [];
//reflectionProbe.dispose();
for (const mesh of this.scene.meshes.filter(m => (m instanceof BABYLON.Mesh || m instanceof BABYLON.InstancedMesh) && m.isEnabled() && m.isVisible && m.material && m.metadata?.isFuniture)) {
for (const mesh of this.scene.meshes.filter(m => (m instanceof BABYLON.Mesh || m instanceof BABYLON.InstancedMesh) && m.isEnabled() && m.isVisible && m.material && m.metadata?.isFurniture)) {
if (mesh.material) {
mesh.material.unfreeze();
if (mesh.material instanceof BABYLON.MultiMaterial) {
@@ -1482,15 +1482,15 @@ export class RoomEngine extends EngineBase<{
*/
}
public duplicateSelectedFuniture() {
public duplicateSelectedFurniture() {
if (this.selected == null) return;
const funitureState = this.selected.funitureState;
const furnitureState = this.selected.furnitureState;
this.addFuniture(funitureState.type, deepClone(funitureState.options));
this.addFurniture(furnitureState.type, deepClone(furnitureState.options));
}
public removeSelectedFuniture() {
public removeSelectedFurniture() {
if (this.selected == null) return;
const furnitureId = this.selected.furnitureId;
@@ -1581,7 +1581,7 @@ export class RoomEngine extends EngineBase<{
showUsername: this.showUsernameOnAvatar,
show2dAvatar: this.show2dAvatarOnAvatar,
});
// TODO: loadFunitureのものとある程度共通化
// TODO: loadFurnitureのものとある程度共通化
p.registerMeshes = (meshes) => {
for (const mesh of meshes) {
mesh.receiveShadows = false;

View File

@@ -241,7 +241,7 @@ export const FUNITURE_DEFS = [
export function getFurnitureDef(type: string): FurnitureDef {
const def = FUNITURE_DEFS.find(x => x.id === type) as FurnitureDef | undefined;
if (def == null) {
throw new Error(`Unrecognized funiture type: ${type}`);
throw new Error(`Unrecognized furniture type: ${type}`);
}
return def;
}

View File

@@ -11,7 +11,7 @@ import type { FurnitureSchemaDef } from 'misskey-world/src/room/object.js';
import type { OptionsSchema } from 'misskey-world/src/mono.js';
import type { ConvertedOptions, GetConvertedOptionsSchemaValues } from '../mono.js';
export type RoomFunitureInstance<Options = any> = {
export type RoomFurnitureInstance<Options = any> = {
onInited?: () => void;
onOptionsUpdated?: <K extends keyof Options, V extends Options[K]>(kv: [K, V]) => void;
interactions: Record<string, {
@@ -45,14 +45,14 @@ export type FurnitureDef<Schema extends FurnitureSchemaDef = FurnitureSchemaDef>
stickyMarkerMeshUpdated?: (mesh: BABYLON.Mesh) => void;
sitChair?: () => void;
reloadModel: () => void;
}) => RoomFunitureInstance<string extends keyof Schema['options']['schema'] ? ConvertedOptions : GetConvertedOptionsSchemaValues<Schema['options']['schema']>> | Promise<RoomFunitureInstance<Schema['options']['schema'] extends undefined ? ConvertedOptions : GetConvertedOptionsSchemaValues<Schema['options']['schema']>>>; // TODO: createInstanceをasyncにするのではなく、別にreadyみたいなものを返させる
}) => RoomFurnitureInstance<string extends keyof Schema['options']['schema'] ? ConvertedOptions : GetConvertedOptionsSchemaValues<Schema['options']['schema']>> | Promise<RoomFurnitureInstance<Schema['options']['schema'] extends undefined ? ConvertedOptions : GetConvertedOptionsSchemaValues<Schema['options']['schema']>>>; // TODO: createInstanceをasyncにするのではなく、別にreadyみたいなものを返させる
};
export function defineFurnitureSchema<const OpSc extends OptionsSchema>(def: FurnitureSchemaDef<OpSc>): FurnitureSchemaDef<OpSc> {
return def;
}
export function defineFuniture<const Schema extends FurnitureSchemaDef<any>>(schema: Schema, def: Pick<FurnitureDef<Schema>, 'path' | 'createInstance'>): FurnitureDef<Schema> {
export function defineFurniture<const Schema extends FurnitureSchemaDef<any>>(schema: Schema, def: Pick<FurnitureDef<Schema>, 'path' | 'createInstance'>): FurnitureDef<Schema> {
return { ...schema, ...def };
}

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { a4Case_schema } from 'misskey-world/src/room/furnitures/a4Case.schema.js';
export const a4Case = defineFuniture(a4Case_schema, {
export const a4Case = defineFurniture(a4Case_schema, {
createInstance: ({ options, model }) => {
const bodyMesh = model.findMesh('__X_BODY__');
const bodyMaterial = bodyMesh.material as BABYLON.PBRMaterial;

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { aircon_schema } from 'misskey-world/src/room/furnitures/aircon.schema.js';
export const aircon = defineFuniture(aircon_schema, {
export const aircon = defineFurniture(aircon_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -6,10 +6,10 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { cm, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { allInOnePc_schema } from 'misskey-world/src/room/furnitures/allInOnePc.schema.js';
import { createTextureManager, defineFuniture } from '../furniture.js';
import { createTextureManager, defineFurniture } from '../furniture.js';
import { getLightRangeFactorByGraphicsQuality } from '../utility.js';
export const allInOnePc = defineFuniture(allInOnePc_schema, {
export const allInOnePc = defineFurniture(allInOnePc_schema, {
createInstance: async ({ lc, scene, options, model, graphicsQuality }) => {
const matrix = model.root.getWorldMatrix(true);
const scale = new BABYLON.Vector3();

View File

@@ -4,11 +4,11 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { cm } from 'misskey-world/src/utility.js';
import { aquarium_schema } from 'misskey-world/src/room/furnitures/aquarium.schema.js';
export const aquarium = defineFuniture(aquarium_schema, {
export const aquarium = defineFurniture(aquarium_schema, {
createInstance: ({ scene, root }) => {
return {
onInited: () => {

View File

@@ -5,9 +5,9 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { aromaReedDiffuser_schema } from 'misskey-world/src/room/furnitures/aromaReedDiffuser.schema.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
export const aromaReedDiffuser = defineFuniture(aromaReedDiffuser_schema, {
export const aromaReedDiffuser = defineFurniture(aromaReedDiffuser_schema, {
createInstance: ({ options, model }) => {
const bottleMaterial = model.findMaterial('__X_BOTTLE__');
const oilMaterial = model.findMaterial('__X_OIL__');

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { banknote_schema } from 'misskey-world/src/room/furnitures/banknote.schema.js';
export const banknote = defineFuniture(banknote_schema, {
export const banknote = defineFurniture(banknote_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -4,12 +4,12 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { cm, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { getLightRangeFactorByGraphicsQuality } from '../utility.js';
import { beamLamp_schema } from 'misskey-world/src/room/furnitures/beamLamp.schema.js';
export const beamLamp = defineFuniture(beamLamp_schema, {
export const beamLamp = defineFurniture(beamLamp_schema, {
createInstance: ({ lc, root, scene, graphicsQuality }) => {
const light = new BABYLON.PointLight('beamLampLight', new BABYLON.Vector3(0, cm(10), 0), scene, lc != null);
light.parent = root;

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { bed_schema } from 'misskey-world/src/room/furnitures/bed.schema.js';
export const bed = defineFuniture(bed_schema, {
export const bed = defineFurniture(bed_schema, {
createInstance: ({ options, model }) => {
const bodyMesh = model.findMesh('__X_BODY__');
const bodyMaterial = bodyMesh.material as BABYLON.PBRMaterial;

View File

@@ -4,12 +4,12 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { cm, remap } from 'misskey-world/src/utility.js';
import { createOverridedStates } from '../utility.js';
import { blind_schema } from 'misskey-world/src/room/furnitures/blind.schema.js';
export const blind = defineFuniture(blind_schema, {
export const blind = defineFurniture(blind_schema, {
createInstance: ({ options, model }) => {
const temp = createOverridedStates({
angle: () => options.angle,

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { book_schema } from 'misskey-world/src/room/furnitures/book.schema.js';
export const book = defineFuniture(book_schema, {
export const book = defineFurniture(book_schema, {
createInstance: ({ options, model }) => {
const bodyMesh = model.findMesh('__X_BODY__');

View File

@@ -4,11 +4,11 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { cm } from 'misskey-world/src/utility.js';
import { books_schema } from 'misskey-world/src/room/furnitures/books.schema.js';
export const books = defineFuniture(books_schema, {
export const books = defineFurniture(books_schema, {
createInstance: ({ scene, options, model }) => {
const coverMaterial = model.findMaterial('__X_COVER__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { boxWallShelf_schema } from 'misskey-world/src/room/furnitures/boxWallShelf.schema.js';
export const boxWallShelf = defineFuniture(boxWallShelf_schema, {
export const boxWallShelf = defineFurniture(boxWallShelf_schema, {
createInstance: async ({ scene, options, model }) => {
const backMesh = model.findMesh('__X_BACK__');
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { cactusS_schema } from 'misskey-world/src/room/furnitures/cactusS.schema.js';
export const cactusS = defineFuniture(cactusS_schema, {
export const cactusS = defineFurniture(cactusS_schema, {
createInstance: ({ options, model }) => {
const potMaterial = model.findMaterial('__X_POT__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { cardboardBox_schema } from 'misskey-world/src/room/furnitures/cardboardBox.schema.js';
export const cardboardBox = defineFuniture(cardboardBox_schema, {
export const cardboardBox = defineFurniture(cardboardBox_schema, {
createInstance: ({ scene, options, model }) => {
const material = model.findMaterial('__X_BODY__');

View File

@@ -5,9 +5,9 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { ceilingFan_schema } from 'misskey-world/src/room/furnitures/ceilingFan.schema.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
export const ceilingFan = defineFuniture(ceilingFan_schema, {
export const ceilingFan = defineFurniture(ceilingFan_schema, {
createInstance: ({ options, sr, scene, model }) => {
const shadeMaterial = model.findMaterial('__X_SHADE__');

View File

@@ -5,9 +5,9 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { ceilingFanLight_schema } from 'misskey-world/src/room/furnitures/ceilingFanLight.schema.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
export const ceilingFanLight = defineFuniture(ceilingFanLight_schema, {
export const ceilingFanLight = defineFurniture(ceilingFanLight_schema, {
createInstance: ({ options, sr, scene, model }) => {
const shadeMaterial = model.findMaterial('__X_SHADE__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { chair_schema } from 'misskey-world/src/room/furnitures/chair.schema.js';
export const chair = defineFuniture(chair_schema, {
export const chair = defineFurniture(chair_schema, {
createInstance: ({ model, options, sitChair }) => {
const primaryMaterial = model.findMaterial('__X_PRIMARY__');
const secondaryMaterial = model.findMaterial('__X_SECONDARY__');

View File

@@ -4,11 +4,11 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { createTextureManager, defineFuniture } from '../furniture.js';
import { createTextureManager, defineFurniture } from '../furniture.js';
import { remap } from 'misskey-world/src/utility.js';
import { clippedPicture_schema } from 'misskey-world/src/room/furnitures/clippedPicture.schema.js';
export const clippedPicture = defineFuniture(clippedPicture_schema, {
export const clippedPicture = defineFurniture(clippedPicture_schema, {
createInstance: async ({ scene, options, model }) => {
const pictureMesh = model.findMesh('__X_PICTURE__');
pictureMesh.rotationQuaternion = null;

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { coffeeCup_schema } from 'misskey-world/src/room/furnitures/coffeeCup.schema.js';
export const coffeeCup = defineFuniture(coffeeCup_schema, {
export const coffeeCup = defineFurniture(coffeeCup_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { colorBox_schema } from 'misskey-world/src/room/furnitures/colorBox.schema.js';
export const colorBox = defineFuniture(colorBox_schema, {
export const colorBox = defineFurniture(colorBox_schema, {
createInstance: ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { cuboid_schema } from 'misskey-world/src/room/furnitures/cuboid.schema.js';
export const cuboid = defineFuniture(cuboid_schema, {
export const cuboid = defineFurniture(cuboid_schema, {
createInstance: async ({ scene, options, model }) => {
const mesh = model.findMesh('__X_BODY__');
const mat = model.findMaterial('__X_BODY__');

View File

@@ -4,12 +4,12 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { cm } from 'misskey-world/src/utility.js';
import { yuge } from '../utility.js';
import { cupNoodle_schema } from 'misskey-world/src/room/furnitures/cupNoodle.schema.js';
export const cupNoodle = defineFuniture(cupNoodle_schema, {
export const cupNoodle = defineFurniture(cupNoodle_schema, {
createInstance: ({ scene, root, sr }) => {
let yugeDispose: (() => void) | null = null;

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { curtain_schema } from 'misskey-world/src/room/furnitures/curtain.schema.js';
export const curtain = defineFuniture(curtain_schema, {
export const curtain = defineFurniture(curtain_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { custardPudding_schema } from 'misskey-world/src/room/furnitures/custardPudding.schema.js';
export const custardPudding = defineFuniture(custardPudding_schema, {
export const custardPudding = defineFurniture(custardPudding_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { debugHipoly_schema } from 'misskey-world/src/room/furnitures/debugHipoly.schema.js';
export const debugHipoly = defineFuniture(debugHipoly_schema, {
export const debugHipoly = defineFurniture(debugHipoly_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { debugMetal_schema } from 'misskey-world/src/room/furnitures/debugMetal.schema.js';
export const debugMetal = defineFuniture(debugMetal_schema, {
export const debugMetal = defineFurniture(debugMetal_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { descriptionPlate_schema } from 'misskey-world/src/room/furnitures/descriptionPlate.schema.js';
export const descriptionPlate = defineFuniture(descriptionPlate_schema, {
export const descriptionPlate = defineFurniture(descriptionPlate_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { desk_schema } from 'misskey-world/src/room/furnitures/desk.schema.js';
export const desk = defineFuniture(desk_schema, {
export const desk = defineFurniture(desk_schema, {
createInstance: ({ options, model }) => {
const frameMaterial = model.findMaterial('__X_FRAME__');
const boardMaterial = model.findMaterial('__X_BOARD__');

View File

@@ -4,12 +4,12 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { cm, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { getLightRangeFactorByGraphicsQuality } from '../utility.js';
import { desktopPc_schema } from 'misskey-world/src/room/furnitures/desktopPc.schema.js';
export const desktopPc = defineFuniture(desktopPc_schema, {
export const desktopPc = defineFurniture(desktopPc_schema, {
createInstance: ({ options, model, root, scene, lc, graphicsQuality }) => {
// TODO: graphicsQualityがLOWならそもそも追加しない
const light1 = new BABYLON.SpotLight('', new BABYLON.Vector3(0, cm(10), cm(22)), new BABYLON.Vector3(0, 0, 1), Math.PI / 1, 2, scene, lc != null);

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { djMixer_schema } from 'misskey-world/src/room/furnitures/djMixer.schema.js';
export const djMixer = defineFuniture(djMixer_schema, {
export const djMixer = defineFurniture(djMixer_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -5,10 +5,10 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { djPlayer_schema } from 'misskey-world/src/room/furnitures/djPlayer.schema.js';
import { createTextureManager, defineFuniture } from '../furniture.js';
import { createTextureManager, defineFurniture } from '../furniture.js';
import { normalizeUvToSquare } from '../../utility.js';
export const djPlayer = defineFuniture(djPlayer_schema, {
export const djPlayer = defineFurniture(djPlayer_schema, {
createInstance: async ({ model, options, scene }) => {
const screenMesh = model.findMesh('__X_SCREEN__');
const screenMaterial = model.findMaterial('__X_SCREEN__');

View File

@@ -6,10 +6,10 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { cm, remap, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { downlight_schema } from 'misskey-world/src/room/furnitures/downlight.schema.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { getLightRangeFactorByGraphicsQuality } from '../utility.js';
export const downlight = defineFuniture(downlight_schema, {
export const downlight = defineFurniture(downlight_schema, {
createInstance: ({ lc, scene, options, model, graphicsQuality }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');
const lightMaterial = model.findMaterial('__X_LIGHT__');

View File

@@ -4,12 +4,12 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { getLightRangeFactorByGraphicsQuality } from '../utility.js';
import { cm, remap, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { ductRailSpotLights_schema } from 'misskey-world/src/room/furnitures/ductRailSpotLights.schema.js';
export const ductRailSpotLights = defineFuniture(ductRailSpotLights_schema, {
export const ductRailSpotLights = defineFurniture(ductRailSpotLights_schema, {
createInstance: ({ lc, scene, options, model, graphicsQuality }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { ductTape_schema } from 'misskey-world/src/room/furnitures/ductTape.schema.js';
export const ductTape = defineFuniture(ductTape_schema, {
export const ductTape = defineFurniture(ductTape_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -5,10 +5,10 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { electronicDisplayBoard_schema } from 'misskey-world/src/room/furnitures/electronicDisplayBoard.schema.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { RecyvlingTextGrid } from '../../utility.js';
export const electronicDisplayBoard = defineFuniture(electronicDisplayBoard_schema, {
export const electronicDisplayBoard = defineFurniture(electronicDisplayBoard_schema, {
createInstance: async ({ scene, options, model, timer }) => {
const frameMaterial = model.findMaterial('__X_BODY__');

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { emptyBento_schema } from 'misskey-world/src/room/furnitures/emptyBento.schema.js';
export const emptyBento = defineFuniture(emptyBento_schema, {
export const emptyBento = defineFurniture(emptyBento_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { energyDrink_schema } from 'misskey-world/src/room/furnitures/energyDrink.schema.js';
export const energyDrink = defineFuniture(energyDrink_schema, {
export const energyDrink = defineFurniture(energyDrink_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { envelope_schema } from 'misskey-world/src/room/furnitures/envelope.schema.js';
export const envelope = defineFuniture(envelope_schema, {
export const envelope = defineFurniture(envelope_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { facialTissue_schema } from 'misskey-world/src/room/furnitures/facialTissue.schema.js';
export const facialTissue = defineFuniture(facialTissue_schema, {
export const facialTissue = defineFurniture(facialTissue_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { glassCylinderPotPlant_schema } from 'misskey-world/src/room/furnitures/glassCylinderPotPlant.schema.js';
export const glassCylinderPotPlant = defineFuniture(glassCylinderPotPlant_schema, {
export const glassCylinderPotPlant = defineFurniture(glassCylinderPotPlant_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -5,9 +5,9 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { handheldGameConsole_schema } from 'misskey-world/src/room/furnitures/handheldGameConsole.schema.js';
import { createTextureManager, defineFuniture } from '../furniture.js';
import { createTextureManager, defineFurniture } from '../furniture.js';
export const handheldGameConsole = defineFuniture(handheldGameConsole_schema, {
export const handheldGameConsole = defineFurniture(handheldGameConsole_schema, {
createInstance: async ({ scene, options, model }) => {
const screenMesh = model.findMesh('__X_SCREEN__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { hangingDuctRail_schema } from 'misskey-world/src/room/furnitures/hangingDuctRail.schema.js';
export const hangingDuctRail = defineFuniture(hangingDuctRail_schema, {
export const hangingDuctRail = defineFurniture(hangingDuctRail_schema, {
createInstance: async ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { hangingTShirt_schema } from 'misskey-world/src/room/furnitures/hangingTShirt.schema.js';
export const hangingTShirt = defineFuniture(hangingTShirt_schema, {
export const hangingTShirt = defineFurniture(hangingTShirt_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -5,9 +5,9 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { haniwa_schema } from 'misskey-world/src/room/furnitures/haniwa.schema.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
export const haniwa = defineFuniture(haniwa_schema, {
export const haniwa = defineFurniture(haniwa_schema, {
createInstance: ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');
const insideMaterial = model.findMaterial('__X_INSIDE__');

View File

@@ -4,9 +4,9 @@
*/
import { herbarium_schema } from 'misskey-world/src/room/furnitures/herbarium.schema.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
export const herbarium = defineFuniture(herbarium_schema, {
export const herbarium = defineFurniture(herbarium_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { icosahedron_schema } from 'misskey-world/src/room/furnitures/icosahedron.schema.js';
export const icosahedron = defineFuniture(icosahedron_schema, {
export const icosahedron = defineFurniture(icosahedron_schema, {
createInstance: ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { ironFrameShelf_schema } from 'misskey-world/src/room/furnitures/ironFrameShelf.schema.js';
export const ironFrameShelf = defineFuniture(ironFrameShelf_schema, {
export const ironFrameShelf = defineFurniture(ironFrameShelf_schema, {
path: (options) => {
switch (options.height) {
case '5': return 'iron-frame-shelf/iron-frame-shelf-5';

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { ironFrameTable_schema } from 'misskey-world/src/room/furnitures/ironFrameTable.schema.js';
export const ironFrameTable = defineFuniture(ironFrameTable_schema, {
export const ironFrameTable = defineFurniture(ironFrameTable_schema, {
createInstance: ({ options, model, stickyMarkerMeshUpdated }) => {
const frameMaterial = model.findMaterial('__X_FRAME__');
const boardMaterial = model.findMaterial('__X_BOARD__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { issyoubin_schema } from 'misskey-world/src/room/furnitures/issyoubin.schema.js';
export const issyoubin = defineFuniture(issyoubin_schema, {
export const issyoubin = defineFurniture(issyoubin_schema, {
createInstance: ({ model, options, scene }) => {
const liquidMesh = model.findMesh('__X_LIQUID__');
const liquidMaterial = model.findMaterial('__X_LIQUID__');

View File

@@ -5,9 +5,9 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { kakejiku_schema } from 'misskey-world/src/room/furnitures/kakejiku.schema.js';
import { createTextureManager, defineFuniture } from '../furniture.js';
import { createTextureManager, defineFurniture } from '../furniture.js';
export const kakejiku = defineFuniture(kakejiku_schema, {
export const kakejiku = defineFurniture(kakejiku_schema, {
createInstance: async ({ scene, options, model }) => {
const imageMesh = model.findMesh('__X_IMAGE__');
imageMesh.rotationQuaternion = null;

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { keyboard_schema } from 'misskey-world/src/room/furnitures/keyboard.schema.js';
export const keyboard = defineFuniture(keyboard_schema, {
export const keyboard = defineFurniture(keyboard_schema, {
createInstance: ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');
const keyMaterial = model.findMaterial('__X_KEY__');

View File

@@ -6,10 +6,10 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { cm, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { laptopPc_schema } from 'misskey-world/src/room/furnitures/laptopPc.schema.js';
import { createTextureManager, defineFuniture } from '../furniture.js';
import { createTextureManager, defineFurniture } from '../furniture.js';
import { getLightRangeFactorByGraphicsQuality } from '../utility.js';
export const laptopPc = defineFuniture(laptopPc_schema, {
export const laptopPc = defineFurniture(laptopPc_schema, {
createInstance: async ({ lc, sr, scene, options, model, graphicsQuality }) => {
const matrix = model.root.getWorldMatrix(true);
const scale = new BABYLON.Vector3();

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { createTextureManager, defineFuniture } from '../furniture.js';
import { createTextureManager, defineFurniture } from '../furniture.js';
import { largeMousepad_schema } from 'misskey-world/src/room/furnitures/largeMousepad.schema.js';
export const largeMousepad = defineFuniture(largeMousepad_schema, {
export const largeMousepad = defineFurniture(largeMousepad_schema, {
createInstance: async ({ scene, options, model }) => {
const padMesh = model.findMesh('__X_PAD__');
const padMaterial = model.findMaterial('__X_PAD__');

View File

@@ -5,12 +5,12 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { lavaLamp_schema } from 'misskey-world/src/room/furnitures/lavaLamp.schema.js';
import { cm, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { getLightRangeFactorByGraphicsQuality } from '../utility.js';
const mix = (a: number, b: number, t: number) => a * (1 - t) + b * t;
export const lavaLamp = defineFuniture(lavaLamp_schema, {
export const lavaLamp = defineFurniture(lavaLamp_schema, {
createInstance: ({ options, lc, scene, sr, root, model, graphicsQuality }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');
const glassMaterial = model.findMaterial('__X_GLASS__');

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { letterCase_schema } from 'misskey-world/src/room/furnitures/letterCase.schema.js';
export const letterCase = defineFuniture(letterCase_schema, {
export const letterCase = defineFurniture(letterCase_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { lowPartitionBar_schema } from 'misskey-world/src/room/furnitures/lowPartitionBar.schema.js';
export const lowPartitionBar = defineFuniture(lowPartitionBar_schema, {
export const lowPartitionBar = defineFurniture(lowPartitionBar_schema, {
createInstance: ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { miObjet_schema } from 'misskey-world/src/room/furnitures/miObjet.schema.js';
export const miObjet = defineFuniture(miObjet_schema, {
export const miObjet = defineFurniture(miObjet_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { miPlate_schema } from 'misskey-world/src/room/furnitures/miPlate.schema.js';
export const miPlate = defineFuniture(miPlate_schema, {
export const miPlate = defineFurniture(miPlate_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { miPlateDisplayed_schema } from 'misskey-world/src/room/furnitures/miPlateDisplayed.schema.js';
export const miPlateDisplayed = defineFuniture(miPlateDisplayed_schema, {
export const miPlateDisplayed = defineFurniture(miPlateDisplayed_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { milk_schema } from 'misskey-world/src/room/furnitures/milk.schema.js';
export const milk = defineFuniture(milk_schema, {
export const milk = defineFurniture(milk_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { mixer_schema } from 'misskey-world/src/room/furnitures/mixer.schema.js';
export const mixer = defineFuniture(mixer_schema, {
export const mixer = defineFurniture(mixer_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -6,11 +6,11 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { cm, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { monitor_schema } from 'misskey-world/src/room/furnitures/monitor.schema.js';
import { createTextureManager, defineFuniture } from '../furniture.js';
import { createTextureManager, defineFurniture } from '../furniture.js';
import { getLightRangeFactorByGraphicsQuality } from '../utility.js';
import { normalizeUvToSquare } from '../../utility.js';
export const monitor = defineFuniture(monitor_schema, {
export const monitor = defineFurniture(monitor_schema, {
createInstance: async ({ lc, scene, options, model, graphicsQuality }) => {
const matrix = model.root.getWorldMatrix(true);
const scale = new BABYLON.Vector3();

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { monitorSpeaker_schema } from 'misskey-world/src/room/furnitures/monitorSpeaker.schema.js';
export const monitorSpeaker = defineFuniture(monitorSpeaker_schema, {
export const monitorSpeaker = defineFurniture(monitorSpeaker_schema, {
createInstance: ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { monstera_schema } from 'misskey-world/src/room/furnitures/monstera.schema.js';
export const monstera = defineFuniture(monstera_schema, {
export const monstera = defineFurniture(monstera_schema, {
createInstance: ({ options, model }) => {
const potMaterial = model.findMaterial('__X_POT__');

View File

@@ -6,10 +6,10 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { cm } from 'misskey-world/src/utility.js';
import { mug_schema } from 'misskey-world/src/room/furnitures/mug.schema.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { yuge } from '../utility.js';
export const mug = defineFuniture(mug_schema, {
export const mug = defineFurniture(mug_schema, {
createInstance: ({ options, scene, root, sr, model }) => {
const yugeDispose = yuge(scene, root, new BABYLON.Vector3(0, cm(5), 0), sr);

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { newtonsCradle_schema } from 'misskey-world/src/room/furnitures/newtonsCradle.schema.js';
export const newtonsCradle = defineFuniture(newtonsCradle_schema, {
export const newtonsCradle = defineFurniture(newtonsCradle_schema, {
createInstance: ({ options, model }) => {
const frameMaterial = model.findMaterial('__X_FRAME__');

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { openedCardboardBox_schema } from 'misskey-world/src/room/furnitures/openedCardboardBox.schema.js';
export const openedCardboardBox = defineFuniture(openedCardboardBox_schema, {
export const openedCardboardBox = defineFurniture(openedCardboardBox_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { pachira_schema } from 'misskey-world/src/room/furnitures/pachira.schema.js';
export const pachira = defineFuniture(pachira_schema, {
export const pachira = defineFurniture(pachira_schema, {
createInstance: ({ options, model }) => {
const potMaterial = model.findMaterial('__X_POT__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { petBottle_schema } from 'misskey-world/src/room/furnitures/petBottle.schema.js';
export const petBottle = defineFuniture(petBottle_schema, {
export const petBottle = defineFurniture(petBottle_schema, {
createInstance: ({ model, options, scene }) => {
const capMesh = model.findMesh('__X_CAP__');
const liquidMesh = model.findMesh('__X_LIQUID__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { piano_schema } from 'misskey-world/src/room/furnitures/piano.schema.js';
export const piano = defineFuniture(piano_schema, {
export const piano = defineFurniture(piano_schema, {
createInstance: ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -4,12 +4,12 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { createTextureManager, defineFuniture } from '../furniture.js';
import { createTextureManager, defineFurniture } from '../furniture.js';
import { pictureFrame_schema } from 'misskey-world/src/room/furnitures/pictureFrame.schema.js';
// NOTE: シェイプキーのnormalのエクスポートは無効にしないとmatを大きくしたときに面のレンダリングがグリッチする
export const pictureFrame = defineFuniture(pictureFrame_schema, {
export const pictureFrame = defineFurniture(pictureFrame_schema, {
createInstance: async ({ scene, options, model }) => {
const frameMesh = model.findMesh('__X_FRAME__');
frameMesh.rotationQuaternion = null;

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { pizza_schema } from 'misskey-world/src/room/furnitures/pizza.schema.js';
export const pizza = defineFuniture(pizza_schema, {
export const pizza = defineFurniture(pizza_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { plant_schema } from 'misskey-world/src/room/furnitures/plant.schema.js';
export const plant = defineFuniture(plant_schema, {
export const plant = defineFurniture(plant_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { plant2_schema } from 'misskey-world/src/room/furnitures/plant2.schema.js';
export const plant2 = defineFuniture(plant2_schema, {
export const plant2 = defineFurniture(plant2_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -4,11 +4,11 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { createTextureManager, defineFuniture } from '../furniture.js';
import { createTextureManager, defineFurniture } from '../furniture.js';
import { remap } from 'misskey-world/src/utility.js';
import { poster_schema } from 'misskey-world/src/room/furnitures/poster.schema.js';
export const poster = defineFuniture(poster_schema, {
export const poster = defineFurniture(poster_schema, {
createInstance: async ({ scene, options, model }) => {
const pictureMesh = model.findMesh('__X_PICTURE__');
pictureMesh.rotationQuaternion = null;

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { powerStrip_schema } from 'misskey-world/src/room/furnitures/powerStrip.schema.js';
export const powerStrip = defineFuniture(powerStrip_schema, {
export const powerStrip = defineFurniture(powerStrip_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { radiometer_schema } from 'misskey-world/src/room/furnitures/radiometer.schema.js';
export const radiometer = defineFuniture(radiometer_schema, {
export const radiometer = defineFurniture(radiometer_schema, {
createInstance: ({ sr, scene, model }) => {
const vanes = model.findTransformNode('__X_VANES__');
model.bakeExcludeMeshes = [...vanes.getChildMeshes()];

View File

@@ -5,11 +5,11 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import seedrandom from 'seedrandom';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { cm, remap, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { randomBooks_schema } from 'misskey-world/src/room/furnitures/randomBooks.schema.js';
export const randomBooks = defineFuniture(randomBooks_schema, {
export const randomBooks = defineFurniture(randomBooks_schema, {
createInstance: ({ options, model, scene }) => {
const bodyMesh = model.findMesh('__X_BODY__');
bodyMesh.isVisible = false;

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { recordPlayer_schema } from 'misskey-world/src/room/furnitures/recordPlayer.schema.js';
export const recordPlayer = defineFuniture(recordPlayer_schema, {
export const recordPlayer = defineFurniture(recordPlayer_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { rolledUpPoster_schema } from 'misskey-world/src/room/furnitures/rolledUpPoster.schema.js';
export const rolledUpPoster = defineFuniture(rolledUpPoster_schema, {
export const rolledUpPoster = defineFurniture(rolledUpPoster_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { roundRug_schema } from 'misskey-world/src/room/furnitures/roundRug.schema.js';
export const roundRug = defineFuniture(roundRug_schema, {
export const roundRug = defineFurniture(roundRug_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { router_schema } from 'misskey-world/src/room/furnitures/router.schema.js';
export const router = defineFuniture(router_schema, {
export const router = defineFurniture(router_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { siphon_schema } from 'misskey-world/src/room/furnitures/siphon.schema.js';
export const siphon = defineFuniture(siphon_schema, {
export const siphon = defineFurniture(siphon_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { snakeplant_schema } from 'misskey-world/src/room/furnitures/snakeplant.schema.js';
export const snakeplant = defineFuniture(snakeplant_schema, {
export const snakeplant = defineFurniture(snakeplant_schema, {
createInstance: ({ options, model }) => {
const potMaterial = model.findMaterial('__X_POT__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { sofa_schema } from 'misskey-world/src/room/furnitures/sofa.schema.js';
export const sofa = defineFuniture(sofa_schema, {
export const sofa = defineFurniture(sofa_schema, {
createInstance: ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { speaker_schema } from 'misskey-world/src/room/furnitures/speaker.schema.js';
export const speaker = defineFuniture(speaker_schema, {
export const speaker = defineFurniture(speaker_schema, {
createInstance: ({ options, model }) => {
const outerMaterial = model.findMaterial('__X_COVER__');
const innerMaterial = model.findMaterial('__X_BODY__');

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { speakerStand_schema } from 'misskey-world/src/room/furnitures/speakerStand.schema.js';
export const speakerStand = defineFuniture(speakerStand_schema, {
export const speakerStand = defineFurniture(speakerStand_schema, {
createInstance: ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -4,12 +4,12 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { getLightRangeFactorByGraphicsQuality } from '../utility.js';
import { cm, remap, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { spotLight_schema } from 'misskey-world/src/room/furnitures/spotLight.schema.js';
export const spotLight = defineFuniture(spotLight_schema, {
export const spotLight = defineFurniture(spotLight_schema, {
createInstance: ({ lc, scene, options, model, graphicsQuality }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { sprayer_schema } from 'misskey-world/src/room/furnitures/sprayer.schema.js';
export const sprayer = defineFuniture(sprayer_schema, {
export const sprayer = defineFurniture(sprayer_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -4,10 +4,10 @@
*/
import * as BABYLON from '@babylonjs/core/pure.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { stanchionPole_schema } from 'misskey-world/src/room/furnitures/stanchionPole.schema.js';
export const stanchionPole = defineFuniture(stanchionPole_schema, {
export const stanchionPole = defineFurniture(stanchionPole_schema, {
createInstance: ({ options, model }) => {
const bodyMaterial = model.findMaterial('__X_BODY__');

View File

@@ -6,9 +6,9 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { steelRack_schema } from 'misskey-world/src/room/furnitures/steelRack.schema.js';
import { cm, remap } from 'misskey-world/src/utility.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
export const steelRack = defineFuniture(steelRack_schema, {
export const steelRack = defineFurniture(steelRack_schema, {
path: (options) => {
switch (options.widthAndDepthVariation) {
case '60-35': return 'steel-rack/60-35';

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { stormGlass_schema } from 'misskey-world/src/room/furnitures/stormGlass.schema.js';
export const stormGlass = defineFuniture(stormGlass_schema, {
export const stormGlass = defineFurniture(stormGlass_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { tableSalt_schema } from 'misskey-world/src/room/furnitures/tableSalt.schema.js';
export const tableSalt = defineFuniture(tableSalt_schema, {
export const tableSalt = defineFurniture(tableSalt_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { tabletopCalendar_schema } from 'misskey-world/src/room/furnitures/tabletopCalendar.schema.js';
export const tabletopCalendar = defineFuniture(tabletopCalendar_schema, {
export const tabletopCalendar = defineFurniture(tabletopCalendar_schema, {
createInstance: () => {
return {
interactions: {},

View File

@@ -6,10 +6,10 @@
import * as BABYLON from '@babylonjs/core/pure.js';
import { cm, WORLD_SCALE } from 'misskey-world/src/utility.js';
import { tabletopDigitalClock_schema } from 'misskey-world/src/room/furnitures/tabletopDigitalClock.schema.js';
import { defineFuniture } from '../furniture.js';
import { defineFurniture } from '../furniture.js';
import { get7segMeshesOfCurrentTime } from '../../utility.js';
export const tabletopDigitalClock = defineFuniture(tabletopDigitalClock_schema, {
export const tabletopDigitalClock = defineFurniture(tabletopDigitalClock_schema, {
createInstance: ({ sr, options, model, timer }) => {
const matrix = model.root.getWorldMatrix(true);
const scale = new BABYLON.Vector3();

Some files were not shown because too many files have changed in this diff Show More