补充美颜模型和美颜配置
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.yunbao.faceunity.infe
|
||||
|
||||
import com.yunbao.faceunity.entity.AnimationFilterBean
|
||||
import com.yunbao.faceunity.entity.AnimojiBean
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* DESC:
|
||||
* Created on 2020/12/24
|
||||
*
|
||||
*/
|
||||
abstract class AbstractAnimojiDataFactory {
|
||||
|
||||
/* 当前选中动漫贴图下标 */
|
||||
abstract var currentAnimojiIndex: Int
|
||||
|
||||
/* 动漫贴图队列 */
|
||||
abstract val animojis: ArrayList<AnimojiBean>
|
||||
|
||||
/* 当前选中滤镜下标 */
|
||||
abstract var currentFilterIndex: Int
|
||||
|
||||
/* 滤镜队列 */
|
||||
abstract val filters: ArrayList<AnimationFilterBean>
|
||||
|
||||
abstract fun onAnimojiSelected(data: AnimojiBean)
|
||||
|
||||
abstract fun onFilterSelected(data: AnimationFilterBean)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.yunbao.faceunity.infe
|
||||
|
||||
import com.yunbao.faceunity.entity.AvatarBean
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* DESC:
|
||||
* Created on 2021/1/6
|
||||
*
|
||||
*/
|
||||
abstract class AbstractAvatarDataFactory {
|
||||
|
||||
/**
|
||||
* 人物队列
|
||||
*/
|
||||
abstract val members: ArrayList<AvatarBean>
|
||||
|
||||
/**
|
||||
* 默认选中人物下标
|
||||
*/
|
||||
abstract var currentMemberIndex: Int
|
||||
|
||||
/**
|
||||
* true 全身、 false 半身 驱动切换
|
||||
*/
|
||||
abstract var isHumanTrackSceneFull: Boolean
|
||||
|
||||
/**
|
||||
* 当前人物选中
|
||||
* @param bean AvatarBean
|
||||
*/
|
||||
abstract fun onMemberSelected(bean:AvatarBean)
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.yunbao.faceunity.infe
|
||||
|
||||
|
||||
import com.yunbao.faceunity.entity.BgSegGreenBackgroundBean
|
||||
import com.yunbao.faceunity.entity.BgSegGreenBean
|
||||
import com.yunbao.faceunity.entity.BgSegGreenSafeAreaBean
|
||||
import com.yunbao.faceunity.entity.ModelAttributeData
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* DESC:
|
||||
* Created on 2020/12/29
|
||||
*
|
||||
*/
|
||||
abstract class AbstractBgSegGreenDataFactory {
|
||||
|
||||
/* 绿幕抠像项目数据扩展模型 */
|
||||
abstract val modelAttributeRange: HashMap<String, ModelAttributeData>
|
||||
|
||||
/* 绿幕抠像功能列表 */
|
||||
abstract val bgSegGreenActions: ArrayList<BgSegGreenBean>
|
||||
|
||||
/* 绿幕抠图安全区域功能列表*/
|
||||
abstract val bgSegGreenSafeAreas: ArrayList<BgSegGreenSafeAreaBean>
|
||||
|
||||
/* 安全区域下标 */
|
||||
abstract var bgSafeAreaIndex: Int
|
||||
|
||||
/* 刷新安全区域UI */
|
||||
abstract fun updateSafeAreaBeansAndIndex() :Boolean
|
||||
|
||||
/* 绿幕抠像背景列表 */
|
||||
abstract val bgSegGreenBackgrounds: ArrayList<BgSegGreenBackgroundBean>
|
||||
|
||||
/* 绿幕抠像当前背景下标 */
|
||||
abstract var backgroundIndex: Int
|
||||
|
||||
|
||||
/**
|
||||
* 背景图片变更
|
||||
* @param data BgSegGreenBackgroundBean
|
||||
*/
|
||||
abstract fun onBackgroundSelected(data: BgSegGreenBackgroundBean)
|
||||
|
||||
/**
|
||||
* 自定义安全区域
|
||||
*/
|
||||
abstract fun onSafeAreaAdd()
|
||||
|
||||
/**
|
||||
* 安全区域变更
|
||||
* @param data BgSegGreenSafeAreaBean
|
||||
*/
|
||||
abstract fun onSafeAreaSelected(data: BgSegGreenSafeAreaBean?)
|
||||
|
||||
/**
|
||||
* 是否开启安全区域总开关
|
||||
*/
|
||||
abstract fun isUseTemplate():Boolean
|
||||
|
||||
/**
|
||||
* 取色锚点颜色变更
|
||||
* @param array DoubleArray
|
||||
*/
|
||||
abstract fun onColorRGBChanged(array: DoubleArray)
|
||||
|
||||
/**
|
||||
* 绿幕开关
|
||||
* @param enable Boolean
|
||||
*/
|
||||
abstract fun onBgSegGreenEnableChanged(enable: Boolean)
|
||||
|
||||
|
||||
/**
|
||||
* 根据名称标识获取对应的值
|
||||
* @param key String 标识
|
||||
* @return Double 值
|
||||
*/
|
||||
abstract fun getParamIntensity(key: String): Double
|
||||
|
||||
/**
|
||||
* 根据名称标识更新对应的值
|
||||
* @param key String 标识
|
||||
* @return Double 值
|
||||
*/
|
||||
abstract fun updateParamIntensity(key: String, value: Double)
|
||||
|
||||
/**
|
||||
* 是否调用取色器功能
|
||||
*
|
||||
* @param selected
|
||||
* @param color
|
||||
*/
|
||||
abstract fun onColorPickerStateChanged(selected: Boolean, color: Int)
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
package com.yunbao.faceunity.infe;
|
||||
|
||||
|
||||
import com.yunbao.faceunity.entity.FaceBeautyBean;
|
||||
import com.yunbao.faceunity.entity.FaceBeautyFilterBean;
|
||||
import com.yunbao.faceunity.entity.ModelAttributeData;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* DESC:数据构造工厂抽象类
|
||||
* Created on 2021/4/26
|
||||
*/
|
||||
public abstract class AbstractFaceBeautyDataFactory {
|
||||
|
||||
|
||||
/**
|
||||
* 美肤底部菜单数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract ArrayList<FaceBeautyBean> getSkinBeauty();
|
||||
|
||||
|
||||
/**
|
||||
* 美型底部菜单数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract ArrayList<FaceBeautyBean> getShapeBeauty();
|
||||
|
||||
|
||||
/**
|
||||
* 滤镜底部菜单数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract ArrayList<FaceBeautyFilterBean> getBeautyFilters();
|
||||
|
||||
/**
|
||||
* 获取当前滤镜下标
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract int getCurrentFilterIndex();
|
||||
|
||||
/**
|
||||
* 设置当前滤镜下标
|
||||
*
|
||||
* @param currentFilterIndex
|
||||
*/
|
||||
public abstract void setCurrentFilterIndex(int currentFilterIndex);
|
||||
|
||||
|
||||
/**
|
||||
* 美颜项目数据扩展模型
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract HashMap<String, ModelAttributeData> getModelAttributeRange();
|
||||
|
||||
/**
|
||||
* 切换滤镜
|
||||
*
|
||||
* @param name String
|
||||
* @param intensity Double
|
||||
*/
|
||||
public abstract void onFilterSelected(String name, double intensity, int resDes);
|
||||
|
||||
|
||||
/**
|
||||
* 更改滤镜强度
|
||||
*
|
||||
* @param intensity Double
|
||||
*/
|
||||
public abstract void updateFilterIntensity(double intensity);
|
||||
|
||||
/**
|
||||
* 美颜开关
|
||||
*
|
||||
* @param enable Boolean
|
||||
*/
|
||||
public abstract void enableFaceBeauty(boolean enable);
|
||||
|
||||
/**
|
||||
* 获取单项强度
|
||||
*
|
||||
* @param key String
|
||||
* @return Double
|
||||
*/
|
||||
public abstract double getParamIntensity(String key);
|
||||
|
||||
/**
|
||||
* 设置单项强度
|
||||
*
|
||||
* @param key String
|
||||
* @param value Double
|
||||
*/
|
||||
public abstract void updateParamIntensity(String key, double value);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.yunbao.faceunity.infe
|
||||
|
||||
|
||||
import com.yunbao.faceunity.entity.FaceBeautyBean
|
||||
import com.yunbao.faceunity.entity.FaceBeautyFilterBean
|
||||
import com.yunbao.faceunity.entity.FaceBeautyStyleBean
|
||||
import com.yunbao.faceunity.entity.ModelAttributeData
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* DESC:数据构造工厂接口类
|
||||
* Created on 2020/12/23
|
||||
*
|
||||
*/
|
||||
abstract class AbstractFaceBeautyDataFactory {
|
||||
|
||||
/*美肤底部菜单数据*/
|
||||
abstract val skinBeauty: ArrayList<FaceBeautyBean>
|
||||
|
||||
/*美型底部菜单数据*/
|
||||
abstract val shapeBeauty: ArrayList<FaceBeautyBean>
|
||||
|
||||
/*美型脸型子项数据*/
|
||||
abstract val shapeBeautySubItem: ArrayList<FaceBeautyBean>
|
||||
|
||||
/* 滤镜底部菜单数据*/
|
||||
abstract val beautyFilters: ArrayList<FaceBeautyFilterBean>
|
||||
|
||||
/* 风格底部菜单数据*/
|
||||
abstract val beautyStyles: ArrayList<FaceBeautyStyleBean>
|
||||
|
||||
/*系统推荐配置滤镜对应下标*/
|
||||
abstract var currentFilterIndex: Int
|
||||
|
||||
/* 美颜项目数据扩展模型 */
|
||||
abstract val modelAttributeRange: HashMap<String, ModelAttributeData>
|
||||
|
||||
/*系统风格对应下标*/
|
||||
abstract var currentStyleIndex: Int
|
||||
|
||||
/**
|
||||
* 切换滤镜
|
||||
* @param name String
|
||||
* @param intensity Double
|
||||
*/
|
||||
abstract fun onFilterSelected(name: String, intensity: Double, resDes: Int)
|
||||
|
||||
/**
|
||||
* 切换风格
|
||||
* @param name String
|
||||
*/
|
||||
abstract fun onStyleSelected(name: String?)
|
||||
|
||||
/**
|
||||
* 更改滤镜强度
|
||||
* @param intensity Double
|
||||
*/
|
||||
abstract fun updateFilterIntensity(intensity: Double)
|
||||
|
||||
/**
|
||||
* 美颜开关
|
||||
* @param enable Boolean
|
||||
*/
|
||||
abstract fun enableFaceBeauty(enable: Boolean)
|
||||
|
||||
/**
|
||||
* 获取单项强度
|
||||
* @param key String
|
||||
* @return Double
|
||||
*/
|
||||
abstract fun getParamIntensity(key: String): Double
|
||||
|
||||
/**
|
||||
* 获取one hot的脸型
|
||||
*/
|
||||
abstract fun getCurrentOneHotFaceShape(): String
|
||||
|
||||
/**
|
||||
* 设置当前one hot的脸型
|
||||
*/
|
||||
abstract fun setCurrentOneHotFaceShape(faceShape:String)
|
||||
|
||||
/**
|
||||
* 设置当前脸型的UI值
|
||||
*/
|
||||
abstract fun setCurrentFaceShapeUIValue(hashMap:HashMap<String,Double>)
|
||||
|
||||
/**
|
||||
* 获取当前脸型的UI值
|
||||
*/
|
||||
abstract fun getCurrentFaceShapeUIValue() :HashMap<String,Double>
|
||||
|
||||
/**
|
||||
* 设置单项强度
|
||||
* @param key String
|
||||
* @param value Double
|
||||
*/
|
||||
abstract fun updateParamIntensity(key: String, value: Double)
|
||||
|
||||
/**
|
||||
* 将所有效果置空 -> 变成标准值
|
||||
*/
|
||||
abstract fun resetParamIntensity()
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.yunbao.faceunity.infe;
|
||||
|
||||
import com.yunbao.faceunity.entity.LightMakeupBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public abstract class AbstractLightMakeupDataFactory {
|
||||
private int currentLightMakeupIndex;
|
||||
private ArrayList<LightMakeupBean> lightMakeUpBeans;
|
||||
public abstract void onLightMakeupSelected(LightMakeupBean data);
|
||||
public abstract void onLightMakeupIntensityChanged(double intensity);
|
||||
|
||||
public int getCurrentLightMakeupIndex() {
|
||||
return currentLightMakeupIndex;
|
||||
}
|
||||
|
||||
public void setCurrentLightMakeupIndex(int currentLightMakeupIndex) {
|
||||
this.currentLightMakeupIndex = currentLightMakeupIndex;
|
||||
}
|
||||
|
||||
public ArrayList<LightMakeupBean> getLightMakeUpBeans() {
|
||||
return lightMakeUpBeans;
|
||||
}
|
||||
|
||||
public void setLightMakeUpBeans(ArrayList<LightMakeupBean> lightMakeUpBeans) {
|
||||
this.lightMakeUpBeans = lightMakeUpBeans;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.yunbao.faceunity.infe
|
||||
|
||||
import com.yunbao.faceunity.entity.PropCustomBean
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* DESC:贴图道具
|
||||
* Created on 2020/12/23
|
||||
*
|
||||
*/
|
||||
abstract class AbstractPropCustomDataFactory {
|
||||
|
||||
/**
|
||||
* 默认选中道具下标
|
||||
*/
|
||||
abstract var currentPropIndex: Int
|
||||
|
||||
|
||||
/**
|
||||
* 道具队列
|
||||
*/
|
||||
abstract val propCustomBeans: ArrayList<PropCustomBean>
|
||||
|
||||
|
||||
/**
|
||||
* 道具选中
|
||||
* @param bean StickerBean
|
||||
*/
|
||||
abstract fun onItemSelected(bean: PropCustomBean)
|
||||
|
||||
|
||||
/**
|
||||
* 道具选中
|
||||
*/
|
||||
abstract fun onAddPropCustomBeanClick()
|
||||
|
||||
|
||||
companion object {
|
||||
const val TYPE_NONE = -1
|
||||
const val TYPE_ADD = -99
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.yunbao.faceunity.infe;
|
||||
|
||||
import com.yunbao.faceunity.entity.PropBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* DESC:数据构造工厂抽象类
|
||||
* Created on 2021/4/26
|
||||
*/
|
||||
public abstract class AbstractPropDataFactory {
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前选中下标
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract int getCurrentPropIndex();
|
||||
|
||||
/**
|
||||
* 设置当前选中下标
|
||||
*
|
||||
* @param currentPropIndex
|
||||
*/
|
||||
public abstract void setCurrentPropIndex(int currentPropIndex);
|
||||
|
||||
/**
|
||||
* 获取道具队列
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public abstract ArrayList<PropBean> getPropBeans();
|
||||
|
||||
/**
|
||||
* 道具选中
|
||||
*
|
||||
* @param bean StickerBean
|
||||
*/
|
||||
public abstract void onItemSelected(PropBean bean);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.yunbao.faceunity.infe
|
||||
|
||||
import com.yunbao.faceunity.entity.PropBean
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* DESC:贴图道具
|
||||
* Created on 2020/12/23
|
||||
*
|
||||
*/
|
||||
abstract class AbstractPropDataFactory {
|
||||
|
||||
/**
|
||||
* 默认选中道具下标
|
||||
*/
|
||||
abstract var currentPropIndex: Int
|
||||
|
||||
|
||||
/**
|
||||
* 道具队列
|
||||
*/
|
||||
abstract val propBeans: ArrayList<PropBean>
|
||||
|
||||
|
||||
/**
|
||||
* 道具选中
|
||||
* @param bean StickerBean
|
||||
*/
|
||||
abstract fun onItemSelected(bean: PropBean)
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user