new PixelsObjects()
METHODS
-
getNewBlankPixelsObject(width, height, color) returns {PixelsObject}
-
Returns a uniformly colored PixelsObject of the width, height, and color provided.
Parameters:
Name Type Attributes Default Description width
number The width of the desired PixelsObject.
height
number The height of the desired PixelsObject.
color
Vector4 Vector with the RGBA color values for the new PixelsObject.
Returns:
PixelsObject -
getPixelsObject(source) returns {PixelsObject}
-
Returns a PixelsObject generated from the given RenderTarget or Texture. It should be noted that the texture will need to be loaded before invoking this function - see nc.addTierLoadedCallback and nc.awaitLoadedTiers for more information.
Parameters:
Name Type Attributes Default Description source
RenderTarget | Texture The RenderTarget or Texture to generate the PixelsObject from. It should be noted that Textures that were originally created from PixelsObjects cannot be used to create a PixelsObject.
Returns:
PixelsObject