api changes and progress on filling in twn_api.json

This commit is contained in:
veclavtalica
2025-01-07 14:14:21 +03:00
parent 5c89c55b3e
commit 8c401eda75
5 changed files with 92 additions and 23 deletions

View File

@ -66,7 +66,7 @@
"symbol": "sprite",
"header": "twn_draw.h",
"params": [
{ "name": "path", "type": "char *" },
{ "name": "texture", "type": "char *" },
{ "name": "rect", "type": "Rect" },
{ "name": "texture_region", "type": "Rect *", "default": {} },
{ "name": "color", "type": "Color", "default": { "r": 255, "g": 255, "b": 255, "a": 255 } },
@ -121,6 +121,71 @@
{ "name": "font", "type": "char *", "default": {} }
],
"return": "float"
},
"draw_nine_slice": {
"module": "draw",
"symbol": "nine_slice",
"header": "twn_draw.h",
"params": [
{ "name": "texture", "type": "char *" },
{ "name": "corners", "type": "Vec2" },
{ "name": "rect", "type": "Rect" },
{ "name": "border_thickness", "type": "float", "default": 0 },
{ "name": "color", "type": "Color", "default": { "r": 255, "g": 255, "b": 255, "a": 255 } }
]
},
"draw_triangle": {
"module": "draw",
"symbol": "triangle",
"header": "twn_draw.h",
"params": [
{ "name": "texture", "type": "char *" },
{ "name": "v0", "type": "Vec3" },
{ "name": "v1", "type": "Vec3" },
{ "name": "v2", "type": "Vec3" },
{ "name": "uv0", "type": "Vec2" },
{ "name": "uv1", "type": "Vec2" },
{ "name": "uv2", "type": "Vec2" },
{ "name": "c0", "type": "Color", "default": { "r": 255, "g": 255, "b": 255, "a": 255 } },
{ "name": "c1", "type": "Color", "default": { "r": 255, "g": 255, "b": 255, "a": 255 } },
{ "name": "c2", "type": "Color", "default": { "r": 255, "g": 255, "b": 255, "a": 255 } }
]
},
"draw_billboard": {
"module": "draw",
"symbol": "billboard",
"header": "twn_draw.h",
"params": [
{ "name": "texture", "type": "char *" },
{ "name": "position", "type": "Vec3" },
{ "name": "size", "type": "Vec2" },
{ "name": "color", "type": "Color", "default": { "r": 255, "g": 255, "b": 255, "a": 255 } },
{ "name": "cylindrical", "type": "bool", "default": false }
]
},
"draw_skybox": {
"module": "draw",
"symbol": "skybox",
"header": "twn_draw.h",
"params": [
{ "name": "textures", "type": "char *", "default": {} }
]
},
"draw_fog": {
"module": "draw",
"symbol": "fog",
"header": "twn_draw.h",
"params": [
{ "name": "start", "type": "float", "default": 0 },
{ "name": "end", "type": "float", "default": 1 },
{ "name": "density", "type": "float", "default": 0 },
{ "name": "color", "type": "Color", "default": { "r": 255, "g": 255, "b": 255, "a": 255 } }
]
}
},