3 ms·
I don't understand how that's supposed to work. What does the decoder decode into? That's gonna depend entirely on the kind of data, right? For some formats, it
by mort96 4mo ago
I don't understand how that's supposed to work. What does the decoder decode into? That's gonna depend entirely on the kind of data, right? For some formats, it's gonna be a stream of bytes; for others, a 2D plane of pixels; others again will need vertexes, 2D planes of pixels and UV maps; for some, an object graph will make more sense.
- gavinray 4mo agoIt appears as though the WASM decode returns two values -- one indicating the data type as a primitive value, and a second value being the data buffer Then there is a helper in this case to de-serialize, "primitive_array_from_buffers()" https://github.com/future-file-format/F3/blob/bd92506447dc1333820cfe9a34ebbf497fe0219e/fff-ude-wasm/examples/wasm.rs#L137-L157 https://github.com/future-file-format/F3/blob/bd92506447dc13...