18 lines
293 B
Vue
18 lines
293 B
Vue
<script setup lang="ts">
|
|
const props = defineProps<{
|
|
x: number;
|
|
y: number;
|
|
opacity: number;
|
|
image: HTMLImageElement;
|
|
}>();
|
|
|
|
useRender((ctx) => {
|
|
ctx.globalAlpha = props.opacity;
|
|
ctx.drawImage(props.image, props.x, props.y);
|
|
});
|
|
|
|
defineOptions({
|
|
render: () => null,
|
|
});
|
|
</script>
|