@esotericsoftware/spine-pixi-v8 4.2.87 → 4.2.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,22 +7,6 @@ if (typeof window !== "undefined" && window.PIXI) {
7
7
  };
8
8
  }
9
9
 
10
- // spine-pixi-v8/src/assets/atlasLoader.ts
11
- import {
12
- checkExtension,
13
- copySearchParams,
14
- DOMAdapter,
15
- extensions,
16
- ExtensionType,
17
- LoaderParserPriority,
18
- path,
19
- Resolver,
20
- TextureSource
21
- } from "pixi.js";
22
-
23
- // spine-pixi-v8/src/SpineTexture.ts
24
- import { Texture as PixiTexture } from "pixi.js";
25
-
26
10
  // spine-core/src/Utils.ts
27
11
  var IntSet = class {
28
12
  array = new Array();
@@ -11305,7 +11289,21 @@ function getValue(map, property, defaultValue) {
11305
11289
  }
11306
11290
  })();
11307
11291
 
11292
+ // spine-pixi-v8/src/assets/atlasLoader.ts
11293
+ import {
11294
+ checkExtension,
11295
+ copySearchParams,
11296
+ DOMAdapter,
11297
+ ExtensionType,
11298
+ extensions,
11299
+ LoaderParserPriority,
11300
+ path,
11301
+ Resolver,
11302
+ TextureSource
11303
+ } from "pixi.js";
11304
+
11308
11305
  // spine-pixi-v8/src/SpineTexture.ts
11306
+ import { Texture as PixiTexture } from "pixi.js";
11309
11307
  var SpineTexture = class _SpineTexture extends Texture {
11310
11308
  static textureMap = /* @__PURE__ */ new Map();
11311
11309
  static from(texture) {
@@ -11408,6 +11406,7 @@ var spineTextureAtlasLoader = {
11408
11406
  }
11409
11407
  },
11410
11408
  loader: {
11409
+ id: loaderName,
11411
11410
  name: loaderName,
11412
11411
  extension: {
11413
11412
  type: ExtensionType.LoadParser,
@@ -11425,7 +11424,7 @@ var spineTextureAtlasLoader = {
11425
11424
  testParse(asset, options) {
11426
11425
  const isExtensionRight = checkExtension(options.src, ".atlas");
11427
11426
  const isString = typeof asset === "string";
11428
- const isExplicitLoadParserSet = options.loadParser === loaderName;
11427
+ const isExplicitLoadParserSet = options.parser === loaderName || options.loadParser === loaderName;
11429
11428
  return Promise.resolve((isExtensionRight || isExplicitLoadParserSet) && isString);
11430
11429
  },
11431
11430
  unload(atlas) {
@@ -11475,8 +11474,8 @@ extensions.add(spineTextureAtlasLoader);
11475
11474
  import {
11476
11475
  checkExtension as checkExtension2,
11477
11476
  DOMAdapter as DOMAdapter2,
11478
- extensions as extensions2,
11479
11477
  ExtensionType as ExtensionType2,
11478
+ extensions as extensions2,
11480
11479
  LoaderParserPriority as LoaderParserPriority2
11481
11480
  } from "pixi.js";
11482
11481
  var loaderName2 = "spineSkeletonLoader";
@@ -11489,6 +11488,7 @@ function isBuffer(resource) {
11489
11488
  var spineLoaderExtension = {
11490
11489
  extension: ExtensionType2.Asset,
11491
11490
  loader: {
11491
+ id: loaderName2,
11492
11492
  name: loaderName2,
11493
11493
  extension: {
11494
11494
  type: ExtensionType2.LoadParser,
@@ -11506,7 +11506,7 @@ var spineLoaderExtension = {
11506
11506
  testParse(asset, options) {
11507
11507
  const isJsonSpineModel = checkExtension2(options.src, ".json") && isJson(asset);
11508
11508
  const isBinarySpineModel = checkExtension2(options.src, ".skel") && isBuffer(asset);
11509
- const isExplicitLoadParserSet = options.loadParser === loaderName2;
11509
+ const isExplicitLoadParserSet = options.parser === loaderName2 || options.loadParser === loaderName2;
11510
11510
  return Promise.resolve(isJsonSpineModel || isBinarySpineModel || isExplicitLoadParserSet);
11511
11511
  }
11512
11512
  }
@@ -12144,15 +12144,15 @@ var Spine = class _Spine extends ViewContainer {
12144
12144
  }
12145
12145
  this._debug = value;
12146
12146
  }
12147
- _autoUpdate = true;
12147
+ _autoUpdate = false;
12148
12148
  get autoUpdate() {
12149
12149
  return this._autoUpdate;
12150
12150
  }
12151
12151
  /** When `true`, the Spine AnimationState and the Skeleton will be automatically updated using the {@link Ticker.shared} instance. */
12152
12152
  set autoUpdate(value) {
12153
- if (value) {
12153
+ if (value && !this._autoUpdate) {
12154
12154
  Ticker.shared.add(this.internalUpdate, this);
12155
- } else {
12155
+ } else if (!value && this._autoUpdate) {
12156
12156
  Ticker.shared.remove(this.internalUpdate, this);
12157
12157
  }
12158
12158
  this._autoUpdate = value;