mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 06:51:51 +00:00
cleanup
This commit is contained in:
parent
e485aedc8e
commit
0dfc87700d
3 changed files with 6 additions and 6 deletions
|
|
@ -48,9 +48,10 @@ local this = {
|
||||||
INT_LINEAR = 2,
|
INT_LINEAR = 2,
|
||||||
INT_BEZIER = 3,
|
INT_BEZIER = 3,
|
||||||
INT_CUSTOM = 4,
|
INT_CUSTOM = 4,
|
||||||
ALMOST_HUGE = 1e9,
|
MAX_DURATION = 1e9,
|
||||||
|
MAX_FRAMES = 1e9,
|
||||||
|
|
||||||
TRACE_CODEGEN = true,
|
TRACE_CODEGEN = false,
|
||||||
|
|
||||||
maths = {
|
maths = {
|
||||||
bezier_interpolation = bezier_interpolation
|
bezier_interpolation = bezier_interpolation
|
||||||
|
|
|
||||||
|
|
@ -107,9 +107,8 @@ local function parse_track(root)
|
||||||
local line = {
|
local line = {
|
||||||
axis = node.by and ("xyz"):find(node.by) or "",
|
axis = node.by and ("xyz"):find(node.by) or "",
|
||||||
channel = channel,
|
channel = channel,
|
||||||
period = node.period or animation.ALMOST_HUGE
|
period = node.period or animation.MAX_FRAMES
|
||||||
}
|
}
|
||||||
debug.print(animation.ALMOST_HUGE)
|
|
||||||
if node.func then
|
if node.func then
|
||||||
line.expression = node.func
|
line.expression = node.func
|
||||||
elseif node.curve then
|
elseif node.curve then
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local ALMOST_HUGE = animation.ALMOST_HUGE
|
local MAX_DURATION = animation.MAX_DURATION
|
||||||
|
|
||||||
local rig = entity.skeleton
|
local rig = entity.skeleton
|
||||||
|
|
||||||
|
|
@ -54,7 +54,7 @@ local function update(delta)
|
||||||
if state.track and intensity > 0.0 then
|
if state.track and intensity > 0.0 then
|
||||||
state.track.func(
|
state.track.func(
|
||||||
rig,
|
rig,
|
||||||
state.timer % math.min(ALMOST_HUGE, state.track.duration),
|
state.timer % math.min(MAX_DURATION, state.track.duration),
|
||||||
intensity * state.max_intencity
|
intensity * state.max_intencity
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue