pmndrs / drei

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

useMask hook and Mask component doesn't work with the current version of three.js #1949

Open Dooqp opened 2 months ago

Dooqp commented 2 months ago

Problem description:

I've used useMask hook and Mask component without a problem for a while. But today I've upgraded my packages and they don't work properly anymore. They still work with the older version of three.js (0.155.0)

Relevant code:

I've tried to reproduce this issue with the drei's own useMask example and it doesn't work either so I'll just leave the examples link below https://www.npmjs.com/package/@react-three/drei

Suggested solution:

I don't really have any suggested solution but I tried the older version of three.js (0.155.0) and it works as expected with the updated drei package. Maybe this helps.

Jarodwr commented 1 month ago

as of threejs 163 you need to toggle the stencil flag on your canvas gl property: image