Skip to content
forked from maierfelix/tolw

WebGL .obj loader - WebAssembly port of tinyobjloader

License

Notifications You must be signed in to change notification settings

kovalenko0/tolw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tolw

WebAssembly port of tinyobjloader

Install:

npm install tolw

Usage:

const tolw = require("tolw");
// initialise tolw
tolw.init().then(() => {
  // have fun
  let binaryFile = new Uint8Array(fs.readFileSync("./model.obj", null));
  let {vertices, normals, uvs, indices} = tolw.loadObj(binaryFile);
});

Build:

em++ --bind -o tolw.js tolw.cc -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]' -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s NODEJS_CATCH_EXIT -O3

About

WebGL .obj loader - WebAssembly port of tinyobjloader

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 66.3%
  • C++ 33.7%