Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Mar 15, 2023
1 parent 0c5deaf commit 968d394
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions packages/cientos/src/core/useCientos.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
import { useTres } from '@tresjs/core'
import { inject, watch } from 'vue'

import { inject } from 'vue'
import { useLogger } from '/@/composables'
/**
* Allows to use and extend the state of the core package.
*
* @export
* @return {*}
*/
export function useCientos() {
const { logWarning } = useLogger()
const { state, setState } = inject('useTres', useTres())
const extend =
inject<(objects: any) => void>('extend') ||
(() => {
console.warn('No extend function provided')
logWarning('No extend function provided')
})

watch(
() => state,
() => {
console.log('cientos state changed', state)
},
)
return {
state,
setState,
Expand Down
2 changes: 1 addition & 1 deletion packages/tres/src/components/TresCanvas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineComponent, h, PropType, ref, watch } from 'vue'
import { defineComponent, h, ref, watch } from 'vue'
import * as THREE from 'three'
import { ShadowMapType, TextureEncoding, ToneMapping } from 'three'
import { createTres } from '/@/core/renderer'
Expand Down

0 comments on commit 968d394

Please sign in to comment.