1 | "use strict";
|
2 | var settings = require("@pixi/settings");
|
3 | function maxRecommendedTextures(max) {
|
4 | let allowMax = !0;
|
5 | const navigator = settings.settings.ADAPTER.getNavigator();
|
6 | if (settings.isMobile.tablet || settings.isMobile.phone) {
|
7 | if (settings.isMobile.apple.device) {
|
8 | const match = navigator.userAgent.match(/OS (\d+)_(\d+)?/);
|
9 | match && parseInt(match[1], 10) < 11 && (allowMax = !1);
|
10 | }
|
11 | if (settings.isMobile.android.device) {
|
12 | const match = navigator.userAgent.match(/Android\s([0-9.]*)/);
|
13 | match && parseInt(match[1], 10) < 7 && (allowMax = !1);
|
14 | }
|
15 | }
|
16 | return allowMax ? max : 4;
|
17 | }
|
18 | exports.maxRecommendedTextures = maxRecommendedTextures;
|
19 |
|