With the v-log directive provided by TresJS, you can do this by just adding v-log to the instance.
<script setup lang="ts">
import { TresCanvas, vLog } from '@tresjs/core'
import { OrbitControls, Sphere } from '@tresjs/cientos'
</script>
<template>
<TresCanvas >
<TresPerspectiveCamera :position="[0, 2, 5]" />
<Sphere
ref="sphereRef"
:scale="0.5"
v-log
/>
<OrbitControls v-log />
</TresCanvas>
</template>
Note that you can pass a modifier with the name of any property, for example:
<!-- will log the materials -->
<Sphere v-log:material />
<TresCanvas > will not log the canvas or the scene.