Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

ThreeJS is a fucking great library, though.


That's true, but that doesn't mean you should use it everywhere. Using Three.js to render a single quad is like using Rust+WASM to add two numbers.


Depends how many times you're gonna add two numbers though, right?


Not necessarily. If data is moving from JS to Rust too much it may even be slower than just using JS.

Also, the simpler the operation, the higher the chance v8 optimises it pretty well.


Agreed, it's probably the best library for 3d graphics in JavaScript. That being said, if you want websites that load fast and perform well on a large number of devices, avoid using ThreeJS unless it's absolutely essential.


I used to use a really great lightweight (5k) library in Flash for simple 3D geometry, polygon shading, etc. (anything simple that could be handled on CPU without uploading anything to GPU; I'm not sure I would attempt to do a full screen terrain with it, but a test would tell). So yeah obviously if you need a couple triangles, look elsewhere than ThreeJS. I'm just saying it's a fantastic library... there's really nothing else equivalent in the ecosystem at this point. It is what Away3D was to Flash, which is a compliment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: