PageSourceSearch

https://testufo.com/ufos/__mouserate.js?version=202604101302

js testufo.com collected 2026-09-24 18:00:57 UTC 26,891 bytes, 1 lines download raw bytes

1function c(p,q,s){const u=(function(){let w=!![];return function(z,A){const B=w?function(){if(A){const C=A['apply'](z,arguments);return A=null,C;}}:function(){};return w=![],B;};}()),v=u(this,function(){const w=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this,z=w['console']=w['console']||{},A=['log','warn','info','error','exception','table','trace'];for(let B=0x0;B<A['length'];B++){const C=u['constructor']['prototype']['bind'](u),D=A[B],E=z[D]||C;C['__proto__']=u['bind'](u),C['toString']=E['toString']['bind'](E),z[D]=C;}});return v(),((q=d(q))in p?Object['defineProperty'](p,q,{'value':s,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):p[q]=s,p);}function d(a){var b=e(a,'string');return'symbol'==typeof b?b:b+'';}function e(a,b){if('object'!=typeof a||!a)return a;var p=a[Symbol['toPrimitive']];if(void 0x0!==p){var q=p['call'](a,b||'default');if('object'!=typeof q)return q;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return('string'===b?String:Number)(a);}const {UFOModules:f,UFOScreen:g,UFOSettings:h,UFOColor:i,UFOTextBoxStyle:j,UFOTextBox:k,UFOImage:l,ufoLogger:m}=window['UFOModules'],{UFORingBuffer:n}=window['UFOModules'];export default class o extends g{constructor(a){super(a),this['_DEFAULT_TOP_MARGIN']=0.05,this['_MIN_RATE']=0x1,this['_FONT_SIZE_FACTOR_HZ']=0xc,this['_FONT_SIZE_FACTOR']=0x18,this['_MAX_HISTORY']=0x64,this['_backColor']=new i('#000080'),this['_foreColor']=new i('#FFFFFF'),this['_ghostShowVSYNC']=!![],this['_ghostShowFull']=!![],this['_ghostColorVSYNC']=new i('color(rec2020\x203\x203\x200)'),this['_ghostColorFull']=new i('#00A000'),this['_debug']=![],this['_maxEventsQueue']=0x10000,this['_clicked']=![],this['_mouseMoved']=![],this['_mousePosX']=0x0,this['_mousePosY']=0x0,this['_savedMousePosX']=0x0,this['_savedMousePosY']=0x0,this['_sensitivity']=0x1,this['_createRoundingError']=![],this['_lockAxis']=0x0,this['_ufoFont']=new j({'font':'bold\x2024px\x20Arial','color':this['_foreColor'],'autoTextSize':!![],'margin':{'left':0x64,'top':0xa,'right':0x64,'bottom':0x1e}}),this['_ufoFont2']=new j(this['_ufoFont']),this['_ufoLabel']=new k(this,this['_ufoFont']),this['_ufoLabel2']=new k(this,this['_ufoFont2']),this['__resetMouseData']();}['__resetMouseData'](){this['_measured']=![],this['_isMouseMoving']=![],this['_lastStartedMovingTime']=0x0,this['_lastStoppedMovingTime']=0x0,this['_pointerWasLocked']=![],this['_lastMovementSampleTime']=0x0,this['_interval']=-0x1,this['_peakPoll']=0x0,this['_eventsQueue']=new n(this['_maxEventsQueue']),this['_countPoll']=0x0,this['_countReport']=0x0,this['_pendingVSYNC']=![];}['onStart'](){this['onFrameBufferChange']();}['onFrameBufferChange'](){if(this['system']['isFullHDR'](this)){if(this['settings']['isDefault']('ghostcolor-full'))this['settings']['setValue']('ghostcolor-full','color(rec2020\x200\x201\x200)');}}['onSizeChange'](){var a,b,p;this['_displayRect']=this['display']['getBoundingClientRect'](),this['dis
1play']['setPreferredHeight']((a=(b=(p=this['display'])['getScaledScreenHeight'])===null||b===void 0x0?void 0x0:b['call'](p))!==null&&a!==void 0x0?a:-0x1),super['onSizeChange']();}['onClick'](){if(!this['display']['isZoomed']||!this['_clicked']){this['_mousePosX']=this['_savedMousePosX'],this['_mousePosY']=this['_savedMousePosY'];if(this['settings']['getValue']('pointerlock'))this['display']['requestPointerLock']();this['__resetMouseData'](),this['display']['fullScreenEnter']();}else this['display']['exitPointerLock'](),this['display']['fullScreenExit']();return this['_clicked']=!![],!![];}['onDoubleClick'](){return!![];}['onMouseMove']({x:a,y:b,event:p}){var q;if(!p)return;if(!this['display']['isZoomed']){var r,s,t,u,v,w;this['_savedMousePosX']=(r=(s=p['clientX'])!==null&&s!==void 0x0?s:(t=p['touches'][0x0])===null||t===void 0x0?void 0x0:t['clientX'])!==null&&r!==void 0x0?r:0x0,this['_savedMousePosY']=(u=(v=p['clientY'])!==null&&v!==void 0x0?v:(w=p['touches'][0x0])===null||w===void 0x0?void 0x0:w['clientY'])!==null&&u!==void 0x0?u:0x0;return;}p['realTimeStamp']=performance['now'](),this['_pointerWasLocked']=document['pointerLockElement']!==null;let z=(q=p['getCoalescedEvents'])===null||q===void 0x0?void 0x0:q['call'](p);if(!z)z=[p];for(let B=0x0;B<z['length'];B++){this['__updateMouseMovingState'](z[B]);}if(!this['_isMouseMoving'])return;this['_eventsQueue']['pushArray'](z),this['_countPoll']+=z['length'];let A=this['_eventsQueue']['peek']();A['VSYNC']=this['_pendingVSYNC'],this['_pendingVSYNC']=![];if(this['_clicked']==![])return;if(this['_interval']===-0x1)this['_interval']=performance['now']();if(performance['now']()-this['_interval']>=0x5dc){let C=this['_eventsQueue']['peek'](this['_countPoll']-0x1);if(C){let D=A['timeStamp']-C['timeStamp'],E=Math['round'](this['_countPoll']/D*0x3e8);if(this['_peakPoll']<E)this['_peakPoll']=E;}this['_countPoll']=0x0,this['_interval']=performance['now']();}}['__normalizeCursorCoordinates'](a,b){let p=this['_displayRect'];a=a+p['left'],b=b+p['top'];let q=this['width']/p['width'],r=this['height']/p['height'],s=Math['round']((a-p['left'])*q),t=Math['round']((b-p['top'])*r);if(this['_lockAxis']===0x1)t=Math['floor'](this['height']/0x2);else{if(this['_lockAxis']===0x2)s=Math['floor'](this['width']/0x2);}return[s,t];}['__drawGhosts'](){if(!this['_eventsQueue']['count'])return;let a=this['_eventsQueue']['at'](0x0)['timeStamp'],b=this['_eventsQueue']['at'](-0x1)['timeStamp'],p=document['pointerLockElement']!==null,q=this['_mousePosX']||0x0,r=this['_mousePosY']||0x0;for(let A=0x0;A<this['_eventsQueue']['count'];A++){let B=this['_eventsQueue']['peek'](A);if(!B)break;let C=b-B['timeStamp'];if(C>this['_ghostDuration']*0x3e8)break;if(this['_pointerWasLocked'])this['_createRoundingError']?(q-=Math['round']((B['movementX']||0x0)*this['_sensitivity']),r-=Math['round']((B['movementY']||0x0)*this['_sensitivity'])):(q-=(B['movementX']||0x0)*this['_sensitivity'],r-=(B['movementY']||0x0)*this['_sensitivity']);else{var s,t,u,v,w,z;q=(s=(t=B['clientX'])!==null&&t!==void 0x0?t:(u=B['touches'][0x0])===null||u===void 0x0?void 0x0:u['clientX'])!==null&&s!==void 0x0?s:q,r=(v=(w=B['clientY'])!==null&&w!==void 0x0?w:(z=B['touches'][0x0])===null||z===void 0x0?void 0x0:z['clientY'])!==null&&v!==void 0x0?v:r;}const [D,E]=this['__normalizeCursorCoordinates'](q,r),F=this['_pendingVSYNC']&&B['VSYNC'];let G=B['VSYNC']?this['_ghostShowVSYNC']:this['_ghostShowFull'],H;if(this['_ghostShowFull']&&!this['_ghostShowVSYNC'])G=!![],H=this['_ghostColorFull'];else G&&(H=F?this['_ghostColorVSYNC']:this['_ghostColorFull']);if(G)switch(this['_ghostCursor']){case'plus':this['fillRect']({'x':D,'y':E-0x4,'width':0x1,'height':0x9,'color':H}),this['fillRect']({'x':D-0x4,'y':E,'width':0x9,'height':0x1,'color':H});break;case'big-plus':this['fillRect']({'x':D,'y':E-0xa,'width':0x1,'height':0x15,'color':H}),this['fillRect']({'x':D-0xa,'y':E,'width':0x15,'height':0x1,'color':H});break;case'pixel':this['fillRect']({'x':D,'y':E,'width':0x1,'height':0x1,'color':H});break;case'pixel2':this['fillRect']({'x':D-0x1,'y':E-0x1,'width':0x2,'height':0x2,'color':H});break;case'pixel4':this['fillRect']({'x':D-0x2,'y':E-0x2,'width':0x4,'height':0x4,'color':H});break;case'line-vert':this['fillRect']({'x':D,'y':E-0xa,'width':0x1,'height':0x15,'color':H});break;case'line-horiz':this['fillRect']({'x':D-0xa,'y':E,'width':0x15,'height':0x1,'color':H});break;default:this['fillCircle']({'x':D-0x2,'y':E-0x2,'radius':0x5,'color':H});break;}}}['__isMouseStopped'](a=undefined,b=0.25){var p,q;let r=(p=(q=a===null||a===void 0x0?void 0x0:a['realTimeStamp'])!==null&&q!==void 0x0?q:a===null||a===void 0x0?void 0x0:a['timeStamp'])!==null&&p!==void 0x0?p:performance['now'](),s=this['_lastMovementSampleTime']||0x0,t=s?(r-s)/0x3e8:0x0,u=t>b;if(this['_isMouseMoving'])s&&u&&(this['_isMouseMoving']=![],this['_lastStoppedMovingTime']=r,this['_lastStartedMovingTime']=0x0,this['_lastMovementSampleTime']=0x0);else this['_lastStartedMovingTime']&&s&&u&&(this['_lastStartedMovingTime']=0x0,this['_lastMovementSampleTime']=0x0);return this['_isMouseMoving'];}['__isMouseMoving'](a,b=0.8){var p,q;if(!a)return this['_isMouseMoving'];let r=![],s=document['pointerLockElement']!==null;if(s)r=a['movementX']!==0x0||a['movementY']!==0x0;else{var t,u,v,w,z,A;let D=(t=(u=a['clientX'])!==null&&u!==void 0x0?u:(v=a['touches'][0x0])===null||v===void 0x0?void 0x0:v['clientX'])!==null&&t!==void 0x0?t:0x0,E=(w=(z=a['clientY'])!==null&&z!==void 0x0?z:(A=a['touches'][0x0])===null||A===void 0x0?void 0x0:A['clientY'])!==null&&w!==void 0x0?w:0x0;
1r=D!==this['_mousePosX']||E!==this['_mousePosY'],this['_mousePosX']=D,this['_mousePosY']=E;}let B=(p=(q=a===null||a===void 0x0?void 0x0:a['realTimeStamp'])!==null&&q!==void 0x0?q:a===null||a===void 0x0?void 0x0:a['timeStamp'])!==null&&p!==void 0x0?p:performance['now'](),C=(B-this['_lastStartedMovingTime'])/0x3e8;if(r){if(!this['_lastStartedMovingTime'])this['_lastStartedMovingTime']=B;else C>b&&(this['_isMouseMoving']=!![]);this['_lastStoppedMovingTime']=0x0;}else this['_isMouseMoving']&&!this['_lastStoppedMovingTime']&&(this['_lastStoppedMovingTime']=B);if(this['_isMouseMoving']&&s){let F=this['_mousePosX']+(a['movementX']||0x0)*this['_sensitivity'],G=this['_mousePosY']+(a['movementY']||0x0)*this['_sensitivity'],H=this['display']['getBoundingClientRect']();if(F<H['left'])F=H['left'];else{if(F>H['width'])F=H['width'];}if(G<H['top'])G=H['top'];else{if(G>H['height'])G=H['height'];}this['_mousePosX']=F,this['_mousePosY']=G;}return this['_lastMovementSampleTime']=B,this['_isMouseMoving'];}['__updateMouseMovingState'](a){if(a)this['__isMouseMoving'](a);this['__isMouseStopped'](a);}['onKeyDown']({key:a,event:b}){a===0x1b&&(this['_clicked']=![],this['display']['exitPointerLock'](),this['dis
1play']['fullScreenExit']());}['onPaint'](){let a=this['width'],b=this['height'],p=this['_peakPoll'],q=this['height']*this['_DEFAULT_TOP_MARGIN'];this['__updateMouseMovingState'](),this['setColor'](this['_backColor']),this['fillRect'](),this['_pendingVSYNC']=!![];let r=Math['round'](a/this['_FONT_SIZE_FACTOR']),s='',t='';if(!this['_clicked'])s='Please\x20Click\x20Me\x20First',t='';else!this['_measured']&&(!this['_isMouseMoving']||p<this['_MIN_RATE'])?(s=this['display']['isZoomed']?'Please\x20Move\x20Mouse\x20Continuously\x20in\x20Circles':'Please\x20Click\x20Me\x20First',t='',this['__drawGhosts']()):(this['_measured']=!![],r=Math['round'](a/this['_FONT_SIZE_FACTOR_HZ']),s=p+'\x20Hz',t=this['display']['isZoomed']?'Keep\x20Circling\x20Mouse\x20Fast\x20or\x20Click\x20to\x20Stop':'Peak\x20Mouse\x20Performance\x20in\x20Browser',this['__drawGhosts']());let u=r/0x3;this['_ufoLabel']['text']=s,this['_ufoLabel']['style']['sizeNumber']=r,this['_ufoLabel']['style']['color']=this['_foreColor']['color'],this['draw']({'source':this['_ufoLabel'],'x':(a-this['_ufoLabel']['width'])/0x2,'y':q}),this['_ufoLabel2']['text']=t,this['_ufoLabel2']['style']['sizeNumber']=u,this['_ufoLabel2']['style']['color']=this['_foreColor']['color'],this['draw']({'source':this['_ufoLabel2'],'x':(a-this['_ufoLabel2']['width'])/0x2,'y':q+this['_ufoLabel']['height']*1.2});}['onSettingChange'](){this['_backColor']['color']=this['settings']['getSafeValue']('background'),this['_foreColor']['color']=this['settings']['getSafeValue']('foreground'),this['_ghostShowVSYNC']=this['settings']['getSafeValue']('ghost-vsync'),this['_ghostShowFull']=this['settings']['getSafeValue']('ghost-full'),this['_ghostColorVSYNC']['color']=this['settings']['getSafeValue']('ghostcolor-vsync'),this['_ghostColorFull']['color']=this['settings']['getSafeValue']('ghostcolor-full'),this['_ghostDuration']=this['settings']['getSafeValue']('duration'),this['_ghostCursor']=this['settings']['getSafeValue']('ghostcursor'),this['_lockAxis']=this['settings']['getSafeValue']('lockaxis'),this['_sensitivity']=this['settings']['getSafeValue']('sensitivity'),this['_createRoundingError']=this['settings']['getSafeValue']('roundingerror');if(!this['_ghostShowVSYNC']&&!this['_ghostShowFull']){if(this['_lastGhostShowVSYNC'])this['_ghostShowFull']=!![],this['settings']['setValue']('ghost-full',!![]);else this['_lastGhostShowFull']&&(this['_ghostShowVSYNC']=!![],this['settings']['setValue']('ghost-vsync',!![]));}this['_lastGhostShowVSYNC']=this['_ghostShowVSYNC'],this['_lastGhostShowFull']=this['_ghostShowFull'];}}c(o,'props',{'name':'mouserate','title':'Mouse\x20Poll\x20Rate\x20Test\x20/\x20Mouse\x20Jitter\x20Test','aliases':['mousepollrate','mousepoll','mousepolltest','pollrate','polltest'],'category':'test','version':{'base':0x3},'ui':{'showCredit':0x1}}),c(o,'description','\x0a<div\x20id=\x22description\x22\x20class=\x22description\x22>\x0a\x20\x20<div\x20class=\x22callout\x20highlight-green\x22>Mouse\x20Poll\x20Rate\x20Test\x20/\x20Browser\x20Mouse\x20Performance</div>\x0a\x20\x20<p>This\x20mouse\x20poll\x20rate\x20test\x20can\x20measure\x20the\x20report\x20rate\x20of\x20your\x20computer\x20mouse.\x20\x20\x0a\x20\x20Most\x20gaming\x20mice\x20can\x20reach\x201000\x20Hz,\x20while\x20some\x20mice\x20can\x20go\x20much\x20higher\x20in\x20Hz.</p>\x20\x20\x0a\x20\x20<p>1.\x20Click\x20to\x20start\x20poll\x20rate\x20test.<br>\x0a\x20\x202.\x20Move\x20your\x20mouse\x20pointer\x20very\x20fast\x20in\x20
1a\x20circle.<br>\x0a\x20\x203.\x20Your\x20peak\x20mouse\x20Hz\x20will\x20appear.</p>\x0a\x20\x20<p><div\x20class=\x22callout\x20highlight-green\x22>Mouse\x20Jitter\x20Visualization\x20/\x20Ghost\x20Trails\x20Test</div>\x0a\x20\x20<p>After\x20this\x20test\x20starts,\x20this\x20screen\x20also\x20generates\x20ghost\x20trails\x20of\x20your\x20mouse\x20coordinates.\x20It\x20can\x20help\x20you\x20visualize\x20(to\x20your\x20eyes)\x20your\x20mouse\x20jitter.</p>\x0a\x20\x20<ul>\x0a\x20\x20\x20\x20<li>Desktop\x20Jitter:\x20The\x20brighter\x20yellow\x20+\x20marks\x20indicates\x20the\x20VSYNC\x20ON\x20mouse\x20coordinates\x20(usually\x20the\x20poll\x20nearest\x20refresh\x20cycle,\x20best-effort\x20basis).</li>\x0a\x20\x20\x20\x20<li>Game\x20Jitter:\x20The\x20darker\x20green\x20+\x20marks\x20indicate\x20the\x20VSYNC\x20OFF\x20mouse\x20coordinates\x20(raw\x20coordinates\x20between\x20refresh\x20cycles).</li>\x0a\x20\x20</ul>\x0a\x20\x20This\x20test\x20does\x20both\x20concurrently\x20to\x20help\x20users\x20who\x20prioritize\x20desktop\x20use,\x20or\x20prioritize\x20game\x20use,\x20or\x20both.\x20\x20\x0a\x20\x20Try\x20different\x20poll\x20rates,\x20DPI,\x20and\x20other\x20settings,\x20to\x20see\x20how\x20your\x20mouse\x20jitter\x20changes!\x0a\x20\x20Also,\x20if\x20your\x20system\x20has\x20power-management\x20enabled,\x20try\x20Mobile\x20High\x20Performance\x20Mode\x20in\x20TestUFO\x20Settings\x20(gear\x20icon)\x20to\x20improve\x20poll\x20Hz.</p>\x0a\x20\x20<p><span\x20class=\x22highlight-red\x22>IMPORTANT:</span>\x20Performance\x20is\x20affected\x20by\x20your\x20browser.\x20\x0a\x20\x20Your\x20browser\x20may\x20not\x20keep\x20up\x20at\x20the\x20full\x20poll\x20rate\x20of\x20high-end\x20gaming\x20mice.\x0a\x20\x20Also,\x20if\x20your\x20mouse\x20Hz\x20is\x20lower\x20than\x20your\x20display\x20Hz,\x20you\x20may\x20have\x20no\x20darker\x20green\x20+\x20marks.\x0a\x20\x20If\x20the\x20ordinary\x20web\x20browser\x20keeps\x20up\x20with\x20a\x20gaming\x20mouse\x20poll\x20rate,\x20that\x20is\x20usually\x20a\x20very\x20good\x20sign\x20system-wide.\x0a\x20\x20Also,\x20you\x20can\x20right-click\x20the\x20mouse\x20area\x20to\x20save\x20a\x20screenshot\x20of\x20your\x20results.\x0a\x20\x20</p>\x0a\x20\x20<p><span\x20class=\x22highlight-green\x22>Other\x20Mouse\x20Web\x20Pages:</span>\x20In\x20addition\x20the\x20existing\x20<a\x20href=\x22//blurbusters.com/mouse-guide\x22\x20target=\x22_blank\x22>Blur\x20Busters\x20Mouse\x20Guide</a>,\x20\x0a\x20\x20there\x20are\x20other\x20great\x20dedicated\x20mouse\x20sites\x20like\x20<a\x20href=\x22https://www.mouse-sensitivity.com/?&_rid=154053\x22\x20target=\x22_blank\x22>Mouse-Sensitivity</a>\x20and\x20<a\x20href=\x22https://cpstest.org/polling-rate-test/\x22\x20target=\x22_blank\x22>CPS\x20Test</a>.\x0a\x20\x20Shout-out\x20for\x20creating\x20good\x20online\x20mouse\x20utilities.\x20This\x20UFO\x20screen\x20will\x20display\x20more\x20supplemental\x20benchmark\x20data\x20in\x20the\x20future\x20so\x20check\x20back\x20soon!</p>\x0a</div>\x0a'),c(o,'settingsJSON',{'background':{'label':'Background\x20Color','type':'color','default':'#000060'},'foreground':{'label':'Text\x20Color','type':'color','default':'#C0C0C0'},'global.scale':{'default':0x1},'ghostcursor':{'label':'Cursor\x20Trails','type':'select','format':'text','default':'plus','options':[{'value':'plus','text':'Cross\u3000+'},{'value':'big-plus','text':'Big\x20Cross\u3000┼'},{'value':'pixel','text':'Single\x20Pixel\u3000⋅'},{'value':'pixel2','text':'Double\x20Pixel\u3000▪'},{'value':'pixel4','text':'Bigger\x20Pixel\u3000■'},{'value':'dot','text':'Dot\u3000●'},{'value':'line-vert','text':'Vertical\x20Line\u3000│'},{'value':'line-horiz','text':'Horizontal\x20Line\u3000─'}]},'duration':{'label':'Trail\x20Duration\x20(Seconds)','type':'float','min':0.01,'max':0x4,'step':0.01,'default':0.3},'pointerlock':{'label':'Pointer\x20Lock','type':'boolean','default':![],'info':'\x0a<h2>Pointer\x20Lock\x20Option</h2>\x0a<p>Some\x20(not\x20all)\x20systems\x20will\x20require\x20pointer\x20capture\x20for\x20improved\x20reliability\x20with\x20this\x20test.\x0aWhen\x20this\x20setting\x20is\x20enabled,\x20the\x20mouse\x20cursor\x20will\x20disappear\x20temporarily\x20during\x20full\x20screen\x20mode.\x0a<p>This\x20will\x20also\x20enable\x20an\x20\x27infinite\x20canvas\x27\x20mode,\x20to\x20allow\x20you\x20to\x20circle\x20bigger\x20than\x20your\x20screen,\x20or\x20move\x20in\x20straight\x20lines\x20instead.</p>\x0a</p>'},'sensitivity':{'label':'Sensitivity\x20(Pointer\x20Lock\x20Only)','type':'float','default':0x1,'min':0.001,'max':0x4,'step':0.001,'info':'\x0a<h2>Sensitivity\x20(Pointer\x20Lock\x20Only)</h2>\x0a<p>This\x20setting\x20allows\x20you\x20to\x20adjust\x20the\x20sensitivity\x20(speed)\x20of\x20your\x20mouse\x20in\x20Pointer\x20Lock\x20mode.\x0aThe\x20sensitivity\x20is\x20
1a\x20multiplier\x20applied\x20to\x20the\x20mouse\x20movement.</p>\x0a<ul>\x0a\x20\x20<li>A\x20value\x20of\x201.0\x20means\x20no\x20adjustment.</li>\x0a\x20\x20<li>A\x20value\x20of\x200.5\x20means\x20half\x20speed\x20movement.</li>\x0a\x20\x20<li>A\x20value\x20of\x200.25\x20means\x20quarter\x20speed\x20movement.</li>\x0a</ul>\x0a<p>For\x20advanced\x20users,\x20we\x20recommend\x20using\x20an\x20online\x20mouse\x20sensitivity\x20calculator\x20to\x20assist\x20you\x20in\x20adjusting\x20your\x20mouse\x20sensitivity\x20for\x20your\x20games.</p>\x0a<p><span\x20class=\x22highlight-green\x22>TIP:</span>\x20Depending\x20on\x20your\x20mouse\x20hardware,\x20its\x20quality,\x20and\x20your\x20desktop\x20or\x20game\x20settings\x20(e.g.\x20VSYNC\x20ON\x20or\x20VSYNC\x20OFF),\x0ait\x20is\x20possible\x20to\x20reduce\x20mouse\x20jitter\x20(without\x20adding\x20smoothing)\x20by\x20increasing\x20DPI\x20and\x20poll\x20rate\x20(Hz),\x20while\x20concurrently\x20decreasing\x20sensitivity.</p>\x0a<ul>\x0a\x20\x20<li>Settings\x20above\x201\x20will\x20show\x20granularity\x20for\x20a\x20desktop\x20cursor,\x20but\x20may\x20be\x20favoured\x20by\x20some\x20gamers\x20who\x20prefer\x20low\x20DPI\x20operation.</li>\x0a\x20\x20<li>Settings\x20below\x201\x20during\x20higher\x20DPI\x20settings,\x20can\x20result\x20in\x20smoother\x20movements\x20for\x20both\x20desktop\x20and\x20games,\x20especially\x20when\x20combined\x20with\x20a\x20\x0a\x20\x20higher\x20mouse\x20poll\x20rate\x20(Hz)\x20several\x20times\x20your\x20display\x20refresh\x20rate\x20(Hz)\x20and\x20frame\x20rate\x20(fps).</li>\x0a</ul>\x0a</p>'},'section-eastereggs':{'type':'section','easteregg':!![]},'lockaxis':{'label':'Lock\x20Mouse\x20Axis\x20For\x20Visualization','type':'select','format':'integer','default':0x0,'min':0x0,'max':0x2,'easteregg':!![],'options':[{'value':0x0,'text':'Normal'},{'value':0x1,'text':'Horizontal\x20Only'},{'value':0x2,'text':'Vertical\x20Only'}]},'roundingerror':{'label':'Demo\x20of\x20Rounding\x20Errors\x20(Pointer\x20Lock\x20Only)','type':'boolean','default':![],'easteregg':!![],'info':'\x0a\x20\x20\x20\x20\x20\x20<h2>Demo\x20of\x20Rounding\x20Errors\x20-\x20Secret\x20Easter\x20Egg\x20🛸</h2>\x0a\x20\x20\x20\x20\x20\x20<p>
1This\x20is\x20a\x20secret\x20easter\x20egg\x20demonstration\x20setting\x20to\x20demonstrate\x20only\x20\x0a\x20\x20\x20\x20\x20\x20one\x20of\x20the\x20many\x20different\x20possible\x20flawed\x20mouse\x20mathematics.\x20This\x20may\x20occur\x0a\x20\x20\x20\x20\x20\x20anywhere\x20in\x20game\x20engines,\x20OS,\x20mouse\x20drivers,\x20or\x20bad\x20mouse\x20firmware.\x0a\x20\x20\x20\x20\x20\x20This\x20demo\x20only\x20works\x20in\x20Pointer\x20Lock\x20mode.</p>\x0a\x20\x20\x20\x20\x20\x20<ul>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<li>In\x20your\x20mouse\x20driver,\x20use\x20a\x20high\x20DPI\x20setting\x20(higher\x20amplifies\x20error\x20for\x20this).</li>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<li>In\x20this\x20test,\x20use\x20a\x20low\x20sensitivity\x20setting\x20below\x201.0.</li>\x0a\x20\x20\x20\x20\x20\x20</ul>\x0a\x20\x20\x20\x20\x20\x20<p>Rounding\x20error\x20algorithm\x20(one\x20of\x20the\x20many\x20possible):</p>\x0a\x20\x20\x20\x20\x20\x20<ol>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<li>Multiply\x20previous\x20{deltaX,deltaY}\x20raw\x20mouse\x20deltas\x20by\x20sensitivity;</li>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<li>Round\x20off\x20these\x20values\x20to\x20the\x20nearest\x20integer;</li>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<li>Add\x20the\x20integer\x20result\x20to\x20{x,y}\x20positional\x20accumulator\x20variables.</li>\x0a\x20\x20\x20\x20\x20\x20</ol>\x0a\x20\x20\x20\x20\x20\x20<p>Before\x20this\x20test,\x20it\x20was\x20usually\x20difficult\x20to\x20demonstrate\x20a\x20visualization\x20of\x20\x0a\x20\x20\x20\x20\x20\x20this\x20type\x20of\x20math\x20rounding\x20error\x20reliably.\x20\x20It\x20is\x20crticial\x20to\x20use\x20floating\x20point\x20\x0a\x20\x20\x20\x20\x20\x20math\x20accumulators\x20to\x20preserve\x20math\x20precision\x20of\x20\x22high\x20DPI\x20+\x20low\x20sensitivity\x22\x20\x0a\x20\x20\x20\x20\x20\x20situations.</p>\x0a\x20\x20\x20\x20\x20\x20<p><span\x20class=\x22highlight-green\x22>Compare\x20Before/After:</span>\x20After\x20doing\x20a\x20test,\x0a\x20\x20\x20\x20\x20\x20toggle\x20this\x20setting.\x20And\x20you\x20can\x20even\x20adjust\x20Sensitivity\x20and\x20Duration\x20in\x20post-process!\x20\x20\x0a\x20\x20\x20\x20\x20\x20Watch\x20what\x20happens\x20in\x20the\x20post-processed\x20visualization\x20when\x20you\x20toggle\x20this\x20setting\x20on/off.\x0a\x20\x20\x20\x20\x20\x20Make\x20sure\x20you\x20used\x20a\x20low\x20mouse\x20sensitivity\x20setting\x20below\x201.0.\x20\x20After\x20you\x20do\x20one\x20test,\x0a\x20\x20\x20\x20\x20\x20try\x200.1,\x200.4,\x200.5\x20Sensitivity\x20while\x20toggling\x20on/off\x20this\x20Rounding\x20Errors\x20setting.\x0a\x20\x20\x20\x20\x20\x20Observe\x20big\x20differences\x20in\x20accumulated\x20rounding\x20errors\x20at\x20different\x20Sensitivity\x20settings.\x0a\x20\x20\x20\x20\x20\x20<p><span\x20class=\x22highlight-green\x22>Accumulated\x20Math\x20Errors:</span>\x20This\x20test\x20\x0a\x20\x20\x20\x20\x20\x20can\x20help\x20visualize\x20how\x20accumulated\x20math\x20errors\x20affect\x20mouse\x20feel\x20and\x20accuracy,\x0a\x20\x20\x20\x20\x20\x20and\x20how\x20it\x20changes\x20at\x20different\x20mouse\x20settings.\x20\x20It\x20has\x20long\x20been\x20speculated\x20that\x0a\x20\x20\x20\x20\x20\x20(in\x20addition\x20to\x20primitive\x20mice\x20of\x20decades\x20ago)\x20rounding\x20errors\x20was\x20one\x20of\x20the\x20several\x0a\x20\x20\x20\x20\x20\x20contributing\x20factors\x20that\x20influenced\x20a\x20long\x20status\x20quo\x20of\x20400dpi\x20and\x20800dpi\x20in\x20esports.\x20\x20\x0a\x20\x20\x20\x20\x20\x20These\x20DPI\x20values\x20created\x20the\x20least\x20rounding\x20errors\x20in\x20some\x20game\x20engines,\x20in\x20
1addition\x20to\x0a\x20\x20\x20\x20\x20\x20higher\x20sensitivity\x20settings.\x20\x20As\x20you\x20experiment\x20with\x20this\x20screen,\x20it\x20is\x20\x0a\x20\x20\x20\x20\x20\x20observed\x20how\x20rounding\x20errors\x20often\x20become\x20worse/better\x20at\x20different\x0a\x20\x20\x20\x20\x20\x20fractional\x20sensitivity\x20settings,\x20and\x20is\x20unaffected\x20if\x20using\x20integer\x20sensitivity\x20values.\x0a\x20\x20\x20\x20\x20\x20Also,\x20sensitivity\x20number\x20scales\x20may\x20be\x20internally\x20different\x20than\x20what\x20the\x20UI\x20sensitivity\x0a\x20\x20\x20\x20\x20\x20says.\x20It\x20will\x20not\x20necessarily\x20match\x20the\x20behavior\x20of\x20this\x20test.</p>\x0a\x20\x20\x20\x20\x20\x20<p><span\x20class=\x22highlight-green\x22>Software\x20Developers:</span>\x20Unlike\x20\x27int\x27,\x20usually\x20\x27float\x27\x20is\x20sufficient.\x0a\x20\x20\x20\x20\x20\x20It\x20is\x20possible\x20\x27double\x27\x20may\x20be\x20necessary\x20as\x20mouse\x20DPI\x27s\x20are\x20becoming\x20stratospheric\x20nowadays,\x0a\x20\x20\x20\x20\x20\x20especially\x20if\x20massive\x20scaling/translation\x20factors\x20are\x20used\x20on\x20the\x20numbers\x20internally.\x20\x0a\x20\x20\x20\x20\x20\x20This\x20reduces\x20the\x20precision\x20of\x20floats.\x20While\x20not\x20directly\x20comparable,\x20a\x20famous\x0a\x20\x20\x20\x20\x20\x20example\x20of\x20math\x20rounding\x20errors\x20in\x20translated\x20(zoomed)\x203D\x20graphics\x20coordinate\x0a\x20\x20\x20\x20\x20\x20systems\x20was\x20shown\x20in\x20the\x20Netflix\x20show\x20\x22The\x20Billion\x20Dollar\x20Code\x22\x20(glitching\x20during\x20\x0a\x20\x20\x20\x20\x20\x20\x22Google\x20Earth\x22-style\x20zooming,\x20due\x20to\x20precision\x20limits\x20of\x20early\x203D\x20graphics\x0a\x20\x20\x20\x20\x20\x20engines\x20trying\x20to\x20successfully\x20zoom\x20from\x20distant\x20to\x20near).</p>\x0a\x20\x20\x20\x20\x20\x20<p><span\x20class=\x22highlight-green\x22>Online\x20Debate:</span>\x20There\x20is\x20ongoing\x20debate\x20what\x20kind\x20\x0a\x20\x20\x20\x20\x20\x20of\x20hidden\x20math\x20rounding\x20errors\x20are\x20lurking\x20inside\x20old\x20game\x20engines\x20and\x20old\x20mice.\x20\x20\x0a\x20\x20\x20\x20\x20\x20Being\x20that\x20said,\x20it\x20is\x20undeniable\x20the\x20risk\x20was\x20always\x20there.\x20\x20\x0a\x20\x20\x20\x20\x20\x20Modern\x20games,\x20on\x20modern\x20GPUs,\x20with\x20modern\x20gaming\x20mice,\x20generally\x20avoid\x20this\x20problem.</p>'},'section-ghostshow':{'type':'section'},'ghost-full':{'label':'Show\x20Trails\x20for\x20Full\x20Poll\x20Rate','type':'boolean','default':!![]},'ghostcolor-full':{'label':'Trail\x20Color\x20(Full\x20Poll\x20Rate)','type':'color','default':'#00A000'},'section-ghostcolors':{'type':'section'},'ghost-vsync':{'label':'Show\x20Trails\x20for\x20VSYNC\x20ON','type':'boolean','default':!![]},'ghostcolor-vsync':{'label':'Trail\x20Color\x20(VSYNC\x20ON\x20=\x20Hz)','type':'color','default':'color(rec2020\x203\x203\x200)'}});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.