Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix normals ( WIP ) #2

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/pg.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/pg.module.js

Large diffs are not rendered by default.

Binary file modified bin/pg.wasm
Binary file not shown.
6 changes: 4 additions & 2 deletions binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ EMSCRIPTEN_KEEPALIVE void createMobSplatAsync(DCInstance *inst, uint32_t taskId,
//

EMSCRIPTEN_KEEPALIVE void createChunkMeshAsync(PGInstance *inst, uint32_t taskId, int x, int z, int lod, int *lodArray) {
std::array<int, 2> lodArray2{
std::array<int, NUM_LOD_ARR> lodArray2{
lodArray[0],
lodArray[1]
lodArray[1],
lodArray[2],
lodArray[3]
};
/* if (lodArray2[0] == 0 || lodArray2[1] == 0) {
std::cerr << "lodArray is zero" << std::endl;
Expand Down
3 changes: 2 additions & 1 deletion compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ emcc -D NUM_THREADS=$NUM_THREADS -sNO_EXIT_RUNTIME=1 -s TOTAL_MEMORY=104857600 -
echo 'let accept, reject;const p = new Promise((a, r) => {accept = a; reject = r;});Module.postRun = () => {accept();};Module.waitForLoad = () => p;' >> bin/pg.js
cp bin/pg.js bin/pg.module.js
echo 'export default Module;' >>bin/pg.module.js
echo done
# cp -R bin/* ../app/public/
echo done
Loading