跳到主要内容

loadContexts 加载动画图层上下文列表

loadContexts

类型: MethodDeclaration

所属类: AnimationPlayer

定义位置: animation.ts

描述

加载动画图层上下文列表

参数 animation: 动画播放器实例

参数 contexts: 动画图层上下文列表

参数

参数名类型描述默认值
animationAnimationPlayer--
contextsCacheList<AnimationFrameContext>--

返回值

类型: void

源代码

位置: 第 998 行

private static loadContexts(animation: AnimationPlayer, contexts: CacheList<AnimationFrameContext>): void {
contexts.count = 0
if (animation.layers !== null) {
// 如果动画已设置动作,加载所有图层上下文
this._loadContext(animation, animation.layers, null, contexts)
}
}

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