Fix rotted examples - #151
Merged
Merged
Conversation
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>
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.
Fixes:
Some of these predated react-pp so they got a little update which required some tuning to get the same visual effect/