[ts][pixi-v7] Removed unnecessary update on autoUpdate warning.

This commit is contained in:
Davide Tantillo 2025-07-31 17:28:34 +02:00
parent cb32efcb28
commit fc6c925954
3 changed files with 97 additions and 9 deletions

View File

@ -29,7 +29,8 @@
"copyfiles": "^2.4.1",
"esbuild": "^0.25.6",
"rimraf": "^6.0.1",
"typescript": "^5.8.3"
"typescript": "^5.8.3",
"typescript-formatter": "^7.2.2"
}
},
"node_modules/@biomejs/biome": {
@ -1421,6 +1422,20 @@
"node": ">=0.1.90"
}
},
"node_modules/commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true,
"license": "MIT"
},
"node_modules/commandpost": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/commandpost/-/commandpost-1.4.0.tgz",
"integrity": "sha512-aE2Y4MTFJ870NuB/+2z1cXBhSBBzRydVVjzhFC4gtenEhpnj15yu0qptWGJsO9YGrcPZ3ezX8AWb1VA391MKpQ==",
"dev": true,
"license": "MIT"
},
"node_modules/concat-map": {
"version": "0.0.1",
"dev": true,
@ -1614,6 +1629,22 @@
"dev": true,
"license": "MIT"
},
"node_modules/editorconfig": {
"version": "0.15.3",
"resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz",
"integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==",
"dev": true,
"license": "MIT",
"dependencies": {
"commander": "^2.19.0",
"lru-cache": "^4.1.5",
"semver": "^5.6.0",
"sigmund": "^1.0.1"
},
"bin": {
"editorconfig": "bin/editorconfig"
}
},
"node_modules/ee-first": {
"version": "1.1.1",
"dev": true,
@ -2063,6 +2094,17 @@
"dev": true,
"license": "MIT"
},
"node_modules/lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"dev": true,
"license": "ISC",
"dependencies": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
}
},
"node_modules/math-intrinsics": {
"version": "1.1.0",
"license": "MIT",
@ -2401,6 +2443,13 @@
"node": ">=0.8.0"
}
},
"node_modules/pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==",
"dev": true,
"license": "ISC"
},
"node_modules/punycode": {
"version": "1.4.1",
"license": "MIT",
@ -2520,6 +2569,16 @@
"dev": true,
"license": "MIT"
},
"node_modules/semver": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"license": "ISC",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/send": {
"version": "0.18.0",
"dev": true,
@ -2723,6 +2782,13 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/sigmund": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
"integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==",
"dev": true,
"license": "ISC"
},
"node_modules/signal-exit": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
@ -2898,6 +2964,26 @@
"node": ">=14.17"
}
},
"node_modules/typescript-formatter": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/typescript-formatter/-/typescript-formatter-7.2.2.tgz",
"integrity": "sha512-V7vfI9XArVhriOTYHPzMU2WUnm5IMdu9X/CPxs8mIMGxmTBFpDABlbkBka64PZJ9/xgQeRpK8KzzAG4MPzxBDQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"commandpost": "^1.0.0",
"editorconfig": "^0.15.0"
},
"bin": {
"tsfmt": "bin/tsfmt"
},
"engines": {
"node": ">= 4.2.0"
},
"peerDependencies": {
"typescript": "^2.1.6 || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"dev": true,
@ -3050,6 +3136,13 @@
"node": ">=10"
}
},
"node_modules/yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==",
"dev": true,
"license": "ISC"
},
"node_modules/yargs": {
"version": "17.7.2",
"dev": true,

View File

@ -84,13 +84,14 @@
"spine-webcomponents"
],
"devDependencies": {
"@biomejs/biome": "^2.1.1",
"@types/offscreencanvas": "^2019.7.3",
"alive-server": "^1.3.0",
"concurrently": "^9.2.0",
"copyfiles": "^2.4.1",
"esbuild": "^0.25.6",
"alive-server": "^1.3.0",
"rimraf": "^6.0.1",
"typescript": "^5.8.3",
"@biomejs/biome": "^2.1.1"
"typescript-formatter": "^7.2.2"
}
}

View File

@ -296,7 +296,6 @@ export class Spine extends Container {
beforeUpdateWorldTransforms: (object: Spine) => void = () => { };
afterUpdateWorldTransforms: (object: Spine) => void = () => { };
private autoUpdateWarned: boolean = false;
private _autoUpdate: boolean = true;
public get autoUpdate (): boolean {
return this._autoUpdate;
@ -305,7 +304,6 @@ export class Spine extends Container {
public set autoUpdate (value: boolean) {
if (value) {
Ticker.shared.add(this.internalUpdate, this);
this.autoUpdateWarned = false;
} else {
Ticker.shared.remove(this.internalUpdate, this);
}
@ -401,10 +399,6 @@ export class Spine extends Container {
/** If {@link Spine.autoUpdate} is `false`, this method allows to update the AnimationState and the Skeleton with the given delta. */
public update (deltaSeconds: number): void {
if (this.autoUpdate && !this.autoUpdateWarned) {
console.warn("You are calling update on a Spine instance that has autoUpdate set to true. This is probably not what you want.");
this.autoUpdateWarned = true;
}
this.internalUpdate(0, deltaSeconds);
}