Skip to main content

StencilFunction

Stencil function used for comparing stencil values.

TypeNameInterface Description
EnumAlways

• Function: The comparison always passes.

EnumEqual

• Function: The comparison passes if the reference value is equal to the stored stencil value.

EnumGreater

• Function: The comparison passes if the reference value is greater than the stored stencil value.

EnumGreaterOrEqual

• Function: The comparison passes if the reference value is greater than or equal to the stored stencil value.

EnumLess

• Function: The comparison passes if the reference value is less than the stored stencil value.

EnumLessOrEqual

• Function: The comparison passes if the reference value is less than or equal to the stored stencil value.

EnumNever

• Function: The comparison never passes.

EnumNotEqual

• Function: The comparison passes if the reference value is not equal to the stored stencil value.

Examples​

Always​

let value = APJS.StencilFunction.Always;

Equal​

let value = APJS.StencilFunction.Equal;

Greater​

let value = APJS.StencilFunction.Greater;

GreaterOrEqual​

let value = APJS.StencilFunction.GreaterOrEqual;

Less​

let value = APJS.StencilFunction.Less;

LessOrEqual​

let value = APJS.StencilFunction.LessOrEqual;

Never​

let value = APJS.StencilFunction.Never;

NotEqual​

let value = APJS.StencilFunction.NotEqual;

Use Case​

@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use StencilFunction here
}
onUpdate(deltaTime: number) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies