Attempt to add variable shapeLimit.

This commit is contained in:
CoolCat467 2021-03-09 13:24:27 -06:00 committed by GitHub
parent 306c08f356
commit 0fca2d8da8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,15 @@ local localization = system.getLocalization(currentScriptDirectory .. "Localizat
local currentLayer = 0
local model
local savePath
local shapeLimit = 24
if component.isAvailable("printer3d") then
local printer3d = component.get("printer3d")
local shapeLimit = printer3d.getMaxShapeCount()
--Might also be getShapeCount(), as it's doc info talks about a config file.
else
local shapeLimit = 24
end
local viewPixelWidth, viewPixelHeight = 4, 2
local colors, hue, hueStep = {}, 0, 360 / shapeLimit