mirror of
https://github.com/chase-manning/pokemon-js.git
synced 2025-11-05 18:38:59 +00:00
✨ create character componen
This commit is contained in:
parent
177cd2b48e
commit
5d1c965261
1 changed files with 27 additions and 0 deletions
27
src/components/Character.tsx
Normal file
27
src/components/Character.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import styled from "styled-components";
|
||||
|
||||
import frontStill from "../assets/character/front-still.png";
|
||||
|
||||
const StyledCharacter = styled.img`
|
||||
position: absolute;
|
||||
top: calc((-16vw / 2.34) / 5);
|
||||
left: 0;
|
||||
width: calc(16vw / 2.34);
|
||||
|
||||
// TODO
|
||||
image-rendering: optimizeSpeed;
|
||||
image-rendering: -moz-crisp-edges;
|
||||
image-rendering: -o-crisp-edges;
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
image-rendering: pixelated;
|
||||
image-rendering: optimize-contrast;
|
||||
-ms-interpolation-mode: nearest-neighbor;
|
||||
`;
|
||||
|
||||
const Character = () => {
|
||||
const blockPixelWidth = 16; // TODO
|
||||
|
||||
return <StyledCharacter src={frontStill} alt="Character" />;
|
||||
};
|
||||
|
||||
export default Character;
|
||||
Loading…
Add table
Add a link
Reference in a new issue