mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
add assets.request_texture
This commit is contained in:
parent
5ca0891c3d
commit
6afb5c8c0f
3 changed files with 26 additions and 1 deletions
|
|
@ -5,6 +5,13 @@ A library for working with audio/visual assets.
|
|||
## Functions
|
||||
|
||||
```lua
|
||||
-- Requests background texture loading
|
||||
assets.request_texture(
|
||||
-- Image file
|
||||
filename: string,
|
||||
-- Texture name after loading
|
||||
name: string,
|
||||
)
|
||||
-- Loads a texture
|
||||
assets.load_texture(
|
||||
-- Array of bytes of an image file
|
||||
|
|
|
|||
|
|
@ -5,6 +5,14 @@
|
|||
## Функции
|
||||
|
||||
```lua
|
||||
-- Запрашивает фоновую загрузку текстуры
|
||||
assets.request_texture(
|
||||
-- Файла изображения
|
||||
filename: string,
|
||||
-- Имя текстуры после загрузки
|
||||
name: string,
|
||||
)
|
||||
|
||||
-- Загружает текстуру
|
||||
assets.load_texture(
|
||||
-- Массив байт файла изображения
|
||||
|
|
@ -33,4 +41,4 @@ assets.to_canvas(
|
|||
-- так и находящиеся в атласе ("атлас:имя_текстуры").
|
||||
name: string
|
||||
) -> Canvas
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue