You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,8 +34,9 @@
34
34
- Automatic template background
35
35
- Sets up the size the game so that it is scaled only when absolutely necessary
36
36
- Refer to src/utils/utils.ts for an explanation on the background_template and the sizing/scaling style
37
+
- Landscape and Portrait support
37
38
38
-
### TODO:
39
+
### TODO (in no particular order):
39
40
40
41
- Clean up generateAssetsClass.js
41
42
- Get Custom/Local Web Fonts hashed by Webpack (to avoid cache issues)
@@ -214,7 +215,9 @@ Run the following specifying some or all of the options;
214
215
215
216
**The '--' after setupGameSize is not a mistake; it is required to pass arguments along to the script.**
216
217
217
-
You can either provide the width **and** height (defaults 800 and 500 respectively) and as long as they result in an aspect ratio of what's set in the script or by --aspect-ratio (default 1.6 or 16:10), or you can provide the width **or** height and the one you didn't provide will be calculated for you.
218
+
You can either provide the width **and** height (defaults 800 and 500 respectively) and as long as they result in an aspect ratio of what's set in the script or by --aspect-ratio, or you can provide the width **or** height and the one you didn't provide will be calculated for you using the aspect ratio of what's set in the script or by --aspect-ratio.
219
+
220
+
Provide --aspect-ratio to change the desired aspect ratio (default 1.6 or 16:10). The script checks to make sure the width and height match the aspect ratio so you get warned early about an incorrect dimension (maximum precision of 3 decimal places).
218
221
219
222
Providing --scale-mode will set this.game.scale.scaleMode to the corresponding Phaser.ScaleManager.SCALE_MODE (default USER_SCALE).
throw'Base width and height must result in a '+aspectRatio+' aspect ratio (width / height).\nYou only need to provide either width or height and the other will be calculated for you.';
70
81
}
71
82
83
+
variPhone4Resolution={
84
+
width: 960,
85
+
height: 640
86
+
};
87
+
88
+
variPhone5Resolution={
89
+
width: 1136,
90
+
height: 640
91
+
}
92
+
93
+
variPadResolution={
94
+
width: 1024,
95
+
height: 768
96
+
}
97
+
72
98
// Calculated based of the long and narrow (aspect ratio wise) iOS device, the iPhone 5 (1136 x 640)
// Just to give some explanation as to the numbers and colors in the included background;
41
41
// The GREEN is the safe area and will be displayed fully on any device and is based on 16:10 aspect ratio, build your actual gameplay here
42
42
// The YELLOW is the extra area that will be visible on devices with a 3:2 aspect ratio (iPhone 4S and below)
43
-
// The BLUE is the extra area that will be visible on devices with a 4:3 aspect ratio (iPads)
44
-
// The RED is the extra area that will be visible on devices with a 16:9 aspect ratio (iPhone 5 and above) (this is probably the most common ratio overall...)
43
+
// The RED is the extra area that will be visible on devices with a 4:3 aspect ratio (iPads)
44
+
// The BLUE is the extra area that will be visible on devices with a 16:9 aspect ratio (iPhone 5 and above) (this is probably the most common ratio overall...)
45
45
// The GREY area will most likely never be seen, unless some device has a really odd aspect ratio (and with Android, I wouldn't be surprised if there is a few out there)
// Calculate the max width and max height if not provided; ratios are based off iPad (4:3) and iPhone 5+ (16:9) as the extremes in both width and height
0 commit comments