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
This is a follow-up to #9778, which just got merged in time for the 1.85 release. Instead of manually downloading .wasm and wrapper files from the Draco repo, CesiumJS now fetches them from gstatic during install time with a prepare script in package.json. There are several loose ends from these changes:
Using version 1.3.5 instead of the latest (1.4.1 at the time of writing): As of 1.3.6, it seems the Draco decoder does not work with our decodeDraco worker. I suspect this is due to our usage of SkipAttributeTransform:
When these lines are commented out, newer Draco versions work fine but the attributes are returned as Float32 arrays instead of Uint16 arrays. The action item here is to do some digging into the SkipAttributeTransform source code and try to make an example demonstrating a bug if there is one (and to open an issue in the Draco3d repo).
Using the gstatic files instead of the npm package: I tried two things with the npm module:
Point the Draco TaskProcessor directly to the .wasm and wrapper files in the npm package dist: This didn't work due to a runtime error, possibly related to the first bullet point but I'm not sure.
Compile the .wasm module from the npm package using the decoder API: Similarly to the other libraries we pull from npm, I imported the Decoder from the Draco module. Then, following the example in the Draco repo, modified the decodeDraco(event) function in our Draco worker to load the module using the createDecoderModule API. I think the changes in the worker were correct, but I was unable to test because I ran into build errors due to a dependency on fs and path inside the Decoder from npm when building the files in Source/ThirdParty/.
Updating the gulp "prepare" task: With the inclusion of a "prepare" script in package.json, we needed to remove the script from the package.json that gets bundled into our zip file. Since we rushed to get the Draco download changes into 1.85, we might've missed a cleaner way to do this; ideally, we wouldn't need to write out a temporary package.noprepare.json file during the "makeZipFile" task and delete it immediately after.
The text was updated successfully, but these errors were encountered:
The action item here is to do some digging into the SkipAttributeTransform source code and try to make an example demonstrating a bug if there is one (and to open an issue in the Draco3d repo).
👍 the sooner the better, while it's on our minds
Point the Draco TaskProcessor directly to the .wasm and wrapper files in the npm package dist
It would be good to get to the bottom of this as well. I was under the impression that draco_decoder_nodejs.js in the npm package and draco_wasm_wrapper.js on gstatic were different, but they're actually identical. It seems like a pure npm solution is maybe possible here.
The action item here is to do some digging into the SkipAttributeTransform source code and try to make an example demonstrating a bug if there is one (and to open an issue in the Draco3d repo).
This is a follow-up to #9778, which just got merged in time for the 1.85 release. Instead of manually downloading .wasm and wrapper files from the Draco repo, CesiumJS now fetches them from gstatic during install time with a
prepare
script in package.json. There are several loose ends from these changes:decodeDraco
worker. I suspect this is due to our usage ofSkipAttributeTransform
:cesium/Source/WorkersES6/decodeDraco.js
Lines 278 to 284 in a020656
SkipAttributeTransform
source code and try to make an example demonstrating a bug if there is one (and to open an issue in the Draco3d repo).TaskProcessor
directly to the .wasm and wrapper files in the npm package dist: This didn't work due to a runtime error, possibly related to the first bullet point but I'm not sure.decodeDraco(event)
function in our Draco worker to load the module using thecreateDecoderModule
API. I think the changes in the worker were correct, but I was unable to test because I ran into build errors due to a dependency onfs
andpath
inside the Decoder from npm when building the files in Source/ThirdParty/."prepare"
script in package.json, we needed to remove the script from the package.json that gets bundled into our zip file. Since we rushed to get the Draco download changes into 1.85, we might've missed a cleaner way to do this; ideally, we wouldn't need to write out a temporarypackage.noprepare.json
file during the"makeZipFile"
task and delete it immediately after.The text was updated successfully, but these errors were encountered: