feat: animate home screen buttons on click
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
const props = defineProps<{
|
||||
x: number;
|
||||
y: number;
|
||||
opacity: number;
|
||||
}>();
|
||||
|
||||
const buttonImage = useTemplateRef("buttonImage");
|
||||
@@ -9,6 +10,7 @@ const buttonImage = useTemplateRef("buttonImage");
|
||||
useRender((ctx) => {
|
||||
if (!buttonImage.value) return;
|
||||
|
||||
ctx.globalAlpha = props.opacity / 100;
|
||||
ctx.drawImage(buttonImage.value, props.x, props.y);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user