mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'period' keyframes-based line parameter
This commit is contained in:
parent
5310de45f0
commit
e485aedc8e
4 changed files with 12 additions and 9 deletions
|
|
@ -150,16 +150,16 @@ local function codegen_track(raw_track, lineset, memoised, keysets, use_tsf)
|
|||
local valueat = string.format("curves[%s]", string.escape(line.curve_func))
|
||||
|
||||
code = code .. string.format(
|
||||
"\n local l%d = value_at_custom(keysets['%s'][%d], t * %s, %s)",
|
||||
i, lineset.target_name, i, raw_track.fps, valueat)
|
||||
"\n local l%d = value_at_custom(keysets['%s'][%d], t * %s %% %s, %s)",
|
||||
i, lineset.target_name, i, raw_track.fps, line.period, valueat)
|
||||
elseif line.channel == animation.CH_TEXTURE then
|
||||
code = code .. string.format(
|
||||
"\n local l%d = string_at(keysets['%s'][%d], t * %s)",
|
||||
i, lineset.target_name, i, raw_track.fps)
|
||||
"\n local l%d = string_at(keysets['%s'][%d], t * %s %% %s)",
|
||||
i, lineset.target_name, i, raw_track.fps, line.period)
|
||||
else
|
||||
code = code .. string.format(
|
||||
"\n local l%d = value_at(keysets['%s'][%d], t * %s, %s)",
|
||||
i, lineset.target_name, i, raw_track.fps, line.interp)
|
||||
"\n local l%d = value_at(keysets['%s'][%d], t * %s %% %s, %s)",
|
||||
i, lineset.target_name, i, raw_track.fps, line.period, line.interp)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue