mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
add assets.parse_animation
This commit is contained in:
parent
41713e89a4
commit
86d2e6a614
5 changed files with 28 additions and 6 deletions
|
|
@ -97,14 +97,13 @@ local function parse_track(root)
|
|||
return raw_track
|
||||
end
|
||||
|
||||
local function load_vca(filepath)
|
||||
local source = file.read(filepath)
|
||||
local function load_vca(source, filepath)
|
||||
local raw_track = parse_track(xml.parse_vcd(source, "track"))
|
||||
debug.print(raw_track)
|
||||
return animation.compile_track(raw_track, filepath)
|
||||
end
|
||||
|
||||
function internals.load_vca_animation(filepath, identifier)
|
||||
local track = load_vca(filepath)
|
||||
function internals.load_vca_animation(filepath, source, identifier)
|
||||
local track = load_vca(source or file.read(filepath), filepath)
|
||||
internals.store_animation(identifier, track)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue