mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
[ts] Remove null-coalescing operator, esbuld keeps it, but won't work in old browsers.
This commit is contained in:
parent
0dc66e2e5a
commit
9521e9243d
@ -94,21 +94,21 @@ export class SpineCanvas {
|
||||
this.assetManager = new AssetManager(this.context, config.pathPrefix);
|
||||
this.input = new Input(canvas);
|
||||
|
||||
config.app.loadAssets?.(this);
|
||||
config.app.loadAssets(this);
|
||||
|
||||
let loop = () => {
|
||||
requestAnimationFrame(loop);
|
||||
this.time.update();
|
||||
config.app.update?.(this, this.time.delta);
|
||||
config.app.render?.(this);
|
||||
config.app.update(this, this.time.delta);
|
||||
config.app.render(this);
|
||||
}
|
||||
|
||||
let waitForAssets = () => {
|
||||
if (this.assetManager.isLoadingComplete()) {
|
||||
if (this.assetManager.hasErrors()) {
|
||||
config.app.error?.(this, this.assetManager.getErrors());
|
||||
config.app.error(this, this.assetManager.getErrors());
|
||||
} else {
|
||||
config.app.initialize?.(this);
|
||||
config.app.initialize(this);
|
||||
loop();
|
||||
}
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user