diff options
author | Sophie Zhang <sophie_zhang@brown.edu> | 2024-04-10 15:26:32 -0400 |
---|---|---|
committer | Sophie Zhang <sophie_zhang@brown.edu> | 2024-04-10 15:26:32 -0400 |
commit | 43569b25466aa9bcf19f0f78c6ccd0928c98ab05 (patch) | |
tree | f7d11032a82e0fb1ca2fb4f3e2c20570471bc96b /src/client/views/nodes/trails/SpringUtils.ts | |
parent | 6e3f78c394e0703465344705987ce3fd4bedd756 (diff) |
fix: naming, cleaning
Diffstat (limited to 'src/client/views/nodes/trails/SpringUtils.ts')
-rw-r--r-- | src/client/views/nodes/trails/SpringUtils.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/nodes/trails/SpringUtils.ts b/src/client/views/nodes/trails/SpringUtils.ts index caadf4220..0518e0623 100644 --- a/src/client/views/nodes/trails/SpringUtils.ts +++ b/src/client/views/nodes/trails/SpringUtils.ts @@ -2,11 +2,10 @@ import { PresEffect, PresMovement } from './PresEnums'; // the type of slide effect timing (spring-driven) export enum SpringType { - DEFAULT = 'default', GENTLE = 'gentle', + QUICK = 'quick', BOUNCY = 'bouncy', CUSTOM = 'custom', - QUICK = 'quick', } // settings that control slide effect spring settings @@ -17,6 +16,7 @@ export interface SpringSettings { mass: number; } +// Options in the movement easing dropdown export const easeItems = [ { text: 'Ease', @@ -44,6 +44,7 @@ export const easeItems = [ }, ]; +// Options in the movement type dropdown export const movementItems = [ { text: 'None', val: PresMovement.None }, { text: 'Center', val: PresMovement.Center }, @@ -52,6 +53,7 @@ export const movementItems = [ { text: 'Jump', val: PresMovement.Jump }, ]; +// Items in the slide effect dropdown export const effectItems = Object.values(PresEffect) .filter(v => isNaN(Number(v))) .map(effect => ({ @@ -59,6 +61,7 @@ export const effectItems = Object.values(PresEffect) val: effect, })); +// Maps each PresEffect to the default timing configuration export const presEffectDefaultTimings: { [key: string]: SpringSettings; } = { @@ -107,8 +110,8 @@ export const presEffectDefaultTimings: { }, }; +// Dropdown items of timings for the effect export const effectTimings = [ - { text: 'Default', val: SpringType.DEFAULT }, { text: 'Gentle', val: SpringType.GENTLE, |