Skip to content

Commit

Permalink
fix: remove on demand invalidation warning (#788)
Browse files Browse the repository at this point in the history
* fix: remove the user warnings on render mode methods

* fix: remove unused code
  • Loading branch information
alvarosabu authored Jul 22, 2024
1 parent dc6c3fd commit eab74e6
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/composables/useTresContextProvider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useCamera } from '../useCamera'
import type { UseRendererOptions } from '../useRenderer'
import { useRenderer } from '../useRenderer'
import { extend } from '../../core/catalogue'
import { useLogger } from '../useLogger'
import type { EmitEventFn, TresObject, TresScene } from '../../types'

import { type TresEventManager, useTresEventManager } from '../useTresEventManager'
Expand Down Expand Up @@ -100,8 +99,6 @@ export function useTresContextProvider({
emit: EmitEventFn

}): TresContext {
const { logWarning } = useLogger()

const localScene = shallowRef<TresScene>(scene)
const sizes = useSizes(windowSize, canvas)

Expand All @@ -128,18 +125,12 @@ export function useTresContextProvider({
if (rendererOptions.renderMode === 'on-demand') {
render.frames.value = Math.min(render.maxFrames, render.frames.value + frames)
}
else {
logWarning('`invalidate` can only be used when `renderMode` is set to `on-demand`')
}
}

function advance() {
if (rendererOptions.renderMode === 'manual') {
render.frames.value = 1
}
else {
logWarning('`advance` can only be used when `renderMode` is set to `manual`')
}
}

const { renderer } = useRenderer(
Expand Down

0 comments on commit eab74e6

Please sign in to comment.