Last updated 2 years ago
Was this helpful?
three.js ⟩ renderer ⟩ set canvas size
const canvas = renderer.domElement; // calculate the real "resolution" size of the canvas const pixelRatio = window.devicePixelRatio; const width = canvas.clientWidth * pixelRatio | 0;
three.js ⟩ Responsive Design
JS ⟩ integers
WebGLRenderer ⟩ .setSize()