Title

Global

Members

# global

Properties:
Name Type Description
global object

the global context.

Methods

# Input(event)

This function is called whenever mouse / keyboard input happens.

Parameters:
Name Type Description
event Event

the current event.

# LoadQoi(fname) → {Bitmap}

Load a QOI image and return it as Bitmap.

Parameters:
Name Type Description
fname String

name of the QOI file.

See:

the loaded Bitmap.

Bitmap

# Loop()

This function is called after setup repeatedly until Stop is called. After calling Stop the program ends when Loop exits.

# MakeQR(bmw, bmh, text) → {Bitmap}

Create a QR code as Bitmap

Parameters:
Name Type Description
bmw Number

width of the wanted bitmap

bmh Number

height of the wanted bitmap

text String

the text to encode into the QR code.

a bitmap containing a QR code.

Bitmap

# ReadUint32BE(data, pos) → {Number}

Read a 32 bit unsigned, big endian number from an IntArray.

Parameters:
Name Type Description
data IntArray

the data to read from

pos Number

The position to start reading from.

the resulting 32bit number

Number

# Setup()

This function is called once at startup. It can initialize variables, setup hardware, etc.

Type Definitions

object

# ArcInfo

An object with coordinates of a drawn arc.

Properties:
Name Type Description
centerX number

center x coordinate of the arc.

centerY number

center y coordinate of the arc.

startX number

x coordinate of the arc start.

startY number

y coordinate of the arc start.

endX number

x coordinate of the arc end.

endY number

y coordinate of the arc end.

object

# CpuInfo

complex object containing the state information for all buttons and sticks. "-1" means "not available"

Example
{
	"brand_str": "",
	"cpu_clock": 55,
	"cpu_clock_measure": 62,
	"cpu_codename": "i486 DX-25/33",
	"ext_family": 4,
	"ext_model": 0,
	"family": 4,
	"features": [
		"fpu"
	],
	"l1_data_assoc": -1,
	"l1_data_cache": -1,
	"l1_data_cacheline": -1,
	"l1_instruction_assoc": -1,
	"l1_instruction_cache": -1,
	"l1_instruction_cacheline": -1,
	"l2_assoc": -1,
	"l2_cache": -1,
	"l2_cacheline": -1,
	"l3_assoc": -1,
	"l3_cache": -1,
	"l3_cacheline": -1,
	"l4_assoc": -1,
	"l4_cache": -1,
	"l4_cacheline": -1,
	"model": 0,
	"num_cores": 1,
	"num_logical_cpus": 1,
	"sse_size": -1,
	"stepping": 2,
	"total_logical_cpus": 1,
	"vendor": 0,
	"vendor_str": "GenuineIntel"
}
object

# Event

Properties:
Name Type Description
x number

mouse X coordinate.

y number

mouse X coordinate.

buttons number

mouse buttons, see MOUSE

key number

key code, see KEY

ticks number

event time.

object

# HTTPResult

An array with the HTTP result: [code, message, header, data]

object

# IpAdddress

An array with four numbers (e.g. [192.168.1.2]).

object

# IpcAddress

Node addresses are arrays of 6 numbers between 0-255 (e.g. [1, 2, 3, 4, 5, 6]).

object

# IpxPacket

received IPX data packet.

Properties:
Name Type Description
data string

the received data.

source IpxAddress

address of the sending node.

object

# Matrix

Properties:
Name Type Description
v Array.<Array.<number>>

the 3x3 matrix data.

t Array.<number>

the translation data.

object

# MemInfo

Properties:
Name Type Description
total number

total amount of memory in the system.

remaining number

number of available bytes.

object

# Node

The root node of the QuadTree which covers the entire area being segmented.

Properties:
Name Type Description
root
object

# StatInfo

Properties:
Name Type Description
atime string

file access timestamp.

ctime string

file creation time.

mtime string

file modification time.

blksize number

file size in blocks.

size number

file size in bytes.

nlink number

number of sub entries.

drive string

drive letter for the entry.

is_blockdev boolean

true if this is a block device.

is_chardev boolean

true if this is a character device.

is_directory boolean

true if this is a directory.

is_regular boolean

true if this is a regular file.