fand / react-vfx

WebGL effects for React elements
https://amagi.dev/react-vfx
468 stars 16 forks source link

fix: recreate CanvasTexture in rerenderTextElement #54

Closed fand closed 1 month ago

fand commented 1 month ago

This PR fixes VFXSpan etc not updating the contents correctly.

Three.js doesn't support updating texture data if the texture size has been changed. This change was introduced in r135: https://github.com/mrdoob/three.js/issues/23164#issuecomment-1007226703

So we have to create textures every time we need to update the contents of VFXSpan etc.

Changes

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-vfx-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 8, 2024 8:49am