diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2020-11-04 21:46:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 21:46:18 +0100 |
commit | 3356da01513860d899cde503408436f7e1918f63 (patch) | |
tree | fa5c33194f29ca26c0118e33a7181ee484ef4da7 /doc | |
parent | e3bd6704a0eb65e9490347680441c7a08df36f7a (diff) | |
download | minetest-3356da01513860d899cde503408436f7e1918f63.tar.gz minetest-3356da01513860d899cde503408436f7e1918f63.tar.bz2 minetest-3356da01513860d899cde503408436f7e1918f63.zip |
Add model[] formspec element (#10320)
Formspec element to display models, written by @kilbith, rebased and tweaked.
Co-authored-by: Jean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>
Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index daf0da3d2..38fc3066a 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2272,6 +2272,18 @@ Elements * `frame duration`: Milliseconds between each frame. `0` means the frames don't advance. * `frame start` (Optional): The index of the frame to start on. Default `1`. +### `model[<X>,<Y>;<W>,<H>;<name>;<mesh>;<textures>;<rotation X,Y>;<continuous>;<mouse control>]` + +* Show a mesh model. +* `name`: Element name that can be used for styling +* `mesh`: The mesh model to use. +* `textures`: The mesh textures to use according to the mesh materials. + Texture names must be separated by commas. +* `rotation {X,Y}` (Optional): Initial rotation of the camera. + The axes are euler angles in degrees. +* `continuous` (Optional): Whether the rotation is continuous. Default `false`. +* `mouse control` (Optional): Whether the model can be controlled with the mouse. Default `true`. + ### `item_image[<X>,<Y>;<W>,<H>;<item name>]` * Show an inventory image of registered item/node @@ -2842,6 +2854,10 @@ Some types may inherit styles from parent types. * font_size - Sets font size. See button `font_size` property for more information. * noclip - boolean, set to true to allow the element to exceed formspec bounds. * textcolor - color. Default white. +* model + * bgcolor - color, sets background color. + * noclip - boolean, set to true to allow the element to exceed formspec bounds. + * Default to false in formspec_version version 3 or higher * image * noclip - boolean, set to true to allow the element to exceed formspec bounds. * Default to false in formspec_version version 3 or higher |