Skip to content

Commit

Permalink
Merge pull request #47 from kion-dgl/44-update-mikus-face-geomtry
Browse files Browse the repository at this point in the history
44 update mikus face geomtry
  • Loading branch information
kion-dgl authored Sep 4, 2024
2 parents 3e2ceee + 1ef66f6 commit f0763ea
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/EncodeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@ const encodeModel = (
let headerOfs = 0;
let ptrOfs = 0x2f0;

const encodeBody = (filename: string) => {
const encodeBody = (filename: string, matId = 0) => {
const obj = readFileSync(filename, "ascii");
const { tri, quad, vertices } = encodeMesh(obj, 0);
const { tri, quad, vertices } = encodeMesh(obj, matId);

const triCount = Math.floor(tri.length / 12);
const quadCount = Math.floor(quad.length / 12);
Expand Down Expand Up @@ -678,7 +678,9 @@ const encodeModel = (
}
headerOfs = 0x130;
encodeBody(hairObject);
encodeFace();
// encodeFace();
encodeBody("miku/01_HEAD_FACE.obj", 2);
encodeBody("miku/01_HEAD_MOUTH.obj", 2);

// Encode Feet
label = Buffer.from("---- FEET ----", "ascii");
Expand Down

0 comments on commit f0763ea

Please sign in to comment.