mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-23 23:53:44 +01:00
Update torus.lua
This commit is contained in:
parent
63d284b35b
commit
9bb9aeda5c
@ -10,9 +10,8 @@
|
|||||||
-- @param hollow=false boolean Whether the generated torus should be hollow or not.
|
-- @param hollow=false boolean Whether the generated torus should be hollow or not.
|
||||||
function worldeditadditions.torus(position, major_radius, minor_radius, target_node, axes, hollow)
|
function worldeditadditions.torus(position, major_radius, minor_radius, target_node, axes, hollow)
|
||||||
local matrix = {x='yz', y='xz', z='xy'}
|
local matrix = {x='yz', y='xz', z='xy'}
|
||||||
if type(axes) ~= "string" then axes = "xz"
|
if type(axes) ~= "string" then axes = "xz" end
|
||||||
elseif #axes == 1 and axes.match('[xyz]') then axes = matrix[axes]
|
if #axes == 1 and axes.match('[xyz]') then axes = matrix[axes] end
|
||||||
else axes = ((axes:match('x') or '')..(axes:match('y') or '')..(axes:match('z') or '')):sub(1,2) end
|
|
||||||
|
|
||||||
-- position = { x, y, z }
|
-- position = { x, y, z }
|
||||||
local total_radius = major_radius + minor_radius
|
local total_radius = major_radius + minor_radius
|
||||||
|
Loading…
Reference in New Issue
Block a user