TheAlmightyOne Posted September 21, 2022 Share Posted September 21, 2022 HI, I'm loading assets with the new @pixi/assets wrapper and setting default scaleMode before loading doesn't work - baseTextures still have scaleMode set to 1(linear). I manually set loaded texture data like so const defaultScaleMode = { scaleMode: PIXI.SCALE_MODES.NEAREST }; const addAssetWithDefaults = (alias, source) => Assets.add(alias, source, defaultScaleMode); addAssetWithDefaults('player', 'public/images/player_16.png'); Unfortunately that didn't propagate to json Spritesheets's related textures. addAssetWithDefaults('player_idle', 'public/images/player/player_idle_new.json'); Is there a current documentation on how to properly set that up? In fact loading spritesheets from json doesn't quite work, I had to change line:60 in spritesheet.js to this.baseTexture = texture instanceof core.BaseTexture || !this._texture ? texture : this._texture.baseTexture; just so that the Spritesheet can have it's corresponding baseTexture. I literally read all related errors that were posted, but didn't do that trick for handling loading errors I was getting. Happy to provide more info/examples. Quote Link to comment Share on other sites More sharing options...
TheAlmightyOne Posted September 22, 2022 Author Share Posted September 22, 2022 I think I know the issue now. I was likely using @pixi packages with pixi.js imported like so. Still having trouble with the switch all the way from v3 to v6 but it's at least getting somewhere import * as PIXI from 'pixi.js' Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.