开发者

Load models via bin files in webgl?

开发者 https://www.devze.com 2023-01-22 12:53 出处:网络
I see an example where the data was in text inside an array, i seen another where someone loads the model through ajax with json.

I see an example where the data was in text inside an array, i seen another where someone loads the model through ajax with json.

Is there a way to load the files via binary? i dont feel like loading a 1mb model vi开发者_JAVA技巧a 4mb json


It is certainly possible to load binary files.

http://blog.nihilogic.dk/2008/05/reading-exif-data-with-javascript.html

But the problem is after that. That you need to know what format it is in. And extract everything from there.


You can use jQuery Binary Ajax, or for new browsers, ArrayBuffer


If file is compressed with gzip then json size is almoast same as binary file size.

Anyway you can use binary loader from three.js if you really need it.

0

精彩评论

暂无评论...
验证码 换一张
取 消