xeolabs / xeogl

A WebGL-based 3D engine for technical visualization. Not actively maintained.
http://xeogl.org
Other
1.15k stars 264 forks source link

Don't hardcode XHR, abstract file loader #325

Open Paril opened 4 years ago

Paril commented 4 years ago

Currently, formats have hardcoded data loading from external sources via URLs which limits the uses of the library. Instead, the raw URL (as it is in the file and/or sent by the user) should be sent back to a loader of some sort which might default to XHR but can be overrided, and essentially provides a load(src) -> Promise<ArrayBuffer|string> function for loading data from any source, including zips, custom buffers, etc.