فهرست منبع

Update meshopt_decoder module to latest (#24491)

This brings up meshopt_decoder modules to the latest versions, which
mostly constitutes a few internal Wasm changes that get reflected in the
different Wasm blobs, and support for Web Workers.

Note that with this change, GLTFLoader will start using decodeGltfBufferAsync
path but by default that still uses the same flow (so no change!).
However, this allows the application to call

	MeshoptDecoder.useWorkers(4);

... to activate asynchronous geometry decoding. It's expected that the
better default is to not use WebWorkers, but using them can be
beneficial for very large files or very latency-sensitive applications.

Some size/perf stats:

old decoder (0.14 from before this change):
- .js 21414 bytes
- .js.gz 5745 bytes

new decoder:
- .js 24850 bytes (+16%)
- .js.gz 6442 bytes (+12%)
- 3-4% faster decoding in Chrome
- support for Web Workers (which is where most of the size impact comes from!)

new decoder with worker support stripped (not part of this PR!):
- .js 22715 bytes (+6%)
- .js.gz 5831 bytes (+1%)
- 3-4% faster decoding in Chrome

I'm currently expecting that the extra ~700 bytes of download cost is
Not A Big Deal, and that size-conscious applications use webpack which
may or may not be able to strip Web Worker support out if that is not
used...
Arseny Kapoulkine 2 سال پیش
والد
کامیت
3e7149ad24
2فایلهای تغییر یافته به همراه2 افزوده شده و 6 حذف شده
  1. 1 3
      examples/js/libs/meshopt_decoder.js
  2. 1 3
      examples/jsm/libs/meshopt_decoder.module.js

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 3
examples/js/libs/meshopt_decoder.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 3
examples/jsm/libs/meshopt_decoder.module.js


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است