More image optimization
|
|
@ -29,7 +29,6 @@
|
|||
"eslint-plugin-react": "^7.21.4",
|
||||
"eslint-plugin-react-hooks": "^4.1.2"
|
||||
},
|
||||
"proxy": "http://localhost:3030",
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
[ZoneTransfer]
|
||||
ZoneId=3
|
||||
ReferrerUrl=https://tinypng.com/
|
||||
HostUrl=https://tinypng.com/web/output/p65f64udkb1zedp6pvx745r5z3a538gj/bg.png
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
||||
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
||||
import React, { useState } from 'react';
|
||||
import { PickSplat } from '../data/Loader';
|
||||
import PickSplat from '../data/splats/Splats';
|
||||
import Freespace from '../data/weapons/freespaec.png';
|
||||
|
||||
export default ({ src, hitIn, propagateChanges }) => {
|
||||
const [hit, setHit] = useState(hitIn);
|
||||
|
|
@ -23,7 +24,7 @@ export default ({ src, hitIn, propagateChanges }) => {
|
|||
>
|
||||
{hit && (
|
||||
<img
|
||||
src={`/img/splats/${PickSplat()}`}
|
||||
src={PickSplat()}
|
||||
alt="splatted"
|
||||
style={{
|
||||
position: 'absolute',
|
||||
|
|
@ -36,8 +37,8 @@ export default ({ src, hitIn, propagateChanges }) => {
|
|||
/>
|
||||
)}
|
||||
<img
|
||||
className={src === 'freespaec.png' ? '' : 'bingoslot'}
|
||||
src={`/img/weapons/${src}`}
|
||||
className={src === Freespace ? '' : 'bingoslot'}
|
||||
src={src}
|
||||
alt="splatoon gun"
|
||||
style={{ maxWidth: '100%' }}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import Weapons from './weapons.json';
|
||||
import Splats from './splats.json';
|
||||
import GetWeapons from './weapons/Weapons';
|
||||
|
||||
export const Shuffle = (arr) => {
|
||||
const arrayIndices = new Set();
|
||||
|
|
@ -11,11 +10,9 @@ export const Shuffle = (arr) => {
|
|||
return ret;
|
||||
};
|
||||
|
||||
export const PickSplat = () => Splats[Math.floor(Math.random() * Splats.length)];
|
||||
|
||||
export const LoadDataOrFallback = () => {
|
||||
const stored = window.localStorage.getItem('splatoon_card');
|
||||
return stored ? JSON.parse(stored) : Shuffle(Weapons).map((x) => ({
|
||||
return stored ? JSON.parse(stored) : Shuffle(GetWeapons()).map((x) => ({
|
||||
src: x,
|
||||
hit: false,
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
[
|
||||
"Cyan.png",
|
||||
"Orange.png",
|
||||
"Teal.png",
|
||||
"Yellow.png",
|
||||
"Pink.png",
|
||||
"Blue.png"
|
||||
]
|
||||
17
src/data/splats/Splats.jsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import Blue from './sprites/Blue.png';
|
||||
import Cyan from './sprites/Cyan.png';
|
||||
import Orange from './sprites/Orange.png';
|
||||
import Pink from './sprites/Pink.png';
|
||||
import Teal from './sprites/Teal.png';
|
||||
import Yellow from './sprites/Yellow.png';
|
||||
|
||||
export const Splats = [
|
||||
Blue,
|
||||
Cyan,
|
||||
Orange,
|
||||
Pink,
|
||||
Teal,
|
||||
Yellow,
|
||||
];
|
||||
|
||||
export default () => Splats[Math.floor(Math.random() * Splats.length)];
|
||||
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
|
@ -1,57 +0,0 @@
|
|||
[
|
||||
"Blaster_LightLong_00.png",
|
||||
"Blaster_LightShort_00.png",
|
||||
"Blaster_Light_00.png",
|
||||
"Blaster_Long_00.png",
|
||||
"Blaster_Middle_00.png",
|
||||
"Blaster_Short_00.png",
|
||||
"Brush_Mini_00.png",
|
||||
"Brush_Normal_00.png",
|
||||
"Charger_Keeper_00.png",
|
||||
"Charger_Light_00.png",
|
||||
"Charger_Long_00.png",
|
||||
"Charger_Normal_00.png",
|
||||
"Charger_Pencil_00.png",
|
||||
"Charger_Quick_00.png",
|
||||
"Maneuver_Dual_00.png",
|
||||
"Maneuver_Gallon_00.png",
|
||||
"Maneuver_Normal_00.png",
|
||||
"Maneuver_Short_00.png",
|
||||
"Maneuver_Stepper_00.png",
|
||||
"Roller_Compact_00.png",
|
||||
"Roller_Heavy_00.png",
|
||||
"Roller_Hunter_00.png",
|
||||
"Roller_Normal_00.png",
|
||||
"Roller_Wide_00.png",
|
||||
"Saber_Lite_00.png",
|
||||
"Saber_Normal_00.png",
|
||||
"Shelter_Compact_00.png",
|
||||
"Shelter_Normal_00.png",
|
||||
"Shelter_Wide_00.png",
|
||||
"Shooter_Blaze_00.png",
|
||||
"Shooter_Expert_00.png",
|
||||
"Shooter_First_00.png",
|
||||
"Shooter_Flash_00.png",
|
||||
"Shooter_Gravity_00.png",
|
||||
"Shooter_Heavy_00.png",
|
||||
"Shooter_Long_00.png",
|
||||
"Shooter_Normal_00.png",
|
||||
"Shooter_Precision_00.png",
|
||||
"Shooter_QuickLong_00.png",
|
||||
"Shooter_QuickMiddle_00.png",
|
||||
"Shooter_Short_00.png",
|
||||
"Shooter_TripleMiddle_00.png",
|
||||
"Shooter_TripleQuick_00.png",
|
||||
"Slosher_Bathtub_00.png",
|
||||
"Slosher_Diffusion_00.png",
|
||||
"Slosher_Launcher_00.png",
|
||||
"Slosher_Strong_00.png",
|
||||
"Slosher_Washtub_00.png",
|
||||
"Spinner_Downpour_00.png",
|
||||
"Spinner_Hyper_00.png",
|
||||
"Spinner_Quick_00.png",
|
||||
"Spinner_Serein_00.png",
|
||||
"Spinner_Standard_00.png",
|
||||
"Stringer_Normal_00.png",
|
||||
"Stringer_Short_00.png"
|
||||
]
|
||||
113
src/data/weapons/Weapons.jsx
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
import BlasterLight from './sprites/Blaster_Light_00.png';
|
||||
import BlasterLightLong from './sprites/Blaster_LightLong_00.png';
|
||||
import BlasterLightShort from './sprites/Blaster_LightShort_00.png';
|
||||
import BlasterLong from './sprites/Blaster_Long_00.png';
|
||||
import BlasterMiddle from './sprites/Blaster_Middle_00.png';
|
||||
import BlasterShort from './sprites/Blaster_Short_00.png';
|
||||
import BrushMini from './sprites/Brush_Mini_00.png';
|
||||
import BrushNormal from './sprites/Brush_Normal_00.png';
|
||||
import ChargerKeeper from './sprites/Charger_Keeper_00.png';
|
||||
import ChargerLight from './sprites/Charger_Light_00.png';
|
||||
import ChargerLong from './sprites/Charger_Long_00.png';
|
||||
import ChargerNormal from './sprites/Charger_Normal_00.png';
|
||||
import ChargerPencil from './sprites/Charger_Pencil_00.png';
|
||||
import ChargerQuick from './sprites/Charger_Quick_00.png';
|
||||
import ManeuverDual from './sprites/Maneuver_Dual_00.png';
|
||||
import ManeuverGallon from './sprites/Maneuver_Gallon_00.png';
|
||||
import ManeuverNormal from './sprites/Maneuver_Normal_00.png';
|
||||
import ManeuverShort from './sprites/Maneuver_Short_00.png';
|
||||
import ManeuverStepper from './sprites/Maneuver_Stepper_00.png';
|
||||
import RollerCompact from './sprites/Roller_Compact_00.png';
|
||||
import RollerHeavy from './sprites/Roller_Heavy_00.png';
|
||||
import RollerHunter from './sprites/Roller_Hunter_00.png';
|
||||
import RollerNormal from './sprites/Roller_Normal_00.png';
|
||||
import RollerWide from './sprites/Roller_Wide_00.png';
|
||||
import SaberLite from './sprites/Saber_Lite_00.png';
|
||||
import SaberNormal from './sprites/Saber_Normal_00.png';
|
||||
import ShelterCompact from './sprites/Shelter_Compact_00.png';
|
||||
import ShelterNormal from './sprites/Shelter_Normal_00.png';
|
||||
import ShelterWide from './sprites/Shelter_Wide_00.png';
|
||||
import ShooterBlaze from './sprites/Shooter_Blaze_00.png';
|
||||
import ShooterExpert from './sprites/Shooter_Expert_00.png';
|
||||
import ShooterFirst from './sprites/Shooter_First_00.png';
|
||||
import ShooterFlash from './sprites/Shooter_Flash_00.png';
|
||||
import ShooterGravity from './sprites/Shooter_Gravity_00.png';
|
||||
import ShooterHeavy from './sprites/Shooter_Heavy_00.png';
|
||||
import ShooterLong from './sprites/Shooter_Long_00.png';
|
||||
import ShooterNormal from './sprites/Shooter_Normal_00.png';
|
||||
import ShooterPrecision from './sprites/Shooter_Precision_00.png';
|
||||
import ShooterQuickLong from './sprites/Shooter_QuickLong_00.png';
|
||||
import ShooterQuickMiddle from './sprites/Shooter_QuickMiddle_00.png';
|
||||
import ShooterShort from './sprites/Shooter_Short_00.png';
|
||||
import ShooterTripleMiddle from './sprites/Shooter_TripleMiddle_00.png';
|
||||
import ShooterTripleQuick from './sprites/Shooter_TripleQuick_00.png';
|
||||
import SlosherBathtub from './sprites/Slosher_Bathtub_00.png';
|
||||
import SlosherDiffusion from './sprites/Slosher_Diffusion_00.png';
|
||||
import SlosherLauncher from './sprites/Slosher_Launcher_00.png';
|
||||
import SlosherStrong from './sprites/Slosher_Strong_00.png';
|
||||
import SlosherWashtub from './sprites/Slosher_Washtub_00.png';
|
||||
import SpinnerDownpour from './sprites/Spinner_Downpour_00.png';
|
||||
import SpinnerHyper from './sprites/Spinner_Hyper_00.png';
|
||||
import SpinnerQuick from './sprites/Spinner_Quick_00.png';
|
||||
import SpinnerSerein from './sprites/Spinner_Serein_00.png';
|
||||
import SpinnerStandard from './sprites/Spinner_Standard_00.png';
|
||||
import StringerNormal from './sprites/Stringer_Normal_00.png';
|
||||
import StringerShort from './sprites/Stringer_Short_00.png';
|
||||
|
||||
export default () => [
|
||||
BlasterLight,
|
||||
BlasterLightLong,
|
||||
BlasterLightShort,
|
||||
BlasterLong,
|
||||
BlasterMiddle,
|
||||
BlasterShort,
|
||||
BrushMini,
|
||||
BrushNormal,
|
||||
ChargerKeeper,
|
||||
ChargerLight,
|
||||
ChargerLong,
|
||||
ChargerNormal,
|
||||
ChargerPencil,
|
||||
ChargerQuick,
|
||||
ManeuverDual,
|
||||
ManeuverGallon,
|
||||
ManeuverNormal,
|
||||
ManeuverShort,
|
||||
ManeuverStepper,
|
||||
RollerCompact,
|
||||
RollerHeavy,
|
||||
RollerHunter,
|
||||
RollerNormal,
|
||||
RollerWide,
|
||||
SaberLite,
|
||||
SaberNormal,
|
||||
ShelterCompact,
|
||||
ShelterNormal,
|
||||
ShelterWide,
|
||||
ShooterBlaze,
|
||||
ShooterExpert,
|
||||
ShooterFirst,
|
||||
ShooterFlash,
|
||||
ShooterGravity,
|
||||
ShooterHeavy,
|
||||
ShooterLong,
|
||||
ShooterNormal,
|
||||
ShooterPrecision,
|
||||
ShooterQuickLong,
|
||||
ShooterQuickMiddle,
|
||||
ShooterShort,
|
||||
ShooterTripleMiddle,
|
||||
ShooterTripleQuick,
|
||||
SlosherBathtub,
|
||||
SlosherDiffusion,
|
||||
SlosherLauncher,
|
||||
SlosherStrong,
|
||||
SlosherWashtub,
|
||||
SpinnerDownpour,
|
||||
SpinnerHyper,
|
||||
SpinnerQuick,
|
||||
SpinnerSerein,
|
||||
SpinnerStandard,
|
||||
StringerNormal,
|
||||
StringerShort,
|
||||
];
|
||||
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 9 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 9 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
|
@ -3,6 +3,7 @@ import React from 'react';
|
|||
import { Button, Popup } from 'semantic-ui-react';
|
||||
import BingoSlot from '../components/BingoSlot';
|
||||
import { LoadDataOrFallback, SaveDataToAppStorage, ClearSavedData } from '../data/Loader';
|
||||
import Freespace from '../data/weapons/freespaec.png';
|
||||
|
||||
export default () => {
|
||||
const data = LoadDataOrFallback();
|
||||
|
|
@ -39,7 +40,7 @@ export default () => {
|
|||
// Special case for the freespace, which lives at the end of the data array
|
||||
cols.push(
|
||||
<BingoSlot
|
||||
src="freespaec.png"
|
||||
src={Freespace}
|
||||
hitIn={data[data.length - 1].hit}
|
||||
key="freespaec"
|
||||
propagateChanges={(newState) => {
|
||||
|
|
|
|||