May 2018
Intermediate to advanced
470 pages
13h 54m
English
In order to add 3D objects to the game world, we will use the Entity component, which allows us to render 3D objects in React 360:
<Entity source={{ obj: {uri: "http://linktoOBJfile.obj "}, mtl: {uri: "http://linktoMTLfile.obj "} }}/>
Files containing the specific 3D object's information are added to the Entity component using a source attribute. The source attribute takes an object of key-value pairs to map resource file types to their locations. React 360 supports the Wavefront OBJ file format, a common representation for 3D models. So in the source attribute, the Entity component supports the following keys:
The values for ...
Read now
Unlock full access