mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 00:30:12 +08:00
[ts][core] Fix SceneRenderer missing checks.
This commit is contained in:
parent
606a5e5a30
commit
f5d1f99974
@ -473,7 +473,7 @@ export class SceneRenderer implements Disposable {
|
||||
canvas.height = h;
|
||||
}
|
||||
|
||||
if (resizeMode === ResizeMode.FitClip) {
|
||||
if (resizeMode === ResizeMode.FitClip && worldWidth !== undefined && worldHeight !== undefined) {
|
||||
let targetRatio = h / w, sourceRatio = worldHeight / worldWidth;
|
||||
let scale = targetRatio > sourceRatio ? w / worldWidth : h / worldHeight;
|
||||
worldWidth *= scale;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user