Added useTemplateRef API support

This commit is contained in:
msavulescu
2025-07-18 16:20:35 +03:00
parent 2aad0d4f4c
commit 6af299052a
69 changed files with 157 additions and 158 deletions

View File

@@ -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 = () => {