Methods
-
inner Gc(info)
-
Run garbage collector, print statistics to logfile if 'info==true'.
Parameters:
Name Type Description infoboolean true to print collection stats to logfile. -
inner GetFramerate() → {number}
-
Current frame rate.
Returns:
number - current framerate. -
inner List(dname) → {Array.<string>}
-
Get directory listing.
Parameters:
Name Type Description dnamestring name of directory to list. Returns:
Array.<string> - array of entry names. -
inner MemoryInfo() → {MemInfo}
-
Get information system memory.
Returns:
MemInfo - an info object. -
inner Print(s)
-
Write data to JSLOG.TXT logfile.
Parameters:
Name Type Description sstring the string to print. -
inner Println(s)
-
Write data to JSLOG.TXT logfile with a newline.
Parameters:
Name Type Description sstring the string to print. -
inner Read(filename) → {string}
-
Load the contents of a file into a string. Throws exception if loading fails.
Parameters:
Name Type Description filenamestring name of file to read. Returns:
string - the contents of the file. -
inner SetExitKey(key)
-
Change the exit key from ESCAPE to any other keycode from KEY}.
Parameters:
Name Type Description keynumber -
inner SetFramerate(rate)
-
Set maximum frame rate. If Loop takes longer than '1/rate' seconds then the framerate will not be reached.
Parameters:
Name Type Description ratenumber max frame rate wanted. -
inner Sleep(ms)
-
Sleep for the given number of ms.
Parameters:
Name Type Description msnumber time to sleep. -
inner Stat(name) → {StatInfo}
-
Get information about a file / directory.
Parameters:
Name Type Description namestring name of the file to get info for. Returns:
StatInfo - an info object. -
inner Stop()
-
DOjS will exit after the current call to Loop.