the-substance icon indicating copy to clipboard operation
the-substance copied to clipboard

Updating to react-three-fiber 5.0.x slows the project down

Open alexhillel opened this issue 4 years ago • 0 comments

I've tried updating to the latest version of react-three-fiber and running this project, after making a few necessary updates to the code including changing the vertex shader functions texture2d to texture, replacing <Dom> with <Html> from Drei, and changing the <bufferGeometry> attribute {...gltf.__$[1].geometry} to {...gltf.nodes.pCone1_lambert1_0.geometry}.

The project now runs, but much slower than using the 4.x implementation of react-three-fiber. Its adding the Diamonds class that appears to slow it down, specifically the setRenderTarget method calls. Using the latest version of three 0.121.0 and react-three-fiber 4.2.1 it is fast.

What changed in 5.0.x that's causing the slowdown?

alexhillel avatar Oct 05 '20 17:10 alexhillel