mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 11:01:36 +08:00
[ts][player] Only accept background image bounds if fully specified.
This commit is contained in:
parent
847ec12e3d
commit
c37916a731
@ -11967,7 +11967,7 @@ var spine;
|
||||
this.sceneRenderer.begin();
|
||||
if (this.config.backgroundImage && this.config.backgroundImage.url) {
|
||||
var bgImage = this.assetManager.get(this.config.backgroundImage.url);
|
||||
if (!this.config.backgroundImage.x) {
|
||||
if (!(this.config.backgroundImage.hasOwnProperty("x") && this.config.backgroundImage.hasOwnProperty("y") && this.config.backgroundImage.hasOwnProperty("width") && this.config.backgroundImage.hasOwnProperty("height"))) {
|
||||
this.sceneRenderer.drawTexture(bgImage, viewport.x, viewport.y, viewport.width, viewport.height);
|
||||
}
|
||||
else {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -11291,7 +11291,7 @@ var spine;
|
||||
this.sceneRenderer.begin();
|
||||
if (this.config.backgroundImage && this.config.backgroundImage.url) {
|
||||
var bgImage = this.assetManager.get(this.config.backgroundImage.url);
|
||||
if (!this.config.backgroundImage.x) {
|
||||
if (!(this.config.backgroundImage.hasOwnProperty("x") && this.config.backgroundImage.hasOwnProperty("y") && this.config.backgroundImage.hasOwnProperty("width") && this.config.backgroundImage.hasOwnProperty("height"))) {
|
||||
this.sceneRenderer.drawTexture(bgImage, viewport.x, viewport.y, viewport.width, viewport.height);
|
||||
}
|
||||
else {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -794,7 +794,7 @@ module spine {
|
||||
// Draw background image if given
|
||||
if (this.config.backgroundImage && this.config.backgroundImage.url) {
|
||||
let bgImage = this.assetManager.get(this.config.backgroundImage.url);
|
||||
if (!this.config.backgroundImage.x) {
|
||||
if (!(this.config.backgroundImage.hasOwnProperty("x") && this.config.backgroundImage.hasOwnProperty("y") && this.config.backgroundImage.hasOwnProperty("width") && this.config.backgroundImage.hasOwnProperty("height"))) {
|
||||
this.sceneRenderer.drawTexture(bgImage, viewport.x, viewport.y, viewport.width, viewport.height);
|
||||
} else {
|
||||
this.sceneRenderer.drawTexture(bgImage, this.config.backgroundImage.x, this.config.backgroundImage.y, this.config.backgroundImage.width, this.config.backgroundImage.height);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user