Skip to content

Commit 9e90f3d

Browse files
committed
add noise fromJson
1 parent 318c35a commit 9e90f3d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

__TESTS__/unit/fromJson/effect.fromJson.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ describe('effect.fromJson', () => {
1919
{ actionType: 'blackwhite', level: 40 },
2020
{ actionType: 'accelerate' },
2121
{ actionType: 'loop', iterations: 5 },
22-
{ actionType: 'makeTransparent', tolerance: 5, color: 'red' }
22+
{ actionType: 'makeTransparent', tolerance: 5, color: 'red' },
23+
{ actionType: 'noise', level: 50 }
2324

2425
]);
2526

@@ -40,7 +41,8 @@ describe('effect.fromJson', () => {
4041
'e_blackwhite:40',
4142
'e_accelerate',
4243
'e_loop:5',
43-
'co_red,e_makeTransparent:5'
44+
'co_red,e_makeTransparent:5',
45+
'e_noise:50'
4446
].join('/'));
4547
});
4648
});

src/internal/fromJson.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ const ActionModelMap: Record<string, IHasFromJson> = {
6363
blackwhite: BlackwhiteEffectAction,
6464
accelerate: AccelerationEffectAction,
6565
loop: LoopEffectAction,
66-
makeTransparent: MakeTransparentEffectAction
66+
makeTransparent: MakeTransparentEffectAction,
67+
noise: EffectActionWithLevel
6768
};
6869

6970
/**

0 commit comments

Comments
 (0)