mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-29 18:44:40 +02:00
update directory structure
This commit is contained in:
32
packages/frontend/src/world/room/objects/mug.ts
Normal file
32
packages/frontend/src/world/room/objects/mug.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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?.();
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user