Last updated 2 years ago
Was this helpful?
⟩ ⟩ ⟩ ⟩ integers
x | 0 // x -> integer
const pixelRatio = window.devicePixelRatio; const width = canvas.clientWidth * pixelRatio | 0; const height = canvas.clientHeight * pixelRatio | 0;