1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-21 19:15:32 +02:00
This commit is contained in:
syuilo
2026-04-03 13:45:43 +09:00
parent e8d8242c09
commit f367bc37f8
4 changed files with 45 additions and 45 deletions

View File

@@ -25,16 +25,16 @@ export const cardboardBox = defineObject({
createInstance: ({ scene, options, root }) => {
return {
onInited: () => {
const boxMesh = root.getChildMeshes().find(m => m.name === 'Box') as BABYLON.Mesh;
if (options.variation === 'mikan') {
const tex = new BABYLON.Texture('/client-assets/room/objects/cardboard-box/textures/mikan.png', scene, false, false);
(boxMesh.material as BABYLON.PBRMaterial).albedoTexture = tex;
(boxMesh.material as BABYLON.PBRMaterial).albedoColor = new BABYLON.Color3(1, 1, 1);
} else if (options.variation === 'aizon') {
const tex = new BABYLON.Texture('/client-assets/room/objects/cardboard-box/textures/aizon.png', scene, false, false);
(boxMesh.material as BABYLON.PBRMaterial).albedoTexture = tex;
(boxMesh.material as BABYLON.PBRMaterial).albedoColor = new BABYLON.Color3(1, 1, 1);
}
//const boxMesh = root.getChildMeshes().find(m => m.name === 'Box') as BABYLON.Mesh;
//if (options.variation === 'mikan') {
// const tex = new BABYLON.Texture('/client-assets/room/objects/cardboard-box/textures/mikan.png', scene, false, false);
// (boxMesh.material as BABYLON.PBRMaterial).albedoTexture = tex;
// (boxMesh.material as BABYLON.PBRMaterial).albedoColor = new BABYLON.Color3(1, 1, 1);
//} else if (options.variation === 'aizon') {
// const tex = new BABYLON.Texture('/client-assets/room/objects/cardboard-box/textures/aizon.png', scene, false, false);
// (boxMesh.material as BABYLON.PBRMaterial).albedoTexture = tex;
// (boxMesh.material as BABYLON.PBRMaterial).albedoColor = new BABYLON.Color3(1, 1, 1);
//}
},
interactions: {},
};