Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Jul 15, 2024
1 parent db29c55 commit 061906f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/docs/guides/ASSET_LOADING.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import BusterDrone from './BusterDrone.glb';
```

:::info
Currently only loading .glb files is supported. You can convert any other 3D models (obj, FBX, etc) to .glb using blender or online converter tools.
Currently only loading `.glb` files is supported. You can convert any other 3D models (gltf, obj, FBX, etc) to .glb using blender or online converter tools.
:::

### Debug
Expand Down
17 changes: 14 additions & 3 deletions docs/docs/guides/GETTING_STARTED.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,21 @@ import TabItem from '@theme/TabItem'

## Installing the library

Install [react-native-filament](https://www.npmjs.com/package/react-native-filament) through npm:
1. Install [react-native-filament](https://www.npmjs.com/package/react-native-filament):

```bash
```sh
npm i react-native-filament
```

2. `react-native-filament` depends on [`react-native-worklets-core`](https://github.com/margelo/react-native-worklets-core):

```sh
npm i react-native-worklets-core
```

3. Update your pods:

```sh
cd ios && pod install
```

Expand Down Expand Up @@ -43,7 +54,7 @@ module.exports = mergeConfig(defaultConfig, config);
```

:::info
react-native-filament only supports loading .glb files for 3d models.
Currently only loading `.glb` files is supported. You can convert any other 3D models (gltf, obj, FBX, etc) to .glb using blender or online converter tools.
:::

## Basic example: Render your first 3D model
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/guides/TRANSFORMATION.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Transforming refers to changing the position, rotation or scale of an object in
</svg>
</div>

## Position
## Translate / Position

By default models are rendered at the origin `[0, 0, 0]`. You can change the position of a model by providing a `position` prop:
By default models are rendered at the origin `[0, 0, 0]`. You can change the position of a model by providing a `translate` prop:

```tsx
import { Model } from "react-native-filament"
Expand All @@ -27,7 +27,7 @@ const x = 0
const y = -1
const z = 0

<Model position={[x, y, z]} />
<Model translate={[x, y, z]} />
```

Units in filament are physically based, so 1 unit is 1 meter.
Expand Down

0 comments on commit 061906f

Please sign in to comment.