Skip to content

Commit

Permalink
refactor(TresContext): remove isTresContext
Browse files Browse the repository at this point in the history
  • Loading branch information
andretchen0 committed Jul 9, 2024
1 parent f7eb00e commit 9fb8cc9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/composables/useTresContextProvider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export interface TresContext {
deregisterObjectAtPointerEventHandler?: (object: TresObject) => void
registerBlockingObjectAtPointerEventHandler?: (object: TresObject) => void
deregisterBlockingObjectAtPointerEventHandler?: (object: TresObject) => void
isTresContext: true
}

export function useTresContextProvider({
Expand Down Expand Up @@ -183,7 +182,6 @@ export function useTresContextProvider({
setCameraActive,
deregisterCamera,
loop: createRenderLoop(),
isTresContext: true,
}

provide('useTres', ctx)
Expand Down
1 change: 0 additions & 1 deletion src/core/nodeOps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,6 @@ function mockTresContext() {
scene: shallowRef(new Scene()),
registerCamera: () => {},
deregisterCamera: () => {},
isTresContext: true,
} as unknown as TresContext
}

Expand Down
5 changes: 0 additions & 5 deletions src/utils/is.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { TresObject, TresPrimitive } from 'src/types'
import type { BufferGeometry, Camera, Fog, Material, Object3D, Scene } from 'three'
import type { TresContext } from '../composables/useTresContextProvider'

export function und(u: unknown) {
return typeof u === 'undefined'
Expand Down Expand Up @@ -59,7 +58,3 @@ export function tresObject(u: unknown): u is TresObject {
export function tresPrimitive(u: unknown): u is TresPrimitive {
return obj(u) && !!(u.isPrimitive)
}

export function tresContext(u: unknown): u is TresContext {
return obj(u) && 'isTresContext' in u && !!(u.isTresContext)
}

0 comments on commit 9fb8cc9

Please sign in to comment.