mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 14:39:30 -07:00
Added useTemplateRef API support
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { Camera, Mesh, Program, Renderer, Transform, Triangle, Vec3 } from 'ogl';
|
||||
import { onMounted, onUnmounted, shallowRef, watch } from 'vue';
|
||||
import { onMounted, onUnmounted, useTemplateRef, watch } from 'vue';
|
||||
|
||||
interface MetaBallsProps {
|
||||
color?: string;
|
||||
@@ -118,7 +118,7 @@ void main() {
|
||||
}
|
||||
`;
|
||||
|
||||
const containerRef = shallowRef<HTMLDivElement>();
|
||||
const containerRef = useTemplateRef<HTMLDivElement>('containerRef');
|
||||
let cleanUpAnimation: () => void = () => {};
|
||||
|
||||
const setupAnimation = () => {
|
||||
|
||||
Reference in New Issue
Block a user