FaceMakeup
Represents a face makeup component that handles facial makeup rendering with customizable properties such as texture, opacity, and color.
| Type | Name | Interface Description |
|---|---|---|
| Variables | color: Color | • Function: Gets the base color applied to the face makeup component |
| Variables | intensity: number | • Function: Gets the intensity level of the face makeup component |
| Variables | makeupTexture: Texture | null | • Function: Gets the main texture applied to the face makeup component |
| Variables | opacityEnabled: boolean | • Function: Gets whether the opacity effect is enabled for the face makeup component |
| Variables | opacityTexture: Texture | null | • Function: Gets the texture used for opacity control in the face makeup component |
| Functions | constructor() | |
| Functions | setMaterialProperty(key: string, value: number | Vector4f | Matrix4x4f | Texture): void | • Function: Sets a shader uniform on all face indexes for this makeup component. The Parameters • • |
| Functions | setMaterialPropertyByIndex(key: string, face: number, value: number): void | • Function: Sets a float uniform on a single face index. Unlike which applies to all faces, this targets one tracked face slot. The Parameters • • • |
Examples
constructor()
let obj = new APJS.FaceMakeup();
setMaterialProperty(key: string, value: number | Vector4f | Matrix4x4f | Texture): void
comp.setMaterialProperty("_Intensity", 0.8);
comp.setMaterialProperty("_BaseColor", new Vector4f(1, 0, 0, 1));
comp.setMaterialProperty("_BaseTexture", myTexture);
setMaterialPropertyByIndex(key: string, face: number, value: number): void
comp.setMaterialPropertyByIndex("_Intensity", 1, 1.0);
comp.setMaterialPropertyByIndex("_Intensity", 1, 0.8);
comp.setMaterialPropertyByIndex("_Intensity", 2, 0.5);
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use FaceMakeup here
}
onUpdate(deltaTime: number) {
}
}