1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-23 20:02:32 +08:00

improve renderer interface

This commit is contained in:
Kevin Levron 2021-05-02 20:44:13 +02:00
parent 1c4acdc1e3
commit dde4c566ae
2 changed files with 5 additions and 3 deletions

View File

@ -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 extends keyof EventCallbackMap>(t: T, cb: EventCallbackMap[T]): void
}
export const RendererInjectionKey: InjectionKey<RendererInterface> = Symbol('Renderer')
export interface RendererPublicInterface extends ComponentPublicInstance, RendererInterface {}
export const RendererInjectionKey: InjectionKey<RendererPublicInterface> = Symbol('Renderer')
export default defineComponent({
name: 'Renderer',

View File

@ -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'