All files / src/components/modal/layouts WebGLClipPath.vue

66.66% Statements 2/3
100% Branches 0/0
100% Functions 0/0
66.66% Lines 2/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36  3x   3x                                                                
<template>
  <svg class="w-100 h-100 position-absolute">
    <defs>
      <clipPath id="webgl">
        <template
          v-for="anchor in anchors"
          :key="anchor"
        >
          <WebGLClipPathRect
            :anchor="anchor"
            :canvas="canvas"
            :padding="padding"
            :radius="radius"
          />
        </template>
      </clipPath>
    </defs>
  </svg>
</template>
 
<script setup lang="ts">
import { AnchorPoint } from '@3cr/types-ts';
 
interface Props {
  anchors: AnchorPoint[];
  canvas: HTMLCanvasElement;
  padding?: number;
  radius?: number;
}
 
withDefaults(defineProps<Props>(), {
  padding: 8,
  radius: 8,
});
</script>