Commit Graph

610 Commits

Author SHA1 Message Date
Lars Mueller
5f0dea2780 Refactor unnecessary closure 2023-09-07 17:25:08 +02:00
Lars Mueller
115f3c2a31 Add matrix application to vectors 2023-08-26 23:50:08 +02:00
Lars Mueller
e064873012 PNG reader: Use bit library if available 2023-07-21 18:11:20 +02:00
Lars Mueller
15ad69b0fe Add highly experimental texture generation 2023-06-10 15:02:51 +02:00
Lars Mueller
91a4ee521f Add file.with_open to ensure :close() is called 2023-06-10 14:50:30 +02:00
Lars Mueller
14de9219b7 Remove unnecessary arguments 2023-06-02 16:24:13 +02:00
Lars Mueller
b56f030127 texmod.read: Unescaped ^ in (...) laxness 2023-06-02 16:19:56 +02:00
Lars Mueller
7d35b4d9e8 Add proper schematic documentation 2023-06-01 13:28:45 +02:00
Lars Mueller
98e452bb6a Refactor minetest.schematic
Fixes a `size` off-by-one error, breaking backwards compatibility.
Also changes `self` to `params` in `schematic.create` to modify the passed table.
Furthermore gets rid of the dirty do-undo for writing.
2023-06-01 13:28:38 +02:00
Lars Mueller
322da6cf0a Improve Bluon documentation 2023-06-01 12:28:21 +02:00
Lars Mueller
2b1c9cff7c Add support for new texture modifiers
https://github.com/minetest/minetest/pull/10100
has introduced a few inconsistencies with the formats of previous texture modifiers:

`[fill` is the first texture modifier to have a modifying and a generating variant.
Thus `texmod` "constructors" and `texmod` "modifiers" / methods had to be separated;
`texmod.fill` is not the same as `tm.fill` where `tm` is `texmod` instance.
It is rather dirty that the generating variant would ignore
extraneous parameters of the modifying variant, so this is not replicated by the parser.

`[hsl`, `[colorizehsl`, `[contrast` and `[screen` are pretty standard texture modifiers
as far as the DSL is concerned. `[hsl` and `[colorizehsl` are very similar.

`[hardlight` is the first texture modifier to exist just for swapping the base and parameter.
`a^[overlay:b` and `b^[hardlight:a` are both normalized to `b:[hardlight:a` by the DSL.
`[overlay` (called "overlay blend" in the docs) creates a naming conflict with
literal overlaying (`^`). This is resolved by renaming `:overlay` to `:blit`.
2023-05-31 20:12:18 +02:00
Lars Mueller
a9b5d80ca8 Fix [multiply missing from texmod:calc_dims 2023-05-31 18:59:35 +02:00
Lars Mueller
9911442977 texmod: Fix :mask(...) and .mask name collision 2023-05-29 21:22:59 +02:00
Lars Mueller
5fbb159a41 texmod: Fix broken [sheet assertions 2023-05-28 12:30:13 +02:00
Lars Mueller
50bd3d8a07 Make colorspec.from_string case-insensitive 2023-05-28 10:59:51 +02:00
Lars Mueller
520ecc641b texmod.read: Fix [transform followed by a lowercase letter 2023-05-27 19:12:49 +02:00
Lars Mueller
5dc6307661 Fix texmod.colorize crash if ratio is nil 2023-05-27 17:21:41 +02:00
Lars Mueller
73640f11d1 texmod: Stricter file name validation 2023-05-27 14:33:46 +02:00
Lars Mueller
8e5bdc817c Fix handling of multiple texmod transforms 2023-05-27 14:24:54 +02:00
Lars Mueller
e07d646203 texmod.read: Make transforms case-insensitive 2023-05-26 19:27:47 +02:00
Lars Mueller
741746613b Move local var to appropriate scope 2023-05-24 22:42:38 +02:00
Lars Mueller
0b521bbb61 Fix texmod:write emitting unnecessary parens 2023-05-24 22:37:55 +02:00
Lars Mueller
95159c48e8 Refactor texmod:read to pass reader around 2023-05-24 22:27:25 +02:00
Lars Mueller
fe7fb6aeec Remove unused variable in texmod:calc_dims 2023-05-24 22:25:46 +02:00
Lars Mueller
d4ca847b0e Add support for [png to texmod:calc_dims 2023-05-24 21:28:46 +02:00
Lars Mueller
b169077a40 Refactor texmod:calc_dims to use a dispatch table 2023-05-24 21:09:24 +02:00
Lars Mueller
9fc4aaf3b8 Add experimental texture modifier DSL 2023-05-24 19:39:20 +02:00
Lars Mueller
6ba9ec8fac Bump version 2023-04-02 15:10:53 +02:00
Lars Mueller
fc0585e86c b3d -> glTF: Fix handling of static vertices in animated meshes
Introduces a "neutral bone" to attach static vertices to.
2023-04-02 14:52:57 +02:00
Lars Mueller
88fec749f5 b3d -> glTF: Gracefully normalize normals 2023-04-02 14:43:31 +02:00
Lars Mueller
c48e4bf340 Bump version 2023-04-01 11:32:04 +02:00
Lars Mueller
785dcb80f4 Fix lack of defaults for wallmounted boxes 2023-04-01 11:29:23 +02:00
Lars Mueller
2425862045 Fix b3d->glTF conv. of models without materials 2023-03-14 17:23:52 +01:00
Lars Mueller
64c5a04a1f Bump version 2023-03-04 15:06:56 +01:00
Lars Mueller
a6aaf9938c Add minetest.media.overridden_mods 2023-03-04 15:00:33 +01:00
Lars Mueller
cc49af0ae6 Fix collecting media from subfolders 2023-03-04 15:00:09 +01:00
Lars Mueller
2f4ed5b857 Add b3d module documentation 2023-03-03 21:11:12 +01:00
Lars Mueller
ae0c87537e b3d -> glTF: Use own base64 (to remove MT dep.) 2023-02-28 13:40:41 +01:00
Lars Mueller
88dcf46bd4 Add base64 encoding & decoding 2023-02-28 13:39:20 +01:00
Lars Mueller
05e62dec10 b3d -> glTF: Add base64 padding 2023-02-28 00:23:49 +01:00
Lars Mueller
c8738450c7 b3d -> glTF: Fix buffer padding 2023-02-28 00:23:35 +01:00
Lars Mueller
e91a406742 b3d -> glTF: Use mesh as skeleton root 2023-02-28 00:23:35 +01:00
Lars Mueller
f7d2b005e1 Add highly experimental b3d to glTF conversion 2023-02-26 18:35:43 +01:00
Lars Mueller
f225499795 Remove unnecessary if 2023-02-26 16:55:54 +01:00
Lars Mueller
fdfe65167f Fix math.fround 2023-02-26 16:47:39 +01:00
Lars Mueller
c5e622f4a9 Add quaternion.len 2023-02-26 14:46:13 +01:00
Lars Mueller
acdce1742d Add basic 4x4 matrix "class" (for b3d to glTF) 2023-02-26 13:18:10 +01:00
Lars Mueller
fcd53ba269 Fix json.new setting an invalid metatable 2023-02-25 20:33:24 +01:00
Lars Mueller
72ca08ed3a Add basic minetest.mod.require 2022-11-05 11:42:01 +01:00
Lars Mueller
1bccb39142 Readme: Acknowledge grorp's contributions 2022-10-29 17:31:23 +02:00