Skip to content

Commit

Permalink
formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shiffman committed Dec 15, 2020
1 parent 8803b97 commit 4c61b28
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions examples/p5js/Handpose/Handpose_Part_Selection/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function setup() {

// This sets up an event that fills the global variable "predictions"
// with an array every time new hand poses are detected
handpose.on('predict', function(results) {
handpose.on("predict", function(results) {
hands = results;
});

Expand All @@ -20,7 +20,7 @@ function setup() {
}

function modelReady() {
console.log('Model ready!');
console.log("Model ready!");
}

function draw() {
Expand Down
4 changes: 2 additions & 2 deletions examples/p5js/Handpose/Handpose_Webcam/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function setup() {

// This sets up an event that fills the global variable "predictions"
// with an array every time new hand poses are detected
handpose.on('predict', function(results) {
handpose.on("predict", function(results) {
hands = results;
});

Expand All @@ -20,7 +20,7 @@ function setup() {
}

function modelReady() {
console.log('Model ready!');
console.log("Model ready!");
}

function draw() {
Expand Down
11 changes: 3 additions & 8 deletions examples/p5js/PoseNet/PoseNet_webcam/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ function setup() {
poseNet = ml5.poseNet(video, modelReady);
// This sets up an event that fills the global variable "poses"
// with an array every time new poses are detected
poseNet.on('pose', function(results) {
poseNet.on("pose", function(results) {
poses = results;
});
// Hide the video element, and just show the canvas
video.hide();
}

function modelReady() {
select('#status').html('Model Loaded');
select("#status").html("Model Loaded");
}

function draw() {
Expand Down Expand Up @@ -69,12 +69,7 @@ function drawSkeleton() {
const partA = skeleton[j][0];
const partB = skeleton[j][1];
stroke(255, 0, 0);
line(
partA.position.x,
partA.position.y,
partB.position.x,
partB.position.y
);
line(partA.position.x, partA.position.y, partB.position.x, partB.position.y);
}
}
}

0 comments on commit 4c61b28

Please sign in to comment.