Function: useModel()
useModel(
source
,props
?):FilamentModel
Loads a model from the given source.
If you are passing in a .glb
model or similar from your app's bundle using require(..)
, make sure to add glb
as an asset extension to metro.config.js
!
If you are passing in a { url: ... }
, make sure the URL points directly to a .glb
model. This can either be a web URL (http://..
/https://..
), a local file (file://..
), or an native asset path (path/to/asset.glb
)
Parameters
• source: BufferSource
• props?: UseModelConfigParams
Returns
Worklet
Example
const model = useModel(require('model.glb'))