Alvaro 2 gadi atpakaļ
vecāks
revīzija
b1bbbcfce9

+ 1 - 1
packages/cientos/src/core/OrbitControls.vue

@@ -5,7 +5,7 @@ import { inject, ref, type Ref } from 'vue'
 
 
 import { useCientos } from './useCientos'
 import { useCientos } from './useCientos'
 
 
-const props = withDefaults(
+withDefaults(
   defineProps<{
   defineProps<{
     makeDefault?: boolean
     makeDefault?: boolean
     camera?: Camera
     camera?: Camera

+ 2 - 3
packages/cientos/src/core/Text3D.vue

@@ -1,8 +1,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
-import { WebGLRenderer } from 'three'
 import { TextGeometry, FontLoader } from 'three-stdlib'
 import { TextGeometry, FontLoader } from 'three-stdlib'
 
 
-import { computed, inject, Ref, useSlots } from 'vue'
+import { computed, useSlots } from 'vue'
 import { useCientos } from './useCientos'
 import { useCientos } from './useCientos'
 
 
 type Glyph = {
 type Glyph = {
@@ -58,7 +57,7 @@ const loader = new FontLoader()
 const slots = useSlots()
 const slots = useSlots()
 
 
 const localText = computed(() => {
 const localText = computed(() => {
-  return props.text || slots.default()?.[0]?.children.trim() || 'TresJS'
+  return props.text || slots.default()[0].children.trim() || 'TresJS'
 })
 })
 
 
 const font = await new Promise((resolve, reject) => {
 const font = await new Promise((resolve, reject) => {