File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -465,6 +465,11 @@ class BodyPose {
465
465
addKeypoints ( poses ) {
466
466
poses . forEach ( ( pose ) => {
467
467
pose . keypoints . forEach ( ( keypoint ) => {
468
+ // Remove the z property that is not documented
469
+ if ( keypoint . z ) {
470
+ delete keypoint . z ;
471
+ }
472
+
468
473
pose [ keypoint . name ] = {
469
474
x : keypoint . x ,
470
475
y : keypoint . y ,
@@ -475,14 +480,11 @@ class BodyPose {
475
480
// Add the 3d keypoints if in BlazePose mode
476
481
if ( pose . keypoints3D ) {
477
482
pose . keypoints3D . forEach ( ( keypoint ) => {
478
- pose [ keypoint . name ] = {
479
- ...pose [ keypoint . name ] ,
480
- keypoint3D : {
481
- x : keypoint . x ,
482
- y : keypoint . y ,
483
- z : keypoint . z ,
484
- confidence : keypoint . confidence ,
485
- } ,
483
+ pose [ keypoint . name ] . keypoint3D = {
484
+ x : keypoint . x ,
485
+ y : keypoint . y ,
486
+ z : keypoint . z ,
487
+ confidence : keypoint . confidence ,
486
488
} ;
487
489
} ) ;
488
490
}
You can’t perform that action at this time.
0 commit comments