Skip to content

Commit

Permalink
auto configure camera when dragging splatv
Browse files Browse the repository at this point in the history
  • Loading branch information
antimatter15 committed Mar 14, 2024
1 parent 16ee82e commit b6c236c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hybrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,11 @@ async function main() {
worker.postMessage({ ply: splatData.buffer });
} else if (splatData[0] == 75 && splatData[1] == 103) {
// splatv file
readChunks(new Response(splatData).body.getReader(), [{ size: 8, type: "magic" }], chunkHandler);
readChunks(new Response(splatData).body.getReader(), [{ size: 8, type: "magic" }], chunkHandler).then(() => {
currentCameraIndex = 0;
camera = cameras[currentCameraIndex];
viewMatrix = getViewMatrix(camera);
});
} else {
alert("Unsupported file format!");
}
Expand Down

0 comments on commit b6c236c

Please sign in to comment.