UNPKG

react-native-filament

Version:

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

20 lines 622 B
import React from 'react'; import { useLightEntity } from '../hooks/useLightEntity'; import { useFilamentContext } from './Context'; import { ParentEntityContext } from './ParentEntityContex'; import { useEntityInScene } from '../hooks/useEntityInScene'; export function Light({ children, ...config }) { const { lightManager, scene } = useFilamentContext(); const lightEntity = useLightEntity(lightManager, config); useEntityInScene(scene, lightEntity); return /*#__PURE__*/React.createElement(ParentEntityContext.Provider, { value: lightEntity }, children); } //# sourceMappingURL=Light.js.map