Skip to content

Integration with/docs on react-three-fiber #1087

@bergkvist

Description

@bergkvist

Right now, we have:

imperative declarative (react)
Mapbox GL JS react-map-gl
THREE.js react-three-fiber

Just as react-map-gl is the declarative react(ion) to Mapbox GL JS, react-three-fiber is the declarative reaction to THREE.js.

Mapbox GL JS has support for adding custom layers with THREE.js:
https://docs.mapbox.com/mapbox-gl-js/example/add-3d-model/

It would be really cool with some examples/documentation on how react-map-gl could be used together with react-three-fiber.

Imagine being able to easily add a postprocessing effect to the map

function App() {
  return (
    <Canvas>
      <ReactMapGL />
      <BookehPostprocessingEffect />
    </Canvas>
  )
}

Or adding a custom 3d object

function App() {
  return (
    <Canvas>
      <ReactMapGL />
      <Custom3DObject />
    </Canvas>
  )
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions