draco icon indicating copy to clipboard operation
draco copied to clipboard

Deprecated DecoderBuffer API is still used in example code

Open Oletus opened this issue 3 years ago • 6 comments

At least some code still uses the deprecated DecoderBuffer API:

  • DRACOLoader example web worker code https://github.com/google/draco/blob/master/javascript/example/DRACOLoader.js
  • JS example in the README

Oletus avatar Sep 20 '22 17:09 Oletus

Please use the three.js documentation and examples. We will be removing the example and the README content, and instead link to the three.js content in our next release.

https://threejs.org/docs/#examples/en/loaders/DRACOLoader

tomfinegan avatar Oct 04 '22 18:10 tomfinegan

DRACOLoader in the three.js repo also still uses the deprecated DecoderBuffer API, I suppose this change also means that DRACO usage in three.js will be updated?

Oletus avatar Oct 05 '22 08:10 Oletus

That's an issue to take up with the three.js maintainers. They'd probably appreciate a patch or PR-- I'm not sure how that project handles third party submissions.

tomfinegan avatar Oct 05 '22 17:10 tomfinegan

Based on the discussion on the three.js issue, looks like three.js maintainers have not really bought in to being the maintainers of Draco example code. Linking to three.js as an example in the next release doesn't seem like a great idea if three.js is still using the API in an outdated way.

Oletus avatar Oct 24 '22 07:10 Oletus

Agreed on that last point, but we don't have plans to update the examples in the near term. I will leave this open so we can get to it when there's time to update the example.

tomfinegan avatar Oct 25 '22 17:10 tomfinegan

We'll update in https://github.com/mrdoob/three.js/pull/25475, but it'd be great if the JavaScript API example in the README here could be kept up to date as well! It isn't necessarily obvious from reading IDL files what the corresponding JavaScript types should be (for example byte[] → Int8Array, Unt8Array, ArrayBuffer, ...?).

donmccurdy avatar Feb 09 '23 14:02 donmccurdy