Prerequisites
- A working React Native quickstart
NosmaiCameraViewhas firedonReady
Apply a subtle preset
await NosmaiCameraSdk.setSkinSmoothing(0.35); await NosmaiCameraSdk.setSkinWhitening(0.15); await NosmaiCameraSdk.setTeethWhitening(0.20); await NosmaiCameraSdk.setSharpening(0.15);
Parameter ranges
All four values use 0 through 1, with 0 as the disabled value. Clamp slider input before calling the TurboModule and ignore a completed Promise if the camera screen has already unmounted.
Reset beauty
await NosmaiCameraSdk.clearBeauty();
clearBeauty() clears skin beauty, makeup, reshaping, and eye color. It preserves color controls, package slots, and manual backgrounds.
Verify it worked
Change smoothing from 0 to 0.35 while the camera view remains mounted. The native preview should update without a React component remount.
Common errors
| Symptom | Cause | Fix |
|---|---|---|
| Promise rejects before preview appears | Processing has not started | Await initialization, mount the view, then wait for onReady |
| Changes are lost after Fast Refresh | Native state and JavaScript lifecycle were reset differently | Run full cleanup and reopen the screen during development |
| Preview performance falls | Development tooling or multiple face features add load | Verify a Release build on a physical device |