Skip to content

Fix rotted examples - #151

Merged
krispya merged 7 commits into
mainfrom
worktree-runtime-crash-fixes
Jul 31, 2026
Merged

Fix rotted examples#151
krispya merged 7 commits into
mainfrom
worktree-runtime-crash-fixes

Conversation

@krispya

@krispya krispya commented Jul 31, 2026

Copy link
Copy Markdown
Member

Fixes:

  • minecraft
  • sparks-and-effects
  • flexbox-yoga-in-webgl

Some of these predated react-pp so they got a little update which required some tuning to get the same visual effect/

krispya and others added 7 commits July 31, 2026 14:46
The rapier 1->2 migration left the player controller calling v1
wrapper APIs, crashing every frame since the v2 conversion:
- translation()/linvel() now return plain {x,y,z} objects: spreading
  into camera.position.set() threw (not iterable), and .length() does
  not exist -- use Vector3.copy and Math.hypot instead.
- useRapier().world is the raw Rapier world (no .raw()).
- world.castRay() requires maxToi and solid, and the hit property is
  timeOfImpact (was .toi); also exclude the player's own rigid body
  from the grounded ray so it cannot self-hit.
- setLinvel() takes an explicit wakeUp argument.

Verified headless: loads and renders with no page or console errors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The demo crashed at mount and had been dead for years across several
API removals:
- threejs-meshline (abandoned) calls three ES classes as functions;
  swap to meshline ^3.3.1 (the fleet's maintained fork): meshLine
  vertices= becomes meshLineGeometry points=.
- WaterPass/GlitchPass were prototype-style (Pass.call(this)) which
  throws against three's ES-class Pass; converted to classes.
  GlitchPass also used removed THREE.Math (-> MathUtils),
  PlaneBufferGeometry (-> PlaneGeometry) and RGBFormat float textures
  (-> RGBA heightmap).
- Text used core THREE.FontLoader/textGeometry, gone from core for
  years: import FontLoader/TextGeometry from three/examples/jsm, and
  the TextGeometry "height" option is now "depth".
- Effects used fiber's removed attachArray="passes" registration, so
  no pass ever joined the composer; rebuilt imperatively
  (render -> water -> bloom). No OutputPass on purpose: the chain was
  tuned for legacy linear output, and the thumbnail look depends on it.
- renderer.toneMapping = removed Uncharted2ToneMapping constant
  (undefined); ACESFilmicToneMapping is the closest surviving filmic.

Verified headless against thumbnail.webp: dark field, glowing blue 4,
sparks and atom doodle render with zero page/console errors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Effects used fiber's removed attachArray="passes" registration, so no
  pass ever joined the composer; rebuilt imperatively
  (render -> water -> gamma correction, same chain as before).
- The vendored WaterPass constructed the removed PlaneBufferGeometry,
  crashing the demo ((void 0) is not a constructor).
- Image and font URLs were absolute (/images/..., /Inter-*.woff), which
  404s under any base path -- the built demos deploy under
  /<demoname>/. Made them relative.

Verified headless: loads and renders the magazine layout with zero
page/console errors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… notes

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@krispya
krispya merged commit 53fddd2 into main Jul 31, 2026
2 checks passed
@krispya
krispya deleted the worktree-runtime-crash-fixes branch July 31, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant