This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
display.setDefault( "background", 1:, 2:, 3: ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- @DEBUG monitor Memory Usage | |
local printMemUsage = function() | |
local memUsed = (collectgarbage("count")) | |
local texUsed = system.getInfo( "textureMemoryUsed" ) / 1048576 -- Reported in Bytes | |
print("\n---------MEMORY USAGE INFORMATION---------") | |
print("System Memory: ", string.format("%.00f", memUsed), "KB") | |
print("Texture Memory:", string.format("%.03f", texUsed), "MB") | |
print("------------------------------------------\n") | |
end |