Skip to content
Advertisement

bufferGeometry setFromPoints with react-three-fiber

Considering toLinePath function:

JavaScript

I want to recreate it using react-three-fiber and been trying something like this:

JavaScript

But there’s no output/error at all. I suppose I’ve completely misunderstood react-three-fibers API. What am I doing wrong here? Thanks and here’s the sandbox

Advertisement

Answer

For a future googler, useUpdate has been removed here:

https://github.com/pmndrs/react-three-fiber/pull/996.

Use useLayoutEffect instead.

JavaScript
Advertisement