react-native-nitro-pose-exercises 1.1.10 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ cd ios && pod install
|
|
|
67
67
|
<img alt="normal-mode" src="https://github.com/user-attachments/assets/762c9b40-ab2e-4e37-ad4c-ac208d555e4f" height="650" width="300"/>
|
|
68
68
|
</td>
|
|
69
69
|
<td align="center">
|
|
70
|
-
<img alt="skeleton-mode" src="https://github.com/user-attachments/assets/
|
|
70
|
+
<img alt="skeleton-mode" src="https://github.com/user-attachments/assets/f65981b3-0c71-4ce1-957e-d35786fc3fdb" height="650" width="300"/>
|
|
71
71
|
</td>
|
|
72
72
|
</tr>
|
|
73
73
|
</table>
|
|
@@ -152,10 +152,10 @@ private var postureWasLost = false
|
|
|
152
152
|
resetSession()
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
override fun isReady(): Boolean {
|
|
156
156
|
val config = exerciseConfig ?: return false
|
|
157
157
|
if (_landmarks.isEmpty()) return false
|
|
158
|
-
return isPostureValid(config.postureFamily)
|
|
158
|
+
return isPostureValid(config.postureFamily, config.visibilityThreshold)
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
// ═══════════════════════════════════════════════════════════
|
|
@@ -638,12 +638,12 @@ if (!isPostureValid(config.postureFamily, config.visibilityThreshold)) {
|
|
|
638
638
|
val kneeY = if (kneesVisible) (lk.y + rk.y) / 2 else hipY
|
|
639
639
|
val ankleY = if (anklesVisible) (la.y + ra.y) / 2 else kneeY
|
|
640
640
|
|
|
641
|
-
|
|
642
|
-
PostureFamily.
|
|
641
|
+
return when (family) {
|
|
642
|
+
PostureFamily.HORIZONTALPRONE, PostureFamily.SUPINE -> {
|
|
643
643
|
val ys = listOf(shoulderY, hipY, ankleY)
|
|
644
644
|
(ys.max() - ys.min()) < 0.25
|
|
645
645
|
}
|
|
646
|
-
PostureFamily.
|
|
646
|
+
PostureFamily.STANDINGUPRIGHT -> {
|
|
647
647
|
if (!kneesVisible) false
|
|
648
648
|
else shoulderY < hipY - 0.08 &&
|
|
649
649
|
hipY < kneeY + 0.05 &&
|
|
@@ -653,7 +653,7 @@ if (!isPostureValid(config.postureFamily, config.visibilityThreshold)) {
|
|
|
653
653
|
if (!kneesVisible) false
|
|
654
654
|
else shoulderY < hipY - 0.05 && kotlin.math.abs(hipY - kneeY) < 0.20
|
|
655
655
|
}
|
|
656
|
-
PostureFamily.
|
|
656
|
+
PostureFamily.SIDEPLANK -> {
|
|
657
657
|
val ySpread = kotlin.math.abs(shoulderY - hipY)
|
|
658
658
|
val shoulderHipDx = kotlin.math.abs(shoulderX - hipX)
|
|
659
659
|
ySpread < 0.20 && shoulderHipDx < 0.15
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-pose-exercises",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"description": "Real-time on-device exercise tracking for React Native. Rep counting, form validation, and skeleton overlay powered by Apple Vision (iOS) and Google ML Kit (Android) with VisionCamera v5 via Nitro Modules.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|