ISSUE-045 - Chyron Body - Timing improvements. More comments. Small corrections.

This commit is contained in:
Kyle Geib committed 2022-02-14 11:23:34 -05:00
1 parent e6312f67e0
commit bab056394c
4 files changed
+21 -12

No files matched your search

@@ -219,16 +219,16 @@ export function ChyronDriver({
> >
<VenetianBlindsTransition <VenetianBlindsTransition
visible={openState !== 0} visible={openState !== 0}
delay={2000 * DDM} delay={1700 * DDM}
blindsColor={teamColor} blindsColor={teamColor}
blindsColorFadeDuration={600 * DDM} blindsColorFadeDuration={600 * DDM}
blindsColorFadeDelay={300 * DDM} blindsColorFadeDelay={0 * DDM}
blindsAngle={-45} blindsAngle={-45}
blindsOpenDuration={300 * DDM} blindsOpenDuration={300 * DDM}
blindsOpenDelay={300 * DDM} blindsOpenDelay={0 * DDM}
blindsSize={{ transparent: 2, opaque: 5 }} blindsSize={{ transparent: 2, opaque: 5 }}
wipeAngle={45} wipeAngle={45}
wipeDuration={0 * DDM} wipeDuration={700 * DDM}
wipeStartingCorner="bottomRight" wipeStartingCorner="bottomRight"
> >
<DriverPortrait <DriverPortrait
@@ -16,13 +16,11 @@ type AnimatedBaseContainerProps = {
width: Px, width: Px,
height: Px, height: Px,
}; };
export const AnimatedBaseContainer = animated( export const AnimatedBaseContainer = animated(styled.div<AnimatedBaseContainerProps>`
styled.div<AnimatedBaseContainerProps>` position: relative;
position: relative; width: ${({ width }) => `${width}px`};
width: ${({ width }) => `${width}px`}; height: ${({ height }) => `${height}px`};
height: ${({ height }) => `${height}px`}; `);
`,
);
AnimatedBaseContainer.displayName = "AnimatedBaseContainer"; AnimatedBaseContainer.displayName = "AnimatedBaseContainer";
const BaseShape = styled.div` const BaseShape = styled.div`
@@ -87,6 +85,7 @@ export const BaseLayout = styled(BaseShape)<TransitionProps>`
${({ transitionProps }) => commonTransition(transitionProps)} ${({ transitionProps }) => commonTransition(transitionProps)}
`; `;
BaseLayout.displayName = "BaseLayout";
type TeamColorBarProps = { type TeamColorBarProps = {
color: string, color: string,
@@ -41,7 +41,7 @@ export const WorkspaceControls = (
/> />
{showAnimationSpeedSelector && ( {showAnimationSpeedSelector && (
<SlotSelector <SlotSelector
label="Animation Speed" label="Animation Duration"
items={debugMultipliers} items={debugMultipliers}
formatter={value => `x${value}`} formatter={value => `x${value}`}
onChange={index => onChange={index =>
+10
View File
@@ -71,6 +71,16 @@ export function commonTransition(propsArray: TransitionArgs[]) {
); );
} }
/**
* Provides the x, y coordinates of a six point polygon for use in a clip-path
* mask. By taking a fraction to indicate the progress through the animation it
* will return the six coordinates that will generate a wipe effect.
* @param width element width in pixels
* @param height element height in pixels
* @param progress fraction from 0 to 1
* @param outlineThickness the expected max width of the outline
* @returns
*/
export function outlineClipPath( export function outlineClipPath(
width: Px, width: Px,
height: Px, height: Px,