mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-14 09:55:38 +02:00
36 lines
763 B
TypeScript
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?.();
|
|
},
|
|
};
|
|
},
|
|
});
|