supermedium / aframe-react

:atom: Build virtual reality experiences with A-Frame and React.
https://ngokevin.github.io/aframe-react-boilerplate/
MIT License
1.42k stars 151 forks source link

Is it possible to render a-model using aframe-react? #18

Closed whatifif closed 8 years ago

whatifif commented 8 years ago

I see there is a-model tag in the original a-frame. a-model uses '.dae' data format.

Is it possible to render a-model using aframe-react?

meta-meta commented 8 years ago

aframe-react doesn't expose the aframe primitives but those are all merely entities witha combination of components

to load a model, you can use a loader component and you'll likely want rotation, position and scale components:

<Entity loader={{src: 'url(models/my_model.dae)', format: 'collada'}}
              scale="1 1 1"
              rotation="0 180 0"
              position="0 0 0">
</Entity>
ngokevin commented 8 years ago

If you are requiring aframe in your project, <a-model> should be there and usable within or as a React component.