from_viewport = function(state) local result = {} for k,v in pairs(state) do if Viewport[k] then result[k] = Viewport[k] end end return result end