@jjlmoya/utils-hardware 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/category/i18n/ru.ts +5 -5
- package/src/category/index.ts +3 -1
- package/src/entries.ts +7 -1
- package/src/index.ts +2 -0
- package/src/pages/[locale]/[slug].astro +28 -12
- package/src/tests/locale_completeness.test.ts +7 -21
- package/src/tests/no_h1_in_components.test.ts +1 -1
- package/src/tests/shared-test-helpers.ts +56 -0
- package/src/tests/tool_exports.test.ts +34 -0
- package/src/tests/tool_validation.test.ts +2 -2
- package/src/tool/batteryHealthEstimator/bibliography.ts +13 -0
- package/src/tool/batteryHealthEstimator/i18n/de.ts +3 -13
- package/src/tool/batteryHealthEstimator/i18n/en.ts +3 -13
- package/src/tool/batteryHealthEstimator/i18n/es.ts +2 -12
- package/src/tool/batteryHealthEstimator/i18n/fr.ts +3 -13
- package/src/tool/batteryHealthEstimator/i18n/id.ts +3 -13
- package/src/tool/batteryHealthEstimator/i18n/it.ts +2 -12
- package/src/tool/batteryHealthEstimator/i18n/ja.ts +2 -12
- package/src/tool/batteryHealthEstimator/i18n/ko.ts +2 -12
- package/src/tool/batteryHealthEstimator/i18n/nl.ts +3 -13
- package/src/tool/batteryHealthEstimator/i18n/pl.ts +3 -13
- package/src/tool/batteryHealthEstimator/i18n/pt.ts +3 -13
- package/src/tool/batteryHealthEstimator/i18n/ru.ts +7 -17
- package/src/tool/batteryHealthEstimator/i18n/sv.ts +3 -13
- package/src/tool/batteryHealthEstimator/i18n/tr.ts +3 -13
- package/src/tool/batteryHealthEstimator/i18n/zh.ts +3 -13
- package/src/tool/batteryHealthEstimator/seo.astro +3 -2
- package/src/tool/colorAccuracyTest/bibliography.astro +14 -0
- package/src/tool/colorAccuracyTest/bibliography.ts +16 -0
- package/src/tool/colorAccuracyTest/color-accuracy-test.css +728 -0
- package/src/tool/colorAccuracyTest/component.astro +157 -0
- package/src/tool/colorAccuracyTest/entry.ts +29 -0
- package/src/tool/colorAccuracyTest/i18n/de.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/en.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/es.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/fr.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/id.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/it.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/ja.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/ko.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/nl.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/pl.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/pt.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/ru.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/sv.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/tr.ts +284 -0
- package/src/tool/colorAccuracyTest/i18n/zh.ts +284 -0
- package/src/tool/colorAccuracyTest/index.ts +9 -0
- package/src/tool/colorAccuracyTest/logic.ts +226 -0
- package/src/tool/colorAccuracyTest/seo.astro +15 -0
- package/src/tool/colorAccuracyTest/ui.ts +27 -0
- package/src/tool/deadPixelTest/bibliography.ts +13 -0
- package/src/tool/deadPixelTest/i18n/de.ts +2 -12
- package/src/tool/deadPixelTest/i18n/en.ts +2 -12
- package/src/tool/deadPixelTest/i18n/es.ts +2 -12
- package/src/tool/deadPixelTest/i18n/fr.ts +2 -12
- package/src/tool/deadPixelTest/i18n/id.ts +2 -12
- package/src/tool/deadPixelTest/i18n/it.ts +2 -12
- package/src/tool/deadPixelTest/i18n/ja.ts +2 -12
- package/src/tool/deadPixelTest/i18n/ko.ts +2 -12
- package/src/tool/deadPixelTest/i18n/nl.ts +2 -12
- package/src/tool/deadPixelTest/i18n/pl.ts +2 -12
- package/src/tool/deadPixelTest/i18n/pt.ts +2 -12
- package/src/tool/deadPixelTest/i18n/ru.ts +2 -12
- package/src/tool/deadPixelTest/i18n/sv.ts +2 -12
- package/src/tool/deadPixelTest/i18n/tr.ts +2 -12
- package/src/tool/deadPixelTest/i18n/zh.ts +2 -12
- package/src/tool/deadPixelTest/seo.astro +3 -2
- package/src/tool/gamepadTest/bibliography.ts +12 -0
- package/src/tool/gamepadTest/i18n/de.ts +2 -12
- package/src/tool/gamepadTest/i18n/en.ts +2 -12
- package/src/tool/gamepadTest/i18n/es.ts +2 -12
- package/src/tool/gamepadTest/i18n/fr.ts +2 -12
- package/src/tool/gamepadTest/i18n/id.ts +2 -12
- package/src/tool/gamepadTest/i18n/it.ts +2 -12
- package/src/tool/gamepadTest/i18n/ja.ts +2 -12
- package/src/tool/gamepadTest/i18n/ko.ts +2 -12
- package/src/tool/gamepadTest/i18n/nl.ts +2 -12
- package/src/tool/gamepadTest/i18n/pl.ts +2 -12
- package/src/tool/gamepadTest/i18n/pt.ts +2 -12
- package/src/tool/gamepadTest/i18n/ru.ts +3 -13
- package/src/tool/gamepadTest/i18n/sv.ts +2 -12
- package/src/tool/gamepadTest/i18n/tr.ts +2 -12
- package/src/tool/gamepadTest/i18n/zh.ts +2 -12
- package/src/tool/gamepadTest/seo.astro +3 -2
- package/src/tool/gamepadVibrationTester/bibliography.ts +13 -0
- package/src/tool/gamepadVibrationTester/i18n/de.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/en.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/es.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/fr.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/id.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/it.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/ja.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/ko.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/nl.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/pl.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/pt.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/ru.ts +5 -15
- package/src/tool/gamepadVibrationTester/i18n/sv.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/tr.ts +2 -12
- package/src/tool/gamepadVibrationTester/i18n/zh.ts +2 -12
- package/src/tool/gamepadVibrationTester/seo.astro +3 -2
- package/src/tool/keyboardTest/bibliography.ts +13 -0
- package/src/tool/keyboardTest/i18n/de.ts +2 -12
- package/src/tool/keyboardTest/i18n/en.ts +2 -12
- package/src/tool/keyboardTest/i18n/es.ts +2 -12
- package/src/tool/keyboardTest/i18n/fr.ts +2 -12
- package/src/tool/keyboardTest/i18n/id.ts +2 -12
- package/src/tool/keyboardTest/i18n/it.ts +2 -12
- package/src/tool/keyboardTest/i18n/ja.ts +2 -12
- package/src/tool/keyboardTest/i18n/ko.ts +2 -12
- package/src/tool/keyboardTest/i18n/nl.ts +2 -12
- package/src/tool/keyboardTest/i18n/pl.ts +2 -12
- package/src/tool/keyboardTest/i18n/pt.ts +2 -12
- package/src/tool/keyboardTest/i18n/ru.ts +2 -12
- package/src/tool/keyboardTest/i18n/sv.ts +2 -12
- package/src/tool/keyboardTest/i18n/tr.ts +2 -12
- package/src/tool/keyboardTest/i18n/zh.ts +2 -12
- package/src/tool/keyboardTest/seo.astro +3 -2
- package/src/tool/mousePollingTest/bibliography.ts +13 -0
- package/src/tool/mousePollingTest/i18n/de.ts +3 -13
- package/src/tool/mousePollingTest/i18n/en.ts +3 -13
- package/src/tool/mousePollingTest/i18n/es.ts +3 -13
- package/src/tool/mousePollingTest/i18n/fr.ts +3 -13
- package/src/tool/mousePollingTest/i18n/id.ts +3 -13
- package/src/tool/mousePollingTest/i18n/it.ts +3 -13
- package/src/tool/mousePollingTest/i18n/ja.ts +3 -13
- package/src/tool/mousePollingTest/i18n/ko.ts +3 -13
- package/src/tool/mousePollingTest/i18n/nl.ts +3 -13
- package/src/tool/mousePollingTest/i18n/pl.ts +3 -13
- package/src/tool/mousePollingTest/i18n/pt.ts +3 -13
- package/src/tool/mousePollingTest/i18n/ru.ts +5 -15
- package/src/tool/mousePollingTest/i18n/sv.ts +3 -13
- package/src/tool/mousePollingTest/i18n/tr.ts +3 -13
- package/src/tool/mousePollingTest/i18n/zh.ts +3 -13
- package/src/tool/mousePollingTest/seo.astro +3 -2
- package/src/tool/refreshRateDetector/bibliography.astro +14 -0
- package/src/tool/refreshRateDetector/bibliography.ts +12 -0
- package/src/tool/refreshRateDetector/component.astro +206 -0
- package/src/tool/refreshRateDetector/entry.ts +29 -0
- package/src/tool/refreshRateDetector/i18n/de.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/en.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/es.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/fr.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/id.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/it.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/ja.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/ko.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/nl.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/pl.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/pt.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/ru.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/sv.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/tr.ts +196 -0
- package/src/tool/refreshRateDetector/i18n/zh.ts +196 -0
- package/src/tool/refreshRateDetector/index.ts +11 -0
- package/src/tool/refreshRateDetector/monitor-refresh-rate-detector.css +342 -0
- package/src/tool/refreshRateDetector/seo.astro +15 -0
- package/src/tool/refreshRateDetector/ui.ts +24 -0
- package/src/tool/toneGenerator/bibliography.ts +13 -0
- package/src/tool/toneGenerator/i18n/de.ts +3 -13
- package/src/tool/toneGenerator/i18n/en.ts +3 -13
- package/src/tool/toneGenerator/i18n/es.ts +2 -12
- package/src/tool/toneGenerator/i18n/fr.ts +3 -13
- package/src/tool/toneGenerator/i18n/id.ts +3 -13
- package/src/tool/toneGenerator/i18n/it.ts +3 -13
- package/src/tool/toneGenerator/i18n/ja.ts +2 -12
- package/src/tool/toneGenerator/i18n/ko.ts +2 -12
- package/src/tool/toneGenerator/i18n/nl.ts +3 -13
- package/src/tool/toneGenerator/i18n/pl.ts +3 -13
- package/src/tool/toneGenerator/i18n/pt.ts +3 -13
- package/src/tool/toneGenerator/i18n/ru.ts +6 -16
- package/src/tool/toneGenerator/i18n/sv.ts +3 -13
- package/src/tool/toneGenerator/i18n/tr.ts +2 -12
- package/src/tool/toneGenerator/i18n/zh.ts +2 -12
- package/src/tool/toneGenerator/seo.astro +3 -2
- package/src/tools.ts +3 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
2
|
import type { ToolLocaleContent } from '../../../types';
|
|
3
3
|
import type { TestRatonUI } from '../ui';
|
|
4
|
+
import { bibliography } from '../bibliography';
|
|
4
5
|
|
|
5
6
|
const slug = 'mouse-polling-rate-test';
|
|
6
7
|
const title = '온라인 마우스 폴링 레이트 테스트';
|
|
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
87
88
|
slug,
|
|
88
89
|
title,
|
|
89
90
|
description,
|
|
90
|
-
faqTitle: '자주 묻는 질문',
|
|
91
91
|
faq: faqData,
|
|
92
|
-
bibliographyTitle: '참조',
|
|
93
|
-
bibliography: [
|
|
94
|
-
{
|
|
95
|
-
name: 'Gamepad Polling Rate — Logitech',
|
|
96
|
-
url: 'https://www.logitechg.com/en-us/innovation/delta-zero.html',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'USB HID Polling Rate — USB Implementers Forum',
|
|
100
|
-
url: 'https://www.usb.org/hid',
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
92
|
howTo: howToData,
|
|
104
93
|
schemas: [faqSchema, howToSchema, appSchema],
|
|
94
|
+
bibliography,
|
|
105
95
|
seo: [
|
|
106
96
|
{ type: 'title', text: '폴링 레이트에 대한 결정적 가이드', level: 2 },
|
|
107
97
|
{
|
|
@@ -111,7 +101,7 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
111
101
|
{ type: 'title', text: '폴링 레이트 단계 및 용도', level: 3 },
|
|
112
102
|
{
|
|
113
103
|
type: 'paragraph',
|
|
114
|
-
html: '<strong>125 Hz</strong>
|
|
104
|
+
html: '<strong>125 Hz</strong> -마우스가 8밀리초마다 보고합니다. 사무용으로는 괜찮지만 144Hz 모니터에서는 끊겨 보일 수 있습니다. <strong>1000 Hz</strong> -게이밍의 표준: 1ms마다 보고합니다. 눈에 띄는 지연 없는 부드러운 움직임을 제공합니다. <strong>8000 Hz</strong> -최첨단 기술(Razer, Logitech). 0.125ms마다 보고하지만 고성능 CPU가 필요합니다.',
|
|
115
105
|
},
|
|
116
106
|
{ type: 'title', text: 'Hz 수치가 왜 변동하나요?', level: 3 },
|
|
117
107
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
2
|
import type { ToolLocaleContent } from '../../../types';
|
|
3
3
|
import type { TestRatonUI } from '../ui';
|
|
4
|
+
import { bibliography } from '../bibliography';
|
|
4
5
|
|
|
5
6
|
const slug = 'muis-polling-rate-test-online';
|
|
6
7
|
const title = 'Online Muis Polling Rate Test';
|
|
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
87
88
|
slug,
|
|
88
89
|
title,
|
|
89
90
|
description,
|
|
90
|
-
faqTitle: 'Veelgestelde Vragen',
|
|
91
91
|
faq: faqData,
|
|
92
|
-
bibliographyTitle: 'Referenties',
|
|
93
|
-
bibliography: [
|
|
94
|
-
{
|
|
95
|
-
name: 'Gamepad Polling Rate — Logitech',
|
|
96
|
-
url: 'https://www.logitechg.com/en-us/innovation/delta-zero.html',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'USB HID Polling Rate — USB Implementers Forum',
|
|
100
|
-
url: 'https://www.usb.org/hid',
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
92
|
howTo: howToData,
|
|
104
93
|
schemas: [faqSchema, howToSchema, appSchema],
|
|
94
|
+
bibliography,
|
|
105
95
|
seo: [
|
|
106
96
|
{ type: 'title', text: 'Definitieve Gids voor Polling Rate', level: 2 },
|
|
107
97
|
{
|
|
@@ -111,7 +101,7 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
111
101
|
{ type: 'title', text: 'Polling Rate Niveaus en hun Gebruik', level: 3 },
|
|
112
102
|
{
|
|
113
103
|
type: 'paragraph',
|
|
114
|
-
html: '<strong>125 Hz</strong>
|
|
104
|
+
html: '<strong>125 Hz</strong> -De muis rapporteert elke 8 milliseconden. Prima voor kantoorgebruik, maar voelt schokkerig aan op 144Hz monitoren. <strong>1000 Hz</strong> -De gouden standaard voor gaming: rapporteert elke 1 ms. Vloeiende beweging zonder merkbare vertraging. <strong>8000 Hz</strong> -Geavanceerde technologie (Razer, Logitech). Rapporteert elke 0,125 ms, maar vereist een krachtige CPU.',
|
|
115
105
|
},
|
|
116
106
|
{ type: 'title', text: 'Waarom fluctueren mijn Hz?', level: 3 },
|
|
117
107
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
2
|
import type { ToolLocaleContent } from '../../../types';
|
|
3
3
|
import type { TestRatonUI } from '../ui';
|
|
4
|
+
import { bibliography } from '../bibliography';
|
|
4
5
|
|
|
5
6
|
const slug = 'test-polling-rate-myszki-online';
|
|
6
7
|
const title = 'Online Test Polling Rate Myszki';
|
|
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
87
88
|
slug,
|
|
88
89
|
title,
|
|
89
90
|
description,
|
|
90
|
-
faqTitle: 'Często Zadawane Pytania',
|
|
91
91
|
faq: faqData,
|
|
92
|
-
bibliographyTitle: 'Referencje',
|
|
93
|
-
bibliography: [
|
|
94
|
-
{
|
|
95
|
-
name: 'Gamepad Polling Rate — Logitech',
|
|
96
|
-
url: 'https://www.logitechg.com/en-us/innovation/delta-zero.html',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'USB HID Polling Rate — USB Implementers Forum',
|
|
100
|
-
url: 'https://www.usb.org/hid',
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
92
|
howTo: howToData,
|
|
104
93
|
schemas: [faqSchema, howToSchema, appSchema],
|
|
94
|
+
bibliography,
|
|
105
95
|
seo: [
|
|
106
96
|
{ type: 'title', text: 'Definitywny Przewodnik po Polling Rate', level: 2 },
|
|
107
97
|
{
|
|
@@ -111,7 +101,7 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
111
101
|
{ type: 'title', text: 'Poziomy Polling Rate i ich zastosowania', level: 3 },
|
|
112
102
|
{
|
|
113
103
|
type: 'paragraph',
|
|
114
|
-
html: '<strong>125 Hz</strong>
|
|
104
|
+
html: '<strong>125 Hz</strong> -Mysz raportuje co 8 milisekund. Dobre do pracy biurowej, ale wydaje się rwane na monitorach 144Hz. <strong>1000 Hz</strong> -Złoty standard gamingowy: raportuje co 1 ms. Płynny ruch bez odczuwalnych opóźnień. <strong>8000 Hz</strong> -Najnowocześniejsza technologia (Razer, Logitech). Raportuje co 0,125 ms, ale wymaga mocnego procesora.',
|
|
115
105
|
},
|
|
116
106
|
{ type: 'title', text: 'Dlaczego moje Hz wahają się?', level: 3 },
|
|
117
107
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
2
|
import type { ToolLocaleContent } from '../../../types';
|
|
3
3
|
import type { TestRatonUI } from '../ui';
|
|
4
|
+
import { bibliography } from '../bibliography';
|
|
4
5
|
|
|
5
6
|
const slug = 'teste-polling-rate-rato-online';
|
|
6
7
|
const title = 'Teste de Polling Rate de Rato Online';
|
|
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
87
88
|
slug,
|
|
88
89
|
title,
|
|
89
90
|
description,
|
|
90
|
-
faqTitle: 'Perguntas Frequentes',
|
|
91
91
|
faq: faqData,
|
|
92
|
-
bibliographyTitle: 'Referências',
|
|
93
|
-
bibliography: [
|
|
94
|
-
{
|
|
95
|
-
name: 'Gamepad Polling Rate — Logitech',
|
|
96
|
-
url: 'https://www.logitechg.com/en-us/innovation/delta-zero.html',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'USB HID Polling Rate — USB Implementers Forum',
|
|
100
|
-
url: 'https://www.usb.org/hid',
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
92
|
howTo: howToData,
|
|
104
93
|
schemas: [faqSchema, howToSchema, appSchema],
|
|
94
|
+
bibliography,
|
|
105
95
|
seo: [
|
|
106
96
|
{ type: 'title', text: 'Guia Definitivo do Polling Rate', level: 2 },
|
|
107
97
|
{
|
|
@@ -111,7 +101,7 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
111
101
|
{ type: 'title', text: 'Níveis de Polling Rate e Seus Usos', level: 3 },
|
|
112
102
|
{
|
|
113
103
|
type: 'paragraph',
|
|
114
|
-
html: '<strong>125 Hz</strong>
|
|
104
|
+
html: '<strong>125 Hz</strong> -O rato comunica a cada 8 milissegundos. Bom para uso de escritório, mas parece tremido em monitores de 144Hz. <strong>1000 Hz</strong> -O padrão de ouro do gaming: comunica a cada 1 ms. Movimento fluido sem atraso percetível. <strong>8000 Hz</strong> -Tecnologia de ponta (Razer, Logitech). Comunica a cada 0,125 ms, mas requer um CPU potente.',
|
|
115
105
|
},
|
|
116
106
|
{ type: 'title', text: 'Porque é que os meus Hz flutuam?', level: 3 },
|
|
117
107
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
2
|
import type { ToolLocaleContent } from '../../../types';
|
|
3
3
|
import type { TestRatonUI } from '../ui';
|
|
4
|
+
import { bibliography } from '../bibliography';
|
|
4
5
|
|
|
5
6
|
const slug = 'test-polling-rate-myshi-online';
|
|
6
7
|
const title = 'Онлайн тест частоты опроса мыши';
|
|
@@ -87,31 +88,20 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
87
88
|
slug,
|
|
88
89
|
title,
|
|
89
90
|
description,
|
|
90
|
-
faqTitle: 'Часто задаваемые вопросы',
|
|
91
91
|
faq: faqData,
|
|
92
|
-
bibliographyTitle: 'Ссылки',
|
|
93
|
-
bibliography: [
|
|
94
|
-
{
|
|
95
|
-
name: 'Gamepad Polling Rate — Logitech',
|
|
96
|
-
url: 'https://www.logitechg.com/en-us/innovation/delta-zero.html',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'USB HID Polling Rate — USB Implementers Forum',
|
|
100
|
-
url: 'https://www.usb.org/hid',
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
92
|
howTo: howToData,
|
|
104
93
|
schemas: [faqSchema, howToSchema, appSchema],
|
|
94
|
+
bibliography,
|
|
105
95
|
seo: [
|
|
106
96
|
{ type: 'title', text: 'Полное руководство по частоте опроса мыши', level: 2 },
|
|
107
97
|
{
|
|
108
98
|
type: 'paragraph',
|
|
109
|
-
html: 'Когда вы физически перемещаете мышь по коврику, это аналоговое движение должно быть преобразовано в цифровые сигналы, которые понимает ваш компьютер. <strong>Polling Rate</strong>
|
|
99
|
+
html: 'Когда вы физически перемещаете мышь по коврику, это аналоговое движение должно быть преобразовано в цифровые сигналы, которые понимает ваш компьютер. <strong>Polling Rate</strong> -это частота, с которой мышь «сообщает» свою позицию ПК. Она измеряется в Герцах (Гц).',
|
|
110
100
|
},
|
|
111
101
|
{ type: 'title', text: 'Уровни частоты опроса и их использование', level: 3 },
|
|
112
102
|
{
|
|
113
103
|
type: 'paragraph',
|
|
114
|
-
html: '<strong>125 Гц</strong>
|
|
104
|
+
html: '<strong>125 Гц</strong> -Мышь отправляет отчет каждые 8 миллисекунд. Подходит для офисного использования, но движения кажутся прерывистыми на мониторах 144 Гц. <strong>1000 Гц</strong> -Золотой стандарт гейминга: отчет каждую 1 мс. Плавное движение без видимых задержек. <strong>8000 Гц</strong> -Новейшие технологии (Razer, Logitech). Отчет каждые 0,125 мс, но требуется мощный процессор.',
|
|
115
105
|
},
|
|
116
106
|
{ type: 'title', text: 'Почему частота Гц колеблется?', level: 3 },
|
|
117
107
|
{
|
|
@@ -121,7 +111,7 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
121
111
|
{ type: 'title', text: 'Polling Rate против DPI: В чем разница', level: 3 },
|
|
122
112
|
{
|
|
123
113
|
type: 'paragraph',
|
|
124
|
-
html: '<strong>DPI (Dots Per Inch)</strong>
|
|
114
|
+
html: '<strong>DPI (Dots Per Inch)</strong> -это чувствительность: сколько пикселей проходит курсор на дюйм физического перемещения. <strong>Гц (Polling Rate)</strong> -это частота обновления: насколько плавно и своевременно сообщается об этом перемещении. Оба параметра независимы и дополняют друг друга.',
|
|
125
115
|
},
|
|
126
116
|
],
|
|
127
117
|
ui: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
2
|
import type { ToolLocaleContent } from '../../../types';
|
|
3
3
|
import type { TestRatonUI } from '../ui';
|
|
4
|
+
import { bibliography } from '../bibliography';
|
|
4
5
|
|
|
5
6
|
const slug = 'mus-polling-rate-test-online';
|
|
6
7
|
const title = 'Online Mus Polling Rate Test';
|
|
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
87
88
|
slug,
|
|
88
89
|
title,
|
|
89
90
|
description,
|
|
90
|
-
faqTitle: 'Vanliga frågor',
|
|
91
91
|
faq: faqData,
|
|
92
|
-
bibliographyTitle: 'Referenser',
|
|
93
|
-
bibliography: [
|
|
94
|
-
{
|
|
95
|
-
name: 'Gamepad Polling Rate — Logitech',
|
|
96
|
-
url: 'https://www.logitechg.com/en-us/innovation/delta-zero.html',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'USB HID Polling Rate — USB Implementers Forum',
|
|
100
|
-
url: 'https://www.usb.org/hid',
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
92
|
howTo: howToData,
|
|
104
93
|
schemas: [faqSchema, howToSchema, appSchema],
|
|
94
|
+
bibliography,
|
|
105
95
|
seo: [
|
|
106
96
|
{ type: 'title', text: 'Den definitiva guiden till Polling Rate', level: 2 },
|
|
107
97
|
{
|
|
@@ -111,7 +101,7 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
111
101
|
{ type: 'title', text: 'Polling Rate-nivåer och deras användning', level: 3 },
|
|
112
102
|
{
|
|
113
103
|
type: 'paragraph',
|
|
114
|
-
html: '<strong>125 Hz</strong>
|
|
104
|
+
html: '<strong>125 Hz</strong> -Musen rapporterar var 8:e millisekund. Okej för kontorsbruk men ser ryckigt ut på 144Hz-monitorer. <strong>1000 Hz</strong> -Den gyllene standarden för gaming: rapporterar varje millisekund (1 ms). Mjuk rörelse utan märkbar fördröjning. <strong>8000 Hz</strong> -Banbrytande teknologi (Razer, Logitech). Rapporterar var 0,125 ms men kräver en kraftfull CPU.',
|
|
115
105
|
},
|
|
116
106
|
{ type: 'title', text: 'Varför fluktuerar mina Hz?', level: 3 },
|
|
117
107
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
2
|
import type { ToolLocaleContent } from '../../../types';
|
|
3
3
|
import type { TestRatonUI } from '../ui';
|
|
4
|
+
import { bibliography } from '../bibliography';
|
|
4
5
|
|
|
5
6
|
const slug = 'fare-polling-hizi-testi-online';
|
|
6
7
|
const title = 'Çevrimiçi Fare Polling Rate Testi';
|
|
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
87
88
|
slug,
|
|
88
89
|
title,
|
|
89
90
|
description,
|
|
90
|
-
faqTitle: 'Sıkça Sorulan Sorular',
|
|
91
91
|
faq: faqData,
|
|
92
|
-
bibliographyTitle: 'Referanslar',
|
|
93
|
-
bibliography: [
|
|
94
|
-
{
|
|
95
|
-
name: 'Gamepad Polling Rate — Logitech',
|
|
96
|
-
url: 'https://www.logitechg.com/en-us/innovation/delta-zero.html',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'USB HID Polling Rate — USB Implementers Forum',
|
|
100
|
-
url: 'https://www.usb.org/hid',
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
92
|
howTo: howToData,
|
|
104
93
|
schemas: [faqSchema, howToSchema, appSchema],
|
|
94
|
+
bibliography,
|
|
105
95
|
seo: [
|
|
106
96
|
{ type: 'title', text: 'Polling Rate Hakkında Kesin Kılavuz', level: 2 },
|
|
107
97
|
{
|
|
@@ -111,7 +101,7 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
111
101
|
{ type: 'title', text: 'Polling Rate Seviyeleri ve Kullanımları', level: 3 },
|
|
112
102
|
{
|
|
113
103
|
type: 'paragraph',
|
|
114
|
-
html: '<strong>125 Hz</strong>
|
|
104
|
+
html: '<strong>125 Hz</strong> -Fare her 8 milisaniyede bir bildirim yapar. Ofis kullanımı için uygundur ancak 144Hz monitörlerde kesik kesik hissettirir. <strong>1000 Hz</strong> -Oyun oynamanın altın standardı: her 1 ms\'de bir bildirim yapar. Algılanabilir bir gecikme olmaksızın akıcı hareket. <strong>8000 Hz</strong> -En son teknoloji (Razer, Logitech). Her 0,125 ms\'de bir bildirim yapar ancak güçlü bir CPU gerektirir.',
|
|
115
105
|
},
|
|
116
106
|
{ type: 'title', text: 'Hz Neden Dalgalanıyor?', level: 3 },
|
|
117
107
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
|
|
2
2
|
import type { ToolLocaleContent } from '../../../types';
|
|
3
3
|
import type { TestRatonUI } from '../ui';
|
|
4
|
+
import { bibliography } from '../bibliography';
|
|
4
5
|
|
|
5
6
|
const slug = 'mouse-polling-rate-test';
|
|
6
7
|
const title = '在线鼠标回报率测试';
|
|
@@ -87,21 +88,10 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
87
88
|
slug,
|
|
88
89
|
title,
|
|
89
90
|
description,
|
|
90
|
-
faqTitle: '常见问题',
|
|
91
91
|
faq: faqData,
|
|
92
|
-
bibliographyTitle: '参考资料',
|
|
93
|
-
bibliography: [
|
|
94
|
-
{
|
|
95
|
-
name: 'Gamepad Polling Rate — Logitech',
|
|
96
|
-
url: 'https://www.logitechg.com/en-us/innovation/delta-zero.html',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'USB HID Polling Rate — USB Implementers Forum',
|
|
100
|
-
url: 'https://www.usb.org/hid',
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
92
|
howTo: howToData,
|
|
104
93
|
schemas: [faqSchema, howToSchema, appSchema],
|
|
94
|
+
bibliography,
|
|
105
95
|
seo: [
|
|
106
96
|
{ type: 'title', text: '鼠标回报率权威指南', level: 2 },
|
|
107
97
|
{
|
|
@@ -111,7 +101,7 @@ export const content: ToolLocaleContent<TestRatonUI> = {
|
|
|
111
101
|
{ type: 'title', text: '回报率等级及其用途', level: 3 },
|
|
112
102
|
{
|
|
113
103
|
type: 'paragraph',
|
|
114
|
-
html: '<strong>125 Hz</strong>
|
|
104
|
+
html: '<strong>125 Hz</strong> -鼠标每 8 毫秒报告一次。适用于办公,但在 144Hz 显示器上会感到卡顿。 <strong>1000 Hz</strong> -游戏黄金标准:每 1 毫秒报告一次。平滑移动,无感知延迟。 <strong>8000 Hz</strong> -尖端技术(Razer, Logitech)。每 0.125 毫秒报告一次,但需要强劲的 CPU。',
|
|
115
105
|
},
|
|
116
106
|
{ type: 'title', text: '为什么我的 Hz 值会波动?', level: 3 },
|
|
117
107
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { SEORenderer } from '@jjlmoya/utils-shared';
|
|
3
|
-
import type { KnownLocale } from '../../types';
|
|
4
3
|
import { testRaton } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
7
|
locale?: KnownLocale;
|
|
@@ -9,6 +9,7 @@ interface Props {
|
|
|
9
9
|
|
|
10
10
|
const { locale = 'es' } = Astro.props;
|
|
11
11
|
const content = await testRaton.i18n[locale]?.();
|
|
12
|
+
if (!content) return null;
|
|
12
13
|
---
|
|
13
14
|
|
|
14
|
-
{content && <SEORenderer content={{ locale, sections: content.seo }} />}
|
|
15
|
+
{content.seo?.length > 0 && <SEORenderer content={{ locale, sections: content.seo }} />}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { Bibliography as SharedBibliography } from '@jjlmoya/utils-shared';
|
|
3
|
+
import type { KnownLocale } from '../../types';
|
|
4
|
+
import { refreshRateDetector } from './index';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'es' } = Astro.props;
|
|
11
|
+
const content = await refreshRateDetector.i18n[locale]?.();
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
{content && content.bibliography.length > 0 && <SharedBibliography links={content.bibliography} />}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BibliographyEntry } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const bibliography: BibliographyEntry[] = [
|
|
4
|
+
{
|
|
5
|
+
name: 'VESA DisplayPort Standard - Monitor Refresh Rates',
|
|
6
|
+
url: 'https://vesa.org/displayport-developer/why-displayport/',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: 'HDMI Specification - Refresh Rate Support',
|
|
10
|
+
url: 'https://silklandtech.com/de/blogs/news/maximum-hdmi-refresh-rate',
|
|
11
|
+
}
|
|
12
|
+
];
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { KnownLocale } from '../../types';
|
|
3
|
+
import type { RefreshRateDetectorUI } from './ui';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
locale?: KnownLocale;
|
|
7
|
+
ui?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { ui } = Astro.props;
|
|
11
|
+
const t = (ui ?? {}) as RefreshRateDetectorUI;
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<div id="rrd-root" class="rrd-wrapper" data-config={JSON.stringify({
|
|
15
|
+
currentHz: t.currentHz,
|
|
16
|
+
averageHz: t.averageHz,
|
|
17
|
+
maxHz: t.maxHz,
|
|
18
|
+
minHz: t.minHz,
|
|
19
|
+
})}>
|
|
20
|
+
<div class="rrd-container">
|
|
21
|
+
<div class="rrd-card">
|
|
22
|
+
<div class="rrd-layout">
|
|
23
|
+
<div class="rrd-left">
|
|
24
|
+
<div class="rrd-metrics">
|
|
25
|
+
<div class="rrd-metric-item">
|
|
26
|
+
<div class="rrd-metric-label">{t.currentHz}</div>
|
|
27
|
+
<div class="rrd-metric-value" id="current-hz">—</div>
|
|
28
|
+
<div class="rrd-metric-unit">Hz</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="rrd-metric-item">
|
|
31
|
+
<div class="rrd-metric-label">{t.averageHz}</div>
|
|
32
|
+
<div class="rrd-metric-value" id="average-hz">—</div>
|
|
33
|
+
<div class="rrd-metric-unit">Hz</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="rrd-metric-item">
|
|
36
|
+
<div class="rrd-metric-label">{t.maxHz}</div>
|
|
37
|
+
<div class="rrd-metric-value" id="max-hz">—</div>
|
|
38
|
+
<div class="rrd-metric-unit">Hz</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="rrd-metric-item">
|
|
41
|
+
<div class="rrd-metric-label">{t.minHz}</div>
|
|
42
|
+
<div class="rrd-metric-value" id="min-hz">—</div>
|
|
43
|
+
<div class="rrd-metric-unit">Hz</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="rrd-mode-selector">
|
|
48
|
+
<button id="mode-fast" class="rrd-mode-btn selected" data-mode="fast" data-duration="3000">
|
|
49
|
+
{t.modeFast}
|
|
50
|
+
</button>
|
|
51
|
+
<button id="mode-stable" class="rrd-mode-btn" data-mode="stable" data-duration="10000">
|
|
52
|
+
{t.modeStable}
|
|
53
|
+
</button>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div class="rrd-right">
|
|
58
|
+
<div class="rrd-monitor">
|
|
59
|
+
<div class="rrd-monitor-bezel">
|
|
60
|
+
<div class="rrd-monitor-screen">
|
|
61
|
+
<div class="rrd-monitor-content">
|
|
62
|
+
<div class="rrd-hz-display" id="hz-display">—</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="rrd-monitor-stand"></div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<link rel="stylesheet" href="./monitor-refresh-rate-detector.css" />
|
|
75
|
+
|
|
76
|
+
<script>
|
|
77
|
+
interface State {
|
|
78
|
+
mode: 'fast' | 'stable';
|
|
79
|
+
duration: number;
|
|
80
|
+
frameTimestamps: number[];
|
|
81
|
+
startTime: number;
|
|
82
|
+
maxHz: number;
|
|
83
|
+
minHz: number;
|
|
84
|
+
averageHz: number;
|
|
85
|
+
currentHz: number;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const state: State = {
|
|
89
|
+
mode: 'fast',
|
|
90
|
+
duration: 3000,
|
|
91
|
+
frameTimestamps: [],
|
|
92
|
+
startTime: 0,
|
|
93
|
+
maxHz: 0,
|
|
94
|
+
minHz: Infinity,
|
|
95
|
+
averageHz: 0,
|
|
96
|
+
currentHz: 0,
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const elements = {
|
|
100
|
+
currentHz: document.getElementById('current-hz'),
|
|
101
|
+
averageHz: document.getElementById('average-hz'),
|
|
102
|
+
maxHz: document.getElementById('max-hz'),
|
|
103
|
+
minHz: document.getElementById('min-hz'),
|
|
104
|
+
hzDisplay: document.getElementById('hz-display'),
|
|
105
|
+
modeFast: document.getElementById('mode-fast'),
|
|
106
|
+
modeStable: document.getElementById('mode-stable'),
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
function getFrameDeltas(timestamps: number[]): number[] {
|
|
110
|
+
const deltas: number[] = [];
|
|
111
|
+
for (let i = 1; i < timestamps.length; i++) {
|
|
112
|
+
const prev = timestamps[i - 1];
|
|
113
|
+
const curr = timestamps[i];
|
|
114
|
+
if (prev !== undefined && curr !== undefined) {
|
|
115
|
+
deltas.push(curr - prev);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return deltas;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function filterOutliers(deltas: number[]): number[] {
|
|
122
|
+
if (deltas.length === 0) return deltas;
|
|
123
|
+
const sorted = [...deltas].sort((a, b) => a - b);
|
|
124
|
+
const q1Index = Math.floor(sorted.length * 0.25);
|
|
125
|
+
const q3Index = Math.floor(sorted.length * 0.75);
|
|
126
|
+
const q1 = sorted[q1Index] ?? 0;
|
|
127
|
+
const q3 = sorted[q3Index] ?? 0;
|
|
128
|
+
const iqr = q3 - q1;
|
|
129
|
+
return deltas.filter(d => d >= q1 - 1.5 * iqr && d <= q3 + 1.5 * iqr);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function calculateHz(timestamps: number[]): number {
|
|
133
|
+
if (timestamps.length < 2) return 0;
|
|
134
|
+
const deltas = getFrameDeltas(timestamps);
|
|
135
|
+
if (deltas.length === 0) return 0;
|
|
136
|
+
const filtered = filterOutliers(deltas);
|
|
137
|
+
if (filtered.length === 0) return 0;
|
|
138
|
+
const avgDelta = filtered.reduce((a, b) => a + b) / filtered.length;
|
|
139
|
+
return avgDelta > 0 ? Math.round(1000 / avgDelta * 10) / 10 : 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function updateMetrics(): void {
|
|
143
|
+
if (state.frameTimestamps.length < 2) return;
|
|
144
|
+
const warmupTime = state.startTime + 500;
|
|
145
|
+
const warmedUpTimestamps = state.frameTimestamps.filter(t => t >= warmupTime);
|
|
146
|
+
if (warmedUpTimestamps.length < 2) return;
|
|
147
|
+
|
|
148
|
+
const recentHz = calculateHz(warmedUpTimestamps.slice(-60));
|
|
149
|
+
state.currentHz = recentHz;
|
|
150
|
+
|
|
151
|
+
const allHz: number[] = [];
|
|
152
|
+
for (let i = 1; i < warmedUpTimestamps.length; i++) {
|
|
153
|
+
const prev = warmedUpTimestamps[i - 1];
|
|
154
|
+
const curr = warmedUpTimestamps[i];
|
|
155
|
+
if (prev !== undefined && curr !== undefined) {
|
|
156
|
+
allHz.push(1000 / (curr - prev));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (allHz.length > 0) {
|
|
161
|
+
state.maxHz = Math.max(...allHz);
|
|
162
|
+
state.minHz = Math.min(...allHz);
|
|
163
|
+
state.averageHz = allHz.reduce((a, b) => a + b) / allHz.length;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
elements.currentHz!.textContent = state.currentHz.toFixed(1);
|
|
167
|
+
elements.averageHz!.textContent = state.averageHz.toFixed(1);
|
|
168
|
+
elements.maxHz!.textContent = state.maxHz.toFixed(1);
|
|
169
|
+
elements.minHz!.textContent = state.minHz.toFixed(1);
|
|
170
|
+
elements.hzDisplay!.textContent = state.currentHz.toFixed(0);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function measureFrame() {
|
|
174
|
+
state.frameTimestamps.push(performance.now());
|
|
175
|
+
updateMetrics();
|
|
176
|
+
requestAnimationFrame(measureFrame);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function restartMeasurement() {
|
|
180
|
+
state.frameTimestamps = [];
|
|
181
|
+
state.startTime = performance.now();
|
|
182
|
+
state.maxHz = 0;
|
|
183
|
+
state.minHz = Infinity;
|
|
184
|
+
state.averageHz = 0;
|
|
185
|
+
state.currentHz = 0;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
elements.modeFast?.addEventListener('click', () => {
|
|
189
|
+
state.mode = 'fast';
|
|
190
|
+
state.duration = 3000;
|
|
191
|
+
elements.modeFast!.classList.add('selected');
|
|
192
|
+
elements.modeStable!.classList.remove('selected');
|
|
193
|
+
restartMeasurement();
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
elements.modeStable?.addEventListener('click', () => {
|
|
197
|
+
state.mode = 'stable';
|
|
198
|
+
state.duration = 10000;
|
|
199
|
+
elements.modeStable!.classList.add('selected');
|
|
200
|
+
elements.modeFast!.classList.remove('selected');
|
|
201
|
+
restartMeasurement();
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
restartMeasurement();
|
|
205
|
+
requestAnimationFrame(measureFrame);
|
|
206
|
+
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { HardwareToolEntry, ToolLocaleContent } from '../../types';
|
|
2
|
+
import type { RefreshRateDetectorUI } from './ui';
|
|
3
|
+
|
|
4
|
+
export type RefreshRateDetectorLocaleContent = ToolLocaleContent<RefreshRateDetectorUI>;
|
|
5
|
+
|
|
6
|
+
export const refreshRateDetector: HardwareToolEntry<RefreshRateDetectorUI> = {
|
|
7
|
+
id: 'monitor-refresh-rate-detector',
|
|
8
|
+
icons: {
|
|
9
|
+
bg: 'mdi:monitor',
|
|
10
|
+
fg: 'mdi:speedometer',
|
|
11
|
+
},
|
|
12
|
+
i18n: {
|
|
13
|
+
en: () => import('./i18n/en').then((m) => m.content),
|
|
14
|
+
es: () => import('./i18n/es').then((m) => m.content),
|
|
15
|
+
fr: () => import('./i18n/fr').then((m) => m.content),
|
|
16
|
+
de: () => import('./i18n/de').then((m) => m.content),
|
|
17
|
+
it: () => import('./i18n/it').then((m) => m.content),
|
|
18
|
+
pt: () => import('./i18n/pt').then((m) => m.content),
|
|
19
|
+
nl: () => import('./i18n/nl').then((m) => m.content),
|
|
20
|
+
pl: () => import('./i18n/pl').then((m) => m.content),
|
|
21
|
+
sv: () => import('./i18n/sv').then((m) => m.content),
|
|
22
|
+
tr: () => import('./i18n/tr').then((m) => m.content),
|
|
23
|
+
ru: () => import('./i18n/ru').then((m) => m.content),
|
|
24
|
+
id: () => import('./i18n/id').then((m) => m.content),
|
|
25
|
+
ja: () => import('./i18n/ja').then((m) => m.content),
|
|
26
|
+
ko: () => import('./i18n/ko').then((m) => m.content),
|
|
27
|
+
zh: () => import('./i18n/zh').then((m) => m.content),
|
|
28
|
+
},
|
|
29
|
+
};
|