gftruj / webzamples

MIT License
39 stars 17 forks source link

Shadow Problem with Newer Version of Aframe #2

Open franbrennan opened 1 year ago

franbrennan commented 1 year ago

The depth-material shadow cast by a Lottie doesn't work as expected with the latest version of aframe (v 1.3.0).

With aframe 1.2.0 it's perfect - but with 1.3.0 it just casts the 'plane' shape of the Lottie instead of the animated outline.

gftruj commented 1 year ago

Thanks, I'll look into it!

franbrennan commented 1 year ago

Superstar! Thank you so much for your time and expertise 🙌

gftruj commented 1 year ago

It looks like threejs require an alpha map, and use the materials info, not the CustomDepthMaterial.

I'm not sure if it's not an overkill, but I can create alphaMaps based on the texture info example here but though it was fun to make, its complicated and heavy.

How about I'd create a "lottie" component or texture, which will manage all: loading, the dynamic nature of the texture (since its animated), and the transparent shadow?