PageSourceSearch

https://asenno.com/_app/immutable/chunks/D16v90l1.js

js asenno.com collected 2026-10-08 13:54:51 UTC 8,962 bytes, 66 lines download raw bytes

1function e(e,{width:l,height:o},n){const{mode:r,brightness:s,showStrobeBars:i,showInstructions:a,showFrequencyGuide:c,backgroundColor:f,barPosition:b,frameCount:h}=n
2switch(e.imageSmoothingEnabled=!1,e.fillStyle="#000000",e.fillRect(0,0,l,o),r){case"brightness-sweep":((e,l,o,n)=>{const{sweepSpeed:r,backgroundColor:s,frameCount:i}=n,a=600/r,c=i%a/a,f=100*Math.abs(Math.sin(c*Math.PI))
3t(e,l,o,s,f)
4const b=o-40-60
5e.fillStyle="rgba(0, 0, 0, 0.8)",e.fillRect(20,b-10,l-40,60),e.fillStyle="rgba(255, 255, 255, 0.2)",e.fillRect(30,b,l-60,40)
6const h=30+f/100*(l-60)
7e.fillStyle="#00FF00",e.fillRect(h-2,b,4,40),e.fillStyle="#FFFFFF",e.font="12px monospace",e.textAlign="center",e.fillText(`Brightness: ${f.toFixed(0)}%`,l/2,b-20)})(e,l,o,n)
8break
9case"static-brightness":((e,l,o,n)=>{const{brightness:r,backgroundColor:s}=n
10t(e,l,o,s,r),e.fillStyle="rgba(0, 0, 0, 0.8)",e.fillRect(l/2-100,20,200,40),e.fillStyle="#00FF00",e.font="bold 16px monospace",e.textAlign="center",e.fillText(`${r}% Brightness`,l/2,45)})(e,l,o,n)
11break
12case"strobe-bars":((e,t,l,o)=>{const{strobeFrequency:n,barPosition:r}=o,s=[30,60,120,240,480,960],i=l/s.length
13s.forEach((l,o)=>{const n=o*i
14e.fillStyle="#202020",e.fillRect(0,n,t,i)
15const s=t/(l/30),a=r*(l/60)%s
16e.fillStyle="#FFFFFF"
17for(let l=-20+a;l<t+20;l+=s)e.fillRect(l,n,20,i)
18e.fillStyle="rgba(0, 0, 0, 0.8)",e.fillRect(10,n+10,100,30),e.fillStyle="#00FF00",e.font="bold 14px monospace",e.textAlign="left",e.fillText(`${l} Hz`,20,n+30)})})(e,l,o,n)
19break
20case"frequency-scan":((e,l,o,n)=>{const{frameCount:r,backgroundColor:s}=n,i=[90,120,180,240,360,480,720,960,1440,1920],a=i[Math.floor(r/120)%i.length]
21t(e,l,o,s,100)
22r%(3600/a)/(3600/a)<.5&&(e.fillStyle="rgba(0, 0, 0, 0.3)",e.fillRect(0,0,l,o)),e.fillStyle="rgba(0, 0, 0, 0.9)",e.fillRect(l/2-150,o/2-50,300,100),e.fillStyle="#00FF00",e.font="bold 32px monospace",e.textAlign="center",e.fillText(`${a} Hz`,l/2,o/2),e.font="14px monospace",e.fillText("PWM Frequency Scan",l/2,o/2+30)})(e,l,o,n)
23break
24case"camera-helper":((e,l,o,n)=>{const{backgroundColor:r,frameCount:s}=n
25t(e,l,o,r,100),e.strokeStyle="rgba(0, 255, 0, 0.3)",e.lineWidth=1
26for(let t=0;t<l;t+=100)e.beginPath(),e.moveTo(t,0),e.lineTo(t,o),e.stroke()
27for(let t=0;t<o;t+=100)e.beginPath(),e.moveTo(0,t),e.lineTo(l,t),e.stroke()
28e.strokeStyle="#FF0000",e.lineWidth=2,e.beginPath(),e.moveTo(l/2-50,o/2),e.lineTo(l/2+50,o/2),e.moveTo(l/2,o/2-50),e.lineTo(l/2,o/2+50),e.stroke()
29e.fillStyle="rgba(0, 0, 0, 0.9)",e.fillRect(20,50,400,200),e.fillStyle="#FFFFFF",e.font="bold 14px monospace",e.textAlign="left",e.fillText("Camera Setup:",30,75),e.font="12px monospace",["1. Use slow-motion mode (240fps+)","2. Manual exposure: 1/8000s or faster","3. ISO: As low as possible","4. Focus: Manual, on screen","5. Distance: Fill frame with display","6. Angle: Perpendicular to screen"].forEach((t,l)=>{e.fillText(t,30,100+20*l)}),Math.floor(s/30)%2==0&&(e.fillStyle="rgba(255, 255, 0, 0.5)",e.fillRect(l-150,50,100,100),e.fillStyle="#000000",e.font="bold 16px monospace",e.textAlign="center",e.fillText("SYNC",l-100,105))})(e,l,o,n)
30break
31case"pwm-sweep":((e,l,o,n)=>{const{frameCount:r,backgroundColor:s,barPosition:i,strobeWidth:a}=n
32t(e,l,o,s,100)
33const c=300,f=[60,90,120,180,240,360,480,720,960,1440,1920,2880],b=Math.floor(r/c)%f.length,h=f[b],d=3600/h
34r%d/d<.5||(e.fillStyle="rgba(0, 0, 0, 0.4)",e.fillRect(0,0,l,o))
35const g=h/60,p=i*g%(l+2*a)
36e.fillStyle="rgba(255, 255, 255, 0.8)",e.fillRect(p-a,0,a,o)
37const u=i*g*.5%(l+2*a)
38e.fillStyle="rgba(255, 0, 0, 0.6)",e.fillRect(u-a/2,0,a/2,o)
39const y=350,F=(l-y)/2,m=o/2-100
40e.fillStyle="rgba(0, 0, 0, 0.9)",e.fillRect(F,m,y,200),e.fillStyle="#00FF00",e.font="bold 36px monospace",e.textAlign="center",e.fillText(`${h} Hz`,F+175,m+50),e.font="bold 16px monospace",e.fillText("PWM Frequency Sweep",F+175,m+80),e.font="12px monospace",e.fillStyle="#CCCCCC",["Watch for beating between:","\u2022 Display PWM and white strobe bar","\u2022 Matching frequencies cause stillness","\u2022 Interference reveals actual PWM rate","","White bar: Reference frequency","Red bar: Half reference frequency"].forEach((t,l)=>{e.fillText(t,F+20,m+110+15*l)})
41const S=F+20,w=m+200-30
42e.strokeStyle="#FFFFFF",e.lineWidth=2,e.strokeRect(S,w,310,15)
43const x=r%c/c*310
44e.fillStyle="#00FF00",e.fillRect(S,w,x,15)
45const C=l-180
46e.fillStyle="rgba(0, 0, 0, 0.8)",e.fillRect(C-10,40,170,25*f.length+30),e.fillStyle="#FFFFFF",e.font="bold 12px monospace",e.textAlign="left",e.fillText("Sweep Schedule:",C,50),f.forEach((t,l)=>{const o=75+22*l
47if(e.fillStyle=l===b?"#00FF00":"#CCCCCC",e.font="11px monospace",e.fillText(`${t} Hz`,C,o),l===b){const t=c-r%c
48e.fillText(`(${(t/60).toFixed(1)}s)`,C+80,o)}})})(e,l,o,n)}i&&"strobe-bars"!==r&&((e,t,l,o)=>{const{barPosition:n,strobeWidth:r}=o
49e.fillStyle="rgba(0, 0, 0, 0.5)"
50for(let o=n%100-r;o<t+r;o+=100)e.fillRect(o,0,r,l)})(e,l,o,n),c&&((e,t)=>{const l=t-250-20
51e.fillStyle="rgba(0, 0, 0, 0.85)",e.fillRect(l,20,250,180),e.strokeStyle="rgba(255, 255, 255, 0.3)",e.lineWidth=1,e.strokeRect(l,20,250,180),e.fillStyle="#FFFFFF",e.font="bold 12px monospace",e.fillText("Common PWM Frequencies:",l+10,40),e.font="11px monospace",[{freq:"90-180 Hz",device:"Older displays"},{freq:"240 Hz",device:"Mid-range monitors"},{freq:"480 Hz",device:"Gaming monitors"},{freq:"960-1920 Hz",device:"High-end displays"},{freq:"2880+ Hz",device:"Flicker-free"}
51].forEach((t,o)=>{e.fillStyle="#00FF00",e.fillText(t.freq,l+10,65+25*o),e.fillStyle="#CCCCCC",e.fillText(t.device,l+10,80+25*o)})})(e,l),a&&((e,t,l,o)=>{const n=250,r=l-n-20
52e.fillStyle="rgba(0, 0, 0, 0.85)",e.fillRect(20,r,450,n),e.strokeStyle="rgba(255, 255, 255, 0.3)",e.lineWidth=1,e.strokeRect(20,r,450,n),e.fillStyle="#FFFFFF",e.font="bold 14px monospace",e.fillText("PWM Flicker Detection",35,r+25),e.font="12px monospace",e.fillStyle="#CCCCCC";({"brightness-sweep":["Automatic brightness sweep to find flicker.","Look for:","\u2022 Brightness pulsing or shimmer","\u2022 Moving bands in peripheral vision","\u2022 Use phone camera to see flicker bands"],"static-brightness":["Fixed brightness level test.","Adjust with arrow keys.","Flicker often worse at low brightness.","Try 10-50% range for most displays."],"strobe-bars":["Reference bars at known frequencies.","Compare display flicker to bar movement.","Matching speed indicates PWM frequency."],"frequency-scan":["Scans through common PWM frequencies.","Creates interference patterns.","Note which frequency causes beats."],"camera-helper":["Optimized for camera detection.","Follow setup guide for best results.","Rolling bands indicate PWM presence.","Band count/speed reveals frequency."],"pwm-sweep":["Sweeps through PWM frequencies with reference bars.","Look for beating patterns between bars and display.","Stillness indicates frequency match.","Use to identify exact display PWM rate."]}[o]||[]).forEach((t,l)=>{e.fillText(t,35,r+50+18*l)}),e.fillStyle="#888888",e.font="10px monospace",e.fillText("M: Mode | B: Background | S: Strobe | F: Freq Guide | I: Instructions",35,r+n-10)})(e,0,o,r)}function t(e,t,l,o,n){const r=n/100
53switch(o){case"white":const t=Math.round(255*r)
54e.fillStyle=`rgb(${t}, ${t}, ${t})`
55break
56case"gray":const l=Math.round(128*r)
57e.fillStyle=`rgb(${l}, ${l}, ${l})`
58break
59case"red":e.fillStyle=`rgb(${Math.round(255*r)}, 0, 0)`
60break
61case"green":e.fillStyle=`rgb(0, ${Math.round(255*r)}, 0)`
62break
63case"blue":e.fillStyle=`rgb(0, 0, ${Math.round(255*r)})`}e.fillRect(0,0,t,l)}function l(e){return{barPosition:e.barPosition+2,frameCount:e.frameCount+1}}const o="PWM Flicker Test - AV Tools | asenno",n="pwm-flicker",r={mode:"brightness-sweep",brightness:100,sweepSpeed:1,strobeFrequency:60,strobeWidth:10,showStrobeBars:!0,showInstructions:!0,showFrequencyGuide:!0,backgroundColor:"white",barPosition:0,frameCount:0},s={"brightness-sweep":"Brightness Sweep","static-brightness":"Static Brightness","strobe-bars":"Strobe Reference","frequency-scan":"Frequency Scanner","camera-helper":"Camera Capture Mode","pwm-sweep":"PWM Frequency Sweep"},i={white:"White (Most Common)",gray:"Gray (50%)",red:"Red Channel",green:"Green Channel",blue:"Blue Channel"},a={infoText:"Detects PWM backlight flicker. Use brightness sweep to find flicker zones. Camera slow-motion mode (240fps+) reveals PWM frequency as rolling bands.",animate:!0},c={handlers:{m:e=>{const t=Object.keys(s),l=t.indexOf(e.mode)
64return{mode:t[(l+1)%t.length]}},b:e=>{const t=Object.keys(i),l=t.indexOf(e.backgroundColor)
65return{backgroundColor:t[(l+1)%t.length]}},s:e=>({showStrobeBars:!e.showStrobeBars}),f:e=>({showFrequencyGuide:!e.showFrequencyGuide}),i:e=>({showInstructions:!e.showInstructions}),ArrowUp:e=>({brightness:Math.min(e.brightness+5,100)}),ArrowDown:e=>({brightness:Math.max(e.brightness-5,0)}),"+":e=>({sweepSpeed:Math.min(e.sweepSpeed+.5,5)}),"-":e=>({sweepSpeed:Math.max(e.sweepSpeed-.5,.5)})}}
66export{i as backgroundOptions,a as controls,r as defaultSettings,n as id,c as keyboard,s as modes,e as render,o as title,l as updatePosition}

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.