import { App, Component } from 'vue' import TresCanvas from '/@/components/TresCanvas.vue' import { useInstanceCreator } from '/@/core' export * from '/@/core' export interface TresPlugin { [key: string]: any install: (app: App, options?: any) => void } const plugin: TresPlugin = { install(app: App /* options: any */) { app.component('TresCanvas', TresCanvas) const { createComponentInstances } = useInstanceCreator() const components = createComponentInstances() components.forEach(([key, cmp]) => { app.component(key as string, cmp as Component) }) }, } export default plugin