Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"commit": true,
"linked": [],
"access": "public",
"baseBranch": "master",
"baseBranch": "v10",
"updateInternalDependencies": "minor",
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
Expand Down
11 changes: 11 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"mode": "pre",
"tag": "alpha",
"initialVersions": {
"example": "0.0.0",
"@react-three/eslint-plugin": "0.1.2",
"@react-three/fiber": "9.4.2",
"@react-three/test-renderer": "9.1.0"
},
"changesets": ["v10-alpha-release"]
}
35 changes: 35 additions & 0 deletions .changeset/v10-alpha-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
'@react-three/fiber': major
'@react-three/test-renderer': major
'@react-three/eslint-plugin': minor
---

## R3F v10 - WebGPU Support & React 19

### Breaking Changes

- **React 19 required** - Minimum React version is now 19.0
- **Three.js 0.181+ required** - Minimum Three.js version is now 0.181.2
- **New entry points** - Bundle structure reorganized with dedicated WebGPU support

### New Features

- **WebGPU Renderer Support** - New `@react-three/fiber/webgpu` entry point with full WebGPU and TSL (Three.js Shading Language) support
- **Legacy Entry Point** - `@react-three/fiber/legacy` for WebGL-only environments
- **Improved Frame Loop** - Enhanced `useFrame` with better priority scheduling and `runOnce` support
- **Build System Migration** - Moved from Preconstruct to Unbuild for better per-entry-point optimization

### Entry Points

```js
// Default - WebGL + WebGPU support
import { Canvas } from '@react-three/fiber'

// WebGPU only - smaller bundle, TSL support
import { Canvas } from '@react-three/fiber/webgpu'

// Legacy WebGL only - maximum compatibility
import { Canvas } from '@react-three/fiber/legacy'
```

See the full migration guide in the documentation.
24 changes: 23 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ on:
pull_request: {}
jobs:
build:
name: Build, lint, and test
name: Build, lint, and test (React ${{ matrix.react-version }})
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
react-version:
- 19.0.0
- latest

steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -18,11 +25,26 @@ jobs:
with:
node-version: 22

- name: Cache node_modules and Yarn cache
uses: actions/cache@v4
with:
path: |
**/node_modules
.yarn/cache
key: >
${{ runner.os }}-node22-react-${{ matrix.react-version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node22-react-${{ matrix.react-version }}-

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
with:
install-command: yarn --immutable --silent

- name: Override React version (${{ matrix.react-version }})
run: |
yarn add @types/react@${{ matrix.react-version }} react@${{ matrix.react-version }} @types/react-dom@${{ matrix.react-version }} react-dom@${{ matrix.react-version }} --dev -W

- name: Build
run: yarn run build

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules/
coverage/
dist/
build/
packages/fiber/react-reconciler/
Thumbs.db
ehthumbs.db
Desktop.ini
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
dist/
coverage/
node_modules/
packages/fiber/react-reconciler/
.yarn/
*.gltf
*.mdx
Loading