UNPKG

react-native-filament

Version:

A real-time physically based 3D rendering engine for React Native

38 lines 1.4 kB
import { PropsWithChildren } from 'react'; import { EngineProps } from '../hooks/useEngine'; import React from 'react'; import { RendererConfigProps, ViewConfigProps } from './Configurator'; export type FilamentProviderProps = PropsWithChildren<Omit<EngineProps, 'context'> & ViewConfigProps & RendererConfigProps & { fallback?: React.ReactElement; }>; /** * The `<FilamentScene>` holds contextual values for a Filament rendering scene. * * You need to wrap your rendering scene (= a component that uses `<FilamentView>`, hooks or * other Filament components) with a `<FilamentScene>`. * * @note Make sure to wrap your scene in a parent component, otherwise the React context cannot be inferred. * @example * ```tsx * function Scene() { * // in here you can use Filament's hooks and components * return ( * <FilamentView style={styles.container}> * <DefaultLight /> * <Model source={{ uri: modelPath }} /> * </FilamentView> * ) * } * * export function RocketModel() { * // in here you only need to wrap the child-component with <FilamentScene> * return ( * <FilamentScene> * <Scene /> * </FilamentScene> * ) * } * ``` */ export declare function FilamentScene({ children, fallback, config, backend, frameRateOptions, ...viewProps }: FilamentProviderProps): React.JSX.Element | null; //# sourceMappingURL=FilamentScene.d.ts.map