mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-19 22:03:45 +01:00
b3d -> glTF: Add base64 padding
This commit is contained in:
parent
c8738450c7
commit
05e62dec10
3
b3d.lua
3
b3d.lua
@ -989,6 +989,7 @@ do
|
|||||||
end
|
end
|
||||||
|
|
||||||
local buffer_string = table.concat(buffer_rope)
|
local buffer_string = table.concat(buffer_rope)
|
||||||
|
local base64 = assert(minetest.encode_base64, "b3d:to_gltf needs `minetest.encode_base64`!")(buffer_string)
|
||||||
return {
|
return {
|
||||||
asset = {
|
asset = {
|
||||||
generator = "modlib b3d:to_gltf",
|
generator = "modlib b3d:to_gltf",
|
||||||
@ -1004,7 +1005,7 @@ do
|
|||||||
{
|
{
|
||||||
byteLength = #buffer_string,
|
byteLength = #buffer_string,
|
||||||
uri = "data:application/octet-stream;base64,"
|
uri = "data:application/octet-stream;base64,"
|
||||||
.. assert(minetest.encode_base64, "b3d:to_gltf needs `minetest.encode_base64`!")(buffer_string)
|
.. base64 .. ("="):rep(#base64 % 4) -- Blender requires base64 padding
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Meshes & nodes
|
-- Meshes & nodes
|
||||||
|
Loading…
Reference in New Issue
Block a user