2023-04-27 11:01:50 +02:00
|
|
|
-- context menu to manually fix rotation
|
|
|
|
function onLoad()
|
2023-04-27 11:15:26 +02:00
|
|
|
self.addContextMenuItem("rotate preview", rotatePreview)
|
|
|
|
self.addContextMenuItem("rotate card+preview", function()
|
|
|
|
self.setRotationSmooth(self.getRotation() + Vector(0, 180, 0))
|
|
|
|
rotatePreview()
|
|
|
|
end)
|
2023-04-27 11:01:50 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- rotates the alt_view_angle
|
2023-04-27 11:15:26 +02:00
|
|
|
function rotatePreview()
|
2023-04-27 11:01:50 +02:00
|
|
|
local angle = self.alt_view_angle
|
|
|
|
if angle.y == 0 then
|
|
|
|
angle.y = 180
|
|
|
|
else
|
|
|
|
angle.y = 0
|
|
|
|
end
|
|
|
|
self.alt_view_angle = angle
|
|
|
|
end
|