Dependencies
No dependencies
Download
- Windows
- macOS
- Binaries are not signed, so it requires to allow it running on your Mac in macOS settings.
- Linux
- Install from sources
How to use
- (All OS) Specify that directory via command line argument
C:/dev/fyrox_lua_sdk/fyroxed_lua.exe <path>
- (Windows only) Double-click on
C:/dev/fyrox_lua_sdk/fyroxed_lua.exe
icon and choose that directory in opened dialog window. - (Windows only) Drop that directory on the
C:/dev/fyrox_lua_sdk/fyroxed_lua.exe
icon in file explorer.
Game can be launched using Play button in editor. Also, game can be launched using
C:/dev/fyrox_lua_sdk/fyrox_lite_lua.exe c:/dev/my_lua_game
command.
Scripts
To emulate some OOP concepts, Lua Annotaions are used.
Following code defines a MyScript
class, inherited from Script
---@uuid 3e0d5f2b-6f9b-4c9a-a4fb-7cda5fae9d8d
---@class MyScript : Script
---@field velocity Vector3
---@field collider Node
---@field power number
MyScript = script_class()
function MyScript:on_update(dt)
end
Defined fields are accessible in editor UI and saved into scene files.
Inherit classes from NodeScript
to create scripts that can be attached to scene nodes in editor via dropdown on
Inspector
panel at the right. for @uuid
annotation value can be generated here.
Inherit from GlobalScript
to create singleton scripts. Unlike C# scripts, Lua global scripts require UUID.
Look into guards_cs project as an example.
Scripts Reloading
Editor reloads scripts metadata automatically after their change and window re-focusing. In-game hot reload works the same way.
Scenes & Assets
CLI
The fyroxed_lua.exe
can also be invoked via terminal with project path argument.
Install from sources
That's optional, because prebuilt binaries are available.
- Install latest Rust toolchain.
- (Windows only) Install Git Bash. Other MSYS2 distribution haven't tested.
- Checkout sources and install using shell command (use Git Bash on windows)
git clone https://github.com/kkolyan/fyrox_lite.git \ && cd fyrox_lite \ && chmod +x **/*.sh \ && ./bash/lua_install_sdk.sh <installation path>
<installation path>
now contains ready-to-use binaries.
Scripting API (C#)
Color
package
Description
Classes
Color
class in Color
Constants
Name | Type | Value | Description |
---|---|---|---|
WHITE | Color | color_to_lite (fyrox :: core :: color :: Color :: WHITE) | |
BLACK | Color | color_to_lite (fyrox :: core :: color :: Color :: BLACK) | |
RED | Color | color_to_lite (fyrox :: core :: color :: Color :: RED) | |
GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: GREEN) | |
BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: BLUE) | |
TRANSPARENT | Color | color_to_lite (fyrox :: core :: color :: Color :: TRANSPARENT) | |
MAROON | Color | color_to_lite (fyrox :: core :: color :: Color :: MAROON) | |
DARK_RED | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_RED) | |
BROWN | Color | color_to_lite (fyrox :: core :: color :: Color :: BROWN) | |
FIREBRICK | Color | color_to_lite (fyrox :: core :: color :: Color :: FIREBRICK) | |
CRIMSON | Color | color_to_lite (fyrox :: core :: color :: Color :: CRIMSON) | |
TOMATO | Color | color_to_lite (fyrox :: core :: color :: Color :: TOMATO) | |
CORAL | Color | color_to_lite (fyrox :: core :: color :: Color :: CORAL) | |
INDIAN_RED | Color | color_to_lite (fyrox :: core :: color :: Color :: INDIAN_RED) | |
LIGHT_CORAL | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_CORAL) | |
DARK_SALMON | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_SALMON) | |
SALMON | Color | color_to_lite (fyrox :: core :: color :: Color :: SALMON) | |
LIGHT_SALMON | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_SALMON) | |
ORANGE_RED | Color | color_to_lite (fyrox :: core :: color :: Color :: ORANGE_RED) | |
DARK_ORANGE | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_ORANGE) | |
ORANGE | Color | color_to_lite (fyrox :: core :: color :: Color :: ORANGE) | |
GOLD | Color | color_to_lite (fyrox :: core :: color :: Color :: GOLD) | |
DARK_GOLDEN_ROD | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_GOLDEN_ROD) | |
GOLDEN_ROD | Color | color_to_lite (fyrox :: core :: color :: Color :: GOLDEN_ROD) | |
PALE_GOLDEN_ROD | Color | color_to_lite (fyrox :: core :: color :: Color :: PALE_GOLDEN_ROD) | |
DARK_KHAKI | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_KHAKI) | |
KHAKI | Color | color_to_lite (fyrox :: core :: color :: Color :: KHAKI) | |
OLIVE | Color | color_to_lite (fyrox :: core :: color :: Color :: OLIVE) | |
YELLOW | Color | color_to_lite (fyrox :: core :: color :: Color :: YELLOW) | |
YELLOW_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: YELLOW_GREEN) | |
DARK_OLIVE_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_OLIVE_GREEN) | |
OLIVE_DRAB | Color | color_to_lite (fyrox :: core :: color :: Color :: OLIVE_DRAB) | |
LAWN_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: LAWN_GREEN) | |
CHARTREUSE | Color | color_to_lite (fyrox :: core :: color :: Color :: CHARTREUSE) | |
GREEN_YELLOW | Color | color_to_lite (fyrox :: core :: color :: Color :: GREEN_YELLOW) | |
DARK_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_GREEN) | |
FOREST_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: FOREST_GREEN) | |
LIME | Color | color_to_lite (fyrox :: core :: color :: Color :: LIME) | |
LIME_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: LIME_GREEN) | |
LIGHT_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_GREEN) | |
PALE_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: PALE_GREEN) | |
DARK_SEA_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_SEA_GREEN) | |
MEDIUM_SPRING_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: MEDIUM_SPRING_GREEN) | |
SPRING_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: SPRING_GREEN) | |
SEA_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: SEA_GREEN) | |
MEDIUM_AQUA_MARINE | Color | color_to_lite (fyrox :: core :: color :: Color :: MEDIUM_AQUA_MARINE) | |
MEDIUM_SEA_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: MEDIUM_SEA_GREEN) | |
LIGHT_SEA_GREEN | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_SEA_GREEN) | |
DARK_SLATE_GRAY | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_SLATE_GRAY) | |
TEAL | Color | color_to_lite (fyrox :: core :: color :: Color :: TEAL) | |
DARK_CYAN | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_CYAN) | |
AQUA | Color | color_to_lite (fyrox :: core :: color :: Color :: AQUA) | |
CYAN | Color | color_to_lite (fyrox :: core :: color :: Color :: CYAN) | |
LIGHT_CYAN | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_CYAN) | |
DARK_TURQUOISE | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_TURQUOISE) | |
TURQUOISE | Color | color_to_lite (fyrox :: core :: color :: Color :: TURQUOISE) | |
MEDIUM_TURQUOISE | Color | color_to_lite (fyrox :: core :: color :: Color :: MEDIUM_TURQUOISE) | |
PALE_TURQUOISE | Color | color_to_lite (fyrox :: core :: color :: Color :: PALE_TURQUOISE) | |
AQUA_MARINE | Color | color_to_lite (fyrox :: core :: color :: Color :: AQUA_MARINE) | |
POWDER_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: POWDER_BLUE) | |
CADET_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: CADET_BLUE) | |
STEEL_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: STEEL_BLUE) | |
CORN_FLOWER_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: CORN_FLOWER_BLUE) | |
DEEP_SKY_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: DEEP_SKY_BLUE) | |
DODGER_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: DODGER_BLUE) | |
LIGHT_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_BLUE) | |
SKY_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: SKY_BLUE) | |
LIGHT_SKY_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_SKY_BLUE) | |
MIDNIGHT_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: MIDNIGHT_BLUE) | |
NAVY | Color | color_to_lite (fyrox :: core :: color :: Color :: NAVY) | |
DARK_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_BLUE) | |
MEDIUM_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: MEDIUM_BLUE) | |
ROYAL_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: ROYAL_BLUE) | |
BLUE_VIOLET | Color | color_to_lite (fyrox :: core :: color :: Color :: BLUE_VIOLET) | |
INDIGO | Color | color_to_lite (fyrox :: core :: color :: Color :: INDIGO) | |
DARK_SLATE_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_SLATE_BLUE) | |
SLATE_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: SLATE_BLUE) | |
MEDIUM_SLATE_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: MEDIUM_SLATE_BLUE) | |
MEDIUM_PURPLE | Color | color_to_lite (fyrox :: core :: color :: Color :: MEDIUM_PURPLE) | |
DARK_MAGENTA | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_MAGENTA) | |
DARK_VIOLET | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_VIOLET) | |
DARK_ORCHID | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_ORCHID) | |
MEDIUM_ORCHID | Color | color_to_lite (fyrox :: core :: color :: Color :: MEDIUM_ORCHID) | |
PURPLE | Color | color_to_lite (fyrox :: core :: color :: Color :: PURPLE) | |
THISTLE | Color | color_to_lite (fyrox :: core :: color :: Color :: THISTLE) | |
PLUM | Color | color_to_lite (fyrox :: core :: color :: Color :: PLUM) | |
VIOLET | Color | color_to_lite (fyrox :: core :: color :: Color :: VIOLET) | |
MAGENTA | Color | color_to_lite (fyrox :: core :: color :: Color :: MAGENTA) | |
ORCHID | Color | color_to_lite (fyrox :: core :: color :: Color :: ORCHID) | |
MEDIUM_VIOLET_RED | Color | color_to_lite (fyrox :: core :: color :: Color :: MEDIUM_VIOLET_RED) | |
PALE_VIOLET_RED | Color | color_to_lite (fyrox :: core :: color :: Color :: PALE_VIOLET_RED) | |
DEEP_PINK | Color | color_to_lite (fyrox :: core :: color :: Color :: DEEP_PINK) | |
HOT_PINK | Color | color_to_lite (fyrox :: core :: color :: Color :: HOT_PINK) | |
LIGHT_PINK | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_PINK) | |
PINK | Color | color_to_lite (fyrox :: core :: color :: Color :: PINK) | |
ANTIQUE_WHITE | Color | color_to_lite (fyrox :: core :: color :: Color :: ANTIQUE_WHITE) | |
BEIGE | Color | color_to_lite (fyrox :: core :: color :: Color :: BEIGE) | |
BISQUE | Color | color_to_lite (fyrox :: core :: color :: Color :: BISQUE) | |
BLANCHED_ALMOND | Color | color_to_lite (fyrox :: core :: color :: Color :: BLANCHED_ALMOND) | |
WHEAT | Color | color_to_lite (fyrox :: core :: color :: Color :: WHEAT) | |
CORN_SILK | Color | color_to_lite (fyrox :: core :: color :: Color :: CORN_SILK) | |
LEMON_CHIFFON | Color | color_to_lite (fyrox :: core :: color :: Color :: LEMON_CHIFFON) | |
LIGHT_GOLDEN_ROD_YELLOW | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_GOLDEN_ROD_YELLOW) | |
LIGHT_YELLOW | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_YELLOW) | |
SADDLE_BROWN | Color | color_to_lite (fyrox :: core :: color :: Color :: SADDLE_BROWN) | |
SIENNA | Color | color_to_lite (fyrox :: core :: color :: Color :: SIENNA) | |
CHOCOLATE | Color | color_to_lite (fyrox :: core :: color :: Color :: CHOCOLATE) | |
PERU | Color | color_to_lite (fyrox :: core :: color :: Color :: PERU) | |
SANDY_BROWN | Color | color_to_lite (fyrox :: core :: color :: Color :: SANDY_BROWN) | |
BURLY_WOOD | Color | color_to_lite (fyrox :: core :: color :: Color :: BURLY_WOOD) | |
TAN | Color | color_to_lite (fyrox :: core :: color :: Color :: TAN) | |
ROSY_BROWN | Color | color_to_lite (fyrox :: core :: color :: Color :: ROSY_BROWN) | |
MOCCASIN | Color | color_to_lite (fyrox :: core :: color :: Color :: MOCCASIN) | |
NAVAJO_WHITE | Color | color_to_lite (fyrox :: core :: color :: Color :: NAVAJO_WHITE) | |
PEACH_PUFF | Color | color_to_lite (fyrox :: core :: color :: Color :: PEACH_PUFF) | |
MISTY_ROSE | Color | color_to_lite (fyrox :: core :: color :: Color :: MISTY_ROSE) | |
LAVENDER_BLUSH | Color | color_to_lite (fyrox :: core :: color :: Color :: LAVENDER_BLUSH) | |
LINEN | Color | color_to_lite (fyrox :: core :: color :: Color :: LINEN) | |
OLD_LACE | Color | color_to_lite (fyrox :: core :: color :: Color :: OLD_LACE) | |
PAPAYA_WHIP | Color | color_to_lite (fyrox :: core :: color :: Color :: PAPAYA_WHIP) | |
SEA_SHELL | Color | color_to_lite (fyrox :: core :: color :: Color :: SEA_SHELL) | |
MINT_CREAM | Color | color_to_lite (fyrox :: core :: color :: Color :: MINT_CREAM) | |
SLATE_GRAY | Color | color_to_lite (fyrox :: core :: color :: Color :: SLATE_GRAY) | |
LIGHT_SLATE_GRAY | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_SLATE_GRAY) | |
LIGHT_STEEL_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_STEEL_BLUE) | |
LAVENDER | Color | color_to_lite (fyrox :: core :: color :: Color :: LAVENDER) | |
FLORAL_WHITE | Color | color_to_lite (fyrox :: core :: color :: Color :: FLORAL_WHITE) | |
ALICE_BLUE | Color | color_to_lite (fyrox :: core :: color :: Color :: ALICE_BLUE) | |
GHOST_WHITE | Color | color_to_lite (fyrox :: core :: color :: Color :: GHOST_WHITE) | |
HONEYDEW | Color | color_to_lite (fyrox :: core :: color :: Color :: HONEYDEW) | |
IVORY | Color | color_to_lite (fyrox :: core :: color :: Color :: IVORY) | |
AZURE | Color | color_to_lite (fyrox :: core :: color :: Color :: AZURE) | |
SNOW | Color | color_to_lite (fyrox :: core :: color :: Color :: SNOW) | |
DIM_GRAY | Color | color_to_lite (fyrox :: core :: color :: Color :: DIM_GRAY) | |
GRAY | Color | color_to_lite (fyrox :: core :: color :: Color :: GRAY) | |
DARK_GRAY | Color | color_to_lite (fyrox :: core :: color :: Color :: DARK_GRAY) | |
SILVER | Color | color_to_lite (fyrox :: core :: color :: Color :: SILVER) | |
LIGHT_GRAY | Color | color_to_lite (fyrox :: core :: color :: Color :: LIGHT_GRAY) | |
GAINSBORO | Color | color_to_lite (fyrox :: core :: color :: Color :: GAINSBORO) | |
WHITE_SMOKE | Color | color_to_lite (fyrox :: core :: color :: Color :: WHITE_SMOKE) |
Input
package
Description
User input utilities
Classes
Input
class in Input
Description
Utility class to poll player input events
Constants
Name | Type | Value | Description |
---|---|---|---|
MouseLeft | int | 0 | Left Mouse Button ID |
MouseRight | int | 1 | |
MouseMiddle | int | 2 | |
MouseBack | int | 3 | |
MouseForward | int | 4 |
Static Properties
Static Methods
Return Type | Signature | Description |
---|---|---|
bool | is_mouse_button_down ( int button ) | is mouse button with ID |
bool | is_mouse_button_up ( int button ) | |
bool | is_mouse_button_pressed ( int button ) | |
bool | is_key_down ( KeyCode key ) | |
bool | is_key_up ( KeyCode key ) | |
bool | is_key_pressed ( KeyCode key ) |
KeyCode
enum in Input
Description
Basically a copy of winit
’s KeyCode
, which is mostly inspired by UI Events Specification’s KeyboardEvent.code
.
Properties
Property | Description |
---|---|
Backquote | ` on a US keyboard. This is also called a backtick or grave. This is the 半角/全角/漢字 (hankaku/zenkaku/kanji) key on Japanese keyboards |
Backslash | Used for both the US \ (on the 101-key layout) and also for the key located between the “ and Enter keys on row C of the 102-, 104- and 106-key layouts. Labeled # on a UK (102) keyboard. |
BracketLeft | [ on a US keyboard. |
BracketRight | ] on a US keyboard. |
Comma | , on a US keyboard. |
Digit0 | 0 on a US keyboard. |
Digit1 | 1 on a US keyboard. |
Digit2 | 2 on a US keyboard. |
Digit3 | 3 on a US keyboard. |
Digit4 | 4 on a US keyboard. |
Digit5 | 5 on a US keyboard. |
Digit6 | 6 on a US keyboard. |
Digit7 | 7 on a US keyboard. |
Digit8 | 8 on a US keyboard. |
Digit9 | 9 on a US keyboard. |
Equal | = on a US keyboard. |
IntlBackslash | Located between the left Shift and Z keys. Labeled \ on a UK keyboard. |
IntlRo | Located between the / and right Shift keys. Labeled \ (ro) on a Japanese keyboard. |
IntlYen | Located between the = and Backspace keys. Labeled ¥ (yen) on a Japanese keyboard. \ on a Russian keyboard. |
A | a on a US keyboard. Labeled q on an AZERTY (e.g., French) keyboard. |
B | b on a US keyboard. |
C | c on a US keyboard. |
D | d on a US keyboard. |
E | e on a US keyboard. |
F | f on a US keyboard. |
G | g on a US keyboard. |
H | h on a US keyboard. |
I | i on a US keyboard. |
J | j on a US keyboard. |
K | k on a US keyboard. |
L | l on a US keyboard. |
M | m on a US keyboard. |
N | n on a US keyboard. |
O | o on a US keyboard. |
P | p on a US keyboard. |
Q | q on a US keyboard. Labeled a on an AZERTY (e.g., French) keyboard. |
R | r on a US keyboard. |
S | s on a US keyboard. |
T | t on a US keyboard. |
U | u on a US keyboard. |
V | v on a US keyboard. |
W | w on a US keyboard. Labeled z on an AZERTY (e.g., French) keyboard. |
X | x on a US keyboard. |
Y | y on a US keyboard. Labeled z on a QWERTZ (e.g., German) keyboard. |
Z | z on a US keyboard. Labeled w on an AZERTY (e.g., French) keyboard, and y on a QWERTZ (e.g., German) keyboard. |
Minus | - on a US keyboard. |
Period | . on a US keyboard. |
Quote | ’ on a US keyboard. |
Semicolon | ; on a US keyboard. |
Slash | / on a US keyboard. |
AltLeft | Alt, Option, or ⌥. |
AltRight | Alt, Option, or ⌥. This is labeled AltGr on many keyboard layouts. |
Backspace | Backspace or ⌫. Labeled Delete on Apple keyboards. |
CapsLock | CapsLock or ⇪ |
ContextMenu | The application context menu key, which is typically found between the right Super key and the right Control key. |
ControlLeft | Control or ⌃ |
ControlRight | Control or ⌃ |
Enter | Enter or ↵. Labeled Return on Apple keyboards. |
SuperLeft | The Windows, ⌘, Command, or other OS symbol key. |
SuperRight | The Windows, ⌘, Command, or other OS symbol key. |
ShiftLeft | Shift or ⇧ |
ShiftRight | Shift or ⇧ |
Space | (space) |
Tab | Tab or ⇥ |
Convert | Japanese: 変 (henkan) |
KanaMode | Japanese: カタカナ/ひらがな/ローマ字 (katakana/hiragana/romaji) |
Lang1 | Korean: HangulMode 한/영 (han/yeong) Japanese (Mac keyboard): か (kana) |
Lang2 | Korean: Hanja 한 (hanja) Japanese (Mac keyboard): 英 (eisu) |
Lang3 | Japanese (word-processing keyboard): Katakana |
Lang4 | Japanese (word-processing keyboard): Hiragana |
Lang5 | Japanese (word-processing keyboard): Zenkaku/Hankaku |
NonConvert | Japanese: 無変換 (muhenkan) |
Delete | ⌦. The forward delete key. Note that on Apple keyboards, the key labelled Delete on the main part of the keyboard is encoded as |
End | Page Down, End, or ↘ |
Help | Help. Not present on standard PC keyboards. |
Home | Home or ↖ |
Insert | Insert or Ins. Not present on Apple keyboards. |
PageDown | Page Down, PgDn, or ⇟ |
PageUp | Page Up, PgUp, or ⇞ |
ArrowDown | ↓ |
ArrowLeft | ← |
ArrowRight | → |
ArrowUp | ↑ |
NumLock | On the Mac, this is used for the numpad Clear key. |
Numpad0 | 0 Ins on a keyboard. 0 on a phone or remote control |
Numpad1 | 1 End on a keyboard. 1 or 1 QZ on a phone or remote control |
Numpad2 | 2 ↓ on a keyboard. 2 ABC on a phone or remote control |
Numpad3 | 3 PgDn on a keyboard. 3 DEF on a phone or remote control |
Numpad4 | 4 ← on a keyboard. 4 GHI on a phone or remote control |
Numpad5 | 5 on a keyboard. 5 JKL on a phone or remote control |
Numpad6 | 6 → on a keyboard. 6 MNO on a phone or remote control |
Numpad7 | 7 Home on a keyboard. 7 PQRS or 7 PRS on a phone or remote control |
Numpad8 | 8 ↑ on a keyboard. 8 TUV on a phone or remote control |
Numpad9 | 9 PgUp on a keyboard. 9 WXYZ or 9 WXY on a phone or remote control |
NumpadAdd | + |
NumpadBackspace | Found on the Microsoft Natural Keyboard. |
NumpadClear | C or A (All Clear). Also for use with numpads that have a Clear key that is separate from the NumLock key. On the Mac, the numpad Clear key is encoded as |
NumpadClearEntry | C (Clear Entry) |
NumpadComma | , (thousands separator). For locales where the thousands separator is a “.” (e.g., Brazil), this key may generate a .. |
NumpadDecimal | . Del. For locales where the decimal separator is “,” (e.g., Brazil), this key may generate a ,. |
NumpadDivide | / |
NumpadEnter | |
NumpadEqual | = |
NumpadHash | # on a phone or remote control device. This key is typically found below the 9 key and to the right of the 0 key. |
NumpadMemoryAdd | M Add current entry to the value stored in memory. |
NumpadMemoryClear | M Clear the value stored in memory. |
NumpadMemoryRecall | M Replace the current entry with the value stored in memory. |
NumpadMemoryStore | M Replace the value stored in memory with the current entry. |
NumpadMemorySubtract | M Subtract current entry from the value stored in memory. |
NumpadMultiply | on a keyboard. For use with numpads that provide mathematical operations (+, - and /). Use |
NumpadParenLeft | ( Found on the Microsoft Natural Keyboard. |
NumpadParenRight | ) Found on the Microsoft Natural Keyboard. |
NumpadStar | on a phone or remote control device. This key is typically found below the 7 key and to the left of the 0 key. Use “NumpadMultiply” for the key on numeric keypads. |
NumpadSubtract | - |
Escape | Esc or ⎋ |
Fn | Fn This is typically a hardware key that does not generate a separate code. |
FnLock | FLock or FnLock. Function Lock key. Found on the Microsoft Natural Keyboard. |
PrintScreen | PrtScr SysRq or Print Screen |
ScrollLock | Scroll Lock |
Pause | Pause Break |
BrowserBack | Some laptops place this key to the left of the ↑ key. This also the “back” button (triangle) on Android. |
BrowserFavorites | |
BrowserForward | Some laptops place this key to the right of the ↑ key. |
BrowserHome | The “home” button on Android. |
BrowserRefresh | |
BrowserSearch | |
BrowserStop | |
Eject | Eject or ⏏. This key is placed in the function section on some Apple keyboards. |
LaunchApp1 | Sometimes labelled My Computer on the keyboard |
LaunchApp2 | Sometimes labelled Calculator on the keyboard |
LaunchMail | |
MediaPlayPause | |
MediaSelect | |
MediaStop | |
MediaTrackNext | |
MediaTrackPrevious | |
Power | This key is placed in the function section on some Apple keyboards, replacing the Eject key. |
Sleep | |
AudioVolumeDown | |
AudioVolumeMute | |
AudioVolumeUp | |
WakeUp | |
Meta | |
Hyper | |
Turbo | |
Abort | |
Resume | |
Suspend | |
Again | Found on Sun’s USB keyboard. |
Copy | Found on Sun’s USB keyboard. |
Cut | Found on Sun’s USB keyboard. |
Find | Found on Sun’s USB keyboard. |
Open | Found on Sun’s USB keyboard. |
Paste | Found on Sun’s USB keyboard. |
Props | Found on Sun’s USB keyboard. |
Select | Found on Sun’s USB keyboard. |
Undo | Found on Sun’s USB keyboard. |
Hiragana | Use for dedicated ひらがな key found on some Japanese word processing keyboards. |
Katakana | Use for dedicated カタカナ key found on some Japanese word processing keyboards. |
F1 | General-purpose function key. Usually found at the top of the keyboard. |
F2 | General-purpose function key. Usually found at the top of the keyboard. |
F3 | General-purpose function key. Usually found at the top of the keyboard. |
F4 | General-purpose function key. Usually found at the top of the keyboard. |
F5 | General-purpose function key. Usually found at the top of the keyboard. |
F6 | General-purpose function key. Usually found at the top of the keyboard. |
F7 | General-purpose function key. Usually found at the top of the keyboard. |
F8 | General-purpose function key. Usually found at the top of the keyboard. |
F9 | General-purpose function key. Usually found at the top of the keyboard. |
F10 | General-purpose function key. Usually found at the top of the keyboard. |
F11 | General-purpose function key. Usually found at the top of the keyboard. |
F12 | General-purpose function key. Usually found at the top of the keyboard. |
F13 | General-purpose function key. Usually found at the top of the keyboard. |
F14 | General-purpose function key. Usually found at the top of the keyboard. |
F15 | General-purpose function key. Usually found at the top of the keyboard. |
F16 | General-purpose function key. Usually found at the top of the keyboard. |
F17 | General-purpose function key. Usually found at the top of the keyboard. |
F18 | General-purpose function key. Usually found at the top of the keyboard. |
F19 | General-purpose function key. Usually found at the top of the keyboard. |
F20 | General-purpose function key. Usually found at the top of the keyboard. |
F21 | General-purpose function key. Usually found at the top of the keyboard. |
F22 | General-purpose function key. Usually found at the top of the keyboard. |
F23 | General-purpose function key. Usually found at the top of the keyboard. |
F24 | General-purpose function key. Usually found at the top of the keyboard. |
F25 | General-purpose function key. |
F26 | General-purpose function key. |
F27 | General-purpose function key. |
F28 | General-purpose function key. |
F29 | General-purpose function key. |
F30 | General-purpose function key. |
F31 | General-purpose function key. |
F32 | General-purpose function key. |
F33 | General-purpose function key. |
F34 | General-purpose function key. |
F35 | General-purpose function key. |
Log
package
Description
Classes
Log
class in Log
Static Methods
Return Type | Signature | Description |
---|---|---|
void | info ( string msg ) | |
void | warn ( string msg ) | |
void | err ( string msg ) |
Math
package
Description
Classes
Quaternion
class in Math
Methods
Return Type | Signature | Description |
---|---|---|
Vector3 | mul_vec ( Vector3 o ) | |
Quaternion | mul_quat ( Quaternion rot_delta ) |
Static Methods
Return Type | Signature | Description |
---|---|---|
Quaternion | face_towards ( Vector3 dir, Vector3 up ) | |
Quaternion | from_axis_angle ( Vector3 axis, float angle ) |
Vector2
class in Math
Properties
Name | Type | Access | Description |
---|---|---|---|
x | float | get / set | |
y | float | get / set |
Methods
Return Type | Signature | Description |
---|---|---|
Vector2 | mul ( float o ) | |
Vector2 | add ( Vector2 o ) | |
Vector2 | normalize ( ) | |
Vector2 | sub ( Vector2 o ) | |
float | magnitude ( ) | |
void | normalize_inplace ( ) |
Static Properties
Name | Type | Access | Description |
---|---|---|---|
ZERO | Vector2 | get |
Static Methods
Return Type | Signature | Description |
---|---|---|
Vector2 | new ( float x, float y ) |
Vector2I
class in Math
Properties
Name | Type | Access | Description |
---|---|---|---|
x | int | get / set | |
y | int | get / set |
Methods
Return Type | Signature | Description |
---|---|---|
Vector2I | mul ( int o ) | |
Vector2I | add ( Vector2I o ) | |
Vector2I | sub ( Vector2I o ) |
Static Properties
Name | Type | Access | Description |
---|---|---|---|
ZERO | Vector2I | get |
Static Methods
Return Type | Signature | Description |
---|---|---|
Vector2I | new ( int x, int y ) |
Vector3
class in Math
Properties
Name | Type | Access | Description |
---|---|---|---|
x | float | get / set | |
y | float | get / set | |
z | float | get / set |
Methods
Return Type | Signature | Description |
---|---|---|
Vector3 | mul ( float o ) | |
Vector3 | add ( Vector3 o ) | |
Vector3 | normalize ( ) | |
Vector3 | sub ( Vector3 o ) | |
float | magnitude ( ) | |
void | normalize_inplace ( ) |
Static Properties
Static Methods
Return Type | Signature | Description |
---|---|---|
Vector3 | new ( float x, float y, float z ) |
Node
package
Description
Classes
Node
class in Node
Properties
Name | Type | Access | Description |
---|---|---|---|
name | string | get | |
alive | bool | get | |
global_position | Vector3 | get | |
local_position | Vector3 | get / set | |
local_rotation | Quaternion | get / set | |
valid | bool | get | |
parent | Node | get | |
global_rotation | Quaternion | get | |
tag | string | get / set |
Methods
Return Type | Signature | Description |
---|---|---|
RigidBody? | as_rigid_body ( ) | |
void | destroy ( ) | |
void | send_hierarchical ( RoutingStrategy routing, object payload ) | Sends a hierarchical script message with the given payload. |
void | subscribe_to <T > ( ) | |
Node? | find_collider_in_children ( ) | |
T | add_script <T > ( ) | |
T ? | find_script <T > ( ) | |
bool | tag_is ( string tag ) |
RoutingStrategy
enum in Node
Properties
Property | Description |
---|---|
Up | An message will be passed to the specified root node and then to every node up in the hierarchy. |
Down | An message will be passed to every node down the tree in the hierarchy. |
Physics
package
Description
Classes
FeatureId
struct in Physics
Description
Shape-dependent identifier.
Fields
Name | Type | Description |
---|---|---|
kind | FeatureKind | |
id | int |
FeatureKind
enum in Physics
Properties
Property | Description |
---|---|
Vertex | Shape-dependent identifier of a vertex. |
Edge | Shape-dependent identifier of an edge. |
Face | Shape-dependent identifier of a face. |
Unknown | Unknown identifier. |
InteractionGroups
struct in Physics
Fields
Name | Type | Description |
---|---|---|
memberships | int | Groups memberships. |
filter | int | Groups filter. |
Intersection
struct in Physics
Description
A ray intersection result.
Fields
Name | Type | Description |
---|---|---|
collider | Node | A handle of the collider with which intersection was detected. |
normal | Vector3 | A normal at the intersection position. |
position | Vector3 | A position of the intersection in world coordinates. |
feature | FeatureId | Additional data that contains a kind of the feature with which intersection was detected as well as its index. Important notes.FeatureId::Face might have index that is greater than amount of triangles in a triangle mesh, this means that intersection was detected from “back” side of a face. To “fix” that index, simply subtract amount of triangles of a triangle mesh from the value. |
toi | float | Distance from the ray origin. |
Physics
class in Physics
Constants
Name | Type | Value | Description |
---|---|---|---|
EXCLUDE_FIXED | int | 1 << 1 | Exclude from the query any collider attached to a fixed rigid-body and colliders with no rigid-body attached. |
EXCLUDE_KINEMATIC | int | 1 << 2 | Exclude from the query any collider attached to a kinematic rigid-body. |
EXCLUDE_DYNAMIC | int | 1 << 3 | Exclude from the query any collider attached to a dynamic rigid-body. |
EXCLUDE_SENSORS | int | 1 << 4 | Exclude from the query any collider that is a sensor. |
EXCLUDE_SOLIDS | int | 1 << 5 | Exclude from the query any collider that is not a sensor. |
ONLY_DYNAMIC | int | LitePhysics :: EXCLUDE_FIXED | LitePhysics :: EXCLUDE_KINEMATIC |
ONLY_KINEMATIC | int | LitePhysics :: EXCLUDE_DYNAMIC | LitePhysics :: EXCLUDE_FIXED |
ONLY_FIXED | int | LitePhysics :: EXCLUDE_DYNAMIC | LitePhysics :: EXCLUDE_KINEMATIC |
Static Methods
Return Type | Signature | Description |
---|---|---|
List< Intersection > | cast_ray ( RayCastOptions opts ) |
RayCastOptions
struct in Physics
Fields
Name | Type | Description |
---|---|---|
ray_origin | Vector3 | A ray origin. |
ray_direction | Vector3 | A ray direction. Can be non-normalized. |
max_len | float | Maximum distance of cast. |
groups | InteractionGroups? | Groups to check. |
sort_results | bool | Whether to sort intersections from closest to farthest. |
RigidBody
class in Physics
Methods
Return Type | Signature | Description |
---|---|---|
void | apply_force ( Vector3 force ) |
Prefab
package
Description
Classes
Prefab
class in Prefab
Methods
Return Type | Signature | Description |
---|---|---|
Node | instantiate_at ( Vector3 position, Quaternion orientation ) |
Scene
package
Description
Classes
Scene
class in Scene
Static Methods
Return Type | Signature | Description |
---|---|---|
void | load_async ( string scene_path ) |
Script
package
Description
Classes
GlobalScript
class in Script
Static Methods
Return Type | Signature | Description |
---|---|---|
T | get <T > ( ) | find a global script by type |
NodeScript
class in Script
Properties
Name | Type | Access | Description |
---|---|---|---|
node | Node | get |
UI
package
Description
Classes
Brush
struct in UI
Description
Brush defines a way to fill an arbitrary surface.
Fields
Name | Type | Description |
---|---|---|
solid_color | Color? | A brush, that fills a surface with a solid color. |
linear_gradient | LinearGradient? | A brush, that fills a surface with a linear gradient, which is defined by two points in local coordinates and a set of stop points. See [ |
radial_gradient | RadialGradient? | A brush, that fills a surface with a radial gradient, which is defined by a center point in local coordinates and a set of stop points. See [ |
GradientPoint
struct in UI
Fields
Name | Type | Description |
---|---|---|
stop | float | A distance from an origin of the gradient. |
color | Color | Color of the point. |
LinearGradient
struct in UI
Fields
Name | Type | Description |
---|---|---|
from | Vector2 | Beginning of the gradient in local coordinates. |
to | Vector2 | End of the gradient in local coordinates. |
stops | List< GradientPoint > | Stops of the gradient. |
RadialGradient
struct in UI
Fields
Name | Type | Description |
---|---|---|
center | Vector2 | Center of the gradient in local coordinates. |
stops | List< GradientPoint > | Stops of the gradient. |
Text
class in UI
Description
Text is a simple widget that allows you to print text on screen. It has various options like word wrapping, text alignment, and so on.
Properties
Name | Type | Access | Description |
---|---|---|---|
text_async | string | set | sets the text of UI element. applied at the end of frame. |
Static Methods
Return Type | Signature | Description |
---|---|---|
Text | new ( TextBuilder state ) |
TextBuilder
struct in UI
Fields
Name | Type | Description |
---|---|---|
foreground | Brush? | |
font_size | float? |
UiNode
class in UI
Window
package
Description
Classes
CursorGrabMode
enum in Window
Properties
Property | Description |
---|---|
None | No grabbing of the cursor is performed. |
Confined | The cursor is confined to the window area. There’s no guarantee that the cursor will be hidden. You should hide it by yourself if you want to do so. Platform-specific
|
Locked | The cursor is locked inside the window area to the certain position. There’s no guarantee that the cursor will be hidden. You should hide it by yourself if you want to do so. Platform-specific
|
Window
class in Window
Static Properties
Name | Type | Access | Description |
---|---|---|---|
cursor_grab | CursorGrabMode | set |