mirror of
https://github.com/appgurueu/modlib.git
synced 2024-12-22 13:22:27 +01:00
b3d -> glTF: Use own base64 (to remove MT dep.)
This commit is contained in:
parent
88dcf46bd4
commit
ae0c87537e
7
b3d.lua
7
b3d.lua
@ -1,6 +1,6 @@
|
||||
-- Localize globals
|
||||
local assert, error, math, minetest, modlib, next, ipairs, pairs, setmetatable, string_char, table
|
||||
= assert, error, math, minetest, modlib, next, ipairs, pairs, setmetatable, string.char, table
|
||||
local assert, error, math, modlib, next, ipairs, pairs, setmetatable, string_char, table
|
||||
= assert, error, math, modlib, next, ipairs, pairs, setmetatable, string.char, table
|
||||
|
||||
local mat4 = modlib.matrix4
|
||||
|
||||
@ -989,7 +989,6 @@ do
|
||||
end
|
||||
|
||||
local buffer_string = table.concat(buffer_rope)
|
||||
local base64 = assert(minetest.encode_base64, "b3d:to_gltf needs `minetest.encode_base64`!")(buffer_string)
|
||||
return {
|
||||
asset = {
|
||||
generator = "modlib b3d:to_gltf",
|
||||
@ -1005,7 +1004,7 @@ do
|
||||
{
|
||||
byteLength = #buffer_string,
|
||||
uri = "data:application/octet-stream;base64,"
|
||||
.. base64 .. ("="):rep(#base64 % 4) -- Blender requires base64 padding
|
||||
.. modlib.base64.encode(buffer_string) -- Note: Blender requires base64 padding
|
||||
},
|
||||
},
|
||||
-- Meshes & nodes
|
||||
|
Loading…
Reference in New Issue
Block a user