v10.0.0-alpha.6: Going WebGPU First
After feedback from the Paris conference, it was decided to make v10 a clean break for some major portions of r3f to better align with the web and ThreeJS ecosystem. Alpha 6 is also the biggest alpha so far, with more than 200 commits since alpha 5.
In alpha 5, The new Renderer was opt-in through a property tag: <Canvas renderer>, so nothing broke. The feedback was that a major version is the time to make the break, given how important WebGPU is to the future of the web and that threejs itself is mostly focused on WebGPU & TSL. Node materials, compute-shaders, and the rendering pipeline only function in the new Renderer.
We wanted v10's default to match where three, and the rest of the web, is heading.
The new Renderer (WebGPURenderer) is Standard with WebGPU, however it can be set or fall back to WebGL2. Many features written with TSL will still function and work. This is NOT WebGPU vs WebGL entirely, its simply the old WebGL ONLY renderer and the newer one with newer features.
If you have custom GLSL, or rely on older libraries and tools built on GLSL shaders, change one import:
- import { Canvas } from '@react-three/fiber'
+ import { Canvas } from '@react-three/fiber/legacy'
That's the only change. Hooks and libraries keep importing from @react-three/fiber, because every entry shares the same core.
If you get it wrong, R3F tells you. A GLSL material on a WebGPU canvas logs a warning pointing at /legacy. A node material on a /legacy canvas throws a clear error instead of crashing on the first frame. gl={...} on the default import also throws, pointing you to /legacy.
@react-three/fiber/webgpu is redundant now that WebGPU is the default. It still works, but it's deprecated and will be removed in the first beta.
R3F's core no longer imports three.js at all. Each renderer lives in its own small module, and the default import loads WebGPU only when the first <Canvas> mounts.
Two renderers in one package could easily mean both of them in your bundle. Now a /legacy app carries only WebGLRenderer, and a default-import app carries only WebGPURenderer (Which again, can fallback to WebGL).
A library that imports hooks from @react-three/fiber adds no renderer and no second copy of R3F to your app, whichever entry you chose. We check this on every build: CI bundles sample apps with Vite and esbuild and confirms which renderer each one contains.
useThree, useFrame and onCreated from @react-three/fiber are typed for WebGPURenderer, so state.renderer.compute(...) works without a cast. From /legacy they're typed for WebGLRenderer. Before, the hooks were typed for either renderer, and WebGPU-only members needed a cast or extra setup.
Libraries that support both renderers can import from the new @react-three/fiber/extension entry.
useUniforms, useUniform, useNodes, useLocalNodes, useBuffers, useGPUStorage and useRenderPipeline moved out of @react-three/fiber/webgpu and into @react-three/tsl. Change the import, and apart from useRenderPipeline (below) they work as before.
These hooks are WebGPU-only and have been changing faster than the rest of R3F. A separate package lets them ship on their own schedule and keeps them out of WebGL apps. It is also the first package built on @react-three/fiber/extension, the same public surface any library can use. That shows the extension story works.
The package brings several improvements:
Uniforms and nodes you read by name now work directly in TSL. Before, both of these lines needed a cast:
const { uTime, uColor } = useUniforms()
material.colorNode = uColor.mul(sin(uTime))
For more precision, register your uniforms once. Every hook and state.uniforms then knows their names and exact types, and a typo becomes a type error. Nodes, buffers and GPU storage register the same way. It's optional: everything above works without it.
// uniforms.ts
export const globalUniforms = { uTime: 0, uColor: new Color('hotpink') }
declare module '@react-three/tsl' {
interface Register {
uniforms: typeof globalUniforms
}
}
// anywhere in your app
const { uTime } = useUniforms()
uTime.value // number
Give it a dependency array, and [] builds the graph once. It also tracks which shared uniforms and nodes it actually read, so it rebuilds only when one of those is replaced. Before, registering any uniform anywhere rebuilt every graph that used the hook.
const { colorNode } = useLocalNodes(({ uniforms }) => ({
colorNode: uniforms.uColor.mul(sin(time)),
}), [])
It also handles nodes that go onto a three object, like fog. Return a function: the graph is built during render, then installed after commit, and the cleanup runs when the component unmounts. This used to take a placeholder return value plus a separate useThree and useEffect.
useLocalNodes(({ scene, uniforms }) => {
const fogNode = fog(uniforms.fogColor, rangeFogFactor(uniforms.near, uniforms.far))
return () => {
scene.fogNode = fogNode
return () => {
scene.fogNode = null
}
}
}, [])
Mount a component with useRenderPipeline and the effect is on. Unmount it and the effect is gone. Before, the pipeline kept rendering until you called reset(), and StrictMode or Fast Refresh built a second scene pass.
function Bloom() {
useRenderPipeline(({ renderPipeline, passes }) => {
renderPipeline.outputNode = bloom(passes.scenePass.getTextureNode())
})
return null
}
// {bloomOn && <Bloom />} toggles the effect
To keep an effect running after its component unmounts, pass { persist: true } as the third argument.
<Canvas id="main" primary>…</Canvas>
<Canvas>…</Canvas> {/* shares "main" automatically */}
<Canvas share={false}>…</Canvas> {/* gets its own renderer */}
Mark the canvas that owns the renderer with primary, and every other WebGPU canvas shares it. In alpha 5 this was set up inside the renderer options with primaryCanvas, which was hard to find and easy to get wrong. scheduler is now a Canvas prop too, on every entry including /legacy.
Sharing one GPU device across canvases is one of WebGPU's real wins, so it should be the easy path. While building this we also fixed multi-canvas under the WebGL2 fallback, where secondary canvases used to render blank. We also stopped a secondary canvas from overwriting the primary's shadows and tone mapping. Thanks to @rubenmarcus for both reports and fixes.
The physics phase of the frame loop now uses a fixed timestep of 1/60 of a second. This comes from @pmndrs/scheduler 0.3. A physics job runs once for every full step of time that has passed, always with the same delta. On a 144 Hz display it sometimes skips a frame. On a slow frame it catches up with several steps.
with one step per frame, a simulation ran more than twice as fast on a 144 Hz monitor as on a 60 Hz one. A fixed timestep is how physics engines expect to be driven. state.overstep tells you how far the frame is between two steps, so you can draw smooth motion between them:
useFrame((_, dt) => world.step(dt), { phase: 'physics' })
useFrame(({ overstep }) => mesh.position.lerpVectors(previous, current, overstep))
If you want the background, Glenn Fiedler's Fix Your Timestep! is the classic explanation of this technique, including why the interpolation step matters.
Any phase can get its own timestep with setPhaseTimestep(). If you'd rather keep one step per frame, you can switch physics back.
R3F now works smoothly with the parts of React 19 that mount, hide and remount components: StrictMode, Fast Refresh and <Activity>. In practice that means fewer leaks, and fewer surprises when you hot-reload or hide a scene.
With WebGPU, a renderer that gets left behind keeps holding on to the GPU, so cleaning up properly matters more than ever.
- Hide a scene with
<Activity>and the 3D content hides with the page around it. Objects keep their ownvisiblestate when they come back. - Unmounting cleans up right away. A Canvas shuts down as soon as React removes it, not half a second later, and the renderer R3F created goes with it. If you passed in your own renderer, R3F leaves it alone.
- Hot reloads and StrictMode keep your scene. React's extra mounts no longer tear down and rebuild the Canvas.
- Settings you change at runtime stick. A Canvas re-render only re-applies the props that changed, so
setDprorsetFramelooparen't undone. - Sharp on every screen. Drag the window to another display, or zoom, and the canvas picks up the new pixel ratio.
- React 19.3 is supported, and a
<ViewTransition>inside a Canvas no longer stalls.
No more manual needsUpdate. Some material props, like transparent, flatShading, side and vertexColors, are compiled into the shader. Changing one of them used to do nothing until something told three to recompile. That's one of the most common "why isn't my prop working?" questions.
Before (v9):
function Glass({ transparent }) {
const ref = useRef()
// without this effect, toggling `transparent` has no visible effect
useEffect(() => {
ref.current.needsUpdate = true
}, [transparent])
return <meshStandardMaterial ref={ref} transparent={transparent} opacity={0.5} />
}
After (v10):
function Glass({ transparent }) {
return <meshStandardMaterial transparent={transparent} opacity={0.5} />
}
The same goes for adding or removing a texture. Props three already handles itself, like color and opacity, are left alone, so you don't pay for extra recompiles.
A few more things that just work now:
- Image backgrounds.
<Canvas background="/sky.png">used to throw on.png,.webp, plain.jpganddata:URLs. All of them load now. frameloop="demand"redraws when you remove an object. It used to stay on screen until something else triggered a frame.state.glstill works. It's an alias forstate.renderer, so drei'sOrbitControlsand friends keep working on WebGPU. The deprecation notice shows only if something actually readsgl.onUpdateis gone. It hooked into reconciler internals and fired on unrelated updates. An effect,useFrameor a ref callback does the job more reliably.
The ESLint plugin got its biggest update yet, going from 2 rules to 20. Version 1.0.0-alpha.6 ships alongside this release, and it's the fastest way to move an app to v10.
A migration config for v9 apps. Add it next to recommended while you upgrade, run eslint --fix, and take it out once you're done:
// eslint.config.js
import threePlugin from '@react-three/eslint-plugin'
export default [threePlugin.configs.recommended, threePlugin.configs.migration]
It finds the v9 patterns that changed, and --fix rewrites the safe ones for you. It covers state.gl and the old clock, numeric useFrame priorities, removed Canvas props and imports (including the deprecated /webgpu), onUpdate, and <color attach="background">. We ran it over our own examples for this release.
New rules for common performance traps, in recommended:
- objects rebuilt on every render through
args - TSL nodes built inline in material props, which recompile the shader every render
setStatecalled in the frame loop- loaders called in effects instead of
useLoader - Canvas props or materials the entry you imported can't use, such as GLSL on WebGPU
The plugin now ships flat configs and works with ESLint 8, 9 and 10. Install it with npm install -D @react-three/eslint-plugin@alpha.
Tested on a real GPU. Separately, CI now runs a set of tests on an actual WebGPU device, using Dawn in Node, and compares the rendered pixels. Before, everything GPU-related was mocked or checked by hand in a browser.
Most of these throw with a message that names the fix.
- The default import renders with WebGPU. GLSL scenes and WebGL-only libraries import
Canvasfrom/legacy. - TSL hooks import from
@react-three/tsl. <Canvas shadows>becomesrenderer={{ shadows }}(WebGPU) orgl={{ shadows }}(/legacy).renderer={{ primaryCanvas }}becomes<Canvas primary>, andrenderer={{ scheduler }}becomes<Canvas scheduler>.physics-phase jobs run on a fixed timestep. Step your simulation by thedeltayou're given.useRenderPipelinestops rendering when the component that configured it unmounts. Pass{ persist: true }to keep the old behaviour.onUpdateis removed.- Split gain map environments are gone. Use a single-file Ultra HDR
.jpginstead. @react-three/fiber/webgpuis deprecated and will be removed in the first beta.
The v10 breaking changes page lists every change since v9, what to do about it, and which alpha it landed in. The v10 migration guide walks through each one. If you're upgrading a v9 app, start with the eslint-plugin's migration config.
npm install @react-three/fiber@alpha @react-three/tsl@alpha three@latest
This is still an alpha, and the WebGPU default is the biggest change v10 makes, so we especially want to hear from you. Tell us which libraries break on the default import, and which ones you had to move to /legacy. Report problems in issues and share everything else in discussions.
| Package | Version |
|---|---|
@react-three/fiber |
10.0.0-alpha.6 |
@react-three/tsl |
10.0.0-alpha.6 (first alpha) |
@react-three/test-renderer |
10.0.0-alpha.6 |
@react-three/eslint-plugin |
1.0.0-alpha.6 |
All are published under the alpha dist-tag. They need three >=0.185.0 and React >=19.0 <19.4.
Full changelog: CHANGELOG-ALPHA.md → 10.0.0-alpha.6
v9.8.2
We have another set of bug fixes, some backported from v10. Here are the highlights:
- Portal memory leaks have been fixed. The portal's root state would get held by the parent even when the portal got unmounted disallowing garbage collection. You mount and unmount on a complex enough app and this adds up quickly. A portal can now be cleaned up properly when unmounted.
- Pixel ratio updates automatically when moving between displays or zooming. Note:
setDpris overwritten by thedprprop whenever theCanvasrerenders. If you want to usesetDprthen don't use thedprprop. This behavior will change in v10. - TypeScript JSX types fixed, preventing
React.ElementTypeprops from collapsing tonever. Importing R3F no longer breaks unrelated React types. - Dragging stays active when an object’s
argschange. - Removed objects disappear immediately with
frameloop="demand"instead of lingering as ghosts.
- ci(docs): publish the v10 alpha docs under /next with a version switcher by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3971
- ci: remove the canary workflow from master (canary is v10-only) by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3986
- fix(events): keep pointer capture across instance reconstruction by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3985
- docs: use three addons loader imports in hooks examples by @pavan-sh in https://github.com/pmndrs/react-three-fiber/pull/3746
- docs: add sparkjs, threepipe, react-three-map, wawa-vfx, r3f-globe, Three-VFX to community components grid by @jo-chemla in https://github.com/pmndrs/react-three-fiber/pull/3714
- fix(docs): remove outdated koestlich README link by @alex-marinov in https://github.com/pmndrs/react-three-fiber/pull/3767
- docs(tutorials): add STL loading to the Loading Models guide by @BenMalaga in https://github.com/pmndrs/react-three-fiber/pull/3787
- fix(core): request a frame when an object is removed with frameloop="demand" by @xaviergonz in https://github.com/pmndrs/react-three-fiber/pull/3976
- fix(types): only register three constructors as intrinsic elements by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/4002
- fix(core): follow devicePixelRatio changes by @tonyblu331 in https://github.com/pmndrs/react-three-fiber/pull/3959
- docs: add Codesandbox preview images by @abernier in https://github.com/pmndrs/react-three-fiber/pull/4004
- refactor(fiber): clarify v9 core domain boundaries by @krispya in https://github.com/pmndrs/react-three-fiber/pull/4008
- docs: use the built-in version switcher of @pmndrs/docs 4 by @abernier in https://github.com/pmndrs/react-three-fiber/pull/4005
- docs: adopt the default pmndrs palette of @pmndrs/docs 4.20 by @abernier in https://github.com/pmndrs/react-three-fiber/pull/4011
- chore: add a pull request template by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/4019
- docs: fix two dead links in testing and basic animations pages by @SatvikMishra08 in https://github.com/pmndrs/react-three-fiber/pull/4024
- fix(fiber): port the Portal leak fixes from v10 by @wrangelvid in https://github.com/pmndrs/react-three-fiber/pull/4030
- @alex-marinov made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3767
- @BenMalaga made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3787
- @xaviergonz made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3976
- @SatvikMishra08 made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/4024
- @wrangelvid made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/4030
Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v9.8.1...v9.8.2
v9.8.1
The main changes here are bug fixes:
- Activity now works completely inside of R3F, even across boundaries with React DOM. Ie, an Activity that wraps the Canvas.
- In some cases a renderer would not be disposed when the Canvas was unmounted. This is fixed and we clarify in which instances we auto-dispose.
- fix(core): dispose the renderer R3F creates when its root unmounts by @tonyblu331 in https://github.com/pmndrs/react-three-fiber/pull/3942
- fix(core): preserve visibility across Activity and Suspense hiding by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3944
- fix(web): keep a Canvas root alive while hides it by @tonyblu331 in https://github.com/pmndrs/react-three-fiber/pull/3943
- fix(core): stop Canvas rerenders from resetting runtime settings by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3945
- fix(core): bridge Activity visibility into Canvas scenes by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3946
- @tonyblu331 made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3942
Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v9.8.0...v9.8.1
v9.8.0
The headline feature is that R3F is now compatible with React 19.3.0. We don't fully support all of the new APIs, but it will not longer conflict to run the latest and greatest React.
In addition we fixed some long standing bugs:
- React roots are configured synchronously and then gated on the renderer if it need async, for example with WebGPURenderer. This means that you won't get awkward out of sync issues.
- Strict Mode no longer causes problems for our canvas. This was related to the async support added a while ago as well.
Have fun!
- fix: corrected broken links by @dor-rondel in https://github.com/pmndrs/react-three-fiber/pull/3872
- feat: support React 19.3 by @cades in https://github.com/pmndrs/react-three-fiber/pull/3916
- fix(core): don't tear down a root remounted during the unmount grace period by @abernier in https://github.com/pmndrs/react-three-fiber/pull/3869
- feat(core): configure and render roots synchronously by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3925
- @dor-rondel made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3872
- @cades made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3916
Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v9.7.0...v9.8.0
v10.0.0-alpha.5
Alpha 5 is a types release. The WebGPU resource hooks now carry three's exact node generics, the stale TSL augmentations are gone, and the built declarations are compiled by a strict consumer fixture on every build. Alongside it: the reconciler oddities that strict-TypeScript consumers surfaced while working around the old types, and the single-canvas depth-attachment fix.
useUniformanduseUniformskeep three's exactUniformNode<TNodeType, TValue>generics and the input's exact keys. Anumberuniform is aNode<'float'>, so TSL math,mix()andbloom()accept it without a cast;.valueis typed; an unknown key is an error (#3769, #3886, #3887).ScopedStoredistinguishes nested scopes from object-valued and callable (Fn()) leaves at runtime, and.scope(key)accepts an explicit schema generic for cross-call access.- The stale
ShaderNodeObjectandthree/tslFnaugmentations are gone. three's ownFnoverloads, including theFn(fn, 'void')statement-call form compute kernels use, are reachable again with R3F installed. Matrix2is an accepted uniform value (mat2), matching three'suniform()overloads.StorageLikeincludesStorage3DTextureandStorageArrayTexture, souseGPUStorageaccepts whatcompute.mdxdocuments.once()is typed as the value the prop declares:translate={once(0, 0, 5)}andcenter={once()}typecheck without a cast.- On the
/webgpuentry,Canvas'sonCreatedreceivesWebGPURootState, so WebGPU-only renderer members no longer need aninstanceofnarrow. pnpm verify-typescompiles a strict consumer fixture against the built declarations withskipLibCheck: false, for every entry.- Reader-mode
useUniforms,useNodes,useBuffersanduseGPUStorageaccept an explicit schema:useUniforms<{ blurAmount: number }>()returns typed nodes for values registered elsewhere, instead ofUniformNode<unknown>. extend(THREE)accepts a whole module namespace without a cast; only its constructors are registered.raycaster={{ params: { Points: { threshold: 0.2 } } }}typechecks:paramsis a partial, matching the runtime merge into the raycaster's defaults.eventSourceaccepts any DOMElement, so anSVGRenderer's<svg>no longer needs a cast.<primitive>keeps typed pointer events (onClick={(e) => ...}inferse) and accepts arbitrary props for the wrapped object.- The examples compile under strict TypeScript without a single
as unknown ascast; the remainingas anysites are third-party gaps (three'sBackend,@use-gesture) and are commented as such.
useTexture'sonLoadreceives the keyed record for record inputs, matching its declared type. It was handeduseLoader's positional array, sotextures.map.wrapTthrew at runtime.- Prefixed elements (
<threeLine>) no longer throw "ThreeLine is not part of the THREE namespace" on their first prop update. - A removed prop resets to the class default for every class. Any class whose constructor takes arguments (every material, geometry and camera) previously had the prop set to
0, turning a removedcolorblack. fromRef(ref, transform)maps the resolved sibling before assignment, so props that need the sibling wrapped are declarative:lightsNode={fromRef(lightRef, (l) => lights([l]))}.- Six-file
.hdrcube sets load throughHDRCubeTextureLoaderinuseEnvironment,<Environment>and the Canvasbackgroundprop, with linear color space. - A lone primary
<Canvas id>owns the renderer's default canvas target, so its depth attachment follows the layout instead of the element's construction size (#3905). - Canvas honors the
resize.debounceprop after the initial measurement (#3881). useRenderPipelinecallbacks receive aWebGPURenderer-typed state, may not return the hook-ownedscenePass, and the hook's return narrowsrenderPipelineonisReady(#3901).- The Pointcloud example's fragment shader handles point colors correctly.
- The demo registry is the one table of contents; the app derives its groups from it. Adds
WebGPUFogandWebGPUPrimaryOnly, drops stale entries, and the examples cleanup from #3883.
no-clone-in-looponly flags.clone()calls. A loop variable namedcloneused asclone.positionno longer trips it.
v10.0.0-alpha4
We have been hard at work on the pmndrs org and all the while alpha updates have been streaming in for R3F v10 as we march toward first class WebGPU and TSL support. Let's catch you up on the big news:
The original v10 alpha introduced useUniforms, useNodes, and useLocalNodes. We have experimented with more hooks since then.
- New experimental
useBuffersanduseGPUStoragehooks manage compute buffers and storage textures. useTexturesprovides a reactive, ref-counted texture registry without passing refs throughout the component tree.- TSL nodes, uniforms, buffers, and storage now rebuild atomically during fast refresh instead of requiring a full reload.
useRenderPipelinereplacesusePostProcessingand provides declarative render-pipeline and MRT setup.- Imports from
@react-three/fiber/webgpunow typeuseThreeanduseFrameagainstWebGPURendererstate without manual casts.
What started as a revamp of the internal R3F scheduler has split out into its own project that is intended to stand on its own legs: https://github.com/pmndrs/scheduler
- useFrame can run outside , making the scheduler useful for external UI and application systems.
- Named phases, explicit before/after ordering, FPS limits, and render takeover make complex frame loops easier to compose.
- Every Canvas now owns its frameloop, invalidation, and manual stepping. A demand-driven Canvas can no longer interfere with an always-running sibling for real multi-canvas support.
WebGPU canvases can now share a single renderer and GPU context. This unlocks HUDs, picture-in-picture views, multi-viewport rendering, and 3D layers separated by regular HTML.
<Canvas id="main" renderer>
<MainScene />
</Canvas>
<Canvas
renderer={{
primaryCanvas: 'main',
scheduler: { after: 'main', fps: 30 },
}}>
<Hud />
</Canvas>
Each Canvas keeps its own scene, camera, events, and state while sharing the renderer and GPU resources. The scheduler handles target switching, render order, and independent frame rates.
There are also several smaller features that remove common imperative work:
- Canvas accepts declarative background colors, environment files, and presets.
- Explicit
widthandheightprops make fixed-resolution rendering and video export straightforward. - The default camera is part of the scene graph, so camera-attached lights, meshes, and HUD elements render naturally.
fromRef()connects props to sibling refs without a mount effect.once()supports mount-only geometry and object methods.userData.interactivePrioritylets overlays and controls take precedence over distance-based hit testing.
And then the usual hardening and bug fixes. There are a lot of ideas being tried out here so as always we would appreciate feedback on what is working and what is not working.
Try it out with:
npm install @react-three/fiber@alpha
Cheers!
- V10-hmr-bug by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3670
- V10-fix-types by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3675
- Bug Fixes and Life Improvement Features by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3678
- chore: Automated canary releases by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3680
- chore: Canary releases are only on v10 by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3682
- Chore/remove changesets by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3683
- V10 fixes cleanup by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3684
- fix: various fixes by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3688
- docs: replace deprecated miniplex with koota in AwesomeR3F by @travisbreaks in https://github.com/pmndrs/react-three-fiber/pull/3691
- feat: reactive Texture registry via useTextures (experimental, A5) by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3776
- fix: v10 alpha.3 functional bugs (#1, #2, #3, #4, #6) by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3777
- refactor: extract frame scheduler into @pmndrs/scheduler by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3774
- docs: consolidate v10 docs into one canonical home + fix stale v9 API by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3775
- test: unify testing strategy, CI parity, high-value coverage + gl-deprecation hardening by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3779
- fix(v10): alpha hardening — portal leaks, WebGPU race, canvas fallback, events, uniforms, useLoader cacheKey by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3784
- fix: complete the v10 alpha.3 pass (A5, C1/C2/C5/C8, blocks A+B, changelog, alpha.3 bump) by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3785
- chore: require three >= 0.185, and use its WebGPU APIs properly by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3786
- docs: scrub scattered specs — delete the stale ones, author what they knew by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3789
- fix: close out the alpha.3 remainder (A1 test, C3, C4, C7, D4) by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3788
- test: port scheduler ordering regression into the @pmndrs/scheduler idiom by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3790
- fix(webgpu): atomic, generation-aware TSL resource registration (C16 HMR blocker) by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3803
- docs(changelog): correct three alpha.3 entries before the release cut by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3791
- ci(docs): unblock the link check — repoint cc0textures, stop timeouts counting as rot by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3806
- fix: port v9 reconciler hardening by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3818
- feat: remove act by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3817
- fix(test-renderer): return real object handles from the mock GL create* calls by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3822
- fix: keep interaction state continuous across instance reconstruction by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3824
- chore(ci): close workflow drift with master, and fix the canary publish set by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3825
- docs(changelog): make the alpha.3 record accurate, and give every package one by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3829
- fix(build): stop the entries importing the package by name, and gate it by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3830
- test: stop shadowing React's act with a frame-wait helper by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3823
- fix(events): recover two fixes lost when #3823/#3824 merged at a stale head by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3833
- chore(packaging): fix the exports map, drop dead files, align peers by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3841
- docs: record the breaking changes alpha.3 actually ships by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3842
- docs(tests): point the Tier-2 markers at where the tiers are defined by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3832
- chore(ci): verify v10 after merge, and verify canaries before publishing by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3834
- chore(release): derive the dist-tag from the version instead of defaulting to latest by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3843
- fix(webgpu): make the three Inspector a lazy import to break the Turbopack cycle by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3855
- fix(webgpu): narrow useThree/useFrame to WebGPURootState on the /webgpu entry by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3860
- fix(webgpu): give scoped TSL resources valid WGSL identifiers by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3857
- fix(webgpu): correct multi-canvas resize targeting by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3859
- fix(core): stop useTexture's array/record forms looping forever by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3858
- fix(webgpu): make useRenderPipeline rebuilds recompile and stop leaking the old scenePass by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3856
- fix(core): keep the renderer root alive when a child suspends by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3861
- fix(core): make Canvas frameloop root-scoped by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3865
- chore-minor-cleanup by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3878
- fix(core): route Canvas ordering through scheduler roots by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3879
- chore(release): prepare v10.0.0-alpha.4 by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3880
- @travisbreaks made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3691
Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v10.0.0-alpha.1...v10.0.0-alpha.4
v9.7.0
The headline updates for this release are the reconciler fixes. We did a pass to harden what is there against react-dom as the standard.
- R3F's internal children were not being reordered correctly. Basically, if React reordered children, our internal map would drift out of sync and this would cause subtle bugs. This is now fixed. Thanks to @kvvasuu who reported it and @wanxiankai who offered a solution.
- Pierced props now reset properly. We had a bug where if a pierce prop was unset, the reconciler would try to reset it to a default value. However, it would set it to the base object instead of the pierced prop. This is fixed now.
// Initial render
<mesh position-x={5} />
// Later render: prop removed
<mesh />
// bug: would set it to the base object
mesh.x = 0 // !!!
- Host props now update properly. Host props are ones that we supply such as
disposeandonUpdate. These now update properly. This also caused a subtle bug where imperatively updated values could get overwritten unexpectedly after unsetting the value in React. This is all fixed. Note:attachis fixed on first set and ignored if you try to dynamically update it. - Properly batch instance reconstruction. This one is pretty technical and if you are curious check out the test in the attached PR. Basically, there was an edge case where if two instances needed to reconstruct (because the
argsupdated), one could be ignore if the other bailed out of updates because of aReact.memoor similar. It is likely a problem you never had, but your agent would curse if you did. - Event priorities match
react-dom. React allows for prioritizing events, for example continuous events like wheel get a higher priority over impulse events like pointer. We copy from the best here and use the same listreact-domdoes. - Support reconciler microtasks. The React reconciler has a cool feature where it can queue microtasks to defer work based on the priorities we set earlier.
- chore: move eslint rules from parserOptions to top-level rules (#3706) by @in-ch in https://github.com/pmndrs/react-three-fiber/pull/3707
- docs: update
useFramehook description to specify that the clock delta is in seconds by @AJamesPhillips in https://github.com/pmndrs/react-three-fiber/pull/3742 - chore(CI): update test workflow actions to remove Node 20 deprecation warning by @Shushovan015 in https://github.com/pmndrs/react-three-fiber/pull/3710
- docs: fix FBXLoader naming in loading-models by @pavan-sh in https://github.com/pmndrs/react-three-fiber/pull/3745
- chore(docs): pmndrs/examples by @abernier in https://github.com/pmndrs/react-three-fiber/pull/3639
- fix: act import by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3807
- fix: internal instance children synchronization after keyed reorder by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3808
- chore: remove CodeSandbox CI by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3809
- fix: Pierced prop reset by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3810
- fix: Internal instance props sync by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3811
- fix: Batch instance reconstruction hardening by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3812
- feat: Match react-dom event priorities by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3815
- feat: Support reconciler microtasks by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3816
- @in-ch made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3707
- @AJamesPhillips made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3742
- @Shushovan015 made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3710
- @pavan-sh made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3745
Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v9.6.1...v9.7.0
v9.6.1
- fix: Seamlessly transfer interactivity state when swapping instances (#3743) by @notrabs in https://github.com/pmndrs/react-three-fiber/pull/3744
Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v9.6.0...v9.6.1
v9.6.0 - Sunset X
Ever tried using <shaderMaterial uniforms={{ time: { value: time } }} /> and ran into immediate issues with desync? No more.
The uniforms objects on ShaderMaterial and its derivatives now have a stable reference. Objects passed into uniforms will instead copy into it. This is the same as behavior for math structures that have copy such as position, rotation, quaternion, etc. and ends up simplifying using the raw JSX where utilities were often introduced before.
Documentation can be found here: https://r3f.docs.pmnd.rs/api/objects#shader-material-uniforms
And an example can be found here: https://github.com/pmndrs/react-three-fiber/blob/master/example/src/demos/ShaderMaterial.tsx
- fix: Fix broken link on "Performance pitfalls" documentation page by @simonKristensen in https://github.com/pmndrs/react-three-fiber/pull/3700
- fix: uniforms have stable refs for ShaderMaterial by @krispya in https://github.com/pmndrs/react-three-fiber/pull/3715
- docs: fix typos and documentation consistency by @NssGourav in https://github.com/pmndrs/react-three-fiber/pull/3709
- @simonKristensen made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3700
- @NssGourav made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3709
Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v9.5.0...v9.6.0
v10.0.0-alpha.1
R3F v10 has been a long time coming. We have talked over plans for years but late last year @DennisSmolek took the initiative do it all himself. We now have an alpha release, along with an alpha release of Drei 11. You can try it out today.
npm install @react-three/fiber@alpha
We were so excited to get this out we forgot to make a release for alpha.0 and alpha.1 is already upon us. But let's quickly get you caught up on what you can expect to be new.
- R3F now supports the
WebGLRendererandWebGPURenderer. This meansstate.glis nowstate.renderer. - There is a new scheduler, allowing for
useFrameto have advanced scheduling and also allows for it to be used outside of<Canvas />. Read more here: Frame Loop Overview. - WebGPU and TSL is first-class, with new built-ins just for working with TSL:
useUniforms,useNodes,useLocalNodesandusePostProcessing. Read more here: WebGPU Hook Overview.
And for a more in-depth introduction check out the migration guide.
And now comes alpha.1 with bug fixes, documentation updates, and several important feature unlocks.
- Camera frustum access for in-frame spatial queries.
- Visibility lifecycle events:
Visible,Framed, andOccluded. - Cameras are now part of the scene graph. Children of a camera will render correctly, enabling camera-attached objects by default.
- Renderer-independent render targets, similar to
useFBO, without needing to branch on the active renderer.
- The scheduler no longer depends on R3F and can run standalone.
- Scheduler context can now be shared outside the R3F tree, allowing external UIs or systems to participate in the frame loop while correctly waiting on the root set.
- New v10 features documentation.
- Updated developer documentation.
- Migration guide expanded, including details on taking over the renderer.
As always, feedback welcome. Consider all features experimental and may be changed, removed or expanded at any time. Who know,s you could be the reason 👀. Happy building!
- Start of the v10 Branch by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3620
- Fix: Only Run Preinstall when working on actual repo by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3624
- Feat-null-props by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3628
- V10-fix-canvas-override by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3629
- Feat-fire-event-3537 by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3630
- Fix-portal-container-updates by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3631
- Feat-useLoader-preload by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3635
- feat: canvasDebounce by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3636
- Docs-useframe by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3640
- feat: react 19.2 and test clean by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3641
- Chore-update-yarn by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3643
- Fix-type-exports by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3644
- Chore/migrate to pnpm by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3645
- Fix-portal-bug by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3649
- Docs-cleanup-circular by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3655
- Docs-migration-guide by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3658
- V10-shared-context by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3663
- V10-feat-Occlusion by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3664
Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v9.4.2...v10.0.0-alpha.1