Repository navigation
feat(demo): WebGPU/WebGL toggle, auto-discovered examples, vehicle example, #666 fixes - #790
Open
DennisSmolek wants to merge 10 commits into
Open
DennisSmolek wants to merge 10 commits into
DennisSmolek wants to merge 10 commits into
Conversation
- packageManager yarn@4.18.1, nodeLinker node-modules (.yarnrc.yml) - move root tooling from dependencies to devDependencies - drop @manypkg/cli (only used by the `ci` script) - demo/addons depend on workspace packages via workspace:* - engines.node >=22, ignore .yarn state but keep releases/plugins/patches Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- @react-three/fiber + test-renderer 10.0.0-canary.a056612 (scheduler 0.3, fixed step), three/@types/three 0.186, react/react-dom 19.2.8, drei 11.0.0-alpha.7 (demo) - peerDependencies: fiber >=10.0.0-0, react >=19.0 <19.3, three >=0.185.0; rapier-addons peers on @react-three/rapier ^3.0.0-0 - three-stdlib ^2.36.1 (2.35 imports LuminanceFormat, removed from three) - vitest 5 + jsdom 30, typescript 5.9; vitest.config.mts replaces vite.config.mts and resolves workspace packages from src (no build needed); root tsconfig uses moduleResolution Bundler with matching `paths` - utils.ts: type-only narrowing for fiber v10's readonly-tuple math types - tests: await `create()` instead of racing it against mount callbacks (overlapping act scopes), expect the extra zero-delta priming frame from advanceFrames, re-baseline the physics snapshot (float noise from scheduler ms timing, see PR) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirrors react-three-jolt's build: `tsc -p tsconfig.build.json` emits per-file declarations,
rollup bundles each entry to dist/<name>.{mjs,cjs} with esbuild and rolls declarations up
into dist/<name>.{d.ts,d.mts,d.cts}.
- shared config in scripts/rollup-library.mjs; entry points are derived from each
package's `exports` map, so a subpath entry (e.g. `./soft-bodies` -> src/soft-bodies/index.ts)
only needs an `exports` + `files` entry. Relative imports of another entry are rewritten to
the published specifier so core is never inlined twice.
- package.json: `exports` map (import/require with types), `type`, `sideEffects: false`,
`engines`, narrowed `files`, repository/bugs/homepage/license metadata
- deps, peers and their subpaths are external
- `check:package` (publint --strict + attw --pack) per package, `yarn check:packages` at root
- drop babel config and the preconstruct dev postinstall
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Minimal fixes only; the demo migration proper (WebGPU, routing, perf overlay) is separate work.
- resolve @react-three/rapier(-addons) from workspace sources via vite aliases + tsconfig
paths (keeps the old `preconstruct dev` behaviour: no build needed, HMR on library code)
- moduleResolution Bundler (exports maps of fiber v10 / drei 11 / three)
- `state.clock` is gone in v10: use `state.elapsed`
- `<Canvas shadows>` -> `gl={{ shadows: true }}` (keeps the default WebGL renderer)
- drei 11: `Text` comes from `@react-three/drei/legacy`; drop unused `useCamera`
- OrbitControls type from three/addons instead of three-stdlib
- SpringExample: stop deep-importing library internals (blocked by the exports map)
- replace r3f-perf (pins drei 9 / an old three-stdlib that breaks on three 0.186) with drei
<Stats>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- eslint.config.mjs mirrors react-three-jolt (js + typescript-eslint recommended, react, react-hooks rules-of-hooks/exhaustive-deps, jsx-a11y, eslint-config-prettier last); automatic JSX runtime everywhere - prettier 3 with the repo's existing style options moved to .prettierrc, so the deferred reformat stays small (6 files differ today) - `lint`, `format`, `format:check` scripts. The codebase is NOT reformatted or lint-fixed here (baseline: 29 errors / 126 warnings); that lands at the end of the 3.0 integration. - pre-commit hook runs `yarn typecheck` instead of the full CI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ci.yml (replaces test.yml): typecheck, test, build + publint/attw, demo build, and a non-blocking lint/format job; runs on PRs and pushes to main and next, with concurrency cancellation and read-only permissions - shared .github/actions/setup composite: corepack (yarn 4) + setup-node with yarn cache + `yarn install --immutable` - current action majors: checkout v7, setup-node v7, configure-pages v6, upload-pages-artifact v5, deploy-pages v5 (supersedes #733) - release.yml mirrors react-three-jolt: runs on main and next, owner guard, permissions (contents/pull-requests write, id-token for provenance), yarn 4 publish env; `changeset:version` / `changeset:publish` scripts (publish builds and tests first) - @changesets/cli 3; `yarn changeset pre enter alpha` (.changeset/pre.json), so `next` releases 3.0.0-alpha.n under the `alpha` dist-tag; `prerelease:enter`/`prerelease:exit` scripts replace the canary ones - changeset for the r3f v10 stack / package format (core + addons, major) - dependabot: root workspace + github-actions ecosystem, ignore majors of the r3f stack - .nvmrc v22.22.2 (jsdom 30 needs >=22.22.2), demo `typecheck` script Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy-paste example on Rapier's DynamicRayCastVehicleController using QueryFilterFlags.EXCLUDE_SENSORS for the wheel rays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…null ref Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 452d9eb The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This was referenced Oct 10, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #787 (foundation: yarn 4, r3f 10 canary, drei 11 alpha, three 0.186). This branch is based on
feat/3.0-foundation; rebase ontonextonce #787 merges.What
navigator.gpuexists, else WebGL;?renderer=webgl|webgpuoverrides and the choice is kept in localStorage. Uses the r3f root-entryCanvas(renderer={...}for WebGPU,gl={...}for WebGL). Switching reloads the page so a canvas never changes renderer.demo/src/examples.tsusesimport.meta.glob+React.lazy.examples/<folder>/index.ts(x)default-exports the component and may exportmeta { title, description, webglOnly }. Folders without an index still register (every*Example*.tsxbecomes a route), so character-controller (feat: kinematic character controller (useCharacterController + <CharacterController>) #783) and soft-bodies (feat: soft bodies (SoftBody, useSoftBody) #786) need noApp.tsxedits after rebasing. Documented in DEVELOPMENT.md.useDemo/Demomoved todemo-context.tsand are re-exported fromApp.tsx, so existing imports keep working.DynamicRayCastVehicleController,updateVehicle(dt, QueryFilterFlags.EXCLUDE_SENSORS), a sensor zone the wheel rays must ignore, ramp and boxes, WASD/arrows + Space, camera follows.WebGPU audit
No example needed
webglOnly(the flag and a notice exist for future use).Sensors: troika<Text>(WebGLShaderMaterial) replaced by drei<Html>.state.gl(null on WebGPU roots in r3f 10):<Html>crashed withgl.domElementanduseTexturewithgl.initTexture(all-colliders, all-shapes, dynamic-type-change, locked-transforms, damping, snapshot). The demo setsstate.gl = rendereron WebGPU roots (GlShimin App.tsx, commented, remove when drei usesstate.renderer). Worth reporting upstream.Immutable props: guard against a null ref during leva-driven remount.@react-three/csgdep is unused).Verification
The Claude in Chrome extension was not connected, so I drove the dev server with headless Chrome (playwright-core, WebGPU enabled, which works), visiting every route on both renderers, collecting console errors/page errors and screenshots; also spot-checked cradle/vehicle/debug interactively by key presses.
yarn typecheck,yarn test(38 tests),yarn demo:buildpass.Destroyed texture "PMREM.cubeUv" used in a submit(drei<Environment>under StrictMode); varies per run, rendering was fine in screenshots. Not fixed.keyprop is being spread" fromInstancedRigidBodies({...instance}includeskey), on both renderers. Library-side fix (const { key, ...rest } = instance); left alone becausefix/3.0-bugfixesalso edits that file.Also: a harmless 404 (likely favicon) and drei's
RGBELoaderdeprecation warning appear in the console.🤖 Generated with Claude Code