Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to show different images for different viewports? #31

Open
slaetthult opened this issue Oct 22, 2018 · 2 comments
Open

Comments

@slaetthult
Copy link

// Add the background diffuse color
const diffuse = Sprite.fromImage('images/BGTextureTest.jpg');
diffuse.parentGroup = diffuseGroup;

// Add the background normal map
const normals = Sprite.fromImage('images/BGTextureNORM.jpg');
normals.parentGroup = normalGroup;

Is there a possibility to change/overwrite the image for "diffuse" and "normals" when user changes the viewport/ resizes the browser window?
I want to show different images for mobile, tablet and desktop.

@ivanpopelyshev
Copy link
Contributor

Just like in normal pixi sprites, you can change the texture or sprite size.

@ivanpopelyshev
Copy link
Contributor

ivanpopelyshev commented Oct 22, 2018

I warn you that if you have that kind of question about PixiJS, managing this plugin might be a problem, Also, serious modification of examples will require knowledge of pixi-display plugin. Concentrate and prepare for difficulties.

Or it might be easy, for example guy who looked at that plugin for several days made his own shadows plugin #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants