You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsing a simple buffer with a similar API as the common DataTexureLoader.load is not standardly supported, however it would seem logical for allowing features like drag and drop and easy server-side loading of DataTextures.
In order to allow drag-and-drop ( or similar instant parsing ) we are required to manually invoke the specific loader.parser and replicate the onLoad events of both DataTextureLoader and the loader itself.
Wouldn't it make sense to supply a simpler built-in function for such workflow? Or, perhaps, it is expected of the loader to always provide a structured object that can be immediately used, bypassing this:
Parsing a simple buffer with a similar API as the common DataTexureLoader.load is not standardly supported, however it would seem logical for allowing features like drag and drop and easy server-side loading of DataTextures.
An example of the current workflow for doing such can be observed in webgl_materials_matcap.
jade.exr - open example file for testing - credits to Michael Harmon.
three.js/examples/webgl_materials_matcap.html
Lines 178 to 195 in 696d783
In order to allow drag-and-drop ( or similar instant parsing ) we are required to manually invoke the specific
loader.parser
and replicate theonLoad
events of bothDataTextureLoader
and the loader itself.Wouldn't it make sense to supply a simpler built-in function for such workflow? Or, perhaps, it is expected of the loader to always provide a structured object that can be immediately used, bypassing this:
three.js/src/loaders/DataTextureLoader.js
Lines 38 to 85 in 696d783
If so, how would you suggest structuring such API? Would it make sense to supply a similar interface to other loaders?
Credits to @WestLangley for the idea, I'm replicating and discussing it.
The text was updated successfully, but these errors were encountered: