Skip to content

Commit bb1635d

Browse files
authored
Merge pull request #65 from kion-dgl/64-update-vertex-colors-in-opening
flat shading for vertex colors
2 parents 5279112 + 76630ab commit bb1635d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/ST03.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,14 @@ const updateSceneModel = () => {
303303
packMesh(buffer, "miku/apron/09_RIGHT_HAND_PLATE.obj", 0x1c0, meta); // 017
304304
packMesh(buffer, "miku/apron/06_LEFT_HAND_PAN.obj", 0x1d0, meta); // 018
305305

306+
// Update Vertex Colors
307+
for (let ofs = 0x1e70; ofs < 0x2524; ofs += 4) {
308+
buffer[ofs + 0] = 0x7f;
309+
buffer[ofs + 1] = 0x7f;
310+
buffer[ofs + 2] = 0x7f;
311+
buffer[ofs + 3] = 0;
312+
}
313+
306314
const content = Buffer.from(buffer.subarray(0, meta.contentEnd));
307315
const [bitField, updatedScene] = compressScene(content);
308316

src/ST0305.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,14 @@ const encodeApronMegaman = () => {
607607
packMesh(buffer, "miku/apron/09_RIGHT_HAND_PLATE.obj", 0x1d0, meta); // 017
608608
packMesh(buffer, "miku/apron/06_LEFT_HAND_PAN.obj", 0x1e0, meta); // 018
609609

610+
// Update Vertex Colors
611+
for (let ofs = 0x1e80; ofs < 0x2534; ofs += 4) {
612+
buffer[ofs + 0] = 0x7f;
613+
buffer[ofs + 1] = 0x7f;
614+
buffer[ofs + 2] = 0x7f;
615+
buffer[ofs + 3] = 0;
616+
}
617+
610618
// Update the content length to read
611619
file.writeUInt32LE(meta.contentEnd, 0x04);
612620
// file.writeUInt32LE(0x1d, 0x08);

0 commit comments

Comments
 (0)