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/cupNoodle.ts
syuilo 6cca5706f7 wip
2026-04-17 15:31:56 +09:00

36 lines
763 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 cupNoodle = defineObject({
id: 'cupNoodle',
name: 'Cup Noodle',
options: {
schema: {},
default: {},
},
placement: 'top',
hasCollisions: false,
hasTexture: true,
canPreMeshesMerging: true,
createInstance: ({ scene, root }) => {
let yugeDispose: (() => void) | null = null;
return {
onInited: () => {
yugeDispose = yuge(scene, root, new BABYLON.Vector3(0, cm(10), 0));
},
interactions: {},
dispose: () => {
yugeDispose?.();
},
};
},
});