A pixel mesh stores a 2-dimensional array of Pixels.
new PixelMesh(config)
Initializes the pixel mesh with the specified data and origin.
config—Objectdata—Array<Pixel>The frame's 2-dimensional (array of row arrays ofPixels) (left-to-right, top-to-bottom) data array.origin—Array<number>An array of display offsets to apply when rendering this pixel.
An array of display offsets to apply when rendering this pixel.
Get all the Pixels in this PixelMesh in a 1D-array.
The PixelMesh's width.
The PixelMesh's height.
Set the color of all Pixels in this PixelMesh.
color—stringThe color to set.
Set the fontWeight of all Pixels in this PixelMesh.
fontWeight—stringThe fontWeight to set.
Set the backgroundColor of all Pixels in this PixelMesh.
backgroundColor—stringThe backgroundColor to set.
Set the solid status of all Pixels in this PixelMesh.
solid—stringWhether or not the pixels should be solid.
Create a PixelMesh object from a string. \n will create a new row.
PixelMesh.fromString("This is my string.\nThis is the next line.");string—stringThe string to convert to aPixelMesh.
The newly created PixelMesh object.