Skip to main content

FaceMakeup

Represents a face makeup component that handles facial makeup rendering with customizable properties such as texture, opacity, and color.

TypeNameInterface Description
Variablescolor: Color

Function: Gets the base color applied to the face makeup component

Variablesintensity: number

Function: Gets the intensity level of the face makeup component

VariablesmakeupTexture: Texture | null

Function: Gets the main texture applied to the face makeup component

VariablesopacityEnabled: boolean

Function: Gets whether the opacity effect is enabled for the face makeup component

VariablesopacityTexture: Texture | null

Function: Gets the texture used for opacity control in the face makeup component

Functionsconstructor()

FunctionssetMaterialProperty(key: string, value: number | Vector4f | Matrix4x4f | Texture): void

Function: Sets a shader uniform on all face indexes for this makeup component. The key must match the shader uniform name used by the bound face makeup material. Known shader keys used by this component include: - "_Intensity" (float): overall makeup intensity - "_BaseColor" (Vector4f): RGBA tint color - "_BaseTexture" (Texture): main makeup texture - "_EnableOpacity" (float): 0 or 1, whether opacity mask is enabled - "_OpacityTexture" (Texture): opacity mask texture Silent failure: passing an unrecognized key or a value whose type does not match the shader's uniform type produces no error — the call is simply ignored. No caching: the value is forwarded to the native shader but NOT stored in JS. The dedicated setters (, , , , ) are convenience wrappers around this method with fixed keys — prefer them when available, as they cache values and provide type safety. All faces vs per-face: use to target a single face index.

Parameters

key: - Shader uniform name.

value: - The value to set.

FunctionssetMaterialPropertyByIndex(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 key must match the shader uniform name used by the bound face makeup material. Only supports number (float) values — for vec4/mat4/texture use the dedicated setters or instead.

Parameters

key: - Shader uniform name. Common keys and values are _Intensity, _Opacity

face: - The tracked face index to apply the property to.

value: - Float value to set.

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) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies