4 ms·
Aren't the following canvas/javascript specific? ctx = document.getElementById('game').getContext('2d'); pixels = ctx.createImageData(w, h); ctx.putImageData
by cgcardona 14y ago
Aren't the following canvas/javascript specific?
ctx = document.getElementById('game').getContext('2d');
pixels = ctx.createImageData(w, h);
ctx.putImageData(pixels, 0, 0);
EDIT: Thanks for the clarification!
- toksaitov 14y agoI think the point was that this code can work in any environment where you can write to specific pixels (without magic WebGL transformation/rasterization operations or complex Canvas drawing routines).
- moe 14y agoAntirez meant to say that notch is using canvas as a dumb framebuffer. He builds the raster image pixel by pixel instead of using higher level primitives (polygons).