Skip to content

Commit

Permalink
Merge pull request #64 from HichamELBSI/fix/documentation-and-female-…
Browse files Browse the repository at this point in the history
…front-svg

fix: documentation and female front svg
  • Loading branch information
HichamELBSI authored Nov 14, 2024
2 parents 0e04eea + 09c4e15 commit 798532e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 52 deletions.
85 changes: 36 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,29 +146,17 @@ const styles = StyleSheet.create({
</p>
</details>

## v3.X.X Props

| Prop | Required | Purpose |
| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| data | Yes | `BodyPartObject[]` - Array of `BodyPartObject` to highlight |
| onBodyPartPress | No | `Func` - `(bodyPart: BodyPartObject, side?: left \| right) => {}` Callback called when a user tap a body part |
| colors | No | `string[]` - Defaults to `['#0984e3', '#74b9ff']` |
| side | No | `front \| back` - Defaults to `front` |
| gender | No | `string` - Can be "male" or "female", Defaults to `male` - :warning: Please consider `female` as a beta work in progress |
| scale | No | `number` - Defaults to `1` |
| border | No | `string` - Defaults to `#dfdfdf` (`none` to hide the border) |

## v2.X.X Props

| Prop | Required | Purpose |
| ------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- |
| data | Yes | (Array) Array of `BodyPartObject` to highlight |
| onMusclePress | No | (Func) (bodyPart: BodyPartObject) => {} Callback called when a user tap a body part, disabled if zoomOnPress is set to true |
| colors | No | (Array) Defaults to `['#0984e3', '#74b9ff']` |
| frontOnly | No | (Boolean) Display only the front, Defaults to `false` |
| backOnly | No | (Boolean) Display only the back, Defaults to `false` |
| zoomOnPress | No | (Boolean) Defaults to false |
| scale | No | (Float) Defaults to `1` |
## Props

| Prop | Required | Purpose |
| --------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
| data | Yes | `BodyPartObject[]` - Array of `BodyPartObject` to highlight |
| onBodyPartPress | No | `Func` - `(bodyPart: BodyPartObject, side?: left \| right) => {}` Callback called when a user tap a body part |
| colors | No | `string[]` - Defaults to `['#0984e3', '#74b9ff']` |
| side | No | `front \| back` - Defaults to `front` |
| gender | No | `string` - Can be "male" or "female", Defaults to `male` |
| scale | No | `number` - Defaults to `1` |
| border | No | `string` - Defaults to `#dfdfdf` (`none` to hide the border) |

## BodyPart object model

Expand All @@ -182,29 +170,28 @@ const styles = StyleSheet.create({

## List of body parts

| BodyParts | v2 | v3 | Side |
| --------------- | ------------------ | ------------------ | ----- |
| trapezius | :white_check_mark: | :white_check_mark: | Both |
| triceps | :white_check_mark: | :white_check_mark: | Both |
| forearm | :white_check_mark: | :white_check_mark: | Both |
| obliques | :white_check_mark: | :white_check_mark: | Both |
| adductors | :white_check_mark: | :white_check_mark: | Both |
| calves | :white_check_mark: | :white_check_mark: | Both |
| head | :white_check_mark: | :white_check_mark: | Both |
| neck | :white_check_mark: | :white_check_mark: | Both |
| chest | :white_check_mark: | :white_check_mark: | Front |
| biceps | :white_check_mark: | :white_check_mark: | Front |
| abs   | :white_check_mark: | :white_check_mark: | Front |
| upper-back | :white_check_mark: | :white_check_mark: | Back |
| lower-back | :white_check_mark: | :white_check_mark: | Back |
| hamstring | :white_check_mark: | :white_check_mark: | Back |
| gluteal | :white_check_mark: | :white_check_mark: | Back |
| deltoids   | :x: | :white_check_mark: | Both |
| hands | :x: | :white_check_mark: | Both |
| feet | :x: | :white_check_mark: | Both |
| ankles | :x: | :white_check_mark: | Both |
| tibialis | :x: | :white_check_mark: | Both |
| adductor | :white_check_mark: | :x: | Both |
| front-deltoids  | :white_check_mark: | :x: | Front |
| abductors | :white_check_mark: | :x: | Front |
| back-deltoids   | :white_check_mark: | :x: | Back |
| BodyParts | Side |
| ------------ | ---------------------------- |
| trapezius | Both |
| triceps | Both |
| forearm | Both |
| adductors | Both |
| calves | Both |
| hair | Both |
| neck | Both |
| deltoids   | Both |
| hands | Both |
| feet | Both |
| head | Both (Front only for female) |
| ankles | Both (Front only for female) |
| tibialis | Front |
| obliques | Front |
| chest | Front |
| biceps | Front |
| abs   | Front |
| quadriceps   | Front |
| knees   | Front |
| upper-back | Back |
| lower-back | Back |
| hamstring | Back |
| gluteal | Back |
12 changes: 11 additions & 1 deletion assets/bodyFemaleFront.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,23 @@ export const bodyFemaleFront: BodyPart[] = [
"m 332.05,262.18 c -0.78,8.99 -5.96,18.06 -11.27,26.44 a 0.35,0.35 0 0 1 -0.59,0.01 q -6.05,-9.29 -9.58,-18.59 -1.68,-4.42 -1.62,-8.04 0.06,-3.36 4.03,-3.55 6.44,-0.31 14.09,-0.13 c 2.41,0.05 5.19,0.99 4.94,3.86 z",
],
left: [
"m 241.01,294.28 c 12.76,-8.28 25.21,-16.07 39.54,-21.44 2.58,-0.96 6.02,0.04 5.63,3.51 q -0.44,3.92 -1.62,5.3 c -6.48,7.58 -12.74,12.81 -19.24,19.14 -1.03,1.01 -1.87,1.15 -3.25,1.03 q -8.13,-0.69 -18.79,-2.97 -2.99,-0.65 -2.7,-3.86 0.05,-0.46 0.43,-0.71 z",
"m 290.15,290.93 c 3.28,4.65 5.62,9.8 7.15,15.32 0.7,2.53 -1.37,5.04 -3.97,5.05 q -6.56,0.04 -11.88,-2.03 a 2.07,2.06 14.4 0 1 -1.3,-2.18 c 0.77,-5.99 4.87,-11.91 8.89,-16.23 a 0.72,0.71 -41.3 0 1 1.11,0.07 z",
"m 301.06,294.13 c -3.51,-6.07 -6.56,-12.38 -9.23,-18.87 q -1.42,-3.46 -1.56,-6.85 -0.36,-8.56 0.86,-17.74 a 0.44,0.44 0 0 1 0.53,-0.37 q 0.46,0.1 0.79,0.48 4.65,5.35 7.86,11.31 c 6.42,11.93 11.65,25.19 18.44,37.61 a 5.28,5.26 30.8 0 1 0.66,2.59 L 319.3,321 a 0.79,0.79 0 0 1 -0.79,0.79 c -1.83,0 -3.44,-1.1 -4.21,-2.73 q -5.68,-11.89 -13.24,-24.93 z",
],
right: [
"m 328.11,315.98 c -1.39,2.8 -1.85,5.31 -5.45,5.84 a 0.92,0.91 85.6 0 1 -1.04,-0.9 q -0.09,-9.72 -0.08,-18.23 0,-1.57 0.75,-3.05 6.71,-13.16 12.25,-25.58 c 3.49,-7.85 8.12,-17.17 14.42,-23.56 q 0.19,-0.18 0.45,-0.19 a 0.43,0.42 -3.6 0 1 0.44,0.38 q 0.95,7.84 0.93,15.61 -0.02,4.3 -1.34,7.91 -3.03,8.27 -7.56,16.2 -8.05,14.11 -13.77,25.57 z",
"m 343.58,306.54 c 1.42,-5.58 3.9,-10.86 7.19,-15.57 a 0.69,0.68 -50.1 0 1 1.04,-0.1 c 3.9,3.84 9.01,11.14 8.89,17.13 a 1.07,1.06 79.1 0 1 -0.65,0.97 q -5.44,2.34 -12.5,2.38 c -2.39,0.01 -4.57,-2.43 -3.97,-4.81 z",
],
},
},
{
slug: "trapezius",
color: "#454545",
path: {
left: [
"m 241.01,294.28 c 12.76,-8.28 25.21,-16.07 39.54,-21.44 2.58,-0.96 6.02,0.04 5.63,3.51 q -0.44,3.92 -1.62,5.3 c -6.48,7.58 -12.74,12.81 -19.24,19.14 -1.03,1.01 -1.87,1.15 -3.25,1.03 q -8.13,-0.69 -18.79,-2.97 -2.99,-0.65 -2.7,-3.86 0.05,-0.46 0.43,-0.71 z",
],
right: [
"m 366.31,275.29 c 12,4.97 22.67,11.96 33.55,18.94 q 0.51,0.33 0.54,0.94 c 0.08,1.63 -0.71,3.2 -2.44,3.59 q -9.65,2.18 -18.62,2.99 c -1.26,0.11 -2.4,0.24 -3.39,-0.7 q -5.03,-4.78 -10.97,-10.25 -6.53,-6.01 -8.56,-9.16 -1.87,-2.89 -1.63,-6.77 0.03,-0.49 0.35,-0.85 c 3.04,-3.4 7.94,-0.07 11.17,1.27 z",
],
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-body-highlighter",
"version": "3.1.0",
"version": "3.1.1",
"main": "index.tsx",
"author": "HichamELBSI",
"license": "MIT",
Expand Down Expand Up @@ -36,4 +36,4 @@
"typescript": "^3.5.3"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
}

0 comments on commit 798532e

Please sign in to comment.