This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader | |
layout (location = 0) in vec3 inPos; | |
layout (location = 1) in vec3 inColor; | |
layout (location = 2) in vec3 inPosB; | |
layout (location = 3) in vec3 inColorB; | |
... | |
Application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_json_date(json_date) | |
local pattern = "(%d+)%-(%d+)%-(%d+)%a(%d+)%:(%d+)%:([%d%.]+)([Z%+%-])(%d?%d?)%:?(%d?%d?)" | |
local year, month, day, hour, minute, | |
seconds, offsetsign, offsethour, offsetmin = json_date:match(pattern) | |
local timestamp = os.time{year = year, month = month, | |
day = day, hour = hour, min = minute, sec = seconds} | |
local offset = 0 | |
if offsetsign ~= 'Z' then | |
offset = tonumber(offsethour) * 60 + tonumber(offsetmin) | |
if xoffset == "-" then offset = offset * -1 end |