You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm submitting a new issue. Please see the details below.
β Step 1: Describe the issue π
Did you find a bug? Want to suggest an idea for feature?
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 πΌ
Here's some helpful screenshots and/or documentation of the new feature
β Step 3: Share an example of the issue π¦
Here's some example code or a demonstration of my feature in this issue, separate GitHub repo, or in the https://editor.p5js.org or codepen/jsfiddle/Glitch/etc...
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!");
}
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: