SpineOptimizeRender2D used for optimized rendering of Spine animations in 2D.

SpineOptimizeRender2D 类用于优化 2D 空间中的 Spine 动画渲染。

层级 (查看完整内容)

属性

bakeData: TSpineBakeData

Bake data for the Spine animation.

Spine 动画的烘焙数据。

currentTime: number = 0

当前播放时间(秒)

renderProxy: IRender

Current render proxy.

当前渲染代理。

renderProxyMap: Map<ERenderProxyType, IRender>

Map of ERenderProxyType to IRender objects.

ERenderProxyType 到 IRender 对象的映射。

spineColor: Color

Color of the Spine object.

Spine 对象的颜色。

state: ESpineRenderState = ESpineRenderState.Stopped

当前渲染状态

trackEntry: TrackEntry = null
_NODE_COMMONMAP_: string[] = ...

访问器

方法

  • 参数

    • animationName: string

      The name of the animation to play.

    • loop: boolean = true

      Whether to loop

    • trackIndex: number = 0

      Track index

    • start: number = 0

      Start time (seconds)

    • end: number = 0

      End time (seconds), 0 means to end

    返回 void

    Play a specific animation.

    播放特定的动画。

  • 参数

    • listeners: {
          complete?: ((entry: any) => void);
          dispose?: ((entry: any) => void);
          end?: ((entry: any) => void);
          event?: ((entry: any, event: any) => void);
          interrupt?: ((entry: any) => void);
          start?: ((entry: any) => void);
      }

      事件监听器对象

      • 可选complete?: ((entry: any) => void)
          • (entry): void
          • 参数

            • entry: any

            返回 void

      • 可选dispose?: ((entry: any) => void)
          • (entry): void
          • 参数

            • entry: any

            返回 void

      • 可选end?: ((entry: any) => void)
          • (entry): void
          • 参数

            • entry: any

            返回 void

      • 可选event?: ((entry: any, event: any) => void)
          • (entry, event): void
          • 参数

            • entry: any
            • event: any

            返回 void

      • 可选interrupt?: ((entry: any) => void)
          • (entry): void
          • 参数

            • entry: any

            返回 void

      • 可选start?: ((entry: any) => void)
          • (entry): void
          • 参数

            • entry: any

            返回 void

    返回 void

    设置动画事件监听器