Skip to content

Commit fd75721

Browse files
committed
Initial.
0 parents  commit fd75721

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+4265
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2016 the authors.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# `boardemu`
2+
3+
This program emulates the computer vision component of [ChessEye](https://github.com/chesseye/chesseye).
4+
5+
It starts a GUI with a chessboard that you can edit at will, and produces a stream of sensor output that a perfect camera would have produced for the given position.
6+
7+
## Running
8+
9+
You need [Electron](http://electron.atom.io/). (E.g. `npm install -g electron`.)
10+
11+
Run `electron .`.

chessground/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
These assets were copied from the [Chessground](https://github.com/ornicar/chessground/) project.
2+
3+
Eventually I'll figure out how to properly build using dependencies and this will go away.
4+
5+
Chessground is released under the MIT license, reproduced below.
6+
7+
```
8+
The MIT License (MIT)
9+
10+
Permission is hereby granted, free of charge, to any person obtaining a copy
11+
of this software and associated documentation files (the "Software"), to deal
12+
in the Software without restriction, including without limitation the rights
13+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
copies of the Software, and to permit persons to whom the Software is
15+
furnished to do so, subject to the following conditions:
16+
17+
The above copyright notice and this permission notice shall be included in all
18+
copies or substantial portions of the Software.
19+
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26+
SOFTWARE.
27+
```

chessground/base.css

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
/*
2+
* Chessground base css properties, for clarity.
3+
*
4+
* You can then include either desktop.css or mobile.css.
5+
*
6+
* And you need to include the css files in themes folder in order to have the
7+
* board and pieces displayed!
8+
*/
9+
10+
.cg-board-wrap {
11+
width: 100%;
12+
height: 100%;
13+
position: relative;
14+
}
15+
.cg-board-wrap svg {
16+
overflow: hidden;
17+
position: relative;
18+
top: 0;
19+
left: 0;
20+
width: 100%;
21+
height: 100%;
22+
pointer-events: none;
23+
z-index: 2;
24+
opacity: 0.6;
25+
}
26+
.cg-board-wrap svg * {
27+
transition: 0.3s;
28+
}
29+
.cg-board {
30+
-webkit-user-select: none;
31+
-moz-user-select: none;
32+
-ms-user-select: none;
33+
user-select: none;
34+
line-height: 0;
35+
background-size: cover;
36+
position: relative;
37+
width: 100%;
38+
height: 100%;
39+
}
40+
.cg-board:not(.is3d) {
41+
image-rendering: -moz-crisp-edges;
42+
image-rendering: -o-crisp-edges;
43+
image-rendering: -webkit-optimize-contrast;
44+
image-rendering: pixelated;
45+
-ms-interpolation-mode: nearest-neighbor;
46+
}
47+
square {
48+
position: absolute;
49+
top: 0;
50+
left: 0;
51+
width: 12.5%;
52+
height: 12.5%;
53+
}
54+
square.move-dest {
55+
background: radial-gradient(rgba(20, 85, 30, 0.5) 22%, #208530 0, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 0);
56+
}
57+
square.premove-dest {
58+
background: radial-gradient(rgba(20, 30, 85, 0.5) 22%, #203085 0, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 0);
59+
}
60+
square.last-move {
61+
background-color: rgba(155, 199, 0, 0.41);
62+
}
63+
square.selected {
64+
background-color: rgba(20, 85, 30, 0.5);
65+
}
66+
square.check {
67+
background: radial-gradient(ellipse at center, rgba(255, 0, 0, 1) 0%, rgba(231, 0, 0, 1) 25%, rgba(169, 0, 0, 0) 89%, rgba(158, 0, 0, 0) 100%);
68+
}
69+
square.current-premove {
70+
background-color: rgba(20, 30, 85, 0.5);
71+
}
72+
piece {
73+
position: absolute;
74+
top: 0;
75+
left: 0;
76+
width: 12.5%;
77+
height: 12.5%;
78+
background-size: cover;
79+
z-index: 2;
80+
will-change: transform;
81+
}
82+
piece.dragging {
83+
z-index: 9;
84+
}
85+
piece.ghost {
86+
opacity: 0.3;
87+
}
88+
.cg-board-wrap coords {
89+
position: absolute;
90+
display: flex;
91+
pointer-events: none;
92+
opacity: 0.8;
93+
font-size: 9px;
94+
}
95+
.cg-board-wrap coords.ranks {
96+
right: -15px;
97+
top: 0;
98+
flex-flow: column-reverse;
99+
height: 100%;
100+
width: 12px;
101+
}
102+
.is3d .cg-board-wrap coords.ranks {
103+
height: calc(100% - 10px);
104+
}
105+
.cg-board-wrap coords.ranks.black {
106+
flex-flow: column;
107+
}
108+
.cg-board-wrap coords.files {
109+
bottom: -16px;
110+
left: 0;
111+
flex-flow: row;
112+
width: 100%;
113+
height: 16px;
114+
text-transform: uppercase;
115+
text-align: center;
116+
}
117+
.cg-board-wrap coords.files.black {
118+
flex-flow: row-reverse;
119+
}
120+
.cg-board-wrap coords coord {
121+
flex: 1 1 auto;
122+
}
123+
.cg-board-wrap coords.ranks coord {
124+
transform: translateY(39%);
125+
}
126+
body.coords_0 .cg-board-wrap coords {
127+
display: none;
128+
}
129+
body.coords_1 .cg-board-wrap coords {
130+
color: #fff;
131+
text-shadow: 0 1px 2px #000;
132+
}
133+
body.coords_1 .cg-board-wrap coords.files {
134+
bottom: 0px;
135+
text-align: left;
136+
}
137+
body.coords_1 .cg-board-wrap coords.files coord {
138+
padding-left: 2px;
139+
}
140+
body.coords_1 .cg-board-wrap coords.ranks {
141+
right: -4px;
142+
text-align: left;
143+
}
144+
body.coords_1 .cg-board-wrap coords.ranks coord {
145+
transform: none;
146+
}

0 commit comments

Comments
 (0)