About to scale
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
b32340cb11
commit
6b6f1211f1
@ -1,9 +1,9 @@
|
|||||||
.Board {
|
.Board {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-self: center;
|
align-self: stretch;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 518px;
|
flex: 1;
|
||||||
height: 450px;
|
align-items: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Offset 'BorderBox' such that 0,0 is the center
|
/* Offset 'BorderBox' such that 0,0 is the center
|
||||||
|
@ -1,10 +1,16 @@
|
|||||||
import React, { useState, useEffect } from "react";
|
import React, { useState } from "react";
|
||||||
import "./Board.css";
|
import "./Board.css";
|
||||||
|
|
||||||
const base = process.env.PUBLIC_URL;
|
const base = process.env.PUBLIC_URL;
|
||||||
const assetsPath = `${base}/assets`;
|
const assetsPath = `${base}/assets`;
|
||||||
|
|
||||||
const scale = 1;
|
const Board = ({ game }) => {
|
||||||
|
const rows = [3, 4, 5, 4, 3];
|
||||||
|
const [signature, setSignature] = useState("");
|
||||||
|
const [pips, setPips] = useState(<></>);
|
||||||
|
const [borders, setBorders] = useState(<></>);
|
||||||
|
const [tiles, setTiles] = useState(<></>);
|
||||||
|
const [scale] = useState(1);
|
||||||
|
|
||||||
const
|
const
|
||||||
hexRatio = 1.1547,
|
hexRatio = 1.1547,
|
||||||
@ -20,12 +26,6 @@ const
|
|||||||
borderImageWidth = (2 + 2/3) * tileImageWidth, /* 2.667 * .Tile.width */
|
borderImageWidth = (2 + 2/3) * tileImageWidth, /* 2.667 * .Tile.width */
|
||||||
borderImageHeight = borderImageWidth * 0.29; /* 0.29 * .Border.height */
|
borderImageHeight = borderImageWidth * 0.29; /* 0.29 * .Border.height */
|
||||||
|
|
||||||
const Board = ({ game }) => {
|
|
||||||
const rows = [3, 4, 5, 4, 3];
|
|
||||||
const [signature, setSignature] = useState("");
|
|
||||||
const [pips, setPips] = useState(<></>);
|
|
||||||
const [borders, setBorders] = useState(<></>);
|
|
||||||
const [tiles, setTiles] = useState(<></>);
|
|
||||||
|
|
||||||
const generatePips = () => {
|
const generatePips = () => {
|
||||||
let row = 0, rowCount = 0;
|
let row = 0, rowCount = 0;
|
||||||
@ -107,6 +107,7 @@ const Board = ({ game }) => {
|
|||||||
return <div
|
return <div
|
||||||
key={`border-${order}`}
|
key={`border-${order}`}
|
||||||
className="Border"
|
className="Border"
|
||||||
|
border={border}
|
||||||
style={{
|
style={{
|
||||||
width: `${borderImageWidth}px`,
|
width: `${borderImageWidth}px`,
|
||||||
height: `${borderImageHeight}px`,
|
height: `${borderImageHeight}px`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user