kokopu-react 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/Chessboard.js +64 -67
- package/dist/lib/impl/ArrowTip.js +2 -2
- package/dist/lib/impl/Motion.js +133 -0
- package/graphic_test_src/05_chessboard_move.js +2 -2
- package/graphic_test_src/06a_chessboard_animated_move.js +36 -0
- package/graphic_test_src/06b_chessboard_animated_move.js +36 -0
- package/graphic_test_src/06c_chessboard_animated_move.js +36 -0
- package/graphic_test_src/{06_chessboard_theme.js → 07_chessboard_theme.js} +0 -0
- package/graphic_test_src/{07_chessboard_click_squares.js → 08_chessboard_click_squares.js} +0 -0
- package/graphic_test_src/{08_chessboard_move_pieces.js → 09_chessboard_move_pieces.js} +0 -0
- package/graphic_test_src/{09_chessboard_edit_arrows.js → 10_chessboard_edit_arrows.js} +0 -0
- package/graphic_test_src/{10_chessboard_play_moves.js → 11_chessboard_play_moves.js} +0 -0
- package/graphic_test_src/{11_chessboard_play_promotions.js → 12_chessboard_play_promotions.js} +0 -0
- package/graphic_test_src/{12_movetext_simple.js → 13_movetext_simple.js} +0 -0
- package/graphic_test_src/{13_movetext_error.js → 14_movetext_error.js} +0 -0
- package/graphic_test_src/{14_movetext_html.js → 15_movetext_html.js} +0 -0
- package/graphic_test_src/{15_movetext_options.js → 16_movetext_options.js} +0 -0
- package/graphic_test_src/{16_movetext_interaction.js → 17_movetext_interaction.js} +0 -0
- package/package.json +6 -8
- package/src/Chessboard.js +24 -20
- package/src/impl/ArrowTip.js +2 -2
- package/src/impl/Motion.js +99 -0
- package/test/4_chessboard_graphic.js +4 -1
- package/test/5_chessboard_interaction.js +5 -5
- package/test/6_chessboard_play_moves.js +4 -4
- package/test/7_movetext_graphic.js +4 -4
- package/test/8_movetext_interaction.js +2 -2
- package/test/common/graphic.js +6 -0
- package/test/references/06a_chessboard_animated_move/0.png +0 -0
- package/test/references/06a_chessboard_animated_move/1.png +0 -0
- package/test/references/06a_chessboard_animated_move/2.png +0 -0
- package/test/references/06a_chessboard_animated_move/3.png +0 -0
- package/test/references/06a_chessboard_animated_move/4.png +0 -0
- package/test/references/06a_chessboard_animated_move/5.png +0 -0
- package/test/references/06b_chessboard_animated_move/0.png +0 -0
- package/test/references/06b_chessboard_animated_move/1.png +0 -0
- package/test/references/06b_chessboard_animated_move/2.png +0 -0
- package/test/references/06b_chessboard_animated_move/3.png +0 -0
- package/test/references/06b_chessboard_animated_move/4.png +0 -0
- package/test/references/06b_chessboard_animated_move/5.png +0 -0
- package/test/references/06c_chessboard_animated_move/0.png +0 -0
- package/test/references/06c_chessboard_animated_move/1.png +0 -0
- package/test/references/06c_chessboard_animated_move/2.png +0 -0
- package/test/references/06c_chessboard_animated_move/3.png +0 -0
- package/test/references/06c_chessboard_animated_move/4.png +0 -0
- package/test/references/06c_chessboard_animated_move/5.png +0 -0
- package/test/references/{06_chessboard_theme → 07_chessboard_theme}/0.png +0 -0
- package/test/references/{06_chessboard_theme → 07_chessboard_theme}/1.png +0 -0
- package/test/references/{06_chessboard_theme → 07_chessboard_theme}/2.png +0 -0
- package/test/references/{06_chessboard_theme → 07_chessboard_theme}/3.png +0 -0
- package/test/references/{06_chessboard_theme → 07_chessboard_theme}/4.png +0 -0
- package/test/references/{06_chessboard_theme → 07_chessboard_theme}/5.png +0 -0
- package/test/references/{06_chessboard_theme → 07_chessboard_theme}/6.png +0 -0
- package/test/references/{06_chessboard_theme → 07_chessboard_theme}/7.png +0 -0
- package/test/references/{06_chessboard_theme → 07_chessboard_theme}/8.png +0 -0
- package/test/references/{08_chessboard_move_pieces → 09_chessboard_move_pieces}/after_move.png +0 -0
- package/test/references/{08_chessboard_move_pieces → 09_chessboard_move_pieces}/empty_square.png +0 -0
- package/test/references/{08_chessboard_move_pieces → 09_chessboard_move_pieces}/null_vector.png +0 -0
- package/test/references/{08_chessboard_move_pieces → 09_chessboard_move_pieces}/out_of_board.png +0 -0
- package/test/references/{08_chessboard_move_pieces → 09_chessboard_move_pieces}/over_arrow_marker.png +0 -0
- package/test/references/{08_chessboard_move_pieces → 09_chessboard_move_pieces}/over_empty.png +0 -0
- package/test/references/{08_chessboard_move_pieces → 09_chessboard_move_pieces}/over_non_empty_1.png +0 -0
- package/test/references/{08_chessboard_move_pieces → 09_chessboard_move_pieces}/over_non_empty_2.png +0 -0
- package/test/references/{08_chessboard_move_pieces → 09_chessboard_move_pieces}/over_square_marker.png +0 -0
- package/test/references/{08_chessboard_move_pieces → 09_chessboard_move_pieces}/over_text_marker.png +0 -0
- package/test/references/{09_chessboard_edit_arrows → 10_chessboard_edit_arrows}/base_1.png +0 -0
- package/test/references/{09_chessboard_edit_arrows → 10_chessboard_edit_arrows}/base_2.png +0 -0
- package/test/references/{09_chessboard_edit_arrows → 10_chessboard_edit_arrows}/edit_color_not_set.png +0 -0
- package/test/references/{09_chessboard_edit_arrows → 10_chessboard_edit_arrows}/null_vector.png +0 -0
- package/test/references/{09_chessboard_edit_arrows → 10_chessboard_edit_arrows}/out_of_board.png +0 -0
- package/test/references/{09_chessboard_edit_arrows → 10_chessboard_edit_arrows}/over_arrow_marker.png +0 -0
- package/test/references/{09_chessboard_edit_arrows → 10_chessboard_edit_arrows}/over_square_marker.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/castling_move.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/chess960_ambiguous_king_move.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/chess960_castling_move_1.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/chess960_castling_move_2.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/chess960_non_kxr_castling.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/illegal_move.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/illegal_position.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/null_vector.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/out_of_board.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/regular_move_1.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/regular_move_2.png +0 -0
- package/test/references/{10_chessboard_play_moves → 11_chessboard_play_moves}/wrong_color.png +0 -0
- package/test/references/{11_chessboard_play_promotions → 12_chessboard_play_promotions}/antichess_promotion.png +0 -0
- package/test/references/{11_chessboard_play_promotions → 12_chessboard_play_promotions}/cancel_promotion.png +0 -0
- package/test/references/{11_chessboard_play_promotions → 12_chessboard_play_promotions}/regular_promotion_1.png +0 -0
- package/test/references/{11_chessboard_play_promotions → 12_chessboard_play_promotions}/regular_promotion_2.png +0 -0
- package/test/references/{12_movetext_simple → 13_movetext_simple}/0.png +0 -0
- package/test/references/{12_movetext_simple → 13_movetext_simple}/1.png +0 -0
- package/test/references/{12_movetext_simple → 13_movetext_simple}/2.png +0 -0
- package/test/references/{12_movetext_simple → 13_movetext_simple}/3.png +0 -0
- package/test/references/{13_movetext_error → 14_movetext_error}/0.png +0 -0
- package/test/references/{13_movetext_error → 14_movetext_error}/1.png +0 -0
- package/test/references/{13_movetext_error → 14_movetext_error}/2.png +0 -0
- package/test/references/{13_movetext_error → 14_movetext_error}/3.png +0 -0
- package/test/references/{13_movetext_error → 14_movetext_error}/4.png +0 -0
- package/test/references/{14_movetext_html → 15_movetext_html}/0.png +0 -0
- package/test/references/{14_movetext_html → 15_movetext_html}/1.png +0 -0
- package/test/references/{14_movetext_html → 15_movetext_html}/2.png +0 -0
- package/test/references/{15_movetext_options → 16_movetext_options}/0.png +0 -0
- package/test/references/{15_movetext_options → 16_movetext_options}/1.png +0 -0
- package/test/references/{15_movetext_options → 16_movetext_options}/2.png +0 -0
- package/test/references/{15_movetext_options → 16_movetext_options}/3.png +0 -0
- package/test/references/{16_movetext_interaction → 17_movetext_interaction}/0.png +0 -0
- package/test/references/{16_movetext_interaction → 17_movetext_interaction}/1.png +0 -0
- package/test/references/{16_movetext_interaction → 17_movetext_interaction}/2.png +0 -0
- package/CHANGELOG.md +0 -141
- package/graphics/chess_sprites/cburnett/bb.svg +0 -45
- package/graphics/chess_sprites/cburnett/bk.svg +0 -47
- package/graphics/chess_sprites/cburnett/bn.svg +0 -37
- package/graphics/chess_sprites/cburnett/bp.svg +0 -19
- package/graphics/chess_sprites/cburnett/bq.svg +0 -58
- package/graphics/chess_sprites/cburnett/br.svg +0 -60
- package/graphics/chess_sprites/cburnett/bx.svg +0 -56
- package/graphics/chess_sprites/cburnett/wb.svg +0 -48
- package/graphics/chess_sprites/cburnett/wk.svg +0 -26
- package/graphics/chess_sprites/cburnett/wn.svg +0 -37
- package/graphics/chess_sprites/cburnett/wp.svg +0 -19
- package/graphics/chess_sprites/cburnett/wq.svg +0 -60
- package/graphics/chess_sprites/cburnett/wr.svg +0 -44
- package/graphics/chess_sprites/cburnett/wx.svg +0 -56
- package/graphics/chess_sprites/generate_sprites.sh +0 -135
- package/graphics/chess_sprites/mmonge/celtic-bx.svg +0 -112
- package/graphics/chess_sprites/mmonge/celtic-wx.svg +0 -111
- package/graphics/chess_sprites/mmonge/celtic.svg +0 -1576
- package/graphics/chess_sprites/mmonge/eyes-spatial-bx.svg +0 -101
- package/graphics/chess_sprites/mmonge/eyes-spatial-wx.svg +0 -100
- package/graphics/chess_sprites/mmonge/eyes.svg +0 -2538
- package/graphics/chess_sprites/mmonge/fantasy-bx.svg +0 -112
- package/graphics/chess_sprites/mmonge/fantasy-wx.svg +0 -111
- package/graphics/chess_sprites/mmonge/fantasy.svg +0 -5497
- package/graphics/chess_sprites/mmonge/fantasy_alt.svg +0 -3742
- package/graphics/chess_sprites/mmonge/freak.svg +0 -3479
- package/graphics/chess_sprites/mmonge/prmi.svg +0 -6776
- package/graphics/chess_sprites/mmonge/skulls-bx.svg +0 -124
- package/graphics/chess_sprites/mmonge/skulls-wx.svg +0 -111
- package/graphics/chess_sprites/mmonge/skulls.svg +0 -12978
- package/graphics/chess_sprites/mmonge/spatial.svg +0 -1223
- package/graphics/logo-small.svg +0 -14
- package/graphics/logo.svg +0 -26
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
|
-
<svg
|
|
4
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
|
5
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
-
version="1.1"
|
|
7
|
-
width="45"
|
|
8
|
-
height="45"
|
|
9
|
-
id="svg3128">
|
|
10
|
-
<defs
|
|
11
|
-
id="defs3130" />
|
|
12
|
-
<g
|
|
13
|
-
id="layer1">
|
|
14
|
-
<path
|
|
15
|
-
d="M 9 13 A 2 2 0 1 1 5,13 A 2 2 0 1 1 9 13 z"
|
|
16
|
-
transform="translate(-1,-1)"
|
|
17
|
-
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
18
|
-
id="path5571" />
|
|
19
|
-
<path
|
|
20
|
-
d="M 9 13 A 2 2 0 1 1 5,13 A 2 2 0 1 1 9 13 z"
|
|
21
|
-
transform="translate(15.5,-5.5)"
|
|
22
|
-
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
23
|
-
id="path5573" />
|
|
24
|
-
<path
|
|
25
|
-
d="M 9 13 A 2 2 0 1 1 5,13 A 2 2 0 1 1 9 13 z"
|
|
26
|
-
transform="translate(32,-1)"
|
|
27
|
-
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
28
|
-
id="path5575" />
|
|
29
|
-
<path
|
|
30
|
-
d="M 9 13 A 2 2 0 1 1 5,13 A 2 2 0 1 1 9 13 z"
|
|
31
|
-
transform="translate(7,-4.5)"
|
|
32
|
-
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
33
|
-
id="path5577" />
|
|
34
|
-
<path
|
|
35
|
-
d="M 9 13 A 2 2 0 1 1 5,13 A 2 2 0 1 1 9 13 z"
|
|
36
|
-
transform="translate(24,-4)"
|
|
37
|
-
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
38
|
-
id="path5579" />
|
|
39
|
-
<path
|
|
40
|
-
d="M 9,26 C 17.5,24.5 30,24.5 36,26 L 38,14 L 31,25 L 31,11 L 25.5,24.5 L 22.5,9.5 L 19.5,24.5 L 14,10.5 L 14,25 L 7,14 L 9,26 z "
|
|
41
|
-
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
42
|
-
id="path5581" />
|
|
43
|
-
<path
|
|
44
|
-
d="M 9,26 C 9,28 10.5,28 11.5,30 C 12.5,31.5 12.5,31 12,33.5 C 10.5,34.5 10.5,36 10.5,36 C 9,37.5 11,38.5 11,38.5 C 17.5,39.5 27.5,39.5 34,38.5 C 34,38.5 35.5,37.5 34,36 C 34,36 34.5,34.5 33,33.5 C 32.5,31 32.5,31.5 33.5,30 C 34.5,28 36,28 36,26 C 27.5,24.5 17.5,24.5 9,26 z "
|
|
45
|
-
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
46
|
-
id="path5583" />
|
|
47
|
-
<path
|
|
48
|
-
d="M 11.5,30 C 15,29 30,29 33.5,30"
|
|
49
|
-
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
|
50
|
-
id="path5585" />
|
|
51
|
-
<path
|
|
52
|
-
d="M 12,33.5 C 18,32.5 27,32.5 33,33.5"
|
|
53
|
-
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
|
54
|
-
id="path5587" />
|
|
55
|
-
<path
|
|
56
|
-
d="M 10.5,36 C 15.5,35 29,35 34,36"
|
|
57
|
-
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
|
|
58
|
-
id="path5589" />
|
|
59
|
-
</g>
|
|
60
|
-
</svg>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
|
-
<svg
|
|
4
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
|
5
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
-
version="1.1"
|
|
7
|
-
width="45"
|
|
8
|
-
height="45"
|
|
9
|
-
id="svg3128">
|
|
10
|
-
<defs
|
|
11
|
-
id="defs3130" />
|
|
12
|
-
<g
|
|
13
|
-
style="display:inline"
|
|
14
|
-
id="layer1">
|
|
15
|
-
<path
|
|
16
|
-
d="M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z "
|
|
17
|
-
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
18
|
-
id="path3119" />
|
|
19
|
-
<path
|
|
20
|
-
d="M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z "
|
|
21
|
-
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
22
|
-
id="path3121" />
|
|
23
|
-
<path
|
|
24
|
-
d="M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14"
|
|
25
|
-
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
26
|
-
id="path3129" />
|
|
27
|
-
<path
|
|
28
|
-
d="M 34,14 L 31,17 L 14,17 L 11,14"
|
|
29
|
-
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
30
|
-
id="path3127" />
|
|
31
|
-
<path
|
|
32
|
-
d="M 31,17 L 31,29.5 L 14,29.5 L 14,17"
|
|
33
|
-
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
34
|
-
id="path3125" />
|
|
35
|
-
<path
|
|
36
|
-
d="M 31,29.5 L 32.5,32 L 12.5,32 L 14,29.5"
|
|
37
|
-
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
38
|
-
id="path3123" />
|
|
39
|
-
<path
|
|
40
|
-
d="M 11,14 L 34,14"
|
|
41
|
-
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
|
|
42
|
-
id="path5175" />
|
|
43
|
-
</g>
|
|
44
|
-
</svg>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<svg
|
|
3
|
-
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
-
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
-
version="1.1"
|
|
11
|
-
width="45"
|
|
12
|
-
height="45"
|
|
13
|
-
id="svg3128"
|
|
14
|
-
inkscape:version="0.91 r"
|
|
15
|
-
sodipodi:docname="wx.svg">
|
|
16
|
-
<metadata
|
|
17
|
-
id="metadata14">
|
|
18
|
-
<rdf:RDF>
|
|
19
|
-
<cc:Work
|
|
20
|
-
rdf:about="">
|
|
21
|
-
<dc:format>image/svg+xml</dc:format>
|
|
22
|
-
<dc:type
|
|
23
|
-
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
24
|
-
<dc:title />
|
|
25
|
-
</cc:Work>
|
|
26
|
-
</rdf:RDF>
|
|
27
|
-
</metadata>
|
|
28
|
-
<sodipodi:namedview
|
|
29
|
-
pagecolor="#ffffff"
|
|
30
|
-
bordercolor="#666666"
|
|
31
|
-
borderopacity="1"
|
|
32
|
-
objecttolerance="10"
|
|
33
|
-
gridtolerance="10"
|
|
34
|
-
guidetolerance="10"
|
|
35
|
-
inkscape:pageopacity="0"
|
|
36
|
-
inkscape:pageshadow="2"
|
|
37
|
-
inkscape:window-width="1680"
|
|
38
|
-
inkscape:window-height="973"
|
|
39
|
-
id="namedview12"
|
|
40
|
-
showgrid="false"
|
|
41
|
-
inkscape:zoom="10.488889"
|
|
42
|
-
inkscape:cx="5.7480884"
|
|
43
|
-
inkscape:cy="26.23736"
|
|
44
|
-
inkscape:window-x="0"
|
|
45
|
-
inkscape:window-y="25"
|
|
46
|
-
inkscape:window-maximized="1"
|
|
47
|
-
inkscape:current-layer="svg3128" />
|
|
48
|
-
<defs
|
|
49
|
-
id="defs3130" />
|
|
50
|
-
<circle
|
|
51
|
-
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
52
|
-
id="path2991"
|
|
53
|
-
cx="22.5"
|
|
54
|
-
cy="22.5"
|
|
55
|
-
r="13.25" />
|
|
56
|
-
</svg>
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
################################################################################
|
|
3
|
-
# #
|
|
4
|
-
# This file is part of Kokopu-React, a JavaScript chess library. #
|
|
5
|
-
# Copyright (C) 2021-2022 Yoann Le Montagner <yo35 -at- melix.net> #
|
|
6
|
-
# #
|
|
7
|
-
# This program is free software: you can redistribute it and/or #
|
|
8
|
-
# modify it under the terms of the GNU Lesser General Public License #
|
|
9
|
-
# as published by the Free Software Foundation, either version 3 of #
|
|
10
|
-
# the License, or (at your option) any later version. #
|
|
11
|
-
# #
|
|
12
|
-
# This program is distributed in the hope that it will be useful, #
|
|
13
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
15
|
-
# GNU Lesser General Public License for more details. #
|
|
16
|
-
# #
|
|
17
|
-
# You should have received a copy of the GNU Lesser General #
|
|
18
|
-
# Public License along with this program. If not, see #
|
|
19
|
-
# <http://www.gnu.org/licenses/>. #
|
|
20
|
-
# #
|
|
21
|
-
################################################################################
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# This script aims at generating the .png sprite files corresponding the .svg files
|
|
25
|
-
# saved in /chess-sprites and its sub-directories.
|
|
26
|
-
# The generated .png files are saved in git, thus no need to call this script during the package build.
|
|
27
|
-
|
|
28
|
-
# Output sprite size
|
|
29
|
-
size=96
|
|
30
|
-
|
|
31
|
-
# Output directory
|
|
32
|
-
output_dir=../src/sprites
|
|
33
|
-
cd `dirname $0`
|
|
34
|
-
mkdir -p $output_dir
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
function echo_pieceset {
|
|
38
|
-
echo ""
|
|
39
|
-
echo "#################################################"
|
|
40
|
-
echo "# Pieceset $1"
|
|
41
|
-
echo "#################################################"
|
|
42
|
-
echo ""
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function echo_sprite {
|
|
47
|
-
echo "Processing sprite $1..."
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
################################################################################
|
|
53
|
-
# CBURNETT
|
|
54
|
-
################################################################################
|
|
55
|
-
|
|
56
|
-
function export_cburnett {
|
|
57
|
-
|
|
58
|
-
echo_pieceset "cburnett"
|
|
59
|
-
|
|
60
|
-
codes=$1
|
|
61
|
-
for code in $codes; do
|
|
62
|
-
|
|
63
|
-
echo_sprite $code
|
|
64
|
-
|
|
65
|
-
# Input/output files
|
|
66
|
-
input=cburnett/$code.svg
|
|
67
|
-
output=$output_dir/cburnett-$code.png
|
|
68
|
-
|
|
69
|
-
# Create the sprite
|
|
70
|
-
inkscape -e $output -w $size -h $size $input > /dev/null
|
|
71
|
-
|
|
72
|
-
done
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
################################################################################
|
|
78
|
-
# MMONGE
|
|
79
|
-
################################################################################
|
|
80
|
-
|
|
81
|
-
function export_mmonge {
|
|
82
|
-
|
|
83
|
-
codes=$1
|
|
84
|
-
piecesets=$2
|
|
85
|
-
|
|
86
|
-
for pieceset in $piecesets; do
|
|
87
|
-
|
|
88
|
-
echo_pieceset $pieceset
|
|
89
|
-
|
|
90
|
-
for code in $codes; do
|
|
91
|
-
|
|
92
|
-
echo_sprite $code
|
|
93
|
-
|
|
94
|
-
colorcode=${code:0:1}
|
|
95
|
-
piececode=${code:1:1}
|
|
96
|
-
|
|
97
|
-
if [ "$piececode" == "x" ]; then
|
|
98
|
-
|
|
99
|
-
# Input/output files
|
|
100
|
-
input=mmonge/$pieceset-$code.svg
|
|
101
|
-
output=$output_dir/$pieceset-$code.png
|
|
102
|
-
|
|
103
|
-
# Create the sprite
|
|
104
|
-
inkscape -e $output -w $size -h $size $input > /dev/null
|
|
105
|
-
|
|
106
|
-
else
|
|
107
|
-
|
|
108
|
-
# Input/output files
|
|
109
|
-
input=mmonge/$pieceset.svg
|
|
110
|
-
output=$output_dir/$pieceset-$code.png
|
|
111
|
-
|
|
112
|
-
# Area to extract from the source file
|
|
113
|
-
x1=`expr "(" index "kqrbnp" $piececode ")" "*" 200`
|
|
114
|
-
y1=`expr "(" index "wb" $colorcode ")" "*" 200`
|
|
115
|
-
x0=`expr $x1 - 200`
|
|
116
|
-
y0=`expr $y1 - 200`
|
|
117
|
-
area="$x0:$y0:$x1:$y1"
|
|
118
|
-
|
|
119
|
-
# Create the sprite
|
|
120
|
-
inkscape -e $output -a $area -w $size -h $size $input > /dev/null
|
|
121
|
-
fi
|
|
122
|
-
|
|
123
|
-
done
|
|
124
|
-
done
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
################################################################################
|
|
130
|
-
# RUN THE EXPORTS
|
|
131
|
-
################################################################################
|
|
132
|
-
|
|
133
|
-
export_cburnett "bb bk bn bp bq br bx wb wk wn wp wq wr wx"
|
|
134
|
-
export_mmonge "bb bk bn bp bq br wb wk wn wp wq wr" "celtic eyes fantasy skulls spatial"
|
|
135
|
-
export_mmonge "bx wx" "celtic eyes-spatial fantasy skulls"
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<svg
|
|
3
|
-
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
-
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
9
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
10
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
11
|
-
version="1.1"
|
|
12
|
-
width="200"
|
|
13
|
-
height="200"
|
|
14
|
-
id="svg3128"
|
|
15
|
-
inkscape:version="0.91 r"
|
|
16
|
-
sodipodi:docname="celtic-bx.svg">
|
|
17
|
-
<metadata
|
|
18
|
-
id="metadata14">
|
|
19
|
-
<rdf:RDF>
|
|
20
|
-
<cc:Work
|
|
21
|
-
rdf:about="">
|
|
22
|
-
<dc:format>image/svg+xml</dc:format>
|
|
23
|
-
<dc:type
|
|
24
|
-
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
25
|
-
<dc:title />
|
|
26
|
-
</cc:Work>
|
|
27
|
-
</rdf:RDF>
|
|
28
|
-
</metadata>
|
|
29
|
-
<sodipodi:namedview
|
|
30
|
-
pagecolor="#ffffff"
|
|
31
|
-
bordercolor="#666666"
|
|
32
|
-
borderopacity="1"
|
|
33
|
-
objecttolerance="10"
|
|
34
|
-
gridtolerance="10"
|
|
35
|
-
guidetolerance="10"
|
|
36
|
-
inkscape:pageopacity="0"
|
|
37
|
-
inkscape:pageshadow="2"
|
|
38
|
-
inkscape:window-width="1280"
|
|
39
|
-
inkscape:window-height="997"
|
|
40
|
-
id="namedview12"
|
|
41
|
-
showgrid="false"
|
|
42
|
-
inkscape:zoom="2.6222223"
|
|
43
|
-
inkscape:cx="51.849615"
|
|
44
|
-
inkscape:cy="88.0318"
|
|
45
|
-
inkscape:window-x="1680"
|
|
46
|
-
inkscape:window-y="0"
|
|
47
|
-
inkscape:window-maximized="1"
|
|
48
|
-
inkscape:current-layer="svg3128"
|
|
49
|
-
showguides="true" />
|
|
50
|
-
<defs
|
|
51
|
-
id="defs3130">
|
|
52
|
-
<linearGradient
|
|
53
|
-
id="linearGradientBlackPieces">
|
|
54
|
-
<stop
|
|
55
|
-
id="stop2268"
|
|
56
|
-
offset="0"
|
|
57
|
-
style="stop-color:#000000;stop-opacity:1;" />
|
|
58
|
-
<stop
|
|
59
|
-
id="stop2270"
|
|
60
|
-
offset="1"
|
|
61
|
-
style="stop-color:#505070;stop-opacity:1;" />
|
|
62
|
-
</linearGradient>
|
|
63
|
-
<linearGradient
|
|
64
|
-
id="linearGradientBlackPiecesBorder">
|
|
65
|
-
<stop
|
|
66
|
-
style="stop-color:#808080;stop-opacity:1;"
|
|
67
|
-
offset="0"
|
|
68
|
-
id="stop7192" />
|
|
69
|
-
<stop
|
|
70
|
-
style="stop-color:#808080;stop-opacity:1;"
|
|
71
|
-
offset="1"
|
|
72
|
-
id="stop7194" />
|
|
73
|
-
</linearGradient>
|
|
74
|
-
<linearGradient
|
|
75
|
-
gradientTransform="matrix(0.35702699,0,0,0.39669667,-171.34051,-48.100097)"
|
|
76
|
-
inkscape:collect="always"
|
|
77
|
-
xlink:href="#linearGradientBlackPieces-9"
|
|
78
|
-
id="linearGradient5532"
|
|
79
|
-
gradientUnits="userSpaceOnUse"
|
|
80
|
-
x1="559.771"
|
|
81
|
-
y1="313.20999"
|
|
82
|
-
x2="911.98419"
|
|
83
|
-
y2="460.03769" />
|
|
84
|
-
<linearGradient
|
|
85
|
-
id="linearGradientBlackPieces-9">
|
|
86
|
-
<stop
|
|
87
|
-
id="stop2268-7"
|
|
88
|
-
offset="0"
|
|
89
|
-
style="stop-color:#000e1c;stop-opacity:1;" />
|
|
90
|
-
<stop
|
|
91
|
-
id="stop2270-6"
|
|
92
|
-
offset="1"
|
|
93
|
-
style="stop-color:#50506f;stop-opacity:1;" />
|
|
94
|
-
</linearGradient>
|
|
95
|
-
<linearGradient
|
|
96
|
-
gradientTransform="matrix(0.35702699,0,0,0.39669667,-171.34051,-48.100097)"
|
|
97
|
-
inkscape:collect="always"
|
|
98
|
-
xlink:href="#linearGradientBlackPiecesBorder"
|
|
99
|
-
id="linearGradient5534"
|
|
100
|
-
gradientUnits="userSpaceOnUse"
|
|
101
|
-
x1="582.45239"
|
|
102
|
-
y1="373.33334"
|
|
103
|
-
x2="937.54761"
|
|
104
|
-
y2="373.33334" />
|
|
105
|
-
</defs>
|
|
106
|
-
<circle
|
|
107
|
-
cy="100"
|
|
108
|
-
cx="100"
|
|
109
|
-
id="path35272"
|
|
110
|
-
style="fill:url(#linearGradient5532);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5534);stroke-width:4.99100018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
|
111
|
-
r="59.504501" />
|
|
112
|
-
</svg>
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<svg
|
|
3
|
-
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
-
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
9
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
10
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
11
|
-
version="1.1"
|
|
12
|
-
width="200"
|
|
13
|
-
height="200"
|
|
14
|
-
id="svg3128"
|
|
15
|
-
inkscape:version="0.91 r"
|
|
16
|
-
sodipodi:docname="celtic-wx.svg">
|
|
17
|
-
<metadata
|
|
18
|
-
id="metadata14">
|
|
19
|
-
<rdf:RDF>
|
|
20
|
-
<cc:Work
|
|
21
|
-
rdf:about="">
|
|
22
|
-
<dc:format>image/svg+xml</dc:format>
|
|
23
|
-
<dc:type
|
|
24
|
-
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
25
|
-
<dc:title />
|
|
26
|
-
</cc:Work>
|
|
27
|
-
</rdf:RDF>
|
|
28
|
-
</metadata>
|
|
29
|
-
<sodipodi:namedview
|
|
30
|
-
pagecolor="#ffffff"
|
|
31
|
-
bordercolor="#666666"
|
|
32
|
-
borderopacity="1"
|
|
33
|
-
objecttolerance="10"
|
|
34
|
-
gridtolerance="10"
|
|
35
|
-
guidetolerance="10"
|
|
36
|
-
inkscape:pageopacity="0"
|
|
37
|
-
inkscape:pageshadow="2"
|
|
38
|
-
inkscape:window-width="1280"
|
|
39
|
-
inkscape:window-height="997"
|
|
40
|
-
id="namedview12"
|
|
41
|
-
showgrid="false"
|
|
42
|
-
inkscape:zoom="1.8541912"
|
|
43
|
-
inkscape:cx="29.606388"
|
|
44
|
-
inkscape:cy="12.455128"
|
|
45
|
-
inkscape:window-x="1680"
|
|
46
|
-
inkscape:window-y="0"
|
|
47
|
-
inkscape:window-maximized="1"
|
|
48
|
-
inkscape:current-layer="svg3128" />
|
|
49
|
-
<defs
|
|
50
|
-
id="defs3130">
|
|
51
|
-
<linearGradient
|
|
52
|
-
id="linearGradientWhitePieces">
|
|
53
|
-
<stop
|
|
54
|
-
id="stop7929"
|
|
55
|
-
offset="0"
|
|
56
|
-
style="stop-color:#ede3de;stop-opacity:1;" />
|
|
57
|
-
<stop
|
|
58
|
-
id="stop7931"
|
|
59
|
-
offset="1"
|
|
60
|
-
style="stop-color:#d0b090;stop-opacity:1;" />
|
|
61
|
-
</linearGradient>
|
|
62
|
-
<linearGradient
|
|
63
|
-
id="linearGradientWhitePiecesBorder">
|
|
64
|
-
<stop
|
|
65
|
-
style="stop-color:#000000;stop-opacity:1;"
|
|
66
|
-
offset="0"
|
|
67
|
-
id="stop7935" />
|
|
68
|
-
<stop
|
|
69
|
-
style="stop-color:#000000;stop-opacity:1;"
|
|
70
|
-
offset="1"
|
|
71
|
-
id="stop7937" />
|
|
72
|
-
</linearGradient>
|
|
73
|
-
<linearGradient
|
|
74
|
-
gradientTransform="matrix(0.35702699,0,0,0.39669667,-171.34052,-48.100103)"
|
|
75
|
-
inkscape:collect="always"
|
|
76
|
-
xlink:href="#linearGradientWhitePieces-1"
|
|
77
|
-
id="linearGradient5543"
|
|
78
|
-
gradientUnits="userSpaceOnUse"
|
|
79
|
-
x1="559.771"
|
|
80
|
-
y1="313.20999"
|
|
81
|
-
x2="911.98419"
|
|
82
|
-
y2="460.03769" />
|
|
83
|
-
<linearGradient
|
|
84
|
-
id="linearGradientWhitePieces-1">
|
|
85
|
-
<stop
|
|
86
|
-
id="stop7929-3"
|
|
87
|
-
offset="0"
|
|
88
|
-
style="stop-color:#ede3de;stop-opacity:1;" />
|
|
89
|
-
<stop
|
|
90
|
-
id="stop7931-0"
|
|
91
|
-
offset="1"
|
|
92
|
-
style="stop-color:#8a6737;stop-opacity:1;" />
|
|
93
|
-
</linearGradient>
|
|
94
|
-
<linearGradient
|
|
95
|
-
gradientTransform="matrix(0.35702699,0,0,0.39669667,-171.34052,-48.100103)"
|
|
96
|
-
inkscape:collect="always"
|
|
97
|
-
xlink:href="#linearGradientWhitePiecesBorder"
|
|
98
|
-
id="linearGradient5545"
|
|
99
|
-
gradientUnits="userSpaceOnUse"
|
|
100
|
-
x1="582.45239"
|
|
101
|
-
y1="373.33334"
|
|
102
|
-
x2="937.54761"
|
|
103
|
-
y2="373.33334" />
|
|
104
|
-
</defs>
|
|
105
|
-
<circle
|
|
106
|
-
cy="100"
|
|
107
|
-
cx="100"
|
|
108
|
-
style="fill:url(#linearGradient5543);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5545);stroke-width:4.99100018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
|
109
|
-
id="path7691"
|
|
110
|
-
r="59.504501" />
|
|
111
|
-
</svg>
|