add fragment.crop, fragment:crop() & fix fragments rotation when width is not equal to depth & fix extra structures placements

This commit is contained in:
MihailRis
2024-10-15 00:03:06 +03:00
parent 44eedadc06
commit 48143c5a2b
13 changed files with 93 additions and 20 deletions
+13
View File
@@ -174,3 +174,16 @@ console.add_command(
" has been saved as "..file.resolve(filename))
end
)
console.add_command(
"fragment.crop filename:str",
"Crop fragment",
function(args, kwargs)
local filename = args[1]
local fragment = generation.load_fragment(filename)
fragment:crop()
generation.save_fragment(fragment, filename, crop)
console.log("fragment with size "..vec3.tostring(fragment.size)..
" has been saved as "..file.resolve(filename))
end
)