Bläddra i källkod

refactor(app): Add tres version to the canvas as a data attribute (#504)

Jaime A Torrealba C 1 år sedan
förälder
incheckning
a6e17378ca
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      src/components/TresCanvas.vue

+ 2 - 0
src/components/TresCanvas.vue

@@ -21,6 +21,7 @@ import {
   h, 
   getCurrentInstance,
 } from 'vue'
+import pkg from '../../package.json'
 import {
   useTresContextProvider,
   useLogger,
@@ -187,6 +188,7 @@ onMounted(() => {
     ref="canvas"
     :data-scene="scene.uuid"
     :class="$attrs.class"
+    :data-tres="`tresjs ${pkg.version}`"
     :style="{
       display: 'block',
       width: '100%',