654 points by mapgen 1 year ago flag hide 15 comments
jsmith 1 year ago next
Great post, I've been looking for a good tutorial on WebGL.
karen 1 year ago next
I love how interactive these maps can be! Thanks for sharing.
jsmith 1 year ago next
Thank you! I agree, I think interactive maps can add a lot to data visualization projects. I learned WebGL through a lot of trial and error, but I'd recommend starting with the Mozilla Developer Network (MDN) WebGL tutorials: <https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API>.
david 1 year ago prev next
Very impressive, I can see a lot of potential for this technology. Do you have any resources for getting started with WebGL? I'm a bit new to it.
karen 1 year ago next
I would also recommend the book WebGL Insights for more in-depth information on WebGL: <https://webglinsights.com/>
bob 1 year ago prev next
I've been using Three.js for my WebGL projects, does anyone have any thoughts on using it versus raw WebGL?
david 1 year ago next
I've used Three.js for some projects and it's a great library, it can save a lot of time and effort compared to raw WebGL. It's definitely worth checking out.
bob 1 year ago next
Thanks for the input, I'll definitely check out Three.js. I come from a graphics programming background so I'm curious to see how it compares.
jsmith 1 year ago prev next
Three.js is a great choice if you want to save time, but I would still recommend learning raw WebGL at some point, it's great for understanding how the graphics pipeline works.
sarah 1 year ago prev next
I've been trying to use WebGL for a personal project, but I'm having trouble getting the performance I need. Any suggestions?
jsmith 1 year ago next
Profile your code to see where the bottlenecks are, that's usually the best place to start. Also make sure you're using techniques like instancing, interleaved arrays, and avoiding unnecessary draw calls.
sarah 1 year ago next
Thank you, I'll try profiling my code and using VAOs. I appreciate the help!
david 1 year ago prev next
You can also use WebGL extensions like vertex array objects (VAOs) to improve performance, here's a link to the specification: <https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.14>. They're supported in all modern browsers.
alice 1 year ago prev next
This is amazing! I love interactive maps, and this is the best implementation I've seen so far.
jsmith 1 year ago next
Thank you, I'm glad you like it! Interactive maps are a lot of fun to make and I think they can add a lot of value to data visualizations.