tangrams / tangram

WebGL map rendering engine for creative cartography
https://tangram.city
MIT License
2.22k stars 290 forks source link

wireframe mode #745

Closed meetar closed 4 years ago

meetar commented 4 years ago

This is a naive approach to wireframe rendering, which manually edits the VBOMesh.element_data indices to produce three line segments for every triangle.

Textures and lighting are disabled, but vertex colors are still applied.

PR for discussion – would be cool to have this as a debugging option.

meetar commented 4 years ago

image

bcamper commented 4 years ago

Thought about this a bit more, decided to move wireframe building code to its own file, to isolate from "normal" code and remove any special wireframe logic from VBOMesh entirely. https://github.com/tangrams/tangram/pull/745/commits/13f8e106cfe3eec1d371820437efd4e86c4cbcc5

bcamper commented 4 years ago

Thanks @meetar! This is awesome, wish we'd had it ~4 years ago...