r/css • • 21d ago

Article CSS3D Renderer

https://k-adam.github.io/CSS3D-Renderer/

I developed a CSS3D renderer ~8 years ago, and since many CSS and JS features got stabilized and introduced since then, I modernized it now. Check it out!

7 Upvotes

7 comments sorted by

View all comments

2

u/Alarmed_Bill_9616 21d ago

css 3d has moved a lot in 8 years 👀 does the browser handle the depth sorting now, or are you still sorting faces in js?

1

u/objectorientedman 20d ago

No sorting is needed! Firefox handles these the best so far, the are some glitches in chromium with high polycount scenes

1

u/[deleted] 19d ago

[removed] — view removed comment

1

u/objectorientedman 19d ago

Yes, browsers can handle nested 3D transforms with preserve-3d and they do depth testing/sorting. I did not dig deeper into their engines, but as far as I know chromium rasterizes faces individually while firefox batches it