@@ -91,6 +91,12 @@ export class Camera {
9191 this . ctx . clearRect ( 0 , 0 , this . video . videoWidth , this . video . videoHeight ) ;
9292 }
9393
94+ /**
95+ * Draw the keypoints and skeleton on the video.
96+ * @param pose A pose with keypoints to render.
97+ * @param shouldScale If the keypoints are normalized, shouldScale should be
98+ * set to true.
99+ */
94100 drawResult ( pose , shouldScale = false ) {
95101 if ( pose . keypoints != null ) {
96102 const scaleX = shouldScale ? this . video . videoWidth : 1 ;
@@ -104,8 +110,10 @@ export class Camera {
104110 /**
105111 * Draw the keypoints on the video.
106112 * @param keypoints A list of keypoints, may be normalized.
107- * @param shouldScale If the keypoints are normalized, shouldScale should be
108- * set to true.
113+ * @param scaleY If keypoints are normalized, y needs to be scaled back based
114+ * on the scaleY.
115+ * @param scaleX If keypoints are normalized, x needs to be scaled back based
116+ * on the scaleX..
109117 */
110118 drawKeypoints ( keypoints , scaleY , scaleX ) {
111119 const keypointInd =
@@ -142,6 +150,14 @@ export class Camera {
142150 }
143151 }
144152
153+ /**
154+ * Draw the skeleton of a body on the video.
155+ * @param keypoints A list of keypoints, may be normalized.
156+ * @param scaleY If keypoints are normalized, y needs to be scaled back based
157+ * on the scaleY.
158+ * @param scaleX If keypoints are normalized, x needs to be scaled back based
159+ * on the scaleX..
160+ */
145161 drawSkeleton ( keypoints , scaleY , scaleX ) {
146162 this . ctx . fillStyle = 'White' ;
147163 this . ctx . strokeStyle = 'White' ;
0 commit comments