Strange results when pre-rendering vs rendering in real-time Canvas
问题 I have a method which renders a matrix of rectangles within a Canvas before the next repaint using requestAnimationFrame . I'm trying to achieve maximum performances. My first approach to this problem was to create rectangles in real-time within the Canvas . render(display: PanelDisplay): void { const ctx = this.parameters.canva.getContext("2d"); const widthEachBit = Math.floor(this.parameters.canva.width / display[0].length); const heightEachBit = Math.floor(this.parameters.canva.height /