Skip to content

Commit

Permalink
Added scaleAnimTo
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed May 28, 2024
1 parent d83beae commit 408dd07
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dn/heaps/HParticle.hx
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ class HParticle extends BatchElement {
scaleYTo(h);
}

public inline function scaleAnimTo(to:Float, seconds:Float) {
dsFrict = 0.8;
dsX = (to-scaleX) / (seconds*fps);
dsY = (to-scaleY) / (seconds*fps);
}

public inline function scaleXTo(len:Float) {
scaleX = len/t.width;
}
Expand Down

0 comments on commit 408dd07

Please sign in to comment.