Skip to content

Commit

Permalink
feat!: Remove base values in Animations
Browse files Browse the repository at this point in the history
  • Loading branch information
kfischer-okarin committed Jan 12, 2023
1 parent f8820e7 commit bf11bd1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions lib/dragon_skeleton/animations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ def animate(object, to:, duration:)
start! object, animation: animation, repeat: false
end

def build(frames:, **base)
def build(frames:)
{
base: base,
frames: frames.map { |frame|
{
duration: frame[:duration],
Expand All @@ -39,7 +38,6 @@ def start!(target, animation:, repeat: true)
repeat: repeat,
finished: false
}.tap { |animation_state|
target.merge! animation[:base]
apply! target, animation_state: animation_state
}
end
Expand Down
1 change: 0 additions & 1 deletion lib/dragon_skeleton/file_formats/asesprite_json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def read_as_animations(asesprite_json_path)

def flipped_horizontally(animation)
{
base: {},
frames: animation[:frames].map { |frame|
values = frame[:values]
frame.merge(
Expand Down

0 comments on commit bf11bd1

Please sign in to comment.