浏览代码

chore: fix lint

alvarosabu 1 年之前
父节点
当前提交
d2e832f8ef

+ 2 - 2
playground/src/components/AnimatedObjectUseUpdate.vue

@@ -30,8 +30,8 @@ watchEffect(() => {
     resume()
   }
 })
-const anotherLog = useThrottleFn(() => console.log('after render'), 3000)
-
+/* const anotherLog = useThrottleFn(() => console.log('after render'), 3000)
+ */
 /* useUpdate(() => {
   anotherLog()
 }, 1) */

+ 1 - 0
playground/src/components/FBOCube.vue

@@ -1,3 +1,4 @@
+<!-- eslint-disable no-console -->
 <script setup lang="ts">
 import { useFBO } from '../composables/useFBO'
 

+ 0 - 1
playground/src/components/TakeOverLoopExperience.vue

@@ -1,5 +1,4 @@
 <script setup lang="ts">
-import { useRender } from '@tresjs/core'
 import { OrbitControls } from '@tresjs/cientos'
 import { useControls } from '@tresjs/leches'
 

+ 3 - 2
playground/src/composables/useFBO.ts

@@ -1,4 +1,5 @@
-import { useRender, useRenderLoop, useTresContext, useUpdate } from '@tresjs/core'
+/* eslint-disable no-console */
+import { useTresContext, useUpdate } from '@tresjs/core'
 import type { Camera, WebGLRenderTargetOptions } from 'three'
 import { DepthTexture, FloatType, HalfFloatType, LinearFilter, WebGLRenderTarget } from 'three'
 import type { Ref } from 'vue'
@@ -48,7 +49,7 @@ export function useFBO(options: FboOptions) {
   const { height, width, settings, depth } = isReactive(options) ? toRefs(options) : toRefs(reactive(options))
 
   /*   const { onLoop } = useRenderLoop() */
-  const { camera, scene, sizes } = useTresContext()
+  const { sizes } = useTresContext()
 
   watchEffect(() => {
     target.value?.dispose()

+ 0 - 4
playground/src/pages/advanced/FBO.vue

@@ -3,10 +3,6 @@ import { TresCanvas } from '@tresjs/core'
 import { BasicShadowMap, NoToneMapping, SRGBColorSpace } from 'three'
 
 import { OrbitControls } from '@tresjs/cientos'
-import { ref, shallowRef } from 'vue'
-import { TresLeches, useControls } from '@tresjs/leches'
-import Fbo from '../../components/useFBO/component.vue'
-import { useFbo } from '../../components/useFBO'
 import '@tresjs/leches/styles'
 
 const gl = {

+ 1 - 1
playground/vite.config.ts

@@ -13,7 +13,7 @@ import { qrcode } from 'vite-plugin-qrcode'
 export default defineConfig({
   plugins: [
     glsl(),
-/*     VueDevTools(), */
+    /*     VueDevTools(), */
     vue({
       script: {
         propsDestructure: true,

+ 3 - 3
src/composables/useTresContextProvider/index.ts

@@ -1,5 +1,5 @@
 import type { Fn } from '@vueuse/core'
-import { useFps, useMemory, useRafFn, useThrottleFn } from '@vueuse/core'
+import { useFps, useMemory, useRafFn } from '@vueuse/core'
 import { computed, inject, onUnmounted, provide, readonly, ref, shallowRef } from 'vue'
 import type { Camera, EventDispatcher, WebGLRenderer } from 'three'
 import { Raycaster } from 'three'
@@ -194,11 +194,11 @@ export function useTresContextProvider({
   }
 
   // The loop
-  const log = useThrottleFn(() => console.log('rendering'), 3000)
+  /*   const log = useThrottleFn(() => console.log('rendering'), 3000) */
 
   ctx.loop.onLoop(() => {
     if (camera.value && render.frames.value > 0) {
-      log()
+    /*   log() */
       renderer.value.render(scene, camera.value)
       emit('render', ctx.renderer.value)
     }