last final documentation fixes

This commit is contained in:
FatalErr42O 2024-12-27 18:30:51 -08:00
parent 49ddb60fba
commit 483ab9106a
2 changed files with 16 additions and 14 deletions

View File

@ -291,11 +291,12 @@ function leef.b3d_reader.read_from_stream(stream, ignore_chunks)
end
return bone
end,
--- keyframes
--@field flags defines if position rotation and scale exists (further explanation needed)
--@field ... a list of @{keyframe}s
--@table KEYS a list of keyframes
KEYS = function()
--- keyframes.
-- a list of keyframes
-- @field flags defines if position rotation and scale exists (further explanation needed)
-- @field ... a list of @{keyframe}s
-- @table KEYS
local flags = int()
local _flags = flags % 8
local rotation, scale, position
@ -329,12 +330,13 @@ function leef.b3d_reader.read_from_stream(stream, ignore_chunks)
end
return bone
end,
--- defines the animation of a model
--@field flags unused?
--@field frames number of frames
--@field fps framerate of the model
--@table ANIM
ANIM = function()
--- defines the animation of a model
--@field flags unused?
--@field frames number of frames
--@field fps framerate of the model
--@table ANIM
local ret = {}
ret.flags = int() -- flags are unused
ret.frames = int()
@ -412,8 +414,8 @@ function leef.b3d_reader.read_from_stream(stream, ignore_chunks)
return node
end,
BB3D = function()
--- b3d table
-- note: in the b3d writer the node_paths field is ignored
--- b3d table structure outputted by the b3d reader.
-- Note: in the b3d writer the node_paths field is ignored
-- @field node_paths all of the nodes in the model @{b3d_nodes}
-- @field node a table containing the root @{NODE} of the model.
-- @field textures TEXS texture information. TEXS not currently documented as not currently useful for minetest purposes
@ -468,7 +470,7 @@ function leef.b3d_reader.read_from_stream(stream, ignore_chunks)
--luckily most of the ground work is layed out for us already.
--also, Fatal here: for the sake of my reputation (which is nonexistent), typically I wouldn't nest these functions
--because I am not a physcopath and or a german named Lars, but for the sake of consistency it has to happen.
--because I am not a physcopath and or a german named Lars, but for the sake of consistency I am doing it like this.
--(Not that its *always* a bad idea, but unless you're baking in parameters it's sort of useless and potentially wasteful)
local copy_path = leef.table and leef.table.shallow_copy or function(tbl)
local new_table = {}

View File

@ -222,7 +222,7 @@ end
--- output a string of binary in the blitz 3d format
-- @function write_string
-- @param self @{BB3D}
-- @param self @{b3d_reader.BB3D|BB3D}
-- @return string containing the binary file
function leef.b3d_writer.write_string(self)
return table.concat(write_rope(self))
@ -230,7 +230,7 @@ end
--- output in the blitz3d format file reference
-- @function write_model_to_file
-- @param self @{BB3D}
-- @param self @{b3d_reader.BB3D|BB3D}
-- @param stream io file object to write to
function leef.b3d_writer.write_model_to_file(self, stream)
for _, str in ipairs(write_rope(self)) do