pmndrs / drei

🥉 useful helpers for react-three-fiber
https://docs.pmnd.rs/drei
MIT License
8.21k stars 670 forks source link

Float does not work with on demand rendering #2033

Closed AaronClaes closed 1 month ago

AaronClaes commented 1 month ago

Problem description:

The Float component does not work when the frameloop is set to demand.

Relevant code:

function Component() {
    return (
        <Canvas frameloop="demand">
            <Float>
                <Box />
            </Float>
        </Canvas>
    );
}

invalidate is not being called inside the Float component.

Suggested solution:

Call invalidate inside the Float component useFrame

github-actions[bot] commented 1 month ago

:tada: This issue has been resolved in version 9.109.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

CodingReaper1 commented 2 days ago

i have 9.112.0 version and it is still not resolved

AaronClaes commented 2 days ago

i have 9.112.0 version and it is still not resolved

Did you pass the autoInvalidate prop as mentioned in the PR? That should fix the problem. We decided not to make it auto invalidate by default because this might not be the expected behavior and would break certain cases.