mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
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:
parent
3b1ab36ac1
commit
49e4b1f519
2 changed files with 6 additions and 8 deletions
|
|
@ -187,17 +187,14 @@ 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] ..
|
||||
", l" .. var .. ", dst)"
|
||||
", l" .. var .. ", dst)"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue