mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-13 14:05:35 +02:00
wip
This commit is contained in:
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB |
BIN
packages/frontend/assets/room/objects/issyoubin/textures/ai.af
Normal file
BIN
packages/frontend/assets/room/objects/issyoubin/textures/ai.af
Normal file
Binary file not shown.
BIN
packages/frontend/assets/room/objects/issyoubin/textures/ai.png
Normal file
BIN
packages/frontend/assets/room/objects/issyoubin/textures/ai.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -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: {},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user