跳到主要内容

setOpacity 设置动画不透明度

setOpacity

类型: MethodDeclaration

所属类: Actor

定义位置: actor.ts

描述

设置动画不透明度

参数 opacity: 不透明度[0-1]

参数 easingId: 过渡曲线ID

参数 duration: 持续时间(毫秒)

参数

参数名类型描述默认值
opacitynumber--
easingIdstring-''
durationnumber-n0

返回值

类型: void

源代码

位置: 第 868 行

public setOpacity(opacity: number, easingId: string = '', duration: number = 0): void {
this.animation?.setOpacity('actor-opacity', this.updaters, opacity, easingId, duration)
}

文档生成时间:2025/7/7 12:07:06