1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-13 14:05:35 +02:00
This commit is contained in:
syuilo
2026-04-23 20:18:46 +09:00
parent eeda7e7002
commit 8a6e925297
7 changed files with 23 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -11,8 +11,14 @@ export const issyoubin = defineObject({
name: 'issyoubin',
options: {
schema: {
variation: {
type: 'enum',
label: 'Variation',
enum: ['misuki', 'ai'],
},
},
default: {
variation: 'ai',
},
},
placement: 'top',
@@ -34,8 +40,25 @@ export const issyoubin = defineObject({
// しょうがないので不透明にする
bottleMaterial.transparencyMode = BABYLON.PBRMaterial.PBRMATERIAL_ALPHATEST;
const applyVariation = () => {
if (options.variation === 'misuki') {
const tex = new BABYLON.Texture('/client-assets/room/objects/issyoubin/textures/misuki.png', scene, false, false);
bottleMaterial.albedoTexture = tex;
} else if (options.variation === 'ai') {
const tex = new BABYLON.Texture('/client-assets/room/objects/issyoubin/textures/ai.png', scene, false, false);
bottleMaterial.albedoTexture = tex;
}
};
applyVariation();
return {
onOptionsUpdated: ([k, v]) => {
switch (k) {
case 'variation':
applyVariation();
break;
}
},
interactions: {},
};