mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[ts] Player, added config.frame.
This commit is contained in:
parent
4e1fe97fb3
commit
3b7d419452
@ -140,6 +140,9 @@ module spine {
|
|||||||
/* Optional: Callback when the skeleton could not be loaded or rendered. Default: none */
|
/* Optional: Callback when the skeleton could not be loaded or rendered. Default: none */
|
||||||
error: (player: SpinePlayer, msg: string) => void
|
error: (player: SpinePlayer, msg: string) => void
|
||||||
|
|
||||||
|
/* Optional: Callback at the start of each frame, before the skeleton is posed or drawn. Default: none */
|
||||||
|
frame: (player: SpinePlayer) => void
|
||||||
|
|
||||||
/* Optional: Callback just after the skeleton is posed each frame. Default: none */
|
/* Optional: Callback just after the skeleton is posed each frame. Default: none */
|
||||||
update: (player: SpinePlayer) => void
|
update: (player: SpinePlayer) => void
|
||||||
|
|
||||||
@ -719,6 +722,8 @@ module spine {
|
|||||||
let renderer = this.sceneRenderer;
|
let renderer = this.sceneRenderer;
|
||||||
renderer.resize(webgl.ResizeMode.Expand);
|
renderer.resize(webgl.ResizeMode.Expand);
|
||||||
|
|
||||||
|
if (config.frame) config.frame(this);
|
||||||
|
|
||||||
// Update animation time and pose the skeleton.
|
// Update animation time and pose the skeleton.
|
||||||
if (!this.paused) {
|
if (!this.paused) {
|
||||||
this.time.update();
|
this.time.update();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user