Favivon - Correção

This commit is contained in:
2026-05-30 19:59:39 -03:00
parent 76ddaa815d
commit d7dfd221f0
32859 changed files with 5459654 additions and 404 deletions
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Tim van Scherpenzeel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+117
View File
@@ -0,0 +1,117 @@
# Detect GPU
[![npm version](https://badge.fury.io/js/detect-gpu.svg)](https://badge.fury.io/js/detect-gpu)
[![gzip size](https://img.badgesize.io/https:/unpkg.com/detect-gpu/dist/detect-gpu.esm.js?compression=gzip)](https://unpkg.com/detect-gpu)
[![install size](https://packagephobia.now.sh/badge?p=detect-gpu)](https://packagephobia.now.sh/result?p=detect-gpu)
Classifies GPUs based on their 3D rendering benchmark score allowing the developer to provide sensible default settings for graphically intensive applications. Think of it like a user-agent detection for the GPU but more powerful.
## Demo
[Live demo](https://pmndrs.github.io/detect-gpu/)
## Installation
By default we use the [UNPKG](https://unpkg.com) CDN to host the benchmark data. If you would like to serve the benchmark data yourself download the required benchmarking data from [benchmarks.tar.gz](https://github.com/pmndrs/detect-gpu/raw/master/benchmarks.tar.gz) and serve it from a public directory.
Make sure you have [Node.js](http://nodejs.org/) installed.
```sh
$ npm install detect-gpu
```
## Usage
```ts
import { getGPUTier } from 'detect-gpu';
(async () => {
const gpuTier = await getGPUTier();
// Example output:
// {
// "tier": 1,
// "isMobile": false,
// "type": "BENCHMARK",
// "fps": 21,
// "gpu": "intel iris graphics 6100"
// }
})();
```
`detect-gpu` uses rendering benchmark scores (framerate, normalized by resolution) in order to determine what tier should be assigned to the user's GPU. If no `WebGLContext` can be created, the GPU is blocklisted or the GPU has reported to render on less than `15 fps` `tier: 0` is assigned. One should provide a fallback to a non-WebGL experience.
Based on the reported `fps` the GPU is then classified into either `tier: 1 (>= 15 fps)`, `tier: 2 (>= 30 fps)` or `tier: 3 (>= 60 fps)`. The higher the tier the more graphically intensive workload you can offer to the user.
## API
```ts
getGPUTier({
/**
* URL of directory where benchmark data is hosted.
*
* @default https://unpkg.com/detect-gpu@{version}/dist/benchmarks
*/
benchmarksURL?: string;
/**
* Optionally pass in a WebGL context to avoid creating a temporary one
* internally.
*/
glContext?: WebGLRenderingContext | WebGL2RenderingContext;
/**
* Whether to fail if the system performance is low or if no hardware GPU is
* available.
*
* @default false
*/
failIfMajorPerformanceCaveat?: boolean;
/**
* Framerate per tier for mobile devices.
*
* @defaultValue [0, 15, 30, 60]
*/
mobileTiers?: number[];
/**
* Framerate per tier for desktop devices.
*
* @defaultValue [0, 15, 30, 60]
*/
desktopTiers?: number[];
/**
* Optionally override specific parameters. Used mainly for testing.
*/
override?: {
renderer?: string;
/**
* Override whether device is an iPad.
*/
isIpad?: boolean;
/**
* Override whether device is a mobile device.
*/
isMobile?: boolean;
/**
* Override device screen size.
*/
screenSize?: { width: number; height: number };
/**
* Override how benchmark data is loaded
*/
loadBenchmarks?: (file: string) => Promise<ModelEntry[]>;
};
})
```
## Support
Special care has been taken to make sure all browsers that support `WebGL` are also supported by `detect-gpu` including `IE 11`.
## Changelog
[Changelog](CHANGELOG.md)
## Licence
My work is released under the [MIT license](https://raw.githubusercontent.com/pmndrs/detect-gpu/master/LICENSE).
`detect-gpu` uses both mobile and desktop benchmarking scores from [https://gfxbench.com](https://gfxbench.com).
+226
View File
@@ -0,0 +1,226 @@
[
"5",
[
"qualcomm adreno 540",
"540",
"540 adreno qualcomm",
0,
[
[
1919,
1279,
19
]
]
],
[
"qualcomm adreno 540 gpu",
"540",
"540 adreno gpu qualcomm",
0,
[
[
1919,
1279,
24
]
]
],
[
"qualcomm adreno 618 gpu",
"618",
"618 adreno gpu qualcomm",
0,
[
[
1920,
1080,
20
]
]
],
[
"qualcomm adreno 630 gpu",
"630",
"630 adreno gpu qualcomm",
0,
[
[
1920,
1080,
21
]
]
],
[
"qualcomm adreno 675 gpu",
"675",
"675 adreno gpu qualcomm",
0,
[
[
1920,
1080,
58
]
]
],
[
"qualcomm adreno 680 gpu",
"680",
"680 adreno gpu qualcomm",
0,
[
[
2880,
1920,
24
]
]
],
[
"qualcomm adreno 685 gpu",
"685",
"685 adreno gpu qualcomm",
0,
[
[
1920,
1080,
28
],
[
2560,
1600,
58
]
]
],
[
"qualcomm adreno 690 gpu",
"690",
"690 adreno gpu qualcomm",
0,
[
[
1920,
1080,
60
],
[
1920,
1280,
28
]
]
],
[
"qualcomm adreno 7c+ gen 3",
"7",
"3 7c+ adreno gen qualcomm",
0,
[
[
1920,
1080,
44
]
]
],
[
"qualcomm adreno 8cx gen 3",
"8",
"3 8cx adreno gen qualcomm",
0,
[
[
1920,
1080,
22
],
[
1920,
1200,
60
]
]
],
[
"qualcomm adreno 8cx gen 4",
"8",
"4 8cx adreno gen qualcomm",
0,
[
[
2880,
1800,
60
]
]
],
[
"qualcomm adreno x1-45 gpu",
"1",
"adreno gpu qualcomm x1-45",
0,
[
[
2880,
1800,
58
]
]
],
[
"qualcomm mi pad 5 adreno 640 gpu",
"5",
"5 640 adreno gpu mi pad qualcomm",
0,
[
[
2560,
1600,
34
]
]
],
[
"qualcomm snapdragon x elite - x1e78100 - qualcomm adreno gpu",
"1",
"- adreno elite gpu qualcomm snapdragon x x1e78100",
0,
[
[
2880,
1620,
115
]
]
],
[
"qualcomm snapdragon x elite - x1e80100 - qualcomm adreno gpu",
"1",
"- adreno elite gpu qualcomm snapdragon x x1e80100",
0,
[
[
2496,
1664,
60
]
]
],
[
"qualcomm snapdragon x elite - x1e84100 - qualcomm adreno gpu",
"1",
"- adreno elite gpu qualcomm snapdragon x x1e84100",
0,
[
[
2880,
1800,
60
]
]
]
]
+13421
View File
File diff suppressed because it is too large Load Diff
+241
View File
@@ -0,0 +1,241 @@
[
"5",
[
"apple a14",
"14",
"a14 apple",
0,
[
[
2704,
1756,
120
]
]
],
[
"apple m1",
"1",
"apple m1",
0,
[
[
2880,
1800,
198
]
]
],
[
"apple m1 max",
"1",
"apple m1 max",
0,
[
[
3456,
2234,
556
]
]
],
[
"apple m1 pro",
"1",
"apple m1 pro",
0,
[
[
3024,
1964,
378
]
]
],
[
"apple m1 ultra",
"1",
"apple m1 ultra",
0,
[
[
5120,
2880,
437
]
]
],
[
"apple m2",
"2",
"apple m2",
0,
[
[
2880,
1800,
60
],
[
2940,
1912,
209
]
]
],
[
"apple m2 max",
"2",
"apple m2 max",
0,
[
[
3456,
2234,
120
]
]
],
[
"apple m2 pro",
"2",
"apple m2 pro",
0,
[
[
3024,
1964,
120
],
[
5120,
2880,
60
]
]
],
[
"apple m2 ultra",
"2",
"apple m2 ultra",
0,
[
[
5120,
2880,
60
]
]
],
[
"apple m3",
"3",
"apple m3",
0,
[
[
2940,
1912,
60
],
[
4480,
2520,
60
]
]
],
[
"apple m3 max",
"3",
"apple m3 max",
0,
[
[
3456,
2234,
120
]
]
],
[
"apple m3 pro",
"3",
"apple m3 pro",
0,
[
[
3024,
1964,
120
]
]
],
[
"apple m4",
"4",
"apple m4",
0,
[
[
1920,
1080,
144
]
]
],
[
"apple m4 max",
"4",
"apple m4 max",
0,
[
[
3024,
1964,
120
],
[
3456,
2234,
120
]
]
],
[
"apple m4 pro",
"4",
"apple m4 pro",
0,
[
[
4112,
2658,
120
],
[
5120,
2880,
120
]
]
],
[
"apple paravirtual device",
"",
"apple device paravirtual",
0,
[
[
1024,
768,
30
],
[
2048,
1362,
59
]
]
]
]
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+337
View File
@@ -0,0 +1,337 @@
[
"5",
[
"apple a10 gpu",
"10",
"a10 apple gpu",
0,
[
[
2048,
1536,
41,
"apple ipad (6th gen)"
],
[
2160,
1620,
38,
"apple ipad (10.2-inch) (7th generation)"
]
]
],
[
"apple a10x gpu",
"10",
"a10x apple gpu",
0,
[
[
2048,
1536,
59,
"apple ipad pro (10.5-inch)"
],
[
2224,
1668,
51,
"apple ipad pro (10.5-inch)"
],
[
2732,
2048,
36,
"apple ipad pro (12.9-inch, 2nd gen)"
]
]
],
[
"apple a12 gpu",
"12",
"a12 apple gpu",
0,
[
[
2048,
1536,
60,
"apple ipad mini (2019)"
],
[
2160,
1620,
59,
"apple ipad 8th gen (wifi+cellular)"
],
[
2224,
1668,
58,
"apple ipad air (2019)"
]
]
],
[
"apple a12x gpu",
"12",
"a12x apple gpu",
0,
[
[
2388,
1668,
115,
"apple ipad pro (11-inch)"
],
[
2732,
2048,
60,
"apple ipad pro (12.9-inch) (3rd generation)"
]
]
],
[
"apple a12z gpu",
"12",
"a12z apple gpu",
0,
[
[
2388,
1668,
113,
"apple ipad pro (11-inch) (2rd generation)"
],
[
2732,
2048,
60,
"apple ipad pro (12.9 inch) (4th generation)"
]
]
],
[
"apple a13 gpu",
"13",
"a13 apple gpu",
0,
[
[
2160,
1620,
60,
"apple ipad 9th gen"
]
]
],
[
"apple a14 gpu",
"14",
"a14 apple gpu",
0,
[
[
2360,
1640,
60,
"apple ipad (10th generation)"
],
[
2388,
1668,
52,
"apple ipad air 4th gen (wi-fi only)"
]
]
],
[
"apple a15 gpu",
"15",
"a15 apple gpu",
0,
[
[
2266,
1488,
60,
"apple ipad mini (6th gen)"
],
[
2388,
1668,
60,
"apple ipad mini (6th gen)"
]
]
],
[
"apple a17 pro gpu",
"17",
"a17 apple gpu pro",
0,
[
[
2266,
1488,
60,
"apple ipad mini 7th gen cellular (a17)"
]
]
],
[
"apple a7 gpu",
"7",
"a7 apple gpu",
0,
[
[
2048,
1536,
10,
"apple ipad mini 3"
]
]
],
[
"apple a8 gpu",
"8",
"a8 apple gpu",
0,
[
[
2048,
1536,
16,
"apple ipad mini 4"
]
]
],
[
"apple a8x gpu",
"8",
"a8x apple gpu",
0,
[
[
2048,
1536,
30,
"apple ipad air 2"
]
]
],
[
"apple a9 gpu",
"9",
"a9 apple gpu",
0,
[
[
2048,
1536,
29,
"apple ipad 9.7 (5th gen)"
]
]
],
[
"apple a9x gpu",
"9",
"a9x apple gpu",
0,
[
[
2048,
1536,
40,
"apple ipad pro 9.7"
],
[
2732,
2048,
35,
"apple ipad pro"
]
]
],
[
"apple m1 gpu",
"1",
"apple gpu m1",
0,
[
[
2360,
1640,
60,
"apple ipad air (5th generation)"
],
[
2388,
1668,
120,
"apple ipad pro (11-inch) (3rd generation)"
],
[
2732,
2048,
60,
"apple ipad pro (12.9-inch) (5th generation)"
],
[
2752,
2064,
103,
"apple ipad pro (12.9-inch) (5th generation)"
]
]
],
[
"apple m2 gpu",
"2",
"apple gpu m2",
0,
[
[
2360,
1640,
60,
"apple ipad air 6th gen (m2)"
],
[
2388,
1668,
120,
"apple ipad pro 11 inch (4th gen)"
],
[
2732,
2048,
60,
"apple ipad air 13-inch (m2)"
]
]
],
[
"apple m4 gpu",
"4",
"apple gpu m4",
0,
[
[
2420,
1668,
120,
"apple ipad pro 11-inch (m4)"
],
[
2752,
2064,
120,
"apple ipad pro 12.9 inch 7th gen"
]
]
]
]
+323
View File
@@ -0,0 +1,323 @@
[
"5",
[
"apple a10 gpu",
"10",
"a10 apple gpu",
0,
[
[
1136,
640,
60,
"apple ipod touch (7th gen)"
],
[
1334,
750,
104,
"apple iphone 7"
],
[
1920,
1080,
60,
"apple iphone 7 plus"
],
[
2001,
1125,
59,
"apple iphone x"
]
]
],
[
"apple a11 gpu",
"11",
"a11 apple gpu",
0,
[
[
1334,
750,
64,
"apple iphone 8"
],
[
1920,
1080,
78,
"apple iphone 8 plus"
]
]
],
[
"apple a12 gpu",
"12",
"a12 apple gpu",
0,
[
[
1792,
828,
65,
"apple iphone xr"
],
[
2436,
1125,
60,
"apple iphone xs max"
],
[
2208,
1242,
60,
"apple iphone xs max"
]
]
],
[
"apple a13 gpu",
"13",
"a13 apple gpu",
0,
[
[
1334,
750,
75,
"apple iphone se (2nd gen)"
],
[
1792,
828,
60,
"apple iphone 11"
],
[
2436,
1125,
59,
"apple iphone 11 pro"
],
[
2688,
1242,
70,
"apple iphone 11 pro max"
]
]
],
[
"apple a14 gpu",
"14",
"a14 apple gpu",
0,
[
[
2338,
1080,
61,
"apple iphone 12 mini"
],
[
2436,
1125,
61,
"apple iphone 12"
],
[
2778,
1284,
60,
"apple iphone 12 pro max"
]
]
],
[
"apple a15 gpu",
"15",
"a15 apple gpu",
0,
[
[
1334,
750,
118,
"apple iphone se (2022)"
],
[
2338,
1080,
60,
"apple iphone 13 mini"
],
[
2532,
1170,
60,
"apple iphone 13"
],
[
2778,
1284,
60,
"apple iphone 13 pro max"
]
]
],
[
"apple a16 gpu",
"16",
"a16 apple gpu",
0,
[
[
2532,
1170,
60,
"apple iphone 14 pro"
],
[
2778,
1284,
60,
"apple iphone 14 pro max"
]
]
],
[
"apple a17 pro gpu",
"17",
"a17 apple gpu pro",
0,
[
[
2532,
1170,
60,
"apple iphone 15 pro"
],
[
2778,
1284,
50,
"apple iphone 15 pro max"
]
]
],
[
"apple a18 gpu",
"18",
"a18 apple gpu",
0,
[
[
2532,
1170,
60,
"apple iphone 16 (iphone17,5)"
],
[
2778,
1284,
60,
"apple iphone 16 (iphone17,4)"
],
[
2793,
1290,
60,
"apple iphone 16 (iphone17,4)"
]
]
],
[
"apple a18 pro gpu",
"18",
"a18 apple gpu pro",
0,
[
[
2532,
1170,
60,
"apple iphone 16 (iphone17,1)"
],
[
2778,
1284,
60,
"apple iphone 16 (iphone17,2)"
]
]
],
[
"apple a7 gpu",
"7",
"a7 apple gpu",
0,
[
[
1136,
640,
32,
"apple iphone 5s"
]
]
],
[
"apple a8 gpu",
"8",
"a8 apple gpu",
0,
[
[
1136,
640,
40,
"apple ipod touch 6"
],
[
1334,
750,
36,
"apple iphone 6"
],
[
1920,
1080,
21,
"apple iphone 6 plus"
]
]
],
[
"apple a9 gpu",
"9",
"a9 apple gpu",
0,
[
[
1136,
640,
90,
"apple iphone se"
],
[
1334,
750,
72,
"apple iphone 6s"
],
[
1920,
1080,
42,
"apple iphone 6s plus"
]
]
]
]
+517
View File
@@ -0,0 +1,517 @@
[
"5",
[
"intel intel hd graphics for atom x5",
"5",
"atom for graphics hd intel x5",
0,
[
[
1024,
600,
35,
"amazon aeokn"
],
[
1024,
720,
13,
"arbor venus 8"
],
[
1217,
720,
23,
"gole gole1"
],
[
1280,
736,
27,
"medion p850x"
],
[
1360,
704,
15,
"chuwi hibox hero mini pc"
],
[
1280,
752,
21,
"tetratab casebook 3"
],
[
1280,
759,
28,
"lenovo yoga a12 (yb-q501f)"
],
[
1366,
720,
19,
"nextbook nx16a11264 ares 11 (x5-z8300)"
],
[
1920,
996,
20,
"teclast x16 pro"
],
[
1920,
1008,
12,
"teclast tbook 16 pro"
],
[
1920,
1016,
13,
"teclast x16 plus"
],
[
1920,
1104,
13,
"medion p851x"
],
[
1920,
1116,
13,
"teclast x80 pro (x5-z8350)"
],
[
1920,
1128,
8,
"cube technology i12-y"
],
[
1920,
1133,
9,
"cube technology i1-tfp (x5-z8350)"
],
[
1920,
1134,
11,
"microtech e-tab pro lte"
],
[
1920,
1136,
14,
"cube technology iwork 10 ultimate (i15-t)"
],
[
1920,
1214,
10,
"chuwi cw-hi10 plus (x5-z8350)"
],
[
2048,
1440,
8,
"teclast x98 plus"
],
[
2160,
1368,
10,
"chuwi hi12 (x5-z8350)"
],
[
2048,
1452,
10,
"teclast x98 plus ii"
],
[
2048,
1536,
14,
"xiaomi mi pad 2"
],
[
2560,
1356,
7,
"baofeng a1"
],
[
2560,
1504,
6,
"chuwi hibook pro (z8350)"
],
[
2560,
1518,
11,
"lenovo yt3-x90 yoga tablet 3 pro (x5-z8550)"
]
]
],
[
"intel intel hd graphics for baytrail",
"hdfor",
"baytrail for graphics hd intel",
0,
[
[
1024,
552,
13,
"multilaser intel 7qc"
],
[
1024,
696,
17,
"thundersoft dual os tablet"
],
[
1024,
720,
15,
"airis onepad 785i"
],
[
1184,
720,
18,
"trimble tdc500"
],
[
1280,
736,
12,
"acer a1-840"
],
[
1280,
752,
9,
"imuz mupad win 10.1 ii"
],
[
1366,
720,
13,
"nextbook nxa116qc164"
],
[
1366,
724,
10,
"cube technology i10 remix"
],
[
1440,
1008,
12,
"teclast x89 kindow"
],
[
1920,
1008,
8,
"minix neo z64"
],
[
1920,
1014,
9,
"cube technology i7 cx remix"
],
[
1920,
1032,
11,
"hp slate 17"
],
[
1920,
1104,
5,
"jltd d630"
],
[
1920,
1128,
6,
"intel(r) e1008"
],
[
1920,
1133,
9,
"pipo w3f"
],
[
2048,
1440,
6,
"kruger & matz eagle 975 (km0975)"
],
[
2048,
1448,
6,
"jide e-tab 3g"
],
[
2048,
1464,
6,
"reeder a10ix air"
],
[
2560,
1344,
7,
"lenovo yoga tablet 2 pro-1380"
],
[
2560,
1504,
5,
"teclast x10hd 3g"
]
]
],
[
"intel mesa dri intel bay trail",
"dribay",
"bay dri intel mesa trail",
0,
[
[
1366,
768,
15,
"google chromebook pixel (2015, n2830)"
]
]
],
[
"intel mesa dri intel hd",
"drihd",
"dri hd intel mesa",
0,
[
[
688,
412,
39,
"hp chromebook x360 11 g1 ee"
],
[
960,
568,
36,
"google chromebook pixel (2015, n3450)"
],
[
1024,
561,
28,
"aaeon up-cht01 up board"
],
[
1024,
736,
33,
"google chromebook reef (n3350)"
]
]
],
[
"intel mesa dri intel hd graphics 400",
"400",
"400 dri graphics hd intel mesa",
0,
[
[
688,
412,
41,
"asus c202sa chromebook"
],
[
768,
431,
45,
"hp chromebook 11 g5"
],
[
960,
568,
25,
"acer chromebook r11 (n3050)"
],
[
1366,
768,
19,
"samsung chromebook 3"
],
[
1536,
832,
25,
"google chromebook r11 (n3160)"
],
[
1920,
1080,
17,
"acer chromebook 14"
]
]
],
[
"intel mesa dri intel hd graphics 510",
"510",
"510 dri graphics hd intel mesa",
0,
[
[
690,
378,
53,
"hp chromebook chell"
],
[
688,
412,
60,
"acer chromebook 14 for work"
]
]
],
[
"intel mesa dri intel hd graphics 515",
"515",
"515 dri graphics hd intel mesa",
0,
[
[
1033,
617,
56,
"samsung chromebook pro (m7-6y75, caroline)"
],
[
1536,
1088,
32,
"google chromebook pixel (2015, m3-6y30)"
],
[
1920,
980,
32,
"asus c302 chromebook flip"
],
[
2400,
1504,
22,
"samsung chromebook pro (caroline)"
],
[
3200,
1640,
12,
"google chromebook pixel (2015, 4405y)"
]
]
],
[
"intel mesa dri intel hd graphics 520",
"520",
"520 dri graphics hd intel mesa",
0,
[
[
700,
412,
60,
"acer chromebook 14 for work (i3-6100u)"
]
]
],
[
"intel mesa dri intel hd graphics 5500",
"5500",
"5500 dri graphics hd intel mesa",
0,
[
[
1080,
575,
59,
"google chromebook pixel (2015, i3-5005u)"
],
[
1920,
1000,
30,
"google chromebook pixel (2015, i5-5300u)"
],
[
2560,
1700,
14,
"google chromebook pixel (2015, i5-5200u)"
]
]
],
[
"intel mesa dri intel hd graphics 615",
"615",
"615 dri graphics hd intel mesa",
0,
[
[
1034,
618,
55,
"google soraka (4415y)"
],
[
1200,
720,
34,
"google poppy (4410y, kabylake)"
],
[
2400,
1504,
21,
"google chromebook eve (i5-7y54)"
]
]
],
[
"intel mesa dri intel kabylake gt2",
"2",
"dri gt2 intel kabylake mesa",
0,
[
[
960,
568,
38,
"google chromebook pixel (2015, m3-7y30)"
]
]
]
]
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+81
View File
@@ -0,0 +1,81 @@
[
"5",
[
"nvidia tegra",
"",
"nvidia tegra",
0,
[
[
2048,
1440,
23,
"google nexus 9"
]
]
],
[
"nvidia tegra k1",
"1",
"k1 nvidia tegra",
0,
[
[
1920,
1008,
32,
"nvidia jetson tk1 (pm375, development board)"
],
[
1920,
1032,
12,
"lenovo k1 hd (2014)"
],
[
1920,
1080,
28,
"nvidia tegra gk20a (ardbeg, development board)"
],
[
1920,
1104,
29,
"google project tango"
],
[
2048,
1536,
21,
"xiaomi mi pad"
],
[
3840,
2088,
8,
"lenovo thinkvision 28"
]
]
],
[
"nvidia tegra x1",
"1",
"nvidia tegra x1",
0,
[
[
1920,
1080,
60,
"nvidia shield android tv"
],
[
2560,
1688,
33,
"google pixel c"
]
]
]
]
+499
View File
@@ -0,0 +1,499 @@
[
"5",
[
"powervr rogue g6110",
"6110",
"g6110 powervr rogue",
0,
[
[
1024,
600,
11,
"dasaita mtcd px5 head unit"
],
[
1280,
752,
8,
"visual land prestige prime 10se"
],
[
1366,
720,
7,
"ditecma m1092r"
],
[
1920,
1008,
6,
"vensmile t051 tv box"
],
[
1920,
1016,
5,
"geekbuying geekbox tv box"
],
[
1920,
1032,
4,
"hannspree hsg1351"
],
[
1920,
1080,
5,
"10moons tv box (rogue g6110)"
],
[
1920,
1128,
5,
"teclast p10"
]
]
],
[
"powervr rogue g6200",
"6200",
"g6200 powervr rogue",
0,
[
[
1280,
720,
15,
"infocus m530"
],
[
1280,
736,
12,
"amazon kindle fire hd 8 (5th gen, kfmewi)"
],
[
1280,
752,
12,
"amazon kindle fire hd 10 (5th gen, kftbwi)"
],
[
1280,
800,
9,
"amazon kindle fire hd 7 (4th gen, kfaswi)"
],
[
1794,
1080,
5,
"ubik uno"
],
[
1920,
1080,
6,
"cherry mobile x220 cosmos one plus"
],
[
1920,
1152,
8,
"meizu mx4 (m460, m460a, m461)"
],
[
2392,
1440,
6,
"hasee hl9916004"
],
[
2560,
1440,
6,
"condor allure a100 pgn-607"
]
]
],
[
"powervr rogue g6230",
"6230",
"g6230 powervr rogue",
0,
[
[
1920,
1008,
8,
"rikomagic mk80 tv box (tronsmart draco aw80, fantasy a80)"
],
[
1920,
1016,
7,
"cubietech cubieboard 4 (cc-a80, hansen-a80, development board)"
],
[
2048,
1440,
5,
"teclast p98air"
],
[
2048,
1464,
7,
"actions gs900a (development board)"
]
]
],
[
"powervr rogue g6400",
"6400",
"g6400 powervr rogue",
0,
[
[
1794,
1080,
8,
"lg f490 liger (g6400)"
],
[
1920,
1032,
8,
"renesas lager"
]
]
],
[
"powervr rogue g6430",
"6430",
"g6430 powervr rogue",
0,
[
[
1024,
552,
26,
"asus fonepad 7 (k01f fe171mg)"
],
[
1280,
720,
27,
"asus zenfone 2 (z008 ze550ml)"
],
[
1280,
736,
20,
"asus fonepad 7 (k019 fe375cg)"
],
[
1280,
752,
27,
"asus zenpad 10 (p01t z300cl)"
],
[
1788,
1080,
8,
"lg f490 liger (g6430)"
],
[
1920,
1080,
15,
"asus zenfone zoom (intel z3560, z00xsb zx551ml)"
],
[
1920,
1104,
11,
"asus memo pad 8 ast21 (intel z3580, k015 me581cl)"
],
[
2048,
1440,
11,
"asus zenpad s 8.0 (p01m z580c)"
],
[
2560,
1504,
9,
"dell venue 10 7040"
]
]
],
[
"powervr rogue ge8100",
"8100",
"ge8100 powervr rogue",
0,
[
[
906,
480,
8,
"tinno k600"
],
[
1184,
720,
5,
"mediatek mt6739 (development board, rogue ge8100)"
],
[
1339,
720,
5,
"vodafone vfd 720"
],
[
1344,
720,
6,
"gionee f205"
]
]
],
[
"powervr rogue ge8300",
"8300",
"ge8300 powervr rogue",
0,
[
[
1280,
752,
9,
"acer b3-a40 iconia one 10"
],
[
1208,
800,
8,
"verizon qtaki1"
],
[
1920,
1128,
5,
"acer b3-a40 fhd iconia one 10"
]
]
],
[
"powervr rogue ge8320",
"8320",
"ge8320 powervr rogue",
0,
[
[
1465,
720,
21,
"samsung galaxy a12"
]
]
],
[
"powervr rogue gx6250",
"6250",
"gx6250 powervr rogue",
0,
[
[
688,
412,
16,
"lenovo n23 yoga / flex 11 chromebook"
],
[
1280,
672,
25,
"renesas salvator-x-r8a7796"
],
[
1280,
736,
25,
"mediatek mt8173 (development board)"
],
[
1920,
980,
10,
"google chromebook pixel (2015, rogue gx6250)"
],
[
1920,
1016,
14,
"peloton ruby"
],
[
1920,
1020,
8,
"acer chromebook r13"
],
[
1920,
1032,
13,
"renesas salvator-x-m3"
],
[
1920,
1080,
12,
"xiaomi mibox 3 pro tv box"
],
[
1920,
1128,
10,
"amazon kindle fire hd 10 (2017, kfsuwi)"
],
[
2048,
1536,
7,
"alps jdtab j01"
],
[
2560,
1504,
7,
"onda f109"
]
]
],
[
"powervr rogue gx6650",
"6650",
"gx6650 powervr rogue",
0,
[
[
1280,
672,
52,
"renesas salvator-x"
],
[
1920,
968,
30,
"renesas salvator-x-r8a7795"
],
[
1920,
1032,
24,
"renesas salvator-x (octa core)"
]
]
],
[
"powervr rogue han",
"han",
"han powervr rogue",
0,
[
[
1794,
1080,
6,
"ireadygo w3d"
],
[
1920,
1080,
6,
"changhong x6"
],
[
2392,
1440,
5,
"alcatel one touch d820"
],
[
2560,
1440,
4,
"alcatel 6071y phantom"
]
]
],
[
"powervr rogue hood",
"",
"hood powervr rogue",
0,
[
[
1280,
736,
16,
"dell venue 7 3740"
],
[
1920,
1080,
12,
"lenovo p90"
],
[
1920,
1104,
9,
"dell venue 8 3840"
]
]
],
[
"powervr rogue lando",
"",
"lando powervr rogue",
0,
[
[
1920,
1080,
13,
"spreadtrum sp9861e (development board, rogue lando)"
]
]
],
[
"powervr rogue marlowe",
"",
"marlowe powervr rogue",
0,
[
[
1920,
1080,
39,
"meitu v6 mp1605"
],
[
2560,
1440,
25,
"meizu pro 7 plus"
]
]
]
]
+23
View File
@@ -0,0 +1,23 @@
[
"5",
[
"samsung xclipse 920",
"920",
"920 samsung xclipse",
0,
[
[
2115,
1080,
119,
"samsung galaxy s22 5g (sm-s901b)"
],
[
2808,
1440,
99,
"samsung galaxy s22 ultra (sm-s908b)"
]
]
]
]
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
export {};
+10
View File
@@ -0,0 +1,10 @@
declare const _default: {
input: string;
output: {
dir: string;
format: string;
sourcemap: boolean;
}[];
plugins: import("rollup").Plugin[];
};
export default _default;
+3
View File
@@ -0,0 +1,3 @@
import { RollupOptions } from 'rollup';
declare const _default: RollupOptions[];
export default _default;
+69
View File
@@ -0,0 +1,69 @@
export interface GetGPUTier {
/**
* URL of directory where benchmark data is hosted.
*
* @default https://unpkg.com/detect-gpu@{version}/dist/benchmarks
*/
benchmarksURL?: string;
/**
* Optionally pass in a WebGL context to avoid creating a temporary one
* internally.
*/
glContext?: WebGLRenderingContext | WebGL2RenderingContext;
/**
* Whether to fail if the system performance is low or if no hardware GPU is
* available.
*
* @default false
*/
failIfMajorPerformanceCaveat?: boolean;
/**
* Framerate per tier for mobile devices.
*
* @defaultValue [0, 15, 30, 60]
*/
mobileTiers?: number[];
/**
* Framerate per tier for desktop devices.
*
* @defaultValue [0, 15, 30, 60]
*/
desktopTiers?: number[];
/**
* Optionally override specific parameters. Used mainly for testing.
*/
override?: {
renderer?: string;
/**
* Override whether device is an iPad.
*/
isIpad?: boolean;
/**
* Override whether device is a mobile device.
*/
isMobile?: boolean;
/**
* Override device screen size.
*/
screenSize?: {
width: number;
height: number;
};
/**
* Override how benchmark data is loaded
*/
loadBenchmarks?: (file: string) => Promise<ModelEntry[]>;
};
}
export type TierType = 'SSR' | 'WEBGL_UNSUPPORTED' | 'BLOCKLISTED' | 'FALLBACK' | 'BENCHMARK';
export type TierResult = {
tier: number;
type: TierType;
isMobile?: boolean;
fps?: number;
gpu?: string;
device?: string;
};
export type ModelEntryScreen = [number, number, number, string | undefined];
export type ModelEntry = [string, string, string, 0 | 1, ModelEntryScreen[]];
export declare const getGPUTier: ({ mobileTiers, desktopTiers, override, glContext, failIfMajorPerformanceCaveat, benchmarksURL, }?: GetGPUTier) => Promise<TierResult>;
+1
View File
@@ -0,0 +1 @@
export declare const BLOCKLISTED_GPUS: string[];
+1
View File
@@ -0,0 +1 @@
export declare function cleanRenderer(renderer: string): string;
+1
View File
@@ -0,0 +1 @@
export declare function deobfuscateAppleGPU(gl: WebGLRenderingContext, renderer: string, isMobileTier: boolean): string[];
+1
View File
@@ -0,0 +1 @@
export declare function deobfuscateRenderer(gl: WebGLRenderingContext | WebGL2RenderingContext, renderer: string, isMobileTier: boolean): string[];
+6
View File
@@ -0,0 +1,6 @@
export declare const deviceInfo: {
isIpad: boolean;
isMobile: boolean;
isSafari12: boolean;
isFirefox: boolean;
} | undefined;
+3
View File
@@ -0,0 +1,3 @@
export declare class OutdatedBenchmarksError extends Error {
constructor(message?: string);
}
+1
View File
@@ -0,0 +1 @@
export declare function getGPUVersion(model: string): string;
@@ -0,0 +1,2 @@
export declare function getLevenshteinDistance(left: string, right: string): number;
export declare function tokenizeForLevenshteinDistance(str: string): string;
+1
View File
@@ -0,0 +1 @@
export declare function getWebGLContext(isSafari12?: boolean, failIfMajorPerformanceCaveat?: boolean): WebGLRenderingContext | undefined;
+1
View File
@@ -0,0 +1 @@
export declare const isSSR: boolean;
+1
View File
@@ -0,0 +1 @@
export declare function isDefined<T>(val: T | undefined | null | void): val is T;
+103
View File
@@ -0,0 +1,103 @@
{
"name": "detect-gpu",
"version": "5.0.70",
"description": "Classify GPU's based on their benchmark score in order to provide an adaptive experience.",
"author": "Tim van Scherpenzeel",
"license": "MIT",
"main": "dist/detect-gpu.umd.js",
"module": "dist/detect-gpu.esm.js",
"types": "dist/src/index.d.ts",
"homepage": "https://github.com/pmndrs/detect-gpu#readme",
"bugs": {
"url": "https://github.com/pmndrs/detect-gpu/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/pmndrs/detect-gpu.git"
},
"files": [
"dist"
],
"keywords": [
"gpu",
"detect",
"webgl",
"webgl2",
"three.js",
"babylonjs",
"three",
"babylon",
"3d",
"typescript",
"javascript"
],
"scripts": {
"start": "rollup -c rollup/config.lib.ts -w --configPlugin rollup-plugin-typescript2",
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\" \"test/**/*.test.ts\" \"rollup/**/*.ts\" \"scripts/**/*.ts\" \"scripts/**/*.js\" --fix --cache --cache-location ~/.eslintcache/eslintcache",
"test": "jest --verbose=false",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"test:debug": "node --inspect-brk ./node_modules/jest/bin/jest --runInBand --no-cache --watch",
"prebuild": "rimraf dist",
"build": "rollup -c rollup/config.lib.ts --configPlugin rollup-plugin-typescript2",
"example": "rollup -w -c rollup/config.dev.ts --configPlugin rollup-plugin-typescript2",
"parse-analytics": "node ./scripts/analytics_parser.js",
"update-benchmarks": "rimraf benchmarks && mkdir -p benchmarks && mkdir -p benchmarks-min && ts-node -O '{\"module\":\"commonjs\"}' ./scripts/update_benchmarks.ts && tar -czvf benchmarks.tar.gz benchmarks-min/*.json && rm -rf benchmarks-min"
},
"dependencies": {
"webgl-constants": "^1.1.1"
},
"devDependencies": {
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.1.0",
"@types/jest": "^29.5.3",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"csvtojson": "^2.0.10",
"eslint": "^8.4.1",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"moment": "^2.29.1",
"prettier": "^3.0.1",
"puppeteer": "^13.0.0",
"rimraf": "^5.0.1",
"rollup": "^3.28.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-filesize": "^10.0.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-serve": "^2.0.2",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.31.1",
"ts-jest": "^29.1.1",
"ts-node": "^10.0.0",
"typescript": "^5.1.6"
},
"jest": {
"testEnvironmentOptions": {
"url": "http://localhost"
},
"moduleFileExtensions": [
"js",
"ts"
],
"testMatch": [
"**/test/**/*.test.ts"
],
"testPathIgnorePatterns": [
"<rootDir>/test/data.ts"
],
"preset": "ts-jest",
"transform": {
"^.+\\.tsx?$": [
"ts-jest",
{
"tsconfig": "tsconfig.json"
}
]
}
}
}