15 lines
364 B
Vue
15 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>
|