Jump to content
Search Community

Pixi Plugin handle size of image

TELLO test
Moderator Tag

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...