-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(deps): update dependency @react-three/fiber to v8 #2114
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
|
Size Change: 0 B Total Size: 56.6 kB ℹ️ View Unchanged
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1280019:
|
91a7e7d to
94cec8d
Compare
94cec8d to
27cc6fd
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. ⚠ Warning: custom changes will be lost. |
This PR contains the following updates:
7.0.29->8.12.0Release Notes
pmndrs/react-three-fiber
v8.12.0Compare Source
What's Changed
scenerender prop for custom THREE.Scene by @MurkyMeow in https://github.com/pmndrs/react-three-fiber/pull/2803New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.11.10...v8.12.0
v8.11.11Compare Source
v8.11.10Compare Source
What's Changed
d6049b2Full Changelog:
v8.11.9...v8.11.10v8.11.9Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.11.8...8.11.9
v8.11.8Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.11.7...v8.11.8
v8.11.7Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.11.5...v8.11.7
v8.11.6Compare Source
What's Changed
99fef6cFull Changelog: pmndrs/react-three-fiber@v8.11.5...v8.11.6
v8.11.5Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.11.4...v8.11.5
v8.11.4Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.11.3...v8.11.4
v8.11.3Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.11.2...v8.11.3
v8.11.2Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.11.1...v8.11.2
v8.11.1Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.10.4...v8.11.1
v8.11.0Compare Source
feat: events.update, allow raycast w/o user interaction by @drcmda in
7b25689Full Changelog: pmndrs/react-three-fiber@v8.10.4...v8.11.0
v8.10.4Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.10.3...v8.10.4
v8.10.3Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.10.1...v8.10.3
v8.10.2Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.10.1...v8.10.2
v8.10.1Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.10.0...v8.10.1
v8.10.0Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.9.2...v8.10.0
v8.9.2Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.9.1...v8.9.2
v8.9.1Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.9.0...v8.9.1
v8.9.0Compare Source
What's Changed
Re-release of #2481 from
v8.7.0, it just didn't get exported.Full Changelog: pmndrs/react-three-fiber@v8.8.11...v8.9.0
v8.8.11Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.8.10...v8.8.11
v8.8.10Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.8.9...v8.8.10
v8.8.9Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.8.8...v8.8.9
v8.8.8Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.8.7...v8.8.8
v8.8.7Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.8.6...v8.8.7
v8.8.6Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.8.5...v8.8.6
v8.8.5Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.8.4...v8.8.5
v8.8.4Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.8.2...v8.8.4
v8.8.3Compare Source
What's Changed
c40f8e4Full Changelog: pmndrs/react-three-fiber@v8.8.2...v8.8.3
v8.8.2Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.8.1...v8.8.2
v8.8.1Compare Source
What's Changed
No changes in this release.
Full Changelog: pmndrs/react-three-fiber@v8.8.0...v8.8.1
v8.8.0Compare Source
What's Changed
This release implements a context bridge within
Canvas, enabling R3F children to consume context between renderers (e.g.react-domorreact-native), and removing the need for manually bridging context.Full Changelog: pmndrs/react-three-fiber@v8.7.4...v8.8.0
v8.7.4Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.7.2...v8.7.4
v8.7.3Compare Source
What's Changed
f26cd95Full Changelog: pmndrs/react-three-fiber@v8.7.2...v8.7.3
v8.7.2Compare Source
What's Changed
24cb1cfFull Changelog: pmndrs/react-three-fiber@v8.7.1...v8.7.2
v8.7.1Compare Source
What's Changed
bcb8f00Full Changelog: pmndrs/react-three-fiber@v8.7.0...v8.7.1
v8.7.0Compare Source
What's Changed
flushGlobalEffectsfor manual loop manipulation by @CodyJasonBennett in https://github.com/pmndrs/react-three-fiber/pull/2481Full Changelog: pmndrs/react-three-fiber@v8.6.2...v8.7.0
v8.6.2Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.6.1...v8.6.2
v8.6.1Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.6.0...v8.6.1
v8.6.0Compare Source
What's Changed
fbce5f9Full Changelog: pmndrs/react-three-fiber@v8.5.1...v8.6.0
v8.5.1Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.5.0...v8.5.1
v8.5.0Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.3.1...v8.5.0
v8.4.1Compare Source
v8.4.0Compare Source
v8.3.1Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.3.0...v8.3.1
v8.3.0Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.2.3...v8.3.0
v8.2.3Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.2.2...v8.2.3
v8.2.2Compare Source
What's Changed
New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.2.1...v8.2.2
v8.2.1Compare Source
What's Changed
Full Changelog: pmndrs/react-three-fiber@v8.2.0...v8.2.1
v8.2.0Compare Source
What's Changed
This release exposes a
ThreeElementsinterface containing native three JSX elements to discern from DOM JSX types.Extending
JSX.IntrinsicElementsis deprecated in favor of extendingThreeElementsdirectly with the following:New Contributors
Full Changelog: pmndrs/react-three-fiber@v8.1.0...v8.2.0
v8.1.0Compare Source
What's Changed
state.sizeby @kmannislands in https://github.com/pmndrs/react-three-fiber/pull/2339New Contributors
Full Changelog: pmndrs/react-three-fiber@8ad0559...v8.1.0
v8.0.27Compare Source
v8.0.26Compare Source
v8.0.25Compare Source
v8.0.24Compare Source
v8.0.23Compare Source
v8.0.22Compare Source
v8.0.21Compare Source
v8.0.20Compare Source
v8.0.19Compare Source
v8.0.18Compare Source
v8.0.17Compare Source
v8.0.16Compare Source
v8.0.15Compare Source
v8.0.14Compare Source
v8.0.13Compare Source
v8.0.12Compare Source
v8.0.11Compare Source
v8.0.10Compare Source
v8.0.9Compare Source
v8.0.8Compare Source
v8.0.7Compare Source
v8.0.6Compare Source
v8.0.5Compare Source
v8.0.4Compare Source
v8.0.3Compare Source
v8.0.2Compare Source
v8.0.1Compare Source
v8.0.0: v8.0.xCompare Source
v8 Migration Guide
Changes and new features with v8 and react 18
Work on version 8 has begun 3 Sep 2021 and is perhaps the biggest update to Fiber yet. We've tried our best to keep breaking-changes to a minimum, they mostly affect rarely used api's like
attach. This release brings a ton of performance related fixes, but also includes some new and ground breaking features.We would like to express our gratitude to the community for their continued support, as well as to all our contributors. 🎉
React Native support
With React 18 and Expo 43, you can now ship threejs goodness across web and native. These apps are not confined to a web-view, they are truly native OpenGLES.
Now expo-gl, which does the hard lifting, has existed for a while, but we've addressed some of the common concerns related to interop and making the three eco system readily work in the native space. For instance, you handle assets the same exact way you'd treat them in a web app.
See installation to get started with managed Expo or bare React Native apps.
This is complete with support for Pressability events and native threejs loaders. See events for a complete list of events.
React Native support was submitted by @Cody_J_Bennett. 🎉
Zustand and suspend-react
Fiber uses zustand to manage state. It's a simple, powerful, and performant state management library for React. And suspend-react to manage async ops and suspense (useLoader for instance). You can use these in your projects as well as they are to get closer interop with Fiber.
New pixel ratio default
The default DPR has changed from
1to[1, 2], which will clamp between 1 and 2, but prefer 2, depending on the screen's native pixel ratio.This was the most common setting in the wild, so it was brought in as a better default.
Color management
Color management is now being handled by Three R139. Therefore we set
THREE.ColorManagement.legacyModetofalseand cede to touch colors and textures since everything will now be converted from sRGB to linear space by Three itself.While you can of course use Fiber with any Three version you like we recommend updating to R139.
Check out https://threejs.org/docs/index.html#manual/en/introduction/Color-management for information.
Automatic concurrency
Concurrency is now part of React 18, which automatically switches between blocking (default) and concurrent (async).
React 18 introduces the
startTransitionanduseTransitionAPIs to defer and schedule expensive operations and state updates. Use these to de-prioritize expensive operations.Examples
Please be careful, this is an extreme stress test. It creates so much load that without React the browser will freeze or crash.
Conditional rendering with frameloop
frameloopcan now be toggled to render conditionally. This is useful to toggle on user interaction or while in frame.Another usecase would be using intersection observers to stop the canvas when it's out of view.
Expanded gl prop
The
glprop can now accept both constructor args and renderer properties like thecameraprop.It can also accept a synchronous callback to manually create a renderer. This allows you to use any custom renderer you want.
Improved WebXR handling
Automatic WebXR switching
The
vrprop was removed in favor of automatic WebXR switching. Whenever a session is requested, XR features are enabled, and the renderer will render at the native refresh rate. The inverse is true when exiting a session.Extended useFrame
In addition to the automatic rendering, useFrame will expose the current
XRFrameobtained via XRSession#requestAnimationFrame.This removes the need for custom rendering loops when using WebXR pose data and abstractions like
useXRFrameof @react-three/xr.Manual camera manipulation
By default Fiber is responsive and will set up cameras properly on resize (aspect ratio etc).
Cameras can be controlled manually by setting
manualto true incamera. This will opt out of projection matrix recalculation when the drawing area resizes.This is also supported by all cameras that you create, be it a THREE.PerspectiveCamera or drei/cameras, put
manualon it and Fiber will not touch it.Unified attach API
Previously, attach had multiple signatures:
attach="name"attachObject={["name", "attribute"]}attachArray="name"attachFns={["add", "remove"]}attachFns={[(self, parent) => parent.add(self), (self, parent) => parent.remove(self)]}This is now a single, unified signature with support for piercing and named attach functions or custom handlers.
Real-world use-cases:
Attaching to nested objects:
Arrays must be explcit now:
Spread Canvas props
The
<Canvas />can now accept non-render props to spread as native props: styles, classes, events, a11y, ...New createRoot API
renderis depreciated in v8 for the newcreateRootsignature.import { - render, + createRoot, events } from '@​react-three/fiber' - render(<mesh />, canvas, { event }) + createRoot(canvas).configure({ events }).render(<mesh />)Here is a typical setup:
Examples
This is a custom-renderer example using the createRoot api:
Tree-shaking via extend
The underlyi
Configuration
📅 Schedule: Branch creation - "before 3am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.