DeviateFish / ingress-model-viewer

Ingress Model Viewer
MIT License
33 stars 8 forks source link

Use callbacks internally #43

Open DeviateFish opened 7 years ago

DeviateFish commented 7 years ago

A while back, I switched everything over to use Promises holistically, but it turns out that might not be a great idea for something that's basically an extraordinarily stripped-down rendering engine.

Apparently, native Promises are an order of magnitude less performant than simply using callbacks: https://jsperf.com/native-promise-vs-callback

I'll probably leave the high-level APIs (especially around asset loading) Promise-aware/compatible, but move everything internal back to using callbacks.