5.3.1

Directives

TresJS provides custom made vue directives to help you creating your scenes.

v-log

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>

Arguments

Note that you can pass a modifier with the name of any property, for example:

    <!-- will log the materials -->
    <Sphere v-log:material />
The component <TresCanvas > will not log the canvas or the scene.