Skip to content

Port of Open Asset Import Library (ASSIMP) to javascript. See https://github.com/assimp/assimp.

Notifications You must be signed in to change notification settings

F1r3Hydr4nt/assimp.js-1

 
 

Repository files navigation

Work in Porgress

Port of Open Asset Import Library (ASSIMP) to javascript with emscripten. See https://github.com/assimp/assimp and http://assimp.sourceforge.net.

Examples:

To threejs

3D File Converter

Build:

Go to https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html to get emscripten.

./emsdk update;
./emsdk install --build=Release latest;
./emsdk activate --build=Release latest;

Posssibly do: source ${YOUR_EMSCRIPTEN_DIR}/emsdk_env.sh

Then do: git submodule update --init --recursive make

Run from repo directory:

python -m SimpleHTTPServer 8000

Then open http://localhost:8000/examples/assimp_to_threejs_to_assimp.html

Rebuilding:

make clean; make

Building a debug build:

make debug

TODO:

Update to latest assimp. Will have to put printf("...\n") statements in Importer::ReadFile() to figure out problem. Most likely need to add a cpp file.

ASSERTIONS=2 causes "RangeError: Maximum call stack size exceeded" This is supposed to fix it, but doesn't seem to work: On Linux and Mac OS X, you can just do NODE_JS = ['node', '--stack_size=8192'] in the Emscripten Compiler Configuration File (.emscripten). On Windows, you will also need --max-stack-size=8192, and also run editbin /stack:33554432 node.exe.

Using "-s SAFE_HEAP=1" will cause a crash on export due to mem alignment issues. They will likely happen in the material export. Look into "-s WASM=1".

For unbound types: Pay attention to ordering of sources in makefile. Also, make sure to include the appropriate headers in embind files.

About

Port of Open Asset Import Library (ASSIMP) to javascript. See https://github.com/assimp/assimp.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 61.1%
  • C 32.7%
  • Makefile 6.1%
  • Shell 0.1%