revert "remove rotation-order (use original directives order)"

Keeping VCA directives unordered is seems more preferred
This reverts commit 3b1ab36ac1.
This commit is contained in:
MihailRis 2026-09-06 00:53:44 +03:00
parent 3b1ab36ac1
commit 49e4b1f519
2 changed files with 6 additions and 8 deletions

View file

@ -187,13 +187,10 @@ local function codegen_track(raw_track, lineset, memoised, keysets, use_tsf)
end
local axis_names = {"X", "Y", "Z"}
local axes = {1, 2, 3}
table.sort(axes, function(a, b)
return rotation[a] < rotation[b]
end)
for _, axis in ipairs(axes) do
local axis_indices = {X=1, Y=2, Z=3}
local rotation_order = raw_track.rotation_order
for i=1,3 do
local axis = axis_indices[rotation_order[i]]
local var = rotation[axis]
if var then
code = code .. "\n mat4.rotate(dst, " .. axis_names[axis] ..

View file

@ -25,6 +25,7 @@ local function parse_configure(raw_track, node)
elseif node.duration then
raw_track.duration = node.duration
end
raw_track.rotation_order = string.upper(node["rotation-order"]) or "XYZ"
end
local function parse_curve(line, node)