pages/site/.vitepress/theme/OrbitControls.vue
thepaperpilot 411b2ac293
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 58s
Separated out Background.vue
That'll make using it in the homepage easier
2024-06-20 08:33:48 -05:00

14 lines
364 B
Vue

<template>
<TresOrbitControls
v-if="renderer"
:args="[camera, renderer?.domElement]"
/>
</template>
<script setup lang="ts">
import { extend, useTresContext } from '@tresjs/core';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
extend({ OrbitControls });
const { camera, renderer } = useTresContext();
</script>