mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fixes
This commit is contained in:
parent
fc16c1ebcd
commit
ef4207aed0
3 changed files with 8 additions and 5 deletions
|
|
@ -135,6 +135,9 @@ function internals.on_animation_frame()
|
|||
if track_info.__timer > track.duration then
|
||||
table.remove(playing_tracks, i)
|
||||
else
|
||||
if track_info.target.reset_pose then
|
||||
track_info.target:reset_pose()
|
||||
end
|
||||
track.func(track_info.target, track_info.__timer)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ end
|
|||
|
||||
local function codegen_object_target(raw_track, context)
|
||||
local code = "\n if target.set_pos then\n"
|
||||
code = code .. " local dst = DST\n"
|
||||
code = code .. " local dst = mat4.idt()\n"
|
||||
local lineset = raw_track.linesets[""]
|
||||
if not lineset then
|
||||
return ""
|
||||
|
|
@ -302,7 +302,7 @@ function internals.compile_animation_track(raw_track, track_name)
|
|||
code = memoised_code .. "\n" .. code
|
||||
end
|
||||
|
||||
local src = "return function(target, t, intensity, m)\n m = m or 1\n"
|
||||
local src = "return function(target, t, intensity, m)\n m = m or 1\n intensity = intensity or 1.0\n"
|
||||
.. code .. "\nend"
|
||||
|
||||
if animation.TRACE_CODEGEN then
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ function create_state(name, track_id, max_intencity)
|
|||
fade_time = 0.0,
|
||||
fade_timer = 0.0,
|
||||
fade_in = false,
|
||||
max_intencity = max_intencity,
|
||||
max_intencity = max_intencity or 1.0,
|
||||
}
|
||||
end
|
||||
|
||||
|
|
@ -25,14 +25,14 @@ function set_state(name, fade_time)
|
|||
end
|
||||
if current_state then
|
||||
current_state.fade_in = false
|
||||
current_state.fade_time = fade_time
|
||||
current_state.fade_time = fade_time or 0.0
|
||||
current_state.fade_timer = 0.0
|
||||
end
|
||||
current_state = state
|
||||
if state then
|
||||
state.timer = 0.0
|
||||
state.fade_in = true
|
||||
state.fade_time = fade_time
|
||||
state.fade_time = fade_time or 0.0
|
||||
state.fade_timer = 0.0
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue