Comments (7)
Are there any known technical barriers to this being implemented?
From reading how the dracomodule is used within the dracoloader, there doesnt look like there is anything that would prevent implementing it in the ctm code pattern.
If no one knows of any reason it wouldnt work, I'm probably going to take a crack at it.
The direction I'm thinking about initially taking is to split up convertDracoGeometryTo3JS so it send back the attributes as {} of transferable attributes (probably just the ArrayBuffer) and fix it up to build the BufferGeometry in the worker's onmessage. That way the worker doesnt need to import three.
Any suggestions are also welcome.
Thanks.
from draco.
Strong +1 for this. If nobody else had done it in a month or so, we'd planned to tackle it ourselves.
So, @zynga-jpetersen, go forth and do battle!
from draco.
Update on this, I tried the simplified approach, where I import the three js and draco into the worker. That both significantly increased the load times (I'm guessing from both sending data back and forth, but also all that code) and didnt result in good data since of course the THREE.Geometry wasnt transferable (I didnt necessarily expect this to work, just for a test). So as a second attempt at this I'm breaking up convertDracoGeometryTo3JS into 2 phases, 1) where it inflates the data from draco, and then 2) builds the three geometry out of the results. Once I've got that working, I should be able to take phase 1 and move it off into a worker and reuse the same code by doing the same writing the worker source trick that Obj2Loader is doing.
from draco.
Check out Babylon.js implements:
babylon.dracoCompression.ts
KHR_draco_mesh_compression.ts
And you can even use draco_decoder.wasm in Web Worker.
from draco.
I should have updated this sooner, my apologies.
I've been moved onto another project so I haven't had time to complete my refactoring.
from draco.
FYI, I've cross-filed this issue on three.js: mrdoob/three.js#13648. There is some infrastructure in three.js's examples/js/*
to support workers. But currently I don't think anyone is actively working on adding worker support to THREE.DRACOLoader.
from draco.
three.js added web worker support. That can be used as an example.
from draco.
Related Issues (20)
- Compilation Error Involving StatusOr and Status Classes in Draco Library HOT 2
- Gstatic, CDNs, and per-domain caching policy HOT 1
- Download links are broken HOT 1
- Support for quads HOT 1
- C++ Documentation Improvement
- Severity Code Description The project file line does not display status Error C2440 "Initialize" : Unable to transfer from "void *" to "tinygltf: : GetFileSizeFunction draco_decoder F: \ resource \ Draco - 1.5.6 \ SRC \ Draco \ IO \ gltf_decoder.cc 489 HOT 2
- Optimizing 3D data with Draco Geometry Compression HOT 1
- Android Studio Build Error
- tex_coord data has no compression
- A problem about pointcloudsequentialencoder HOT 1
- I failed to compress the downsampled point cloud file with draco_encoder. HOT 1
- ld: unknown option: --start-group
- Apple new Privacy manifest files In May HOT 2
- How to open a gltf/glb file, then compress and save it, in C++
- OSS-Fuzz issue 68890
- Only the positions of the point cloud data in the ply file got compressed
- Large amounts of dynamic memory allocation. HOT 1
- Encoding speed issue when using draco_encoder.js in web browser environment.
- The status.h header file is not compiled HOT 1
- Build Failure of Draco 1.3.6 on red hat 8 with gcc-11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from draco.