ISSUE-045 - Venetian Blinds - Starting work on the "venetian blinds" transition effect.

I'll be starting with re-creating this effect on the PositionFlag component. That involves first separating out the PositionFlag into its own common component (it's used on the timing board as well, so it makes sense).
Adding new overlays for prototyping work.
This commit is contained in:
Kyle Geib committed 2022-02-04 10:02:23 -05:00
1 parent 5e86b92ca5
commit e747a7d7c3
13 files changed
+65 -34

No files matched your search

@@ -4,14 +4,13 @@ import { theme } from "../../../../shared/theme";
import { DriverNumber } from "../../Common/DriverNumber"; import { DriverNumber } from "../../Common/DriverNumber";
import { AngledFlag } from "../../Common/AngledFlag"; import { AngledFlag } from "../../Common/AngledFlag";
import { PositionFlag } from "../../Common/PositionFlag";
import { import {
BaseBackground, BaseBackground,
FirstName, FirstName,
PositionNumber,
LastName, LastName,
NameContainer, NameContainer,
NumberContainer, NumberContainer,
PositionFlag,
Spacer, Spacer,
TeamColorBar, TeamColorBar,
TeamName, TeamName,
@@ -42,11 +41,7 @@ export function ChyronDriver({ chyronData, subMode }: ChyronDriverProps) {
<BaseBackground > <BaseBackground >
<Spacer width="6px" /> <Spacer width="6px" />
{showPosFlag && ( {showPosFlag && (
<PositionFlag containerHeight={baseHeight}> <PositionFlag size={baseHeight * 0.85} number={car.position} />
<PositionNumber containerHeight={baseHeight}>
{car.position}
</PositionNumber>
</PositionFlag>
)} )}
<Spacer width="8px" /> <Spacer width="8px" />
<TeamColorBar color={theme.colors.teams[car.driver.team.id]} /> <TeamColorBar color={theme.colors.teams[car.driver.team.id]} />
@@ -27,33 +27,6 @@ export const BaseBackground = styled.div`
`; `;
BaseBackground.displayName = "BaseBackground"; BaseBackground.displayName = "BaseBackground";
type PositionFlagProps = {
containerHeight: Px,
};
export const PositionFlag = styled.div<PositionFlagProps>`
position: relative;
height: ${({ containerHeight }) => `${containerHeight * 0.85}px`};
width: ${({ containerHeight }) => `${containerHeight * 0.85}px`};
border-bottom-right-radius: 9px;
background-color: #f4f3ee;
display: flex;
align-items: center;
justify-content: center;
`;
PositionFlag.displayName = "PositionFlag";
type PositionNumberProps = {
containerHeight: Px,
};
export const PositionNumber = styled.span<PositionNumberProps>`
font-family: ${p => p.theme.fonts.f1Regular};
font-size: ${({ containerHeight }) => `${containerHeight * 0.85 * 0.64}px`};
margin-top: 2px;
`;
PositionNumber.displayName = "PositionNumber";
type TeamColorBarProps = { type TeamColorBarProps = {
color: string, color: string,
}; };
@@ -0,0 +1,17 @@
import { Px } from "../../../../types/style";
import { PositionFlagBox, PositionNumber } from "./styles";
type PositionFlagProps = {
size: Px,
number: number,
};
export function PositionFlag({ size, number }: PositionFlagProps) {
return (
<PositionFlagBox size={size}>
<PositionNumber size={size}>
{number}
</PositionNumber>
</PositionFlagBox>
);
}
@@ -0,0 +1 @@
export * from "./PositionFlag";
@@ -0,0 +1,29 @@
import styled from "styled-components";
import { Px } from "../../../../types/style";
type PositionFlagBoxProps = {
size: Px,
};
export const PositionFlagBox = styled.div<PositionFlagBoxProps>`
position: relative;
height: ${({ size }) => `${size}px`};
width: ${({ size }) => `${size}px`};
border-bottom-right-radius: 15%;
background-color: #f4f3ee;
display: flex;
align-items: center;
justify-content: center;
`;
PositionFlagBox.displayName = "PositionFlagBox";
type PositionNumberProps = {
size: Px,
};
export const PositionNumber = styled.span<PositionNumberProps>`
font-family: ${p => p.theme.fonts.f1Regular};
font-size: ${({ size }) => `${size * 0.64}px`};
margin-top: 2px;
`;
PositionNumber.displayName = "PositionNumber";
+16
View File
@@ -67,4 +67,20 @@ export const workspaces: WorkspaceObject = {
height: 500, height: 500,
}, },
}, },
venetianTransitionPosFlag: {
name: "Venetian Transition (Pos Flag)",
overlayIds: [
"venetian-pos-1.png",
"venetian-pos-2.png",
"venetian-pos-3.png",
"venetian-pos-4.png",
"venetian-pos-5.png",
"venetian-pos-6.png",
"venetian-pos-7.png",
],
previewWindowDimensions: {
width: 300,
height: 300,
},
},
}; };
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB