BaseBeautyState is a module within AtomicXCore that manages essential portrait enhancement effects. Use this module to seamlessly integrate natural beauty filters into your live streaming or call applications.BaseBeautyState and monitor its reactive data to track beauty parameter changes in real time.useBaseBeautyState to access the current instance.BaseBeautyState reactive properties to trigger UI updates.import { useEffect } from 'react';import { useBaseBeautyState } from 'react-native-tuikit-atomic-x/lib/module/atomic-x/state/BaseBeautyState';// 1. Obtain the instance of BaseBeautyStateconst { smoothLevel, whitenessLevel, ruddyLevel } = useBaseBeautyState();// 2. Monitor real-time changes of smoothLevel, whitenessLevel, and ruddyLevel to drive UI updatesuseEffect(() => {console.log('smoothLevel:', smoothLevel);}, [smoothLevel]);useEffect(() => {console.log('whitenessLevel:', whitenessLevel);}, [whitenessLevel]);useEffect(() => {console.log('ruddyLevel:', ruddyLevel);}, [ruddyLevel]);
[0, 9], with 0 disabling the effect and 9 applying maximum intensity. Map UI values accordingly.setSmoothLevel, setWhitenessLevel, and setRuddyLevel to adjust smoothing, whitening, and rosy tone intensities.import { useBaseBeautyState } from 'react-native-tuikit-atomic-x/lib/module/atomic-x/state/BaseBeautyState';// Obtain the instance of BaseBeautyStateconst { setSmoothLevel, setWhitenessLevel, setRuddyLevel } = useBaseBeautyState();// Set smoothing (parameter range 0-9)const handleSetSmooth = (smoothLevel) => {setSmoothLevel({ smoothLevel });};// Set whitening (parameter range 0-9)const handleSetWhiteness = (whitenessLevel) => {setWhitenessLevel({ whitenessLevel });};// Set rosy tone (parameter range 0-9)const handleSetRuddy = (ruddyLevel) => {setRuddyLevel({ ruddyLevel });};
0 via the provided interfaces.smoothLevel, whitenessLevel, and ruddyLevel to 0 using their respective methods.import { useBaseBeautyState } from 'react-native-tuikit-atomic-x/lib/module/atomic-x/state/BaseBeautyState;// Obtain the instance of BaseBeautyStateconst { setSmoothLevel, setWhitenessLevel, setRuddyLevel } = useBaseBeautyState;// Reset beauty effectsconst handleReset = () => {setSmoothLevel({ smoothLevel: 0 });setWhitenessLevel({ whitenessLevel: 0 });setRuddyLevel({ ruddyLevel: 0 });};
State | Feature Description | API Documentation |
BaseBeautyState | Basic beauty filters: adjust smoothing, whitening, and rosy tone (levels 0–9), reset beauty state, synchronize effect parameters. | |
DeviceState | Audio/Video device control: microphone (on/off/volume), camera (on/off/switch/quality), screen sharing, real-time device status monitoring. |
0 to 9).피드백