2020-06-11 01:54:28 +02:00
|
|
|
return {
|
|
|
|
-- Get an entry from a list for a given detail level
|
2020-06-13 14:54:13 +02:00
|
|
|
--
|
2020-06-11 01:54:28 +02:00
|
|
|
-- textures: An array of textures
|
|
|
|
-- detail: The detail level
|
|
|
|
--
|
|
|
|
-- Returns the entry at detail, or the last entry if detail is out-of-bounds
|
|
|
|
get_clamped = function(textures, detail)
|
|
|
|
return textures[math.min(detail, #textures)];
|
|
|
|
end
|
|
|
|
};
|