perf optimization
This commit is contained in:
parent
8d0d0a7e9a
commit
39c146329f
@ -172,11 +172,11 @@ namespace pxsim.visuals {
|
|||||||
if (!pixel) {
|
if (!pixel) {
|
||||||
let cxy: Coord = [0, CANVAS_VIEW_PADDING + i * PIXEL_SPACING];
|
let cxy: Coord = [0, CANVAS_VIEW_PADDING + i * PIXEL_SPACING];
|
||||||
pixel = this.pixels[i] = new NeoPixel(cxy);
|
pixel = this.pixels[i] = new NeoPixel(cxy);
|
||||||
|
svg.hydrate(pixel.el, { title: `offset: ${i}` });
|
||||||
this.canvas.appendChild(pixel.el);
|
this.canvas.appendChild(pixel.el);
|
||||||
}
|
}
|
||||||
let color = colors[i];
|
let color = colors[i];
|
||||||
pixel.setRgb(color);
|
pixel.setRgb(color);
|
||||||
svg.hydrate(pixel.el, { title: `offset: ${i}` });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//show the canvas if it's hidden
|
//show the canvas if it's hidden
|
||||||
|
Loading…
Reference in New Issue
Block a user