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

changes made #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
22 changes: 19 additions & 3 deletions mocap/mocap.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ if (globalSettings.forward.enableForwarding)
globalSettings.forward.supportForWebXR
);

//Handle response for main response
ipcRenderer.on("webServerStarted", (event, success) => {
if (!success) {
console.error("Failed to start the web server.");
// Add any necessary error handling logic here
} else {
console.log("Web server started successfully.");
// Add any additional logic after successful server start
}
});



/* VRM Character Animator */
const animateVRM = (vrm, results) => {
Expand Down Expand Up @@ -97,15 +109,19 @@ const animateVRM = (vrm, results) => {
};

let videoElement = document.querySelector(".input_video"),
guideCanvas = document.querySelector("canvas.guides");
guideCanvas = document.querySelector("canvas.guides");

const onResults = (results) => {
// Draw landmark guides
if (globalSettings.preview.showSketelonOnInput) drawResults(results);
if (globalSettings.preview.showSkeletonOnInput) {
drawResults(results);
}
// Animate model
animateVRM(null, results);
if (!started) {
if (localStorage.getItem("useCamera") == "file") videoElement.play();
if (localStorage.getItem("useCamera") == "file") {
videoElement.play();
}
started = true;
}
};
Expand Down
15 changes: 2 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.