(timestamp)
| 231 | |
| 232 | let prevTimestamp = 0; |
| 233 | function frame(timestamp) { |
| 234 | const deltaTime = (timestamp - prevTimestamp)/1000; |
| 235 | prevTimestamp = timestamp; |
| 236 | if (shaking) { |
| 237 | const x = Math.random()*2 - 1 + 50; |
| 238 | const y = Math.random()*2 - 1 + 50; |
| 239 | clickMe.style.left = `${x}%`; |
| 240 | clickMe.style.top = `${y}%`; |
| 241 | } else { |
| 242 | clickMe.style.left = "50%"; |
| 243 | clickMe.style.top = "50%"; |
| 244 | } |
| 245 | window.requestAnimationFrame(frame); |
| 246 | } |
| 247 | window.requestAnimationFrame((timestamp) => { |
| 248 | prevTimestamp = timestamp; |
| 249 | window.requestAnimationFrame(frame); |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…