Jump to content

PixelDeviceRatio support


PianoScoreJP
 Share

Recommended Posts

PIXI.autoDetectRenderer supports pixicelDeviceRatio  as resolution parameter.

 

Following code works good in Android Chrome and Opera  but not in Android browser (4.2.2) and Android Firefox

 

var renderer = PIXI.autoDetectRenderer(640,360,{backgroundColor:0xFFFFFF,resolution:window.devicePixelRatio || 1}););

 

Android browser  shows noting(white screen) 

Firefox , browser is clashed.

 

This  works in Android browser also Firefox but image rendered  with poor quality.

 

var renderer = PIXI.autoDetectRenderer(640,360,{backgroundColor:0xFFFFFF});

 

Please see below screenshot.

 

Android Chrome or Opera with resolution setting

post-14442-0-98193800-1431676339_thumb.p

 

without resolution setting.

post-14442-0-05275200-1431676636_thumb.p

 

Is there anyway to show high quality without resolution setting? 

 

screen shot's devicePixcelRatio is 3

 

My goal is fit container to device width when page loaded.

Loading image size is 1920 x 1080;

Link to comment
Share on other sites

I posted my code to github.

 

https://github.com/GoodBoyDigital/pixi.js/issues/1808

 

 

And I have another problem in this code

 

Somtimes , renderer width is larger than I specified in autoDetectRenderer.

And texture is overflowed from may device screen sometimes.

 

How renderer width or heigth determined?

Is it depended on loading image size or devicePixelRatio?

Thank you.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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