-
Notifications
You must be signed in to change notification settings - Fork 907
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
Issue to add particle system to my facemesh #1455
Comments
Hi @Ganzi1995 , Thank you for opening an issue with us! I'm wondering if this is happening because of something that has to do with the emitter class? Could you link the p5.js sketch you're using so that I can debug in a more comprehensive way? Thank you! Miaoye |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear ml5 community,
I'm submitting a new issue. Please see the details below.
β Step 1: Describe the issue π
I am new to P5js and I am trying to understand why I can not let the particle system move simultaniosly with my facemesh.
β Step 2: Screenshots or Relevant Documentation πΌ
β Step 3: Share an example of the issue π¦
let facemesh;
let video;
let predictions = [];
let emitter;
let particle;
function setup() {
createCanvas(640, 480);
video = createCapture(VIDEO);
video.size(width, height);
emitter = new Emitter(width / 2, height / 2);
facemesh = ml5.facemesh(video, modelReady);
// This sets up an event that fills the global variable "predictions"
// with an array every time new predictions are made
facemesh.on("predict", results => {
predictions = results;
});
// Hide the video element, and just show the canvas
video.hide();
}
function modelReady() {
console.log("Model ready!");
}
function draw() {
//image(video, 0, 0, width, height);
drawSelectKeypoints()
emitter.show();
emitter.update();
blendMode(ADD);
}
function drawSelectKeypoints() {
for (let i = 0; i < predictions.length; i += 1) {
//for (let i = 0; i < predictions.length; i += 1) {
//const keypoints = predictions[i].scaledMesh;
}
}
Other relevant information, if applicable
β Describe your setup π¦
The text was updated successfully, but these errors were encountered: