mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
Merge branch 'main' into animation
This commit is contained in:
commit
856f678315
14 changed files with 125 additions and 9 deletions
|
|
@ -172,7 +172,9 @@ app.start_background_instance(
|
|||
-- script file
|
||||
app_script: string,
|
||||
-- log file
|
||||
output_file: string | nil
|
||||
output_file: string,
|
||||
-- project parameters (can be read with vc.get_project_arg(name))
|
||||
project_args: table<string, string> | nil
|
||||
) -> int
|
||||
|
||||
-- Checks if the engine sub-instance is alive.
|
||||
|
|
|
|||
|
|
@ -63,6 +63,13 @@ input.get_mouse_delta() --> {int, int}
|
|||
|
||||
Returns cursor movement delta.
|
||||
|
||||
```lua
|
||||
input.get_mouse_scroll() --> int
|
||||
```
|
||||
|
||||
Returns the vertical mouse wheel offset accumulated during the current frame.
|
||||
A positive value indicates scrolling up; a negative value indicates scrolling down.
|
||||
|
||||
```lua
|
||||
input.get_bindings() --> strings array
|
||||
```
|
||||
|
|
|
|||
|
|
@ -92,6 +92,21 @@ socket:recv_async(
|
|||
[optional] usetable: bool=false
|
||||
) -> nil|table|Bytearray
|
||||
|
||||
-- `peek` and `peek_async` are analogous to the `recv` and `recv_async` methods
|
||||
-- with the exception that `peek` and `peek_async` do not advance the socket buffer position
|
||||
-- This means they do not remove bytes from the socket, so the bytes can be received after
|
||||
socket:peek(
|
||||
length: int,
|
||||
[optional] usetable: boolean=false
|
||||
) -> nil|table|Bytearray
|
||||
|
||||
socket:peek_async(
|
||||
length: int,
|
||||
[optional] usetable: boolean=false
|
||||
) -> nil|table|Bytearray
|
||||
|
||||
Translated with DeepL.com (free version)
|
||||
|
||||
-- Closes the connection
|
||||
socket:close()
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,9 @@ app.start_background_instance(
|
|||
-- файл сценария
|
||||
app_script: string,
|
||||
-- файл лога
|
||||
output_file: string | nil
|
||||
output_file: string,
|
||||
-- параметры проекта, что будут доступны через vc.get_project_arg(name)
|
||||
project_args: table<string, string> | nil,
|
||||
) -> int
|
||||
|
||||
-- Проверяет, жив ли под-экземпляр движка.
|
||||
|
|
|
|||
|
|
@ -34,6 +34,10 @@ input.get_mouse_pos() -> {number, number}
|
|||
|
||||
-- Возращает дельту позиции курсора.
|
||||
input.get_mouse_delta() -> {number, number}
|
||||
|
||||
-- Возвращает вертикальное смещение колеса мыши, накопленное за текущий кадр.
|
||||
-- Положительное значение соответствует прокрутке вверх, отрицательное - вниз.
|
||||
input.get_mouse_scroll() -> number
|
||||
```
|
||||
|
||||
## Создание обработчиков
|
||||
|
|
|
|||
|
|
@ -92,6 +92,19 @@ socket:recv_async(
|
|||
[опционально] usetable: boolean=false
|
||||
) -> nil|table|Bytearray
|
||||
|
||||
-- `peek` и `peek_async` являются аналогами методов `recv` и `recv_async`
|
||||
-- за тем исключением, что `peek` и `peek_async` не двигают позицию буфера сокета
|
||||
-- Это означает, что они не удаляют байты из сокета, а значит байты могут быть прочитаны после
|
||||
socket:peek(
|
||||
length: int,
|
||||
[опционально] usetable: boolean=false
|
||||
) -> nil|table|Bytearray
|
||||
|
||||
socket:peek_async(
|
||||
length: int,
|
||||
[опционально] usetable: boolean=false
|
||||
) -> nil|table|Bytearray
|
||||
|
||||
-- Оборачивает сокет в io_stream (см. ../io_stream.md)
|
||||
socket:as_stream(
|
||||
[опционально] binary_mode: boolean=true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue