Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for controls #783

Closed
wants to merge 20 commits into from
Closed

Add support for controls #783

wants to merge 20 commits into from

Conversation

gkjohnson
Copy link
Contributor

Related to #770

jo-chemla and others added 20 commits October 1, 2024 21:11
Example setup via standard r3f [installation instructions](https://r3f.docs.pmnd.rs/getting-started/installation)doc with vite bundler. Removed glb test files which are heavy, prefer CDN served Suzanne.

```bash
# Create app
npm create vite r3f-3dtilesrenderer

# Install dependencies
cd r3f-3dtilesrenderer
npm install three @react-three/fiber @react-three/drei

# Start development server
npm run dev
```
- Add leva for options control
- add proj4 computeCrsTransform for correct vertical
- rename component to DemoTiles
…ug property

Depending on the renderer used, different props have to be passed:
 - `props.type === TilesRendererType.Standard`: requires `props.path`
 - `props.type === TilesRendererType.Google`: requires `props.googleApiKey`
 - `props.type === TilesRendererType.CesiumIon`: requires `props.ionAssetId & props.ionAccessToken`
WIP works for standard TilesRenderer, now need to test it for CesiumIon and Google
Extracted some code out of the r3d component, to be defined at application level
Now works for google, ion, standard with custom matrix transform.
Still need to try to extract the matrixTransform outside of the component as well
* Wrap an r3f component for standard TilesRenderer

Example coming

* Create example/r3f-3dtilesrenderer with vite

Example setup via standard r3f [installation instructions](https://r3f.docs.pmnd.rs/getting-started/installation)doc with vite bundler. Removed glb test files which are heavy, prefer CDN served Suzanne.

```bash
# Create app
npm create vite r3f-3dtilesrenderer

# Install dependencies
cd r3f-3dtilesrenderer
npm install three @react-three/fiber @react-three/drei

# Start development server
npm run dev
```

* Quickfixes

- Add leva for options control
- add proj4 computeCrsTransform for correct vertical
- rename component to DemoTiles

* Add Google and Cesium Ion in addition to Standard Renderers, with debug property

Depending on the renderer used, different props have to be passed:
 - `props.type === TilesRendererType.Standard`: requires `props.path`
 - `props.type === TilesRendererType.Google`: requires `props.googleApiKey`
 - `props.type === TilesRendererType.CesiumIon`: requires `props.ionAssetId & props.ionAccessToken`

* WIP MatrixTransform works for standard tileset

WIP works for standard TilesRenderer, now need to test it for CesiumIon and Google

* Works for google, ion, standard renderer

Extracted some code out of the r3d component, to be defined at application level
Now works for google, ion, standard with custom matrix transform.
Still need to try to extract the matrixTransform outside of the component as well
# Conflicts:
#	example/r3f-3dtilesrenderer/src/App.jsx
* Add support for the tile root frame transformations

* fixes

* Add east north up frame component

* Update package.json

* Add children to new root objects

* Fixed tile coordinate frames
* Add overlay component

* Remove unused imports

* Fix dom overlay

* Fixes to dom overlay

* Add support for ion attributions

* Add attributions component

* Rename component

* Adjust use of pointer events all
@gkjohnson gkjohnson closed this Oct 5, 2024
@gkjohnson gkjohnson deleted the r3f-controls branch October 5, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants