mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-22 23:24:10 +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',
|
name: 'issyoubin',
|
||||||
options: {
|
options: {
|
||||||
schema: {
|
schema: {
|
||||||
|
variation: {
|
||||||
|
type: 'enum',
|
||||||
|
label: 'Variation',
|
||||||
|
enum: ['misuki', 'ai'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
default: {
|
default: {
|
||||||
|
variation: 'ai',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
placement: 'top',
|
placement: 'top',
|
||||||
@@ -34,8 +40,25 @@ export const issyoubin = defineObject({
|
|||||||
// しょうがないので不透明にする
|
// しょうがないので不透明にする
|
||||||
bottleMaterial.transparencyMode = BABYLON.PBRMaterial.PBRMATERIAL_ALPHATEST;
|
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 {
|
return {
|
||||||
onOptionsUpdated: ([k, v]) => {
|
onOptionsUpdated: ([k, v]) => {
|
||||||
|
switch (k) {
|
||||||
|
case 'variation':
|
||||||
|
applyVariation();
|
||||||
|
break;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
interactions: {},
|
interactions: {},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user