道具贴纸包含:Animoji、AR面具、自定义背景分割、搞笑大头、表情识别、哈哈镜、手势识别、人像分割线、人像分割、道具贴纸、精品贴纸、精品美妆贴纸
道具贴纸特效添加管理通过FURenderKit中PropContainer进行配置
Module | 类名 | 说明 |
core | Animoji | Animoji贴纸 |
core | ARMask | AR面具 |
core | BgSegCustom | 自定义背景分割 |
core | BigHead | 搞笑大头 |
core | ExpressionRecognition | 表情识别 |
core | FaceWarp | 哈哈镜 |
core | GestureRecognition | 手势识别 |
core | HumanOutline | 人物描边 |
core | PortraitSegment | 人像分割 |
core | Sticker | 道具贴纸 |
core | FineSticker | 精品贴纸 |
属性 | 说明 | 默认值 | 备注 |
enable | Animoji开关 | true | true表示开启,false表示关闭 |
enableFaceFollow | 人脸跟随 | true | true表示开启,false表示关闭 |
属性 | 说明 | 默认值 | 备注 |
enable | AR面具开关 | true | true表示开启,false表示关闭 |
属性 | 说明 | 默认值 | 备注 |
enable | 自定义背景分割开关 | true | true表示开启,false表示关闭 |
fun createBgSegment(rgba: ByteArray, width: Int, height: Int)
rgba:图象Buffer width:图象宽 height:图象高
bgSegCustom.createBgSegment(bytes, width, height);
fun removeBgSegment()
bgSegCustom.removeBgSegment();
属性 | 说明 | 默认值 | 备注 |
enable | 搞笑大头开关 | true | true表示开启,false表示关闭 |
属性 | 说明 | 默认值 | 备注 |
enable | 表情识别开关 | true | true表示开启,false表示关闭 |
属性 | 说明 | 默认值 | 备注 |
enable | 哈哈镜开关 | true | true表示开启,false表示关闭 |
属性 | 说明 | 默认值 | 备注 |
enable | 手势识别开关 | true | true表示开启,false表示关闭 |
属性 | 说明 | 默认值 | 备注 |
enable | 人物描边开关 | true | true表示开启,false表示关闭 |
lineGap | 距离 | 3.0 | 描边与人的距离 |
lineSize | 宽度 | 1.0 | 描边宽度 |
lineColor | 颜色 | FUColorRGBData(0.0, 0.0, 255.0) | 描边对应RGB颜色值 |
属性 | 说明 | 默认值 | 备注 |
enable | 人像分割开关 | true | true表示开启,false表示关闭 |
属性 | 说明 | 默认值 | 备注 |
enable | 道具贴纸开关 | true | true表示开启,false表示关闭 |
属性 | 说明 | 默认值 | 备注 |
enable | 精品贴纸开关 | true | true表示开启,false表示关闭 |
isFlipPoints | 前后置点位翻转 | true | true表示开启,false表示关闭,构造赋值,不可变,默认为false |
is3DFlipH | 3D水平翻转 | true | true表示开启,false表示关闭,构造赋值,不可变,默认为false |
isClick | 点击事件 | true表示支持,false表示不支持,构造赋值,不可变,默认为false |
class FineSticker @JvmOverloads constructor(
controlBundle: FUBundleData, val isFlipPoints: Boolean = false,
val is3DFlipH: Boolean = false, val isClick: Boolean = false
)
Boolean isFlipPoints = adapter.contains("2");
Boolean is3DFlipH = adapter.contains("4");
Boolean isClick = adapter.contains("3");
FineSticker sticker=new FineSticker(new FUBundleData(path), isFlipPoints, is3DFlipH, isClick);
fun onClick()
currentProp.onClick();
该贴纸支持含有点击交互,并isClick需要设置为true,