Skip to content

Commit

Permalink
Use an object in PIXI.Assets.add to remove depreciation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
D8H committed Feb 7, 2025
1 parent 8191d58 commit ef41371
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Extensions/Spine/managers/pixi-spine-atlas-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ namespace gdjs {
? 'use-credentials'
: 'anonymous',
});
PIXI.Assets.add(resource.name, url, { images });
PIXI.Assets.add({alias: resource.name, src: url, data: { images }});
console.log('Loading spine atlas:', resource.name, url, images);
PIXI.Assets.load<pixi_spine.TextureAtlas | string>(resource.name).then(
(atlas) => {
Expand Down
2 changes: 1 addition & 1 deletion Extensions/Spine/managers/pixi-spine-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace gdjs {
? 'use-credentials'
: 'anonymous',
});
PIXI.Assets.add(resource.name, url, { spineAtlas });
PIXI.Assets.add({ alias: resource.name, src: url, data: { spineAtlas }});
const loadedJson = await PIXI.Assets.load(resource.name);

if (loadedJson.spineData) {
Expand Down
2 changes: 1 addition & 1 deletion newIDE/app/src/ObjectsRendering/PixiResourcesLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ export default class PixiResourcesLoader {
? 'use-credentials'
: 'anonymous',
});
PIXI.Assets.add(spineTextureAtlasName, atlasUrl, { images });
PIXI.Assets.add({ alias: spineTextureAtlasName, src: atlasUrl, data: { images }});
console.log(
'added',
spineTextureAtlasName,
Expand Down

0 comments on commit ef41371

Please sign in to comment.