Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Add Entity import note #843

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ title: Entity
sidebar_label: Entity
---

Entity allows you to render 3D objects, as described in the [3D Object documentation](objects.md). At the moment, React 360 supports Wavefront OBJ files and GLTF files. The external resource (or resources) containing the model's information are provided using a `source` attribute, which is an object of key-value pairs mapping resource types to their locations.
Entity allows you to render 3D objects, as described in the [3D Object documentation](objects.md). At the moment, React 360 supports Wavefront OBJ files and GLTF files. The external resource (or resources) containing the model's information are provided using a `source` attribute, which is an object of key-value pairs mapping resource types to their locations. Don't forget to import Entity from 'Entity' instead of from 'react-360'


The following properties are currently supported:
- `obj` - Location of an OBJ-formatted model
- `mtl` - Location of a MTL-formatted material (the companion of OBJ)
- `gltf2` - Location of a standalone GLTF2 model

```js
import Entity from 'Entity';


// Entity with a material
<Entity
source={{
Expand Down Expand Up @@ -47,4 +51,4 @@ An object containing keys pointing to the resources for the 3D model, as describ
- `{translateY: number}`
- `{translateZ: number}`
- **color** `color`
- **opacity** `opacity`
- **opacity** `opacity`