1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-16 22:35:27 +02:00
Files
misskey/packages/frontend/src/utility/room/objects/mug.ts
2026-04-15 11:54:38 +09:00

33 lines
661 B
TypeScript

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