TELLO Posted June 25, 2021 Share Posted June 25, 2021 Hi all, I use the PIXI Plugin for some BCG pictures. How can I change the size of the image? I use it like this... but it means only the wrapper is "responsive". But the picture/image themselves is not smaller. So on small devices not nice... wrapper.width = app.screen.width; wrapper.height = app.screen.height; wrapper.append(app.view); image = PIXI.Sprite.from(bcg); image.anchor.set(0.5); image.x = app.screen.width / 2; image.y = app.screen.height / 2; image.alpha = 0; $(window).resize(function () { image.x = app.screen.width / 2; image.y = app.screen.height / 2; }); I also tried to change as test the size of the picture direct like this: image.width = 10; image.height = 20; // or image.scale.x = 0.5; image.scale.y = 0.5; But no difference. Any help? Link to comment Share on other sites More sharing options...
OSUblake Posted June 25, 2021 Share Posted June 25, 2021 Hi TELLO! It's hard to say what's going on without seeing it, but changing the scale will definitely change the size. Changing the height or width just changes the scale. As you can see here, the PixiPlugin is changing the size of the sprite. See the Pen JjWqMQG by GreenSock (@GreenSock) on CodePen 2 Link to comment Share on other sites More sharing options...
TELLO Posted June 26, 2021 Author Share Posted June 26, 2021 @os0wski Oh I did a big mistake. In your timeline i found it. I forgot my later timeline, where I scale again. So I can set and scale like hell before without result. 🤪 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now