diff --git a/src/core/Renderer.ts b/src/core/Renderer.ts index b67007b..452be16 100644 --- a/src/core/Renderer.ts +++ b/src/core/Renderer.ts @@ -1,7 +1,7 @@ /* eslint-disable no-use-before-define */ import { Camera, NoToneMapping, PCFShadowMap, Scene, WebGLRenderer } from 'three' import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer' -import { defineComponent, InjectionKey, PropType } from 'vue' +import { ComponentPublicInstance, defineComponent, InjectionKey, PropType } from 'vue' import { bindProp } from '../tools' import { PointerPublicConfigInterface } from './usePointer' import useThree, { SizeInterface, ThreeConfigInterface, ThreeInterface } from './useThree' @@ -93,7 +93,9 @@ export interface RendererInterface extends RendererSetupInterface { removeListener(t: T, cb: EventCallbackMap[T]): void } -export const RendererInjectionKey: InjectionKey = Symbol('Renderer') +export interface RendererPublicInterface extends ComponentPublicInstance, RendererInterface {} + +export const RendererInjectionKey: InjectionKey = Symbol('Renderer') export default defineComponent({ name: 'Renderer', diff --git a/src/core/index.ts b/src/core/index.ts index 7c49cc4..26fef3c 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -9,5 +9,5 @@ export { default as Raycaster } from './Raycaster' export { default as CubeCamera } from './CubeCamera' -export type { RendererInterface } from './Renderer' +export type { RendererPublicInterface } from './Renderer' export type { Object3DInterface } from './Object3D'