r/reactnative • • 1d ago

Real-time 3D exercise demos in React Native, ~1 KB of code per exercise

Saw the stickman exercise post going around and wanted to share how I solved the same thing differently in my fitness app (Expo + three.js).

Same goal: I didn't want people leaving the app to check form on YouTube, and I didn't want to ship hundreds of MB of videos.

What it does. Each exercise plays a rigged 3D athlete doing the rep on the actual machine. You can drag to rotate around it and pinch to zoom, and the muscles being worked glow.

How. The trick is that almost nothing is a file. There's one rigged character model (~1 MB) and the rest is code. Each movement is a small spec (four phases, grip, camera angles, which muscles to light up) plus a function that poses the skeleton at any point in the rep. All 31 pieces of gym equipment, racks, cable towers, leg press, pec deck, are built from basic shapes in code. No model files for any of them.

Size. 100 exercises live right now. All the 3D code together is ~123 KB compressed, so roughly 1 KB per exercise, plus the one-time character.

Trade-off. It's heavier than a stickman (that 1 MB model, and it needs a GL view), but you get a real human on real equipment, which helps more with stuff like grip and bench angle.

Rendering is expo-gl + three.js.

Would love feedback, good or bad. Especially: does the realistic look help you, or would you rather have something simpler?

9 Upvotes

3 comments sorted by

3

u/SourdoughBaker 21h ago

Share either the repository, more videos, or an Expo Snack for us to see more, if you would like feedback.

0

u/BJCC007 1d ago

Will you able to share APK or file. Which I am able to review on device. I will review and share feedback. Also from above video it looks great.

Also I have few suggestion which I will provide after review apk.

upload it to any apk sharing platform and send link.

I use Appsonair for sharing apk and ipa.

1

u/runtimeterror007 5h ago

Will soon share the open testing link instead here if that's fine for you? It's currently in review