0.0.1 • Published 4 years ago
react-bim v0.0.1
React BIM
A helper library that provides 3D BIM component based on react-three-fiber. May be merged into epics-components in the future. Beware of the peer deps.
Author
Usage
import React, { FC, useState, useEffect } from 'react'
import { Canvas, Model } from 'react-bim'
const App: FC = () => {
const [ status, setStatus ] = useState<'normal'|'error'>()
useEffect(() => setInterval(() => setStatus(status === 'normal' ? 'error' : 'normal'), 1000), [])
return (
<Canvas>
<Model
src={{
normal: '/normal.glb',
error: '/error.glb'
}}
status={status}
/>
</Canvas>
)
}