UNPKG

react-babylonjs

Version:
35 lines (34 loc) 1.39 kB
import { Scene } from '@babylonjs/core/scene.js'; import { Nullable } from '@babylonjs/core/types.js'; import { HostConfig } from 'react-reconciler'; import { CreatedInstance } from './CreatedInstance'; import { UpdatePayload } from './PropsHandler'; type HostCreatedInstance<T> = CreatedInstance<T> | undefined; type Props = { scene: Scene; } & any; export type Container = { scene: Nullable<Scene>; rootInstance: CreatedInstance<Scene>; }; type HostContext = Container; type TimeoutHandle = number | undefined; type NoTimeout = number; declare const ReactBabylonJSHostConfig: HostConfig<string, Props, Container, HostCreatedInstance<any>, Record<string, never>, // text Record<string, any>, // suspense Record<string, any>, // hydratable any, HostContext, UpdatePayload, Record<string, never>, // TODO Placeholder for undocumented API in typings TimeoutHandle, NoTimeout> & { now: () => number; resolveUpdatePriority: (args: any) => void; getCurrentUpdatePriority: () => number; setCurrentUpdatePriority: (newPriority: number) => void; onUncaughtError: (error: Error) => void; maySuspendCommit: () => boolean; preloadInstance: (args: any) => void; startSuspendingCommit: () => void; waitForCommitToBeReady: () => void; finishedWork: (args: any) => void; suspendInstance: (args: any) => void; }; export default ReactBabylonJSHostConfig;