cuca Posted March 9 Share Posted March 9 On v8, the scale modes started being strings `'nearest'` and `'linear'`, as of migration guide. I'm not sure how/where do I set it, though. I've attempted to do `texture.scaleMode`, to add is as an object on Sprite constructor (since I didn't find any example anywhere of it). How it is done now? Thanks in advance 😬 import { Application, Assets, Container, Sprite } from "pixi.js"; const app = new Application(); await app.init({ background: "#1099bb", resizeTo: window, }); document.body.appendChild(app.canvas); const container = new Container(); app.stage.addChild(container); const texture = await Assets.load("https://pixijs.com/assets/bunny.png"); const bunny = new Sprite(texture); container.addChild(bunny); Quote Link to comment Share on other sites More sharing options...
emptygamer Posted April 20 Share Posted April 20 (edited) You can set the scale mode it in baseTexture. const texture = await Assets.load("https://pixijs.com/assets/bunny.png"); texture.source.scaleMode = 'nearest'; const bunny = new Sprite(texture); bunny.scale = 10; Edited April 20 by emptygamer Quote Link to comment Share on other sites More sharing options...
squareronin Posted April 20 Share Posted April 20 Looks like you set it on TexturePool now import { TexturePool } from "pixi.js"; TexturePool.textureOptions.scaleMode = 'nearest'; 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.