1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-06-02 10:14:23 +02:00
This commit is contained in:
syuilo
2026-02-22 09:08:50 +09:00
parent dcae3ccaaa
commit c5eaf0f7af
8 changed files with 134 additions and 103 deletions

View File

@@ -3,7 +3,9 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import * as BABYLON from '@babylonjs/core';
import { defineObject } from '../engine.js';
import { initTv } from '../utility.js';
export const tv = defineObject({
id: 'tv',
@@ -13,7 +15,12 @@ export const tv = defineObject({
default: {},
},
placement: 'top',
createInstance: () => {
createInstance: ({ room, root }) => {
const screenMesh = root.getChildMeshes().find(m => m.name.includes('__TV_SCREEN__')) as BABYLON.Mesh;
screenMesh.markVerticesDataAsUpdatable(BABYLON.VertexBuffer.UVKind, true);
initTv(room, screenMesh);
return {
interactions: {},
};