Comments (7)
We did our first pass on the javascript decoder size, which included separating mesh and point cloud decoders into two .js files + turning on extra flags that reduced the javascript size without hurting the performance (the performance should be actually slightly better now).
From the previous draco_decoder.js (878 KB) we are now down to 585 KB for draco_mesh_decoder.js .. so about 33% reduction. Still far from perfect, but getting better.
Note that we now include 3 different javascripts:
draco_decoder.js - still contains both mesh and point cloud decoders
draco_mesh_decoder.js - only mesh decoding
draco_point_cloud_decoder.js - only point cloud decoding
We will still keep working on this so I'm going to keep the issue open
from draco.
We actually did write a javascript decoder manually some time ago, but it is now rather outdated and not compatible with the current bitstream. If there is a strong demand we may look into that again.
Saying that, what we plan to do in the near future is to add an option to add/remove features that are included in the decoder. For example if you know that your input files are only meshes, you will be able to exclude all functionality specific to point clouding, which would reduce the decoder size quite a bit. We actually already have a limited support for this in the Empscripten makefile (look for DRACO_CONFIG_DEFINES
), but on a very few features can be disabled at this time.
from draco.
when I run "make -f Makefile.emcc" in os x EI Capitan to compile generated draco_decoder.js code
get the following compile errors:
In file included from javascript/emscripten/draco_glue_wrapper.cc:26:
./glue.cpp:148:14: error: cannot initialize a parameter of type 'const char *'
with an lvalue of type 'char'
self->Init(arg0, arg1);
^~~~
./core/decoder_buffer.h:38:25: note: passing argument to parameter 'data' here
void Init(const char *data, size_t data_size);
^
1 error generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
make: *** [obj/javascript/emscripten/draco_glue_wrapper.o] Error 1
So how to resolve this problem?
from draco.
Being able to remove unnecessary features is indeed a great idea, so I would like so second that.
from draco.
@openforus Thanks for the report. I was able to repro the problem. As far as I can tell this is a MacOS specific issue. We will post an update when we have a fix. Also, in future, please consider opening a new issue when reporting problems. It makes things easier to track.
from draco.
Would a WebAssembly Decoder make sense in this instance?
from draco.
@marklundin Yes, WebAssembly is going to make the decoder smaller as well.
from draco.
Related Issues (20)
- OSS-Fuzz issue 65986
- OSS-Fuzz issue 65989 HOT 1
- OSS-Fuzz issue 66259
- 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.
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.