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 widthnumber The width of the desired PixelsObject.
heightnumber The height of the desired PixelsObject.
colorVector4 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 sourceRenderTarget | 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