mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
Merge branch 'MihailRis:main' into main
This commit is contained in:
commit
d920772f75
15 changed files with 287 additions and 6 deletions
|
|
@ -156,6 +156,25 @@ Properties:
|
|||
| ----- | ------ | ---- | ----- | ------------ |
|
||||
| src | string | yes | yes | texture name |
|
||||
|
||||
## Canvas
|
||||
|
||||
Properties:
|
||||
|
||||
| Title | Type | Read | Write | Description |
|
||||
|-------|--------| ---- |-------|-------------|
|
||||
| data | Canvas | yes | no | canvas data |
|
||||
|
||||
Methods:
|
||||
|
||||
| Method | Description |
|
||||
|----------------------------------------------------------|---------------------------------------------------------|
|
||||
| data:at(x: int, y: int) | returns an RGBA pixel at the given coordinates |
|
||||
| data:set(x: int, y: int, rgba: int) | updates an RGBA pixel at the given coordinates |
|
||||
| data:set(x: int, y: int, r: int, g: int, b: int) | updates an RGBA pixel at the given coordinates |
|
||||
| data:set(x: int, y: int, r: int, g: int, b: int, a: int) | updates an RGBA pixel at the given coordinates |
|
||||
| data:update() | applies changes to the canvas and uploads it to the GPU |
|
||||
|
||||
|
||||
## Inventory
|
||||
|
||||
Properties:
|
||||
|
|
|
|||
|
|
@ -97,7 +97,11 @@ Inner text is a button text.
|
|||
- `src` - name of an image stored in textures folder. Extension is not specified. Type: string.
|
||||
Example: *gui/error*
|
||||
|
||||
## *textbox*
|
||||
## *canvas*
|
||||
|
||||
- _No additional attributes_
|
||||
|
||||
## *textbox*
|
||||
|
||||
Inner text - initially entered text
|
||||
|
||||
|
|
|
|||
|
|
@ -156,6 +156,25 @@ document["worlds-panel"]:clear()
|
|||
| -------- | ------ | ------ | ------ | --------------------- |
|
||||
| src | string | да | да | отображаемая текстура |
|
||||
|
||||
|
||||
## Холст (canvas)
|
||||
|
||||
Свойства:
|
||||
|
||||
| Название | Тип | Чтение | Запись | Описание |
|
||||
|----------|--------| ------ |--------|----------------|
|
||||
| data | Canvas | да | нет | пиксели холста |
|
||||
|
||||
Методы:
|
||||
|
||||
| Метод | Описание |
|
||||
|----------------------------------------------------------|-----------------------------------------------------|
|
||||
| data:at(x: int, y: int) | возвращает RGBA пиксель по указанным координатам |
|
||||
| data:set(x: int, y: int, rgba: int) | изменяет RGBA пиксель по указанным координатам |
|
||||
| data:set(x: int, y: int, r: int, g: int, b: int) | изменяет RGBA пиксель по указанным координатам |
|
||||
| data:set(x: int, y: int, r: int, g: int, b: int, a: int) | изменяет RGBA пиксель по указанным координатам |
|
||||
| data:update() | применяет изменения и загружает холст в видеопамять |
|
||||
|
||||
## Inventory (inventory)
|
||||
|
||||
Свойства:
|
||||
|
|
|
|||
|
|
@ -98,6 +98,10 @@
|
|||
|
||||
- `src` - имя изображения в папке textures без указания расширения. Тип: строка. Например `gui/error`
|
||||
|
||||
## Холст - *canvas*
|
||||
|
||||
- _Нет дополнительных свойств_
|
||||
|
||||
## Текстовое поле - *textbox*
|
||||
|
||||
Внутренний текст - изначально введенный текст
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue