Monday, July 25, 2022
HomeGame DevelopmentSplash Display Gadget vs Design facet ratio - Cocos Creator

Splash Display Gadget vs Design facet ratio – Cocos Creator


Presently the Splash Display within the engine makes use of a tough coded displayRatio setting within the construct configuration and I assume that’s attempting to fill the function of what I really need. I want this worth to be dynamic primarily based on the gadget that’s working the sport.

Cell net units are available varied facet ratios that will or could not match the design ratio. We have to evaluate the design facet ratio to the gadget facet ratio and use that as a multiplier on the splash display screen to make sure it suits. Beforehand iPhone had 1.77 facet ratio however newer units appear to be 2.16.

Sometimes designers could be designing for a 1.77 facet ratio, so we would want a ratio modifier primarily based on the gadget it runs on. It might be 1.0 for older units and 1.22 for newer. However fairly than onerous code these values, I need to use the facet ratio of the gadget and the facet ratio of the design decision to calculate it dynamically.

This transformation would in all probability negate the necessity for the onerous coded displayRatio in settings and tbh, I’m not even positive why that exists because it isn’t dynamic.

I’ve examined this modification regionally and it really works for my wants. I’ve a PR Assist gadget vs design facet ratio by mikecoker · Pull Request #12159 · cocos/cocos-engine · GitHub


Okay, we’ll reply you within the pr, please hold watching the pr for the most recent progress.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments