1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-14 09:55:38 +02:00
Files
misskey/packages/frontend/src/world/room/objects/mug.ts
syuilo c8441da835 wip
2026-04-29 10:04:45 +09:00

35 lines
724 B
TypeScript

/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import * as BABYLON from '@babylonjs/core';
import { defineObject } from '../object.js';
import { cm } from '../../utility.js';
import { yuge } from '../utility.js';
export const mug = defineObject({
id: 'mug',
name: 'Mug',
options: {
schema: {},
default: {},
},
placement: 'top',
hasCollisions: false,
canPreMeshesMerging: true,
createInstance: ({ scene, root }) => {
let yugeDispose: (() => void) | null = null;
return {
onInited: () => {
yugeDispose = yuge(scene, root, new BABYLON.Vector3(0, cm(5), 0));
},
interactions: {},
dispose: () => {
yugeDispose?.();
},
};
},
});