import {createContext, Dispatch} from 'react'; import * as THREE from 'three'; import {ClientAreaProps, ViewerDispatchers, ViewerOptions} from './types'; export interface IViewerContext { animationRunner?: () => void; dispatchers?: ViewerDispatchers; object3D?: Promise; onSceneReady?: () => void; options: ViewerOptions; threeRoot: HTMLDivElement | null; clientSize: ClientAreaProps; setIsLoading: Dispatch; } const ViewerContext = createContext({} as IViewerContext); export default ViewerContext;