summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorhecks <42101236+hecktest@users.noreply.github.com>2021-10-13 17:51:37 +0200
committerGitHub <noreply@github.com>2021-10-13 17:51:37 +0200
commit02292e03e42e5c3be0aa09a329dabd9c8dad5571 (patch)
tree85b9607cdaf5778c9de8b1c5bcca28da612d7b1e /doc
parentfe5cb2cdfb137764d20ca56f17f607ec361e0dcf (diff)
downloadminetest-02292e03e42e5c3be0aa09a329dabd9c8dad5571.tar.gz
minetest-02292e03e42e5c3be0aa09a329dabd9c8dad5571.tar.bz2
minetest-02292e03e42e5c3be0aa09a329dabd9c8dad5571.zip
Add embedded PNG texture modifier (#11498)
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index e6cabb68e..69ac55493 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -628,6 +628,23 @@ Result is more like what you'd expect if you put a color on top of another
color, meaning white surfaces get a lot of your new color while black parts
don't change very much.
+#### `[png:<base64>`
+
+Embed a base64 encoded PNG image in the texture string.
+You can produce a valid string for this by calling
+`minetest.encode_base64(minetest.encode_png(tex))`,
+refer to the documentation of these functions for details.
+You can use this to send disposable images such as captchas
+to individual clients, or render things that would be too
+expensive to compose with `[combine:`.
+
+IMPORTANT: Avoid sending large images this way.
+This is not a replacement for asset files, do not use it to do anything
+that you could instead achieve by just using a file.
+In particular consider `minetest.dynamic_add_media` and test whether
+using other texture modifiers could result in a shorter string than
+embedding a whole image, this may vary by use case.
+
Hardware coloring
-----------------