react-native-nitro-pose-exercises 1.1.8 → 1.1.9
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/ios/NitroPoseExercises.swift +25 -25
- package/package.json +1 -1
|
@@ -366,31 +366,31 @@ private func isPostureValid(family: PostureFamily, threshold: Double) -> Bool {
|
|
|
366
366
|
let kneeY = kneesVisible ? (lk.y + rk.y) / 2 : hipY
|
|
367
367
|
let ankleY = anklesVisible ? (la.y + ra.y) / 2 : kneeY
|
|
368
368
|
|
|
369
|
-
|
|
370
|
-
case .
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
case .
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
case .seated:
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
case .
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
case .inverted:
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
case .none:
|
|
392
|
-
|
|
393
|
-
}
|
|
369
|
+
switch family {
|
|
370
|
+
case .horizontalprone, .supine:
|
|
371
|
+
let ys = [shoulderY, hipY, ankleY]
|
|
372
|
+
return ((ys.max() ?? 0) - (ys.min() ?? 0)) < 0.25
|
|
373
|
+
|
|
374
|
+
case .standingupright:
|
|
375
|
+
guard kneesVisible else { return false }
|
|
376
|
+
return shoulderY < hipY - 0.08 && hipY < kneeY + 0.05 && (anklesVisible ? kneeY < ankleY : true)
|
|
377
|
+
|
|
378
|
+
case .seated:
|
|
379
|
+
guard kneesVisible else { return false }
|
|
380
|
+
return shoulderY < hipY - 0.05 && Swift.abs(hipY - kneeY) < 0.20
|
|
381
|
+
|
|
382
|
+
case .sideplank:
|
|
383
|
+
let ySpread = Swift.abs(shoulderY - hipY)
|
|
384
|
+
let shoulderHipDx = Swift.abs(shoulderX - hipX)
|
|
385
|
+
return ySpread < 0.20 && shoulderHipDx < 0.15
|
|
386
|
+
|
|
387
|
+
case .inverted:
|
|
388
|
+
guard anklesVisible else { return false }
|
|
389
|
+
return hipY < shoulderY && hipY < ankleY
|
|
390
|
+
|
|
391
|
+
case .none:
|
|
392
|
+
return true
|
|
393
|
+
}
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
// ═══════════════════════════════════════════════════════════
|
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.9",
|
|
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",
|