跳到主要内容

contextReset 图层上下文方法 - 重置

contextReset

类型: MethodDeclaration

所属类: AnimationPlayer

定义位置: animation.ts

描述

图层上下文方法 - 重置

参数

参数名类型描述默认值
thisAnimationFrameContext--

返回值

类型: void

源代码

位置: 第 1063 行

private static contextReset(this: AnimationFrameContext): void {
const parent = this.parent
const matrix = this.matrix
if (parent !== null) {
// 从父级图层继承属性
matrix.set(parent.matrix)
this.opacity = parent.opacity
} else {
// 没有父级图层的情况
matrix.set(AnimationPlayer.matrix)
this.opacity = this.animation.opacity
}
this.frame = null
}

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