mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
Merge branch 'dev' into pathfinding
This commit is contained in:
commit
ca1b761c8c
57 changed files with 818 additions and 207 deletions
28
doc/en/scripting/builtins/libassets.md
Normal file
28
doc/en/scripting/builtins/libassets.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# *assets* library
|
||||
|
||||
A library for working with audio/visual assets.
|
||||
|
||||
## Functions
|
||||
|
||||
```lua
|
||||
-- Loads a texture
|
||||
assets.load_texture(
|
||||
-- Array of bytes of an image file
|
||||
data: table | Bytearray,
|
||||
-- Texture name after loading
|
||||
name: str,
|
||||
-- Image file format (only png is supported)
|
||||
[optional]
|
||||
format: str = "png"
|
||||
)
|
||||
|
||||
-- Parses and loads a 3D model
|
||||
assets.parse_model(
|
||||
-- Model file format (xml / vcm)
|
||||
format: str,
|
||||
-- Contents of the model file
|
||||
content: str,
|
||||
-- Model name after loading
|
||||
name: str
|
||||
)
|
||||
```
|
||||
|
|
@ -103,3 +103,9 @@ gui.load_document(
|
|||
```
|
||||
|
||||
Loads a UI document with its script, returns the name of the document if successfully loaded.
|
||||
|
||||
```lua
|
||||
gui.root: Document
|
||||
```
|
||||
|
||||
Root UI document
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue