Is it possible to show different images for different viewports?
slaetthult opened this issue · comments
// 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.
Just like in normal pixi sprites, you can change the texture or sprite size.
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