game-village-politics-frontend/app/components/village/Bird.vue

17 lines
654 B
Vue

<script setup lang="ts">
defineProps<{ d: string; dur: number; begin: number; size: number }>()
</script>
<!-- A crow crossing the land or circling, two black wings beating. -->
<template>
<g>
<g :transform="`scale(${size})`">
<g>
<animateTransform attributeName="transform" type="scale" values="1 1;1 -0.6;1 1" keyTimes="0;0.5;1" dur="0.45s" :begin="`${begin}s`" repeatCount="indefinite" />
<path d="M0 0L-3.8 -1.6L-1.6 0.3zM0 0L3.8 -1.6L1.6 0.3zM-0.5 -0.3H0.5V0.6H-0.5z" fill="#121212" />
</g>
</g>
<animateMotion :dur="`${dur}s`" :begin="`${begin}s`" repeatCount="indefinite" :path="d" />
</g>
</template>