Commit 1724aae
authored
feat: expose orthographic camera projection (#339)
## Description
Filament already supports orthographic cameras through
`Camera::setProjection(Camera::Projection::ORTHO, ...)`, but
react-native-filament currently only exposes the perspective helpers
through the JS camera wrapper.
This PR bridges that existing Filament API so React Native callers can
configure an orthographic projection without dropping down to native
code.
## Changes
- Adds `camera.setOrthographicProjection(left, right, bottom, top, near,
far)` to the native Camera wrapper.
- Registers the new method with the JSI hybrid object.
- Adds the method to the `RNFCamera` TypeScript interface.
## Testing
- Ran `yarn check-all` from `package/`.
- Verified C++ formatting ran after installing the missing
`clang-format` local dependency.
- Verified ESLint and TypeScript completed successfully.1 parent b422470 commit 1724aae
3 files changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
101 | 113 | | |
0 commit comments