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

This commit is contained in:
Davide Tantillo 2025-07-31 17:10:57 +02:00
parent c7cf509071
commit e2bd01aef0
3 changed files with 97 additions and 9 deletions

View File

@ -28,7 +28,8 @@
"copyfiles": "^2.4.1",
"esbuild": "^0.25.4",
"rimraf": "^3.0.2",
"typescript": "5.6.2"
"typescript": "5.6.2",
"typescript-formatter": "^7.2.2"
}
},
"node_modules/@babel/runtime": {
@ -714,6 +715,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,
@ -904,6 +919,22 @@
"license": "ISC",
"peer": true
},
"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,
@ -1308,6 +1339,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",
@ -1592,6 +1634,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",
@ -1668,6 +1717,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,
@ -1848,6 +1907,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/spawn-command": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz",
@ -1986,6 +2052,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,
@ -2103,6 +2189,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

@ -83,11 +83,12 @@
],
"devDependencies": {
"@types/offscreencanvas": "^2019.6.4",
"alive-server": "^1.3.0",
"concurrently": "^7.6.0",
"copyfiles": "^2.4.1",
"esbuild": "^0.25.4",
"alive-server": "^1.3.0",
"rimraf": "^3.0.2",
"typescript": "5.6.2"
"typescript": "5.6.2",
"typescript-formatter": "^7.2.2"
}
}

View File

@ -297,7 +297,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;
@ -306,7 +305,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);
}