mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-19 22:55:29 +02:00
wip
This commit is contained in:
@@ -22,19 +22,19 @@ export const cardboardBox = defineObject({
|
||||
},
|
||||
},
|
||||
placement: 'top',
|
||||
createInstance: ({ scene, options, root }) => {
|
||||
createInstance: ({ scene, options, model }) => {
|
||||
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 material = model.findMaterial('__X_BODY__');
|
||||
if (options.variation === 'mikan') {
|
||||
const tex = new BABYLON.Texture('/client-assets/room/objects/cardboard-box/textures/mikan.png', scene, false, false);
|
||||
material.albedoTexture = tex;
|
||||
material.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);
|
||||
material.albedoTexture = tex;
|
||||
material.albedoColor = new BABYLON.Color3(1, 1, 1);
|
||||
}
|
||||
},
|
||||
interactions: {},
|
||||
};
|
||||
|
||||
@@ -19,6 +19,8 @@ export const tv = defineObject({
|
||||
const screenMesh = model.findMesh('__TV_SCREEN__');
|
||||
screenMesh.markVerticesDataAsUpdatable(BABYLON.VertexBuffer.UVKind, true);
|
||||
|
||||
model.bakeExcludeMeshes = [screenMesh];
|
||||
|
||||
initTv(room, screenMesh);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user