Skip to content

Commit 3db4e3a

Browse files
Add duration to effect.fadeIn() (#306)
* Add duration to effect.fadeIn()
1 parent c9aca5b commit 3db4e3a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

__TESTS__/unit/actions/Effect.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('Tests for Transformation Action -- Effect', () => {
2424
.effect(Effect.blackwhite(10))
2525
.effect(Effect.blackwhite().threshold(20))
2626
.effect(Effect.fadeIn(100))
27-
.effect(Effect.fadeIn().length(5))
27+
.effect(Effect.fadeIn().duration(5))
2828
.effect(Effect.fadeOut(100))
2929
.effect(Effect.fadeOut().duration(5))
3030
.effect(Effect.grayscale())

src/actions/effect.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {Pixelate} from "./effect/pixelate/pixelate";
2121
import {ImageSource} from "../values/source/sourceTypes/ImageSource";
2222
import {EffectActionWithStrength} from "./effect/EffectActions/EffectActionWithStrength";
2323
import {BlackwhiteEffectAction} from "./effect/leveled/blackwhite";
24+
import {FadeInEffectAction} from "./effect/leveled/fadeIn";
2425

2526

2627
/**
@@ -214,10 +215,10 @@ function accelerate(speedIncreasePercent?: number): AccelerationEffectAction {
214215
* For details and examples, see 'Fade in and out' in the Video Transformations guide.
215216
* @memberOf Actions.Effect
216217
* @param {number} fadeLength The time in ms for the fade to occur. (Server default: 2000)
217-
* @return {EffectActionWithLength}
218+
* @return {FadeInEffectAction}
218219
*/
219-
function fadeIn(fadeLength?: number):EffectActionWithLength {
220-
return new EffectActionWithLength('fade', fadeLength);
220+
function fadeIn(fadeLength?: number):FadeInEffectAction {
221+
return new FadeInEffectAction('fade', fadeLength);
221222
}
222223

223224

0 commit comments

Comments
 (0)