@mirasen/chessboard 0.1.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/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +96 -0
- package/assets/pieces/chessnut/ATTRIBUTION.md +13 -0
- package/assets/pieces/chessnut/LICENSE.txt +202 -0
- package/assets/pieces/chessnut/bB.svg +58 -0
- package/assets/pieces/chessnut/bK.svg +51 -0
- package/assets/pieces/chessnut/bN.svg +19 -0
- package/assets/pieces/chessnut/bP.svg +17 -0
- package/assets/pieces/chessnut/bQ.svg +97 -0
- package/assets/pieces/chessnut/bR.svg +34 -0
- package/assets/pieces/chessnut/wB.svg +61 -0
- package/assets/pieces/chessnut/wK.svg +71 -0
- package/assets/pieces/chessnut/wN.svg +19 -0
- package/assets/pieces/chessnut/wP.svg +17 -0
- package/assets/pieces/chessnut/wQ.svg +40 -0
- package/assets/pieces/chessnut/wR.svg +38 -0
- package/dist/animation/planner.d.ts +6 -0
- package/dist/animation/planner.js +128 -0
- package/dist/animation/render/fade.d.ts +7 -0
- package/dist/animation/render/fade.js +24 -0
- package/dist/animation/render/move.d.ts +7 -0
- package/dist/animation/render/move.js +28 -0
- package/dist/animation/render/plan.d.ts +14 -0
- package/dist/animation/render/plan.js +69 -0
- package/dist/animation/render/static.d.ts +7 -0
- package/dist/animation/render/static.js +21 -0
- package/dist/animation/render/types.d.ts +21 -0
- package/dist/animation/render/types.js +1 -0
- package/dist/animation/types.d.ts +46 -0
- package/dist/animation/types.js +6 -0
- package/dist/extensions/animation/factory.d.ts +3 -0
- package/dist/extensions/animation/factory.js +88 -0
- package/dist/extensions/animation/types.d.ts +11 -0
- package/dist/extensions/animation/types.js +1 -0
- package/dist/extensions/factory/main.d.ts +2 -0
- package/dist/extensions/factory/main.js +101 -0
- package/dist/extensions/factory/runtime.d.ts +5 -0
- package/dist/extensions/factory/runtime.js +43 -0
- package/dist/extensions/first-party/active-target/factory.d.ts +2 -0
- package/dist/extensions/first-party/active-target/factory.js +109 -0
- package/dist/extensions/first-party/active-target/types.d.ts +25 -0
- package/dist/extensions/first-party/active-target/types.js +15 -0
- package/dist/extensions/first-party/board-events/factory.d.ts +2 -0
- package/dist/extensions/first-party/board-events/factory.js +65 -0
- package/dist/extensions/first-party/board-events/types.d.ts +27 -0
- package/dist/extensions/first-party/board-events/types.js +2 -0
- package/dist/extensions/first-party/common/helpers.d.ts +8 -0
- package/dist/extensions/first-party/common/helpers.js +33 -0
- package/dist/extensions/first-party/common/types.d.ts +10 -0
- package/dist/extensions/first-party/common/types.js +1 -0
- package/dist/extensions/first-party/last-move/factory.d.ts +2 -0
- package/dist/extensions/first-party/last-move/factory.js +106 -0
- package/dist/extensions/first-party/last-move/types.d.ts +19 -0
- package/dist/extensions/first-party/last-move/types.js +6 -0
- package/dist/extensions/first-party/legal-moves/factory.d.ts +2 -0
- package/dist/extensions/first-party/legal-moves/factory.js +101 -0
- package/dist/extensions/first-party/legal-moves/types.d.ts +29 -0
- package/dist/extensions/first-party/legal-moves/types.js +19 -0
- package/dist/extensions/first-party/main-renderer/animation/factory.d.ts +4 -0
- package/dist/extensions/first-party/main-renderer/animation/factory.js +35 -0
- package/dist/extensions/first-party/main-renderer/animation/render.d.ts +7 -0
- package/dist/extensions/first-party/main-renderer/animation/render.js +46 -0
- package/dist/extensions/first-party/main-renderer/animation/types.d.ts +24 -0
- package/dist/extensions/first-party/main-renderer/animation/types.js +1 -0
- package/dist/extensions/first-party/main-renderer/animation/update.d.ts +3 -0
- package/dist/extensions/first-party/main-renderer/animation/update.js +40 -0
- package/dist/extensions/first-party/main-renderer/board/factory.d.ts +3 -0
- package/dist/extensions/first-party/main-renderer/board/factory.js +16 -0
- package/dist/extensions/first-party/main-renderer/board/render.d.ts +3 -0
- package/dist/extensions/first-party/main-renderer/board/render.js +24 -0
- package/dist/extensions/first-party/main-renderer/board/types.d.ts +10 -0
- package/dist/extensions/first-party/main-renderer/board/types.js +1 -0
- package/dist/extensions/first-party/main-renderer/board/update.d.ts +3 -0
- package/dist/extensions/first-party/main-renderer/board/update.js +27 -0
- package/dist/extensions/first-party/main-renderer/coordinates/factory.d.ts +3 -0
- package/dist/extensions/first-party/main-renderer/coordinates/factory.js +9 -0
- package/dist/extensions/first-party/main-renderer/coordinates/render.d.ts +3 -0
- package/dist/extensions/first-party/main-renderer/coordinates/render.js +60 -0
- package/dist/extensions/first-party/main-renderer/coordinates/types.d.ts +8 -0
- package/dist/extensions/first-party/main-renderer/coordinates/types.js +1 -0
- package/dist/extensions/first-party/main-renderer/drag/factory.d.ts +4 -0
- package/dist/extensions/first-party/main-renderer/drag/factory.js +23 -0
- package/dist/extensions/first-party/main-renderer/drag/render.d.ts +3 -0
- package/dist/extensions/first-party/main-renderer/drag/render.js +27 -0
- package/dist/extensions/first-party/main-renderer/drag/types.d.ts +16 -0
- package/dist/extensions/first-party/main-renderer/drag/types.js +1 -0
- package/dist/extensions/first-party/main-renderer/drag/update.d.ts +3 -0
- package/dist/extensions/first-party/main-renderer/drag/update.js +23 -0
- package/dist/extensions/first-party/main-renderer/factory.d.ts +2 -0
- package/dist/extensions/first-party/main-renderer/factory.js +95 -0
- package/dist/extensions/first-party/main-renderer/normalize.d.ts +4 -0
- package/dist/extensions/first-party/main-renderer/normalize.js +27 -0
- package/dist/extensions/first-party/main-renderer/pieces/factory.d.ts +3 -0
- package/dist/extensions/first-party/main-renderer/pieces/factory.js +27 -0
- package/dist/extensions/first-party/main-renderer/pieces/render.d.ts +3 -0
- package/dist/extensions/first-party/main-renderer/pieces/render.js +45 -0
- package/dist/extensions/first-party/main-renderer/pieces/suppress.d.ts +5 -0
- package/dist/extensions/first-party/main-renderer/pieces/suppress.js +9 -0
- package/dist/extensions/first-party/main-renderer/pieces/types.d.ts +20 -0
- package/dist/extensions/first-party/main-renderer/pieces/types.js +1 -0
- package/dist/extensions/first-party/main-renderer/pieces/update.d.ts +6 -0
- package/dist/extensions/first-party/main-renderer/pieces/update.js +31 -0
- package/dist/extensions/first-party/main-renderer/types/extension.d.ts +15 -0
- package/dist/extensions/first-party/main-renderer/types/extension.js +10 -0
- package/dist/extensions/first-party/main-renderer/types/input.d.ts +4 -0
- package/dist/extensions/first-party/main-renderer/types/input.js +1 -0
- package/dist/extensions/first-party/main-renderer/types/instance.d.ts +16 -0
- package/dist/extensions/first-party/main-renderer/types/instance.js +1 -0
- package/dist/extensions/first-party/main-renderer/types/internal.d.ts +17 -0
- package/dist/extensions/first-party/main-renderer/types/internal.js +30 -0
- package/dist/extensions/first-party/main-renderer/types/template.d.ts +5 -0
- package/dist/extensions/first-party/main-renderer/types/template.js +1 -0
- package/dist/extensions/first-party/selected-square/factory.d.ts +2 -0
- package/dist/extensions/first-party/selected-square/factory.js +88 -0
- package/dist/extensions/first-party/selected-square/types.d.ts +18 -0
- package/dist/extensions/first-party/selected-square/types.js +6 -0
- package/dist/extensions/index.d.ts +8 -0
- package/dist/extensions/index.js +6 -0
- package/dist/extensions/invalidation/factory.d.ts +2 -0
- package/dist/extensions/invalidation/factory.js +22 -0
- package/dist/extensions/invalidation/types.d.ts +11 -0
- package/dist/extensions/invalidation/types.js +1 -0
- package/dist/extensions/types/basic/animation.d.ts +28 -0
- package/dist/extensions/types/basic/animation.js +6 -0
- package/dist/extensions/types/basic/events.d.ts +34 -0
- package/dist/extensions/types/basic/events.js +7 -0
- package/dist/extensions/types/basic/mount.d.ts +7 -0
- package/dist/extensions/types/basic/mount.js +14 -0
- package/dist/extensions/types/basic/render.d.ts +9 -0
- package/dist/extensions/types/basic/render.js +1 -0
- package/dist/extensions/types/basic/transient-visuals.d.ts +10 -0
- package/dist/extensions/types/basic/transient-visuals.js +1 -0
- package/dist/extensions/types/basic/update.d.ts +16 -0
- package/dist/extensions/types/basic/update.js +11 -0
- package/dist/extensions/types/context/animation.d.ts +31 -0
- package/dist/extensions/types/context/animation.js +9 -0
- package/dist/extensions/types/context/render.d.ts +6 -0
- package/dist/extensions/types/context/render.js +1 -0
- package/dist/extensions/types/context/transient-visuals.d.ts +7 -0
- package/dist/extensions/types/context/transient-visuals.js +1 -0
- package/dist/extensions/types/context/ui-move.d.ts +16 -0
- package/dist/extensions/types/context/ui-move.js +1 -0
- package/dist/extensions/types/context/update.d.ts +25 -0
- package/dist/extensions/types/context/update.js +10 -0
- package/dist/extensions/types/extension.d.ts +40 -0
- package/dist/extensions/types/extension.js +1 -0
- package/dist/extensions/types/main.d.ts +44 -0
- package/dist/extensions/types/main.js +1 -0
- package/dist/extensions/types/surface/commands.d.ts +26 -0
- package/dist/extensions/types/surface/commands.js +1 -0
- package/dist/extensions/types/surface/events.d.ts +5 -0
- package/dist/extensions/types/surface/events.js +1 -0
- package/dist/extensions/types/surface/main.d.ts +10 -0
- package/dist/extensions/types/surface/main.js +1 -0
- package/dist/extensions/types/surface/transient-visuals.d.ts +4 -0
- package/dist/extensions/types/surface/transient-visuals.js +1 -0
- package/dist/extensions/types/wrapper.d.ts +26 -0
- package/dist/extensions/types/wrapper.js +11 -0
- package/dist/extensions/update.d.ts +4 -0
- package/dist/extensions/update.js +29 -0
- package/dist/helpers/util.d.ts +1 -0
- package/dist/helpers/util.js +9 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/layout/factory.d.ts +2 -0
- package/dist/layout/factory.js +33 -0
- package/dist/layout/geometry/factory.d.ts +12 -0
- package/dist/layout/geometry/factory.js +33 -0
- package/dist/layout/geometry/types.d.ts +20 -0
- package/dist/layout/geometry/types.js +1 -0
- package/dist/layout/helpers.d.ts +4 -0
- package/dist/layout/helpers.js +6 -0
- package/dist/layout/mutation.d.ts +6 -0
- package/dist/layout/mutation.js +1 -0
- package/dist/layout/reducers.d.ts +2 -0
- package/dist/layout/reducers.js +30 -0
- package/dist/layout/types.d.ts +23 -0
- package/dist/layout/types.js +1 -0
- package/dist/mutation/pipeline.d.ts +2 -0
- package/dist/mutation/pipeline.js +36 -0
- package/dist/mutation/session.d.ts +3 -0
- package/dist/mutation/session.js +66 -0
- package/dist/mutation/types.d.ts +26 -0
- package/dist/mutation/types.js +1 -0
- package/dist/render/factory.d.ts +2 -0
- package/dist/render/factory.js +117 -0
- package/dist/render/mount.d.ts +3 -0
- package/dist/render/mount.js +28 -0
- package/dist/render/rendering/animation.d.ts +13 -0
- package/dist/render/rendering/animation.js +92 -0
- package/dist/render/rendering/helpers.d.ts +3 -0
- package/dist/render/rendering/helpers.js +10 -0
- package/dist/render/rendering/state.d.ts +4 -0
- package/dist/render/rendering/state.js +48 -0
- package/dist/render/rendering/visuals.d.ts +3 -0
- package/dist/render/rendering/visuals.js +21 -0
- package/dist/render/scheduler/scheduler.d.ts +2 -0
- package/dist/render/scheduler/scheduler.js +53 -0
- package/dist/render/scheduler/types.d.ts +12 -0
- package/dist/render/scheduler/types.js +1 -0
- package/dist/render/svg/factory.d.ts +4 -0
- package/dist/render/svg/factory.js +38 -0
- package/dist/render/svg/helpers.d.ts +18 -0
- package/dist/render/svg/helpers.js +34 -0
- package/dist/render/types.d.ts +42 -0
- package/dist/render/types.js +1 -0
- package/dist/runtime/factory/helpers.d.ts +6 -0
- package/dist/runtime/factory/helpers.js +42 -0
- package/dist/runtime/factory/input.d.ts +3 -0
- package/dist/runtime/factory/input.js +98 -0
- package/dist/runtime/factory/main.d.ts +2 -0
- package/dist/runtime/factory/main.js +182 -0
- package/dist/runtime/factory/ui-move.d.ts +4 -0
- package/dist/runtime/factory/ui-move.js +84 -0
- package/dist/runtime/input/adapter/factory.d.ts +2 -0
- package/dist/runtime/input/adapter/factory.js +55 -0
- package/dist/runtime/input/adapter/helpers.d.ts +5 -0
- package/dist/runtime/input/adapter/helpers.js +23 -0
- package/dist/runtime/input/adapter/pointer.d.ts +13 -0
- package/dist/runtime/input/adapter/pointer.js +97 -0
- package/dist/runtime/input/adapter/types.d.ts +16 -0
- package/dist/runtime/input/adapter/types.js +1 -0
- package/dist/runtime/input/controller/factory.d.ts +2 -0
- package/dist/runtime/input/controller/factory.js +32 -0
- package/dist/runtime/input/controller/helpers.d.ts +3 -0
- package/dist/runtime/input/controller/helpers.js +12 -0
- package/dist/runtime/input/controller/pointer.d.ts +7 -0
- package/dist/runtime/input/controller/pointer.js +104 -0
- package/dist/runtime/input/controller/transient-visuals.d.ts +3 -0
- package/dist/runtime/input/controller/transient-visuals.js +12 -0
- package/dist/runtime/input/controller/types.d.ts +25 -0
- package/dist/runtime/input/controller/types.js +1 -0
- package/dist/runtime/layout.d.ts +2 -0
- package/dist/runtime/layout.js +10 -0
- package/dist/runtime/lifecycle.d.ts +12 -0
- package/dist/runtime/lifecycle.js +49 -0
- package/dist/runtime/mutation/extension-update.d.ts +2 -0
- package/dist/runtime/mutation/extension-update.js +26 -0
- package/dist/runtime/mutation/factory.d.ts +2 -0
- package/dist/runtime/mutation/factory.js +47 -0
- package/dist/runtime/mutation/interaction.d.ts +2 -0
- package/dist/runtime/mutation/interaction.js +34 -0
- package/dist/runtime/mutation/invalidation.d.ts +0 -0
- package/dist/runtime/mutation/invalidation.js +2 -0
- package/dist/runtime/mutation/last-move.d.ts +3 -0
- package/dist/runtime/mutation/last-move.js +19 -0
- package/dist/runtime/mutation/layout.d.ts +2 -0
- package/dist/runtime/mutation/layout.js +8 -0
- package/dist/runtime/mutation/pipeline.d.ts +22 -0
- package/dist/runtime/mutation/pipeline.js +1 -0
- package/dist/runtime/mutation/request-render.d.ts +2 -0
- package/dist/runtime/mutation/request-render.js +29 -0
- package/dist/runtime/mutation/run.d.ts +2 -0
- package/dist/runtime/mutation/run.js +3 -0
- package/dist/runtime/mutation/types.d.ts +14 -0
- package/dist/runtime/mutation/types.js +1 -0
- package/dist/runtime/types/main.d.ts +36 -0
- package/dist/runtime/types/main.js +1 -0
- package/dist/runtime/types/ui-move.d.ts +9 -0
- package/dist/runtime/types/ui-move.js +1 -0
- package/dist/state/board/check.d.ts +27 -0
- package/dist/state/board/check.js +148 -0
- package/dist/state/board/coords.d.ts +4 -0
- package/dist/state/board/coords.js +9 -0
- package/dist/state/board/denormalize.d.ts +11 -0
- package/dist/state/board/denormalize.js +77 -0
- package/dist/state/board/factory.d.ts +3 -0
- package/dist/state/board/factory.js +46 -0
- package/dist/state/board/mutation.d.ts +9 -0
- package/dist/state/board/mutation.js +1 -0
- package/dist/state/board/normalize.d.ts +8 -0
- package/dist/state/board/normalize.js +76 -0
- package/dist/state/board/piece.d.ts +3 -0
- package/dist/state/board/piece.js +11 -0
- package/dist/state/board/position.d.ts +4 -0
- package/dist/state/board/position.js +94 -0
- package/dist/state/board/reducers.d.ts +8 -0
- package/dist/state/board/reducers.js +80 -0
- package/dist/state/board/types/input.d.ts +35 -0
- package/dist/state/board/types/input.js +1 -0
- package/dist/state/board/types/internal.d.ts +54 -0
- package/dist/state/board/types/internal.js +17 -0
- package/dist/state/board/types/main.d.ts +18 -0
- package/dist/state/board/types/main.js +1 -0
- package/dist/state/board/types/output.d.ts +5 -0
- package/dist/state/board/types/output.js +1 -0
- package/dist/state/board/types/template.d.ts +23 -0
- package/dist/state/board/types/template.js +1 -0
- package/dist/state/change/factory.d.ts +2 -0
- package/dist/state/change/factory.js +28 -0
- package/dist/state/change/helpers.d.ts +8 -0
- package/dist/state/change/helpers.js +86 -0
- package/dist/state/change/mutation.d.ts +6 -0
- package/dist/state/change/mutation.js +1 -0
- package/dist/state/change/reducers.d.ts +5 -0
- package/dist/state/change/reducers.js +16 -0
- package/dist/state/change/types.d.ts +17 -0
- package/dist/state/change/types.js +1 -0
- package/dist/state/factory.d.ts +2 -0
- package/dist/state/factory.js +24 -0
- package/dist/state/interaction/factory.d.ts +2 -0
- package/dist/state/interaction/factory.js +83 -0
- package/dist/state/interaction/helpers.d.ts +4 -0
- package/dist/state/interaction/helpers.js +16 -0
- package/dist/state/interaction/movability.d.ts +5 -0
- package/dist/state/interaction/movability.js +87 -0
- package/dist/state/interaction/mutation.d.ts +11 -0
- package/dist/state/interaction/mutation.js +1 -0
- package/dist/state/interaction/normalize.d.ts +5 -0
- package/dist/state/interaction/normalize.js +50 -0
- package/dist/state/interaction/reducers.d.ts +11 -0
- package/dist/state/interaction/reducers.js +81 -0
- package/dist/state/interaction/types/input.d.ts +18 -0
- package/dist/state/interaction/types/input.js +1 -0
- package/dist/state/interaction/types/internal.d.ts +35 -0
- package/dist/state/interaction/types/internal.js +1 -0
- package/dist/state/interaction/types/main.d.ts +33 -0
- package/dist/state/interaction/types/main.js +1 -0
- package/dist/state/types.d.ts +30 -0
- package/dist/state/types.js +1 -0
- package/dist/state/view/factory.d.ts +2 -0
- package/dist/state/view/factory.js +24 -0
- package/dist/state/view/mutation.d.ts +5 -0
- package/dist/state/view/mutation.js +1 -0
- package/dist/state/view/reducers.d.ts +3 -0
- package/dist/state/view/reducers.js +6 -0
- package/dist/state/view/types/internal.d.ts +6 -0
- package/dist/state/view/types/internal.js +1 -0
- package/dist/state/view/types/main.d.ts +12 -0
- package/dist/state/view/types/main.js +1 -0
- package/dist/wrapper/factory.d.ts +3 -0
- package/dist/wrapper/factory.js +61 -0
- package/dist/wrapper/types.d.ts +56 -0
- package/dist/wrapper/types.js +1 -0
- package/package.json +98 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
width="800px" height="800px" viewBox="0 0 800 800" style="enable-background:new 0 0 800 800;" xml:space="preserve">
|
|
6
|
+
<g id="white_bishop">
|
|
7
|
+
<g id="silhouette_1_">
|
|
8
|
+
<path style="fill:#FFFFFF;" d="M238.9,701.8c-41.8,0-77-14.8-101.8-42.8c-22.9-25.8-35.5-62.1-35.5-102.2
|
|
9
|
+
c0-58.9,41.1-72.9,77.1-78.5l15.6-2.5l-4.8,15c-6.5,20.5-10.2,43-10.2,61.3c0,54.3,24.5,88.1,64.2,88.1
|
|
10
|
+
c29.5,0,57.2-24.2,71.4-61.1c-33-6.6-49.5-16.4-50.1-29.9l-7.3-55.7v-0.5c0-9.1,5.9-15.3,13.2-20.3c-1.6-4.4-3.3-9.1-5.1-13.8
|
|
11
|
+
c-16.6-44.9-37.3-100.8-37.3-143.6c0-50.2,22.1-95.1,62.3-126.5c22.9-32,69.2-68.5,105.3-90.6l5.1-3.1l5.1,3.1
|
|
12
|
+
c36,22,82.3,58.5,105.3,90.7c40.2,31.4,62.3,76.1,62.3,126c0,43-20.7,99.4-37.4,144.6c-1.7,4.5-3.3,9-4.9,13.2
|
|
13
|
+
c7.2,5,13.2,11.3,13.2,20.3v0.6l-7.2,55.5c-0.5,13.5-17,23.4-50,29.9c14.1,36.9,41.9,61.1,71.4,61.1c39.5,0,64.2-33.8,64.2-88.1
|
|
14
|
+
c0-18.5-3.7-40.8-10.2-61.3l-4.8-15l15.6,2.5c25.2,4,42.6,10.8,54.9,21.6c14.9,13.1,22.2,31.8,22.2,56.9
|
|
15
|
+
c0,40.1-12.6,76.4-35.5,102.2c-24.8,28-59.9,42.8-101.8,42.8c-65.4,0-118.6-45.1-137.4-115.8c-8.2,0.3-16.5,0.5-24.8,0.5
|
|
16
|
+
c-8.3,0-16.6-0.2-24.8-0.5C357.4,656.7,304.3,701.8,238.9,701.8z"/>
|
|
17
|
+
<path d="M401.1,106.4c33.5,20.5,80.6,56.8,103.2,89.3C540.2,223.2,564,264,564,315c0,48.3-28.5,117.6-44.4,161.9l0,0
|
|
18
|
+
c9.7,5.4,15.2,10.2,15.2,16.2l-7.2,55.4c0,9.5-21,17.9-53.1,23.1c13.2,44.7,45.9,78.4,84.2,78.4c45.7,0,73.9-38.9,73.9-97.8
|
|
19
|
+
c0-20-4-43.3-10.7-64.3c41.5,6.6,68.9,21.9,68.9,68.9c0,75-45.6,135.2-127.5,135.2c-62,0-113.6-43.6-129.9-116.1
|
|
20
|
+
c-10.4,0.6-21.2,1-32.4,1c-11.2,0-22-0.3-32.4-1C352.4,648.4,300.6,692,238.6,692c-82,0-127.5-60.3-127.5-135.2
|
|
21
|
+
c0-47,27.4-62.4,68.9-68.9c-6.6,21-10.7,44.4-10.7,64.3c0,59,28.1,97.8,73.9,97.8c38.3,0,71.1-33.7,84.2-78.4
|
|
22
|
+
c-32.2-5.2-53.1-13.5-53.1-23L267,493c0-5.9,5.5-10.8,15.2-16.2l0,0c-15.8-44.3-44.4-113.3-44.4-161.6c0-51,23.9-92.2,59.7-119.7
|
|
23
|
+
C320.5,163.1,367.6,127,401.1,106.4 M401.1,83.6l-10.2,6.3C357,110.6,309.1,147,283.6,182c-41.9,33.3-65,80.5-65,133.3
|
|
24
|
+
c0,44.6,21,101.3,37.8,147c0.9,2.5,1.7,4.9,2.6,7.1c-6,5.5-11.3,13.2-11.3,23.7v1.3l0.2,1.3l7.1,54.8c0.3,5.5,2.6,12.9,10.3,19.8
|
|
25
|
+
c4.1,3.7,9.4,6.8,16.1,9.7c5.6,2.4,12.2,4.5,19.8,6.5c-5.3,10.7-12,20.1-19.7,27.4c-8.1,7.8-21.3,17.1-38.1,17.1
|
|
26
|
+
c-16.1,0-29.1-6.4-38.4-19c-10.4-13.9-15.9-34.6-15.9-59.4c0-17.5,3.6-38.8,9.7-58.4l9.4-29.9l-31,4.9
|
|
27
|
+
c-27.1,4.3-46,11.9-59.7,23.9c-17,14.8-25.5,36.4-25.5,64.3c0,21,3.1,40.8,9.5,59.1c6.5,18.9,16.1,35.5,28.5,49.6
|
|
28
|
+
c26.7,30.1,64.4,46,109.1,46c67.6,0,123-44.8,144.6-115.5c5.8,0.2,11.7,0.2,17.6,0.2c5.9,0,11.8-0.1,17.6-0.2
|
|
29
|
+
c21.7,70.6,77,115.5,144.6,115.5c44.7,0,82.4-15.9,109.1-46c12.4-14,22-30.7,28.5-49.6c6.3-18.3,9.5-38.1,9.5-59.1
|
|
30
|
+
c0-27.8-8.5-49.5-25.5-64.3c-13.7-12-32.7-19.7-59.7-23.9l-31-4.9l9.4,29.9c6.2,19.7,9.7,40.9,9.7,58.4c0,24.8-5.5,45.5-15.9,59.4
|
|
31
|
+
c-9.4,12.6-22.4,19-38.4,19c-16.8,0-30-9.3-38.1-17.1c-7.7-7.3-14.4-16.7-19.7-27.5c7.6-1.9,14.1-4.1,19.8-6.5
|
|
32
|
+
c6.7-2.9,12-6,16.1-9.7c7.7-6.9,9.8-14.3,10.2-19.8l7.1-54.5l0.1-1.3v-1.4c0-10.5-5.3-18.1-11.3-23.7c0.8-2.2,1.6-4.3,2.4-6.5
|
|
33
|
+
c17-46,38-103.1,38-148c0-52.6-23-99.7-65-132.8c-11.4-15.7-28-32.6-49.4-50.4c-18.2-15.2-38.8-30-58-41.8L401.1,83.6L401.1,83.6z
|
|
34
|
+
"/>
|
|
35
|
+
</g>
|
|
36
|
+
<g id="bottom_2_">
|
|
37
|
+
<path style="fill:none;stroke:#000000;stroke-width:16.9057;stroke-linecap:round;stroke-miterlimit:10;" d="M527.8,548.5
|
|
38
|
+
l7.2-55.7c0-19.7-58.9-35.2-133.9-35.2c-75.1,0-133.9,15.7-133.9,35.2l7.2,55.7"/>
|
|
39
|
+
|
|
40
|
+
<ellipse style="fill:none;stroke:#000000;stroke-width:15.9112;stroke-linecap:round;stroke-miterlimit:10;" cx="401.1" cy="548.5" rx="126.7" ry="28.4"/>
|
|
41
|
+
</g>
|
|
42
|
+
<g id="legs_3_">
|
|
43
|
+
<path id="_x31__8_" style="fill:#FFFFFF;stroke:#000000;stroke-width:18.36;stroke-miterlimit:10;" d="M333.9,527.1
|
|
44
|
+
c0,64.4-40.4,121.9-90.5,121.9c-45.7,0-73.9-38.9-73.9-97.8c0-20,4-43.3,10.7-64.3c-41.5,6.6-68.9,21.9-68.9,68.9
|
|
45
|
+
c0,75,45.6,135.2,127.5,135.2c74.5,0,134.2-63.2,135.2-163.6"/>
|
|
46
|
+
<path id="_x31__2_" style="fill:#FFFFFF;stroke:#000000;stroke-width:18.36;stroke-miterlimit:10;" d="M468.4,527.1
|
|
47
|
+
c0,64.4,40.4,121.9,90.5,121.9c45.7,0,73.9-38.9,73.9-97.8c0-20-4-43.3-10.7-64.3c41.5,6.6,68.9,21.9,68.9,68.9
|
|
48
|
+
c0,75-45.6,135.2-127.5,135.2c-74.5,0-134.2-63.2-135.2-163.6"/>
|
|
49
|
+
<path id="_x32__old_1_" style="display:none;fill:#FFFFFF;stroke:#000000;stroke-width:18.36;stroke-miterlimit:10;" d="
|
|
50
|
+
M470.4,527.1c0,62.3,27.5,122.3,84.5,122.3c45.9,0,74.5-36.1,74.5-93.2c0-19.9-1.9-49.1-8.6-70.4c35.7,2.7,58.4,13.3,68.3,37.2
|
|
51
|
+
c7.3,18,8.1,54.9-3.8,87.3c-19.5,52.8-64.6,87.3-119.4,87.3c-82.6,0-134.6-69.6-135.5-170.1"/>
|
|
52
|
+
</g>
|
|
53
|
+
<path id="top_8_" style="fill:none;stroke:#000000;stroke-width:20.52;stroke-miterlimit:10;" d="M519.8,476.2
|
|
54
|
+
c15.8-44.7,44.4-113.3,44.4-161.6c0-51-23.9-92.4-59.7-119.9c-22.7-32.4-69.9-69.2-103.2-89.7c-33.5,20.5-80.6,57.2-103.2,89.7
|
|
55
|
+
c-35.9,27.4-59.7,68.8-59.7,119.8c0,48.3,28.6,117,44.4,161.7"/>
|
|
56
|
+
<g id="cross_5_">
|
|
57
|
+
<line style="fill:none;stroke:#000000;stroke-width:19.44;stroke-miterlimit:10;" x1="401.1" y1="211.2" x2="401.1" y2="395.9"/>
|
|
58
|
+
<line style="fill:none;stroke:#000000;stroke-width:19.44;stroke-miterlimit:10;" x1="330.9" y1="301.9" x2="471.3" y2="301.9"/>
|
|
59
|
+
</g>
|
|
60
|
+
</g>
|
|
61
|
+
</svg>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
width="800px" height="800px" viewBox="0 0 800 800" style="enable-background:new 0 0 800 800;" xml:space="preserve">
|
|
6
|
+
<g id="white_king">
|
|
7
|
+
<g id="silhouette_7_">
|
|
8
|
+
<path style="fill:#FFFFFF;" d="M405.3,700c-59.8,0-116.1-5.3-158.7-14.8c-47.4-10.6-71.1-24.6-72.1-42.8L158.1,576v-1.1
|
|
9
|
+
c0-9.1,5.2-18,15.2-26.5c-6.2-21.9-21.6-45.5-36.6-68.4c-18.4-28-35.7-54.4-35.7-77.7c0-25.5,18.4-41.4,47.8-41.4
|
|
10
|
+
c0.4,0,0.9,0,1.3,0c2.2,0,4.5,0.1,7,0.1c6,0.1,12.9,0.2,19.3,0.2c-5.4-26.7-3.8-45.9,5-59.9c13.3-21.5,36.9-24,53.6-24
|
|
11
|
+
c14.1,0,29.8,2.1,46.4,4.4c1.8-16.3,7.5-28.5,17.2-36.9c7.8-6.8,17-10.3,27-10.3c21.3,0,42.2,14.9,60.8,28c7,5,13.6,9.7,19,12.5
|
|
12
|
+
c5.4-2.9,12.1-7.6,19-12.5c18.5-13.1,39.5-28,60.7-28c10.2,0,19.2,3.5,27,10.3c9.6,8.4,15.3,20.5,17.1,36.9
|
|
13
|
+
c16.6-2.3,32.3-4.4,46.4-4.4c16.6,0,40.3,2.5,53.6,24c8.6,14,10.3,33.3,4.9,60c6.6,0,13.6-0.1,19.8-0.2c2.3,0,4.4-0.1,6.5-0.1
|
|
14
|
+
c0.4,0,0.9,0,1.3,0c29.5,0,47.1,15.4,47.1,41.4c0,23.2-17.6,49.7-36.3,77.7c-15.2,22.8-30.8,46.3-37,68.1
|
|
15
|
+
c10.7,8.2,16.1,17.3,16.1,26.8v1.1l-15.8,67.2c-1.6,17.9-25.5,31.9-72.8,42.3C520.7,694.8,464.6,700,405.3,700z"/>
|
|
16
|
+
<path d="M325.6,243.8c28.2,0,60.4,33.6,79.8,41.5c19.4-8,51.6-41.5,79.8-41.5c7.3,0,14.5,2.3,21.1,8c10.2,8.9,14.3,22.9,14.6,40.4
|
|
17
|
+
c20-2.8,38.8-5.7,55-5.7c20.2,0,36.4,4.5,45.8,19.7s7.9,38,1.2,64.3c2.5,0,5.1,0.1,7.8,0.1c10.3,0,21.7-0.2,30.1-0.3
|
|
18
|
+
c0.4,0,0.8,0,1.2,0c21.4,0,37.9,9.2,37.9,32.2c0,39.1-60.9,95.7-73.9,146.7v3.3c10.8,6.9,16.5,14.5,16.5,22.5l-15.6,66.9
|
|
19
|
+
c-1.3,27.2-100,49.1-221.5,49.1c-122.3,0-221.5-22.2-221.5-49.7l-16.3-66.3c0-7.9,5.8-15.6,15.6-22.5v-3.6
|
|
20
|
+
c-11.9-51-72.8-107.6-72.8-146.7c0-23,17.3-32.2,38.7-32.2c0.4,0,0.8,0,1.2,0c8.5,0.1,20.3,0.4,30.6,0.4c2.6,0,5.1,0,7.5-0.1
|
|
21
|
+
c-6.7-26.4-8.1-49.1,1.3-64.3c9.4-15.1,25.5-19.7,45.8-19.7c16.2,0,35,2.9,55,5.7c0.3-17.5,4.4-31.6,14.6-40.4
|
|
22
|
+
C311.1,246.1,318.2,243.8,325.6,243.8 M325.6,225.5L325.6,225.5c-12.4,0-23.5,4.2-33,12.5c-9.4,8.1-15.6,19.3-18.7,33.5
|
|
23
|
+
c-13.7-1.8-26.7-3.2-38.9-3.2c-13.3,0-24.3,1.7-33.7,5.4c-11.9,4.6-21.2,12.3-27.8,22.9c-8.6,14-11.3,32-8.1,55.5
|
|
24
|
+
c-2.8,0-5.6-0.1-8.2-0.1c-2.5,0-4.9-0.1-7-0.1c-0.4,0-1,0-1.4,0c-15.2,0-28.5,3.8-38.2,11c-8.5,6.4-18.8,18.4-18.8,39.4
|
|
25
|
+
c0,26,18.1,53.6,37.3,82.7c13.4,20.4,27.3,41.4,34,60.5c-9.2,9.2-13.6,19-13.6,29.4v2.3l0.3,2.2l15.8,64.6
|
|
26
|
+
c1.1,12.9,10.2,24,27,32.8c12.6,6.7,30.1,12.5,52.1,17.5c43.1,9.6,100.2,15,160.6,15c60,0,116.7-5.3,159.7-14.8
|
|
27
|
+
c21.8-4.9,39.4-10.7,52.1-17.3c17-8.9,26.4-19.8,27.8-32.5l15.1-65.6l0.3-2.1v-2.2c0-10.8-4.8-20.7-14.4-29.8
|
|
28
|
+
c6.8-19,20.7-39.9,34.2-60c19.4-29.2,37.8-56.7,37.8-82.7c0-21.1-9.8-33-18.1-39.3c-9.8-7.5-22.6-11.2-38-11.2c-0.4,0-1,0-1.4,0
|
|
29
|
+
c-2.1,0-4.2,0.1-6.5,0.1c-2.8,0-5.7,0.1-8.7,0.1c3.3-23.5,0.6-41.6-8-55.5c-6.6-10.6-15.9-18.3-27.8-22.9
|
|
30
|
+
c-9.3-3.7-20.3-5.4-33.6-5.4c-12.2,0-25.2,1.4-38.9,3.2c-3.1-14.1-9.3-25.4-18.7-33.5c-9.5-8.3-20.6-12.5-33-12.5
|
|
31
|
+
c-24.2,0-47.4,16.4-66.1,29.7c-4.8,3.3-9.6,6.8-13.7,9.4c-4.1-2.6-9-6-13.7-9.4C373,241.9,349.8,225.5,325.6,225.5L325.6,225.5z"
|
|
32
|
+
/>
|
|
33
|
+
</g>
|
|
34
|
+
<g id="top_12_">
|
|
35
|
+
<path id="_x31__9_" style="fill:none;stroke:#000000;stroke-width:18.36;stroke-linecap:round;stroke-miterlimit:10;" d="
|
|
36
|
+
M187.4,370.4c-11.9,0.3-25.9-0.1-37.5-0.3c-21.9-0.3-39.4,8.7-39.4,32.2c0,39.1,60.6,95.7,73.3,146.7"/>
|
|
37
|
+
<path id="_x32__7_" style="fill:none;stroke:#000000;stroke-width:18.36;stroke-linecap:round;stroke-miterlimit:10;" d="
|
|
38
|
+
M289.5,292.4c-45.6-6.3-83.3-13.8-100.3,13.7c-27,43.6,35.6,150.7,55.1,222.4"/>
|
|
39
|
+
<path id="_x33__6_" style="fill:none;stroke:#000000;stroke-width:18.36;stroke-linecap:round;stroke-miterlimit:10;" d="
|
|
40
|
+
M404.3,285.7c-24.3-9-67.9-61.7-99.8-33.9c-43.6,37.9,22.9,173.9,38.1,260.5"/>
|
|
41
|
+
<path id="_x31__3_" style="fill:none;stroke:#000000;stroke-width:18.36;stroke-linecap:round;stroke-miterlimit:10;" d="
|
|
42
|
+
M623.3,370.4c11.9,0.3,25.9-0.1,37.5-0.3c21.9-0.3,39.4,8.7,39.4,32.2c0,39.1-60.6,95.7-73.3,146.7"/>
|
|
43
|
+
<path id="_x32__6_" style="fill:none;stroke:#000000;stroke-width:18.36;stroke-linecap:round;stroke-miterlimit:10;" d="
|
|
44
|
+
M521.3,292.4c45.6-6.3,83.3-13.8,100.3,13.7c27,43.6-35.6,150.7-55.1,222.4"/>
|
|
45
|
+
<path id="_x33__5_" style="fill:none;stroke:#000000;stroke-width:18.36;stroke-linecap:round;stroke-miterlimit:10;" d="
|
|
46
|
+
M406.5,285.7c24.3-9,67.9-61.7,99.8-33.9c43.6,37.9-22.9,173.9-38.1,260.5"/>
|
|
47
|
+
|
|
48
|
+
<line id="center" style="fill:none;stroke:#000000;stroke-width:15.12;stroke-linecap:round;stroke-miterlimit:10;" x1="405.4" y1="271.7" x2="405.4" y2="456.2"/>
|
|
49
|
+
</g>
|
|
50
|
+
<path id="middle_2_" style="fill:#FFFFFF;stroke:#000000;stroke-width:18.36;stroke-miterlimit:10;" d="M632.9,552.5l27.8-68.8
|
|
51
|
+
c-11.1,14.6-24.8,16.8-33.9,14.3c-27-8-26.5-40.6-24.4-66.5c-16.4,29.5-39.3,44.7-63.9,39.5c-24.9-5.3-40-40.5-39-68.6
|
|
52
|
+
c-17.5,35.6-49.4,54.1-94.1,54.1c-44.7,0-76.6-18.5-94.1-54.1c1.1,28.1-14,63.3-39,68.6c-24.6,5.2-47.4-10-63.9-39.5
|
|
53
|
+
c1.9,25.9,2.6,58.5-24.4,66.5c-9.1,2.7-22.9,0.3-33.9-14.3l27.8,68.8"/>
|
|
54
|
+
<g id="bottom_4_">
|
|
55
|
+
<path style="fill:none;stroke:#000000;stroke-width:21.6;stroke-linecap:round;stroke-miterlimit:10;" d="M167.9,574.8
|
|
56
|
+
c0-34.3,106.3-61.7,237.4-61.7c131.1,0,237.4,27.3,237.4,61.7"/>
|
|
57
|
+
|
|
58
|
+
<line style="fill:none;stroke:#000000;stroke-width:21.6;stroke-linecap:round;stroke-miterlimit:10;" x1="167.7" y1="576.7" x2="183.9" y2="641.7"/>
|
|
59
|
+
|
|
60
|
+
<line style="fill:none;stroke:#000000;stroke-width:21.6;stroke-linecap:round;stroke-miterlimit:10;" x1="643.1" y1="576.7" x2="626.9" y2="641.7"/>
|
|
61
|
+
|
|
62
|
+
<ellipse style="fill:none;stroke:#000000;stroke-width:21.6;stroke-linecap:round;stroke-miterlimit:10;" cx="405.4" cy="641.1" rx="221.4" ry="49.7"/>
|
|
63
|
+
</g>
|
|
64
|
+
<g id="cross_1_">
|
|
65
|
+
|
|
66
|
+
<line id="cross_h_2_" style="fill:none;stroke:#000000;stroke-width:30.24;stroke-miterlimit:10;" x1="404.3" y1="94.6" x2="404.3" y2="283.6"/>
|
|
67
|
+
|
|
68
|
+
<line id="cross_v_1_" style="fill:none;stroke:#000000;stroke-width:30.24;stroke-miterlimit:10;" x1="342.8" y1="159.4" x2="468" y2="159.4"/>
|
|
69
|
+
</g>
|
|
70
|
+
</g>
|
|
71
|
+
</svg>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
width="800px" height="800px" viewBox="0 0 800 800" enable-background="new 0 0 800 800" xml:space="preserve">
|
|
6
|
+
<g id="white_knight">
|
|
7
|
+
<path id="head_3_" fill="#FFFFFF" stroke="#000000" stroke-width="29.16" stroke-linecap="round" stroke-miterlimit="10" d="
|
|
8
|
+
M641.4,692.1H356.701C423.301,614.3,461.4,536.5,461.4,468.4c0-50.802-19-97.602-50-127.8c16.801,35.6,24.5,81.5,10.5,119.9
|
|
9
|
+
c-10.801,29.8-42.199,48.9-66.601,59.2C335.9,537,305.4,575.2,290.2,597.9L267.8,656l-120.9-51.5c8.5-46.6,29.5-153.7,43.4-212.8
|
|
10
|
+
v-39.4C206.9,302.4,232,249.2,239,233c-18.4-23.4-18-68.1-24.3-97.7c33.5,1.8,68.199,25.5,81.5,60.4c47.3-15.3,106-22.9,148.6-13.2
|
|
11
|
+
c54.3,12.3,139.4,56.3,196.601,98.1V692.1L641.4,692.1z"/>
|
|
12
|
+
<path id="nose_3_" stroke="#000000" stroke-width="9.169" stroke-miterlimit="10" d="M198.301,600c11.5-21.4-3-36.1-22.4-25.2
|
|
13
|
+
L198.301,600z"/>
|
|
14
|
+
<path id="eye_3_" stroke="#000000" stroke-width="0.9518" stroke-miterlimit="10" d="M269.201,355.8l4.5,3.7l-21.5,24.9
|
|
15
|
+
c-4.5,3.6-14.101,7.4-18.601,8c-6.6-5.2-12.899-25-6-34.5C238.501,355.7,260.4,355.7,269.201,355.8z"/>
|
|
16
|
+
<path id="ear_1_" fill="#FFFFFF" stroke="#000000" stroke-width="23.76" stroke-linecap="square" stroke-miterlimit="10" d="
|
|
17
|
+
M358.301,181.5c4.601-23.2-6.899-56.3-35.1-70.6c-16.9,25.4-19.5,57.2-7,75.1"/>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
width="800px" height="800px" viewBox="0 0 800 800" style="enable-background:new 0 0 800 800;" xml:space="preserve">
|
|
6
|
+
<g id="white_pawn">
|
|
7
|
+
<path id="top_10_" style="fill:#FFFFFF;stroke:#000000;stroke-width:30.24;stroke-miterlimit:10;" d="M497.9,240
|
|
8
|
+
c0,53.6-44,93.9-98.1,93.9c-54.1,0-98.1-40.3-98.1-93.9c0-53.6,44-93.9,98.1-93.9C454,146.2,497.9,186.5,497.9,240z"/>
|
|
9
|
+
<path id="middle_10_" style="fill:#FFFFFF;stroke:#000000;stroke-width:30.24;stroke-miterlimit:10;" d="M526.4,337.6v55.3
|
|
10
|
+
c-30.2,3-42.8,12.1-42.8,28c0,56.9,36,123.4,109.1,187.9v60.9c0,17.4-87.5,30.8-192.7,30.8l0,0l0,0c-105.2,0-192.7-13.4-192.7-30.8
|
|
11
|
+
l-0.1-60.6c73.1-64.5,108.1-131.1,108.1-188c0-15.9-13.6-25.2-43.8-28.2v-55.3H526.4z"/>
|
|
12
|
+
<path id="middle_3_" style="fill:none;stroke:#000000;stroke-width:16.2;stroke-miterlimit:10;" d="M207.2,608
|
|
13
|
+
c0,17.4,87.5,30.3,192.7,30.3l0,0c105.2,0,192.6-12.9,192.6-30.2"/>
|
|
14
|
+
|
|
15
|
+
<line id="line_3_" style="fill:none;stroke:#000000;stroke-width:14.04;stroke-miterlimit:10;" x1="272.6" y1="386.7" x2="525.3" y2="386.7"/>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
width="800px" height="800px" viewBox="0 0 800 800" style="enable-background:new 0 0 800 800;" xml:space="preserve">
|
|
6
|
+
<g id="white_queen">
|
|
7
|
+
<path id="silhouette" style="fill:#FFFFFF;stroke:#000000;stroke-width:20.52;stroke-miterlimit:10;" d="M401.1,704.4
|
|
8
|
+
c-62,0-120.5-5.5-164.8-15.4c-49.6-11.1-74.1-25.8-75-44.7l-10.2-54v-0.9c0-5.4,1.6-13.2,8.6-21.4c-8-46.5-25.9-125.2-44.6-195.5
|
|
9
|
+
c-18.4-6.9-30.8-24.5-30.8-44.6c0-26.4,21.4-47.7,47.7-47.7s47.7,21.4,47.7,47.7c0,11.1-3.7,21.5-10.6,29.9
|
|
10
|
+
c21.1,67.1,46.9,136.7,64.9,175.2l5.3-1.3c-0.5-55.3-9.1-164.3-20.6-261.6c-18.6-8-31-26.6-31-47.1c0-28.3,23-51.3,51.3-51.3
|
|
11
|
+
c28.3,0,51.3,23,51.3,51.3c0,13.8-5.4,26.7-15,36.3c17.9,93.5,47.7,211.6,65.3,258.9l5.4-0.3c8.6-66,19.4-184.5,24.6-294.5
|
|
12
|
+
c-14.9-10-23.8-26.6-23.8-44.6c0-29.8,24.2-54,54-54c29.8,0,54,24.2,54,54c0,18-8.9,34.6-23.5,44.6c5.2,110.1,16,228.5,24.6,294.5
|
|
13
|
+
l5.4,0.3c17.6-47.3,47.4-165.3,65.3-258.9c-9.6-9.6-15-22.5-15-36.3c0-28.3,23-51.3,51.3-51.3s51.3,23,51.3,51.3
|
|
14
|
+
c0,20.6-12.4,39.1-31,47.1c-11.6,97.3-20.2,206.3-20.6,261.6l5.3,1.3c18-38.4,43.8-108.1,64.9-175.2c-6.9-8.4-10.6-18.9-10.6-29.9
|
|
15
|
+
c0-26.4,21.4-47.7,47.7-47.7s47.7,21.4,47.7,47.7c0,20.1-12.4,37.7-30.8,44.6c-18.7,70.3-36.5,148.9-44.6,195.5
|
|
16
|
+
c5.7,6.7,8.6,13.8,8.6,21.3v0.9l-10.3,54.3c-1.2,18.9-25.7,33.5-75,44.6C521.7,698.9,463.2,704.4,401.1,704.4z M211.7,613.7
|
|
17
|
+
c1.4,3,13.7,12.4,54.6,20.3c36.5,7,84.2,11,134.6,11c50.3,0,98.2-3.9,134.6-11c40.9-8,53.4-17.3,54.6-20.3
|
|
18
|
+
c-1.4-3-13.7-12.4-54.6-20.3c-36.5-7-84.2-11-134.6-11c-50.3,0-98.2,3.9-134.6,11C225.5,601.3,213.2,610.7,211.7,613.7z"/>
|
|
19
|
+
<path id="back" style="fill:#FFFFFF;stroke:#000000;stroke-width:16.2;stroke-miterlimit:10;" d="M592.9,607.6
|
|
20
|
+
c-41.8,13.8-112.3,23.2-191.8,23.2c-80.4,0-148.9-9.5-190.6-23.5C197,610.8,171,628.4,171,643c0,28.5,103,51.6,230,51.6
|
|
21
|
+
c127,0,230-23.1,230-51.6C631.1,628.8,606.6,611.3,592.9,607.6z"/>
|
|
22
|
+
<path id="front" style="fill:#FFFFFF;stroke:#000000;stroke-width:17.28;stroke-miterlimit:10;" d="M401.1,591.4
|
|
23
|
+
c127.1,0,230.1,23.1,230.1,51.6l10.2-60.3c0-6.3-3.2-12.3-9.4-18.1c7.5-44.9,26.1-121.9,47-199.9c16.6-4,29.1-19,29.1-36.9
|
|
24
|
+
c0-21-17-38-38-38c-21.1,0-38,17-38,38c0,10.8,4.5,20.6,11.8,27.5c-20.8,67-50.1,141.4-70.4,182.4l-20.4-4.9
|
|
25
|
+
c-0.3-54.2,9.2-167.8,21.5-269.9c17.4-5,30.2-21,30.2-40c0-23-18.6-41.6-41.6-41.6S521.5,200,521.5,223c0,13.3,6.3,25.1,15.9,32.7
|
|
26
|
+
c-18,95.8-51.2,221.4-69.4,266.1l-20.4-1.3c-9.1-66.5-20.8-188.6-26-302.6c14.1-7.5,23.8-22.1,23.8-39.2
|
|
27
|
+
c0-24.4-19.9-44.3-44.3-44.3c-24.4,0-44.3,19.9-44.3,44.3c0,17.1,9.6,31.9,23.8,39.2c-5.1,114-16.8,236.1-26,302.6l-20.4,1.3
|
|
28
|
+
c-18.1-44.7-51.4-170.3-69.4-266.1c9.7-7.6,15.9-19.4,15.9-32.7c0-23-18.6-41.6-41.6-41.6S197.3,200,197.3,223
|
|
29
|
+
c0,19,12.7,35,30.2,40C239.8,365,249.3,478.5,249,532.8l-20.4,4.9c-20.3-41.1-49.7-115.5-70.4-182.4c7.2-6.9,11.8-16.6,11.8-27.5
|
|
30
|
+
c0-21-17-38-38-38c-21.1,0-38,17-38,38c0,17.9,12.4,32.9,29.1,36.9c20.8,78,39.5,155,47,199.9c-6,5.7-9.4,11.8-9.4,18.1l10.2,60.3
|
|
31
|
+
C170.9,614.5,274,591.4,401.1,591.4z"/>
|
|
32
|
+
<g id="pearls_2_">
|
|
33
|
+
<circle cx="401.1" cy="112.9" r="25.9"/>
|
|
34
|
+
<circle cx="226.1" cy="164.8" r="23"/>
|
|
35
|
+
<circle cx="114.9" cy="273.8" r="22.4"/>
|
|
36
|
+
<circle cx="576" cy="164.8" r="23"/>
|
|
37
|
+
<circle cx="688.4" cy="273.8" r="22.4"/>
|
|
38
|
+
</g>
|
|
39
|
+
</g>
|
|
40
|
+
</svg>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
width="800px" height="800px" viewBox="0 0 800 800" style="enable-background:new 0 0 800 800;" xml:space="preserve">
|
|
6
|
+
<g id="white_rook">
|
|
7
|
+
<g id="silhouette_3_">
|
|
8
|
+
<path style="fill:#FFFFFF;" d="M400.4,708.3c-57.1,0-110.8-5.8-151.2-16.5c-45.5-12-68.5-28.4-68.5-48.6V582
|
|
9
|
+
c0-28.4,44.1-46.2,74.7-55.3l8.1-172.4c-3.2-2.6-5.6-5.3-7.3-8.1l-0.2-0.3l-24.7-52.8c-19.3-9.5-19.3-19-19.3-22.2V145.3h74.5
|
|
10
|
+
v50.8h43.2v-50.3l137.2,0.1v50.2H510v-50.8h75.6v125.4c0,7.8-4.2,14.5-13,19.9L548.6,346l-0.4,0.8c-2.1,3.1-5,6-8.5,8.6l7.6,170.9
|
|
11
|
+
c21.1,6,38.8,13.5,51.5,21.6c16.5,10.5,24.8,21.9,24.8,34.1c0,0.8,0,1.6-0.1,2.5l-0.1,58.6c0,20.2-23.4,36.6-69.6,48.6
|
|
12
|
+
C512.9,702.4,458.3,708.3,400.4,708.3z"/>
|
|
13
|
+
<path d="M576,155v115.7c0,4.5-3.2,9-10.9,13.1l-24.9,57.7c-2.2,3.2-5.6,6.2-10.4,9l8.2,183.5c47.2,12.5,76,30.8,76,48.2
|
|
14
|
+
c0,0.6,0,1.3-0.1,1.9l-0.1,59.3c0,30.6-95,55.4-213.3,55.4c-116.6,0-210-24.7-210-55.4v-61.2l0,0c0-17.2,28.2-35.3,74.4-47.8
|
|
15
|
+
l8.6-184.7c-4.1-2.6-7.2-5.3-8.9-8.1l-26-55.7c-10.4-4.5-16.8-9.6-16.8-15V155H277v50.8h62.6v-50.3l117.7,0.1v50.2H520V155H576
|
|
16
|
+
M595.5,135.6h-19h-56.2h-19.9v19.5v31.2h-23.8v-30.8v-19.4h-19.4L339.7,136h-19.7v19.4v30.9h-23.8v-31.2v-19.5h-19.5h-55.2h-19.2
|
|
17
|
+
v19.5v115.6c0,15.4,12.5,24.6,21.6,29.5l23.1,49.4l0.3,0.8l0.4,0.8c1.5,2.6,3.5,5.1,5.8,7.5l-7.6,160.8
|
|
18
|
+
c-18.7,5.9-34.2,12.9-46.2,20.5c-8.3,5.3-14.9,11.1-19.5,17.1c-6.2,7.9-9.3,16.2-9.3,24.9v61.3c0,18.3,13.9,30.8,25.5,38
|
|
19
|
+
c12.2,7.7,29.1,14.4,50.2,20c41.1,10.9,95.7,16.8,153.7,16.8c58.8,0,114-5.9,155.8-16.8c21.4-5.6,38.6-12.3,50.9-19.9
|
|
20
|
+
c11.9-7.3,25.9-19.9,25.9-38.1l0.1-58.2c0.1-1.1,0.1-2.1,0.1-3c0-8.7-3.1-17.3-9.4-25.2c-4.8-6-11.4-11.8-19.9-17.2
|
|
21
|
+
c-12.3-7.8-28.2-14.7-47.3-20.6l-7-159.1c2.7-2.4,5-5,6.8-7.8l1-1.4l0.6-1.6l22.5-52.1c12.3-8.7,14.9-18.9,14.9-26.4V155.1V135.6
|
|
22
|
+
L595.5,135.6z"/>
|
|
23
|
+
</g>
|
|
24
|
+
<g id="base_2_">
|
|
25
|
+
<path id="bottom" style="fill:#FFFFFF;stroke:#000000;stroke-width:18.36;stroke-linecap:round;stroke-miterlimit:10;" d="
|
|
26
|
+
M191,581.6v61.6c0,30.6,93.1,55.4,209.6,55.4c118.3,0,213.2-24.8,213.2-55.4l-0.3-61.3"/>
|
|
27
|
+
<path id="top" style="fill:#FFFFFF;stroke:#000000;stroke-width:21.6;stroke-miterlimit:10;" d="M613.9,582
|
|
28
|
+
c0,30.6-94.5,55.4-211.1,55.4c-116.6,0-211.1-24.8-211.1-55.4s87.5-64,211.1-64C524.4,517.9,613.9,551.3,613.9,582z"/>
|
|
29
|
+
</g>
|
|
30
|
+
<path id="middle_7_" style="fill:#FFFFFF;stroke:#000000;stroke-width:15.12;stroke-miterlimit:10;" d="M275.8,260.9l-10.5,280.6
|
|
31
|
+
c0,19.7,62.1,34.1,136.8,34.1c74.8,0,136.1-14.4,136.1-33.9l-14.9-280.8H275.8L275.8,260.9z"/>
|
|
32
|
+
<path id="top_bottom_3_" style="fill:#FFFFFF;stroke:#000000;stroke-width:15.12;stroke-miterlimit:10;" d="M231.3,268.1l33.8,73.1
|
|
33
|
+
c9.5,16.5,61.6,28.5,137.6,28.5c76,0,126.4-11.7,137.6-28.5l32.8-73.1"/>
|
|
34
|
+
<path id="top_11_" style="fill:#FFFFFF;stroke:#000000;stroke-width:19.44;stroke-linecap:square;stroke-miterlimit:10;" d="
|
|
35
|
+
M522,154v50.8h-63.7v-49.1l-116.6-0.1v49.2H278V154h-55.1v116.7c0,20.1,83.1,36.4,178.5,36.4c95.5,0,176.8-16.3,176.8-36.4V154H522
|
|
36
|
+
z"/>
|
|
37
|
+
</g>
|
|
38
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Square } from '../state/board/types/internal';
|
|
2
|
+
import { BoardStateSnapshot } from '../state/board/types/main';
|
|
3
|
+
import { AnimationPlan, AnimationTrack, CalculateAnimationTracksOptions } from './types';
|
|
4
|
+
export declare function collectSuppressedSquares(tracks: AnimationTrack[]): ReadonlySet<Square>;
|
|
5
|
+
export declare function calculateAnimationTracks(pos1: BoardStateSnapshot, pos2: BoardStateSnapshot, options?: CalculateAnimationTracksOptions): AnimationTrack[];
|
|
6
|
+
export declare function calculateAnimationPlan(pos1: BoardStateSnapshot, pos2: BoardStateSnapshot, sessionId: number, options?: CalculateAnimationTracksOptions): AnimationPlan;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { isNonEmptyPieceCode } from '../state/board/check';
|
|
2
|
+
import { fileOf, rankOf } from '../state/board/coords';
|
|
3
|
+
import { SQUARE_COUNT } from '../state/board/types/internal';
|
|
4
|
+
import { isMoveExclude, isSquareExclude } from './types';
|
|
5
|
+
// Precomputed squared distance: (dFile² + dRank²) for all square pairs.
|
|
6
|
+
// Max value = 7² + 7² = 98, fits in Uint8. Index: a * 64 + b.
|
|
7
|
+
const SQUARE_DIST = new Uint8Array(SQUARE_COUNT * SQUARE_COUNT);
|
|
8
|
+
for (let a = 0; a < SQUARE_COUNT; a++) {
|
|
9
|
+
for (let b = 0; b < SQUARE_COUNT; b++) {
|
|
10
|
+
const df = fileOf(a) - fileOf(b);
|
|
11
|
+
const dr = rankOf(a) - rankOf(b);
|
|
12
|
+
SQUARE_DIST[a * SQUARE_COUNT + b] = df * df + dr * dr;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export function collectSuppressedSquares(tracks) {
|
|
16
|
+
const result = new Set();
|
|
17
|
+
for (const track of tracks) {
|
|
18
|
+
if (track.effect === 'move') {
|
|
19
|
+
result.add(track.fromSq);
|
|
20
|
+
result.add(track.toSq);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
result.add(track.sq);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
export function calculateAnimationTracks(pos1, pos2, options) {
|
|
29
|
+
const tracks = [];
|
|
30
|
+
let nextId = 0;
|
|
31
|
+
const removed = [];
|
|
32
|
+
const added = [];
|
|
33
|
+
for (let sq = 0; sq < SQUARE_COUNT; sq++) {
|
|
34
|
+
const c1 = pos1.pieces[sq];
|
|
35
|
+
const c2 = pos2.pieces[sq];
|
|
36
|
+
if (c1 === c2)
|
|
37
|
+
continue;
|
|
38
|
+
if (isNonEmptyPieceCode(c1))
|
|
39
|
+
removed.push({ pieceCode: c1, sq: sq });
|
|
40
|
+
if (isNonEmptyPieceCode(c2))
|
|
41
|
+
added.push({ pieceCode: c2, sq: sq });
|
|
42
|
+
}
|
|
43
|
+
// Step 2: greedy min-distance matching of same-code pairs → move tracks
|
|
44
|
+
const removedMatched = new Uint8Array(removed.length);
|
|
45
|
+
const addedMatched = new Uint8Array(added.length);
|
|
46
|
+
// toSq → code of the piece that moved there (used for static detection)
|
|
47
|
+
const movedToSqCode = new Map();
|
|
48
|
+
const candidates = [];
|
|
49
|
+
for (let ri = 0; ri < removed.length; ri++) {
|
|
50
|
+
for (let ai = 0; ai < added.length; ai++) {
|
|
51
|
+
if (removed[ri].pieceCode !== added[ai].pieceCode)
|
|
52
|
+
continue;
|
|
53
|
+
candidates.push({ dist: SQUARE_DIST[removed[ri].sq * SQUARE_COUNT + added[ai].sq], ri, ai });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
candidates.sort((a, b) => a.dist - b.dist);
|
|
57
|
+
const excl = options?.exclude;
|
|
58
|
+
const preparedExcl = prepareExclude(excl);
|
|
59
|
+
for (const { ri, ai } of candidates) {
|
|
60
|
+
if (removedMatched[ri] || addedMatched[ai])
|
|
61
|
+
continue;
|
|
62
|
+
removedMatched[ri] = 1;
|
|
63
|
+
addedMatched[ai] = 1;
|
|
64
|
+
movedToSqCode.set(added[ai].sq, removed[ri].pieceCode);
|
|
65
|
+
if (excl &&
|
|
66
|
+
preparedExcl.move.has(removed[ri].sq) &&
|
|
67
|
+
preparedExcl.move.get(removed[ri].sq).has(added[ai].sq)) {
|
|
68
|
+
// Suppress this move track but keep both squares matched so they don't become fades.
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
tracks.push({
|
|
72
|
+
id: nextId++,
|
|
73
|
+
pieceCode: removed[ri].pieceCode,
|
|
74
|
+
fromSq: removed[ri].sq,
|
|
75
|
+
toSq: added[ai].sq,
|
|
76
|
+
effect: 'move'
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
// Step 3: unmatched added → fade-in
|
|
80
|
+
for (let ai = 0; ai < added.length; ai++) {
|
|
81
|
+
if (addedMatched[ai])
|
|
82
|
+
continue;
|
|
83
|
+
if (preparedExcl.square.has(added[ai].sq)) {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
tracks.push({
|
|
87
|
+
id: nextId++,
|
|
88
|
+
pieceCode: added[ai].pieceCode,
|
|
89
|
+
sq: added[ai].sq,
|
|
90
|
+
effect: 'fade-in'
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
// Step 4: unmatched removed → fade-out or static
|
|
94
|
+
for (let ri = 0; ri < removed.length; ri++) {
|
|
95
|
+
if (removedMatched[ri])
|
|
96
|
+
continue;
|
|
97
|
+
if (preparedExcl.square.has(removed[ri].sq)) {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
const { pieceCode: code, sq } = removed[ri];
|
|
101
|
+
/*const movedCode = movedToSqCode.get(sq);
|
|
102
|
+
const isCapture =
|
|
103
|
+
movedCode !== undefined && fromPieceCode(code).color !== fromPieceCode(movedCode).color;*/
|
|
104
|
+
const pieceCode = code;
|
|
105
|
+
tracks.push({ id: nextId++, pieceCode, sq, effect: 'fade-out' });
|
|
106
|
+
}
|
|
107
|
+
return tracks;
|
|
108
|
+
}
|
|
109
|
+
export function calculateAnimationPlan(pos1, pos2, sessionId, options) {
|
|
110
|
+
return { sessionId, tracks: calculateAnimationTracks(pos1, pos2, options) };
|
|
111
|
+
}
|
|
112
|
+
function prepareExclude(exclude) {
|
|
113
|
+
const result = { move: new Map(), square: new Set() };
|
|
114
|
+
if (!exclude)
|
|
115
|
+
return result;
|
|
116
|
+
for (const e of exclude) {
|
|
117
|
+
if (isMoveExclude(e)) {
|
|
118
|
+
if (!result.move.has(e.fromSq)) {
|
|
119
|
+
result.move.set(e.fromSq, new Set());
|
|
120
|
+
}
|
|
121
|
+
result.move.get(e.fromSq).add(e.toSq);
|
|
122
|
+
}
|
|
123
|
+
else if (isSquareExclude(e)) {
|
|
124
|
+
result.square.add(e.sq);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PieceUrls } from '../../extensions/first-party/main-renderer/types/internal';
|
|
2
|
+
import type { RenderGeometry } from '../../layout/geometry/types';
|
|
3
|
+
import type { AnimationTrackFade } from '../types';
|
|
4
|
+
import type { PreparedFadeNode } from './types';
|
|
5
|
+
export declare function prepareFadeTrack(track: AnimationTrackFade, geometry: RenderGeometry, pieceUrls: PieceUrls, layer: SVGElement): PreparedFadeNode;
|
|
6
|
+
export declare function renderFadeTrack(node: PreparedFadeNode, progress: number): void;
|
|
7
|
+
export declare function cleanFadeTrack(node: PreparedFadeNode): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createSvgElement, updateElementAttributes } from '../../render/svg/helpers';
|
|
2
|
+
export function prepareFadeTrack(track, geometry, pieceUrls, layer) {
|
|
3
|
+
const r = geometry.squareRect(track.sq);
|
|
4
|
+
const url = pieceUrls[track.pieceCode];
|
|
5
|
+
const initialOpacity = track.effect === 'fade-in' ? '0' : '1';
|
|
6
|
+
const root = createSvgElement(layer, 'image', {
|
|
7
|
+
'data-chessboard-id': `animation-fade-${track.id}`,
|
|
8
|
+
'data-animation-effect': track.effect,
|
|
9
|
+
href: url,
|
|
10
|
+
x: r.x.toString(),
|
|
11
|
+
y: r.y.toString(),
|
|
12
|
+
width: r.size.toString(),
|
|
13
|
+
height: r.size.toString(),
|
|
14
|
+
opacity: initialOpacity
|
|
15
|
+
});
|
|
16
|
+
return { ...track, root };
|
|
17
|
+
}
|
|
18
|
+
export function renderFadeTrack(node, progress) {
|
|
19
|
+
const opacity = node.effect === 'fade-in' ? progress : 1 - progress;
|
|
20
|
+
updateElementAttributes(node.root, { opacity: opacity.toString() });
|
|
21
|
+
}
|
|
22
|
+
export function cleanFadeTrack(node) {
|
|
23
|
+
node.root.remove();
|
|
24
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PieceUrls } from '../../extensions/first-party/main-renderer/types/internal';
|
|
2
|
+
import type { RenderGeometry } from '../../layout/geometry/types';
|
|
3
|
+
import type { AnimationTrackMove } from '../types';
|
|
4
|
+
import type { PreparedMoveNode } from './types';
|
|
5
|
+
export declare function prepareMoveTrack(track: AnimationTrackMove, geometry: RenderGeometry, pieceUrls: PieceUrls, layer: SVGElement): PreparedMoveNode;
|
|
6
|
+
export declare function renderMoveTrack(node: PreparedMoveNode, geometry: RenderGeometry, progress: number): void;
|
|
7
|
+
export declare function cleanMoveTrack(node: PreparedMoveNode): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createSvgElement, updateElementAttributes } from '../../render/svg/helpers';
|
|
2
|
+
export function prepareMoveTrack(track, geometry, pieceUrls, layer) {
|
|
3
|
+
const r = geometry.squareRect(track.fromSq);
|
|
4
|
+
const url = pieceUrls[track.pieceCode];
|
|
5
|
+
const root = createSvgElement(layer, 'image', {
|
|
6
|
+
'data-chessboard-id': `animation-move-${track.id}`,
|
|
7
|
+
'data-animation-effect': 'move',
|
|
8
|
+
href: url,
|
|
9
|
+
x: r.x.toString(),
|
|
10
|
+
y: r.y.toString(),
|
|
11
|
+
width: r.size.toString(),
|
|
12
|
+
height: r.size.toString()
|
|
13
|
+
});
|
|
14
|
+
return { ...track, root };
|
|
15
|
+
}
|
|
16
|
+
export function renderMoveTrack(node, geometry, progress) {
|
|
17
|
+
const from = geometry.squareRect(node.fromSq);
|
|
18
|
+
const to = geometry.squareRect(node.toSq);
|
|
19
|
+
const x = from.x + (to.x - from.x) * progress;
|
|
20
|
+
const y = from.y + (to.y - from.y) * progress;
|
|
21
|
+
updateElementAttributes(node.root, {
|
|
22
|
+
x: x.toString(),
|
|
23
|
+
y: y.toString()
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export function cleanMoveTrack(node) {
|
|
27
|
+
node.root.remove();
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PieceUrls } from '../../extensions/first-party/main-renderer/types/internal';
|
|
2
|
+
import type { RenderGeometry } from '../../layout/geometry/types';
|
|
3
|
+
import type { AnimationPlan } from '../types';
|
|
4
|
+
import type { PreparedNodeMap } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Prepare all tracks in the plan — creates SVG nodes in `layer` for each track.
|
|
7
|
+
* Returns a map keyed by track id for use in render/clean passes.
|
|
8
|
+
*/
|
|
9
|
+
export declare function prepareAnimationPlan(plan: AnimationPlan, geometry: RenderGeometry, pieceUrls: PieceUrls, layer: SVGElement): PreparedNodeMap;
|
|
10
|
+
export declare function renderAnimationPlan(nodes: PreparedNodeMap, geometry: RenderGeometry, progress: number): void;
|
|
11
|
+
/**
|
|
12
|
+
* Clean up all track nodes — removes SVG elements from the DOM.
|
|
13
|
+
*/
|
|
14
|
+
export declare function cleanAnimationPlan(nodes: PreparedNodeMap): void;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { cleanFadeTrack, prepareFadeTrack, renderFadeTrack } from './fade';
|
|
2
|
+
import { cleanMoveTrack, prepareMoveTrack, renderMoveTrack } from './move';
|
|
3
|
+
import { cleanStaticTrack, prepareStaticTrack, renderStaticTrack } from './static';
|
|
4
|
+
/**
|
|
5
|
+
* Prepare all tracks in the plan — creates SVG nodes in `layer` for each track.
|
|
6
|
+
* Returns a map keyed by track id for use in render/clean passes.
|
|
7
|
+
*/
|
|
8
|
+
export function prepareAnimationPlan(plan, geometry, pieceUrls, layer) {
|
|
9
|
+
const nodes = new Map();
|
|
10
|
+
for (const track of plan.tracks) {
|
|
11
|
+
let node;
|
|
12
|
+
switch (track.effect) {
|
|
13
|
+
case 'move':
|
|
14
|
+
node = prepareMoveTrack(track, geometry, pieceUrls, layer);
|
|
15
|
+
break;
|
|
16
|
+
case 'fade-in':
|
|
17
|
+
case 'fade-out':
|
|
18
|
+
node = prepareFadeTrack(track, geometry, pieceUrls, layer);
|
|
19
|
+
break;
|
|
20
|
+
case 'static':
|
|
21
|
+
node = prepareStaticTrack(track, geometry, pieceUrls, layer);
|
|
22
|
+
break;
|
|
23
|
+
default:
|
|
24
|
+
throw new RangeError(`Unsupported track effect: ${track}`);
|
|
25
|
+
}
|
|
26
|
+
nodes.set(track.id, node);
|
|
27
|
+
}
|
|
28
|
+
return nodes;
|
|
29
|
+
}
|
|
30
|
+
export function renderAnimationPlan(nodes, geometry, progress) {
|
|
31
|
+
for (const node of nodes.values()) {
|
|
32
|
+
switch (node.effect) {
|
|
33
|
+
case 'move':
|
|
34
|
+
renderMoveTrack(node, geometry, progress);
|
|
35
|
+
break;
|
|
36
|
+
case 'fade-in':
|
|
37
|
+
case 'fade-out':
|
|
38
|
+
renderFadeTrack(node, progress);
|
|
39
|
+
break;
|
|
40
|
+
case 'static':
|
|
41
|
+
renderStaticTrack(node);
|
|
42
|
+
break;
|
|
43
|
+
default:
|
|
44
|
+
throw new RangeError(`Unsupported track effect: ${node}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Clean up all track nodes — removes SVG elements from the DOM.
|
|
50
|
+
*/
|
|
51
|
+
export function cleanAnimationPlan(nodes) {
|
|
52
|
+
for (const node of nodes.values()) {
|
|
53
|
+
switch (node.effect) {
|
|
54
|
+
case 'move':
|
|
55
|
+
cleanMoveTrack(node);
|
|
56
|
+
break;
|
|
57
|
+
case 'fade-in':
|
|
58
|
+
case 'fade-out':
|
|
59
|
+
cleanFadeTrack(node);
|
|
60
|
+
break;
|
|
61
|
+
case 'static':
|
|
62
|
+
cleanStaticTrack(node);
|
|
63
|
+
break;
|
|
64
|
+
default:
|
|
65
|
+
throw new RangeError(`Unsupported track effect: ${node}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
nodes.clear();
|
|
69
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PieceUrls } from '../../extensions/first-party/main-renderer/types/internal';
|
|
2
|
+
import type { RenderGeometry } from '../../layout/geometry/types';
|
|
3
|
+
import type { AnimationTrackStatic } from '../types';
|
|
4
|
+
import type { PreparedStaticNode } from './types';
|
|
5
|
+
export declare function prepareStaticTrack(track: AnimationTrackStatic, geometry: RenderGeometry, pieceUrls: PieceUrls, layer: SVGElement): PreparedStaticNode;
|
|
6
|
+
export declare function renderStaticTrack(_node: PreparedStaticNode): void;
|
|
7
|
+
export declare function cleanStaticTrack(node: PreparedStaticNode): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createSvgElement } from '../../render/svg/helpers';
|
|
2
|
+
export function prepareStaticTrack(track, geometry, pieceUrls, layer) {
|
|
3
|
+
const r = geometry.squareRect(track.sq);
|
|
4
|
+
const url = pieceUrls[track.pieceCode];
|
|
5
|
+
const root = createSvgElement(layer, 'image', {
|
|
6
|
+
'data-chessboard-id': `animation-static-${track.id}`,
|
|
7
|
+
'data-animation-effect': 'static',
|
|
8
|
+
href: url,
|
|
9
|
+
x: r.x.toString(),
|
|
10
|
+
y: r.y.toString(),
|
|
11
|
+
width: r.size.toString(),
|
|
12
|
+
height: r.size.toString()
|
|
13
|
+
});
|
|
14
|
+
return { ...track, root };
|
|
15
|
+
}
|
|
16
|
+
// No per-frame update needed — static pieces stay in place until the animation layer is cleaned.
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18
|
+
export function renderStaticTrack(_node) { }
|
|
19
|
+
export function cleanStaticTrack(node) {
|
|
20
|
+
node.root.remove();
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AnimationTrack, AnimationTrackFade, AnimationTrackMove, AnimationTrackStatic } from '../types';
|
|
2
|
+
/** Prepared node for a move track — holds the SVG image and its track. */
|
|
3
|
+
export interface PreparedMoveNode extends AnimationTrackMove {
|
|
4
|
+
root: SVGImageElement;
|
|
5
|
+
}
|
|
6
|
+
/** Prepared node for a fade-in / fade-out track. */
|
|
7
|
+
export interface PreparedFadeNode extends AnimationTrackFade {
|
|
8
|
+
root: SVGImageElement;
|
|
9
|
+
}
|
|
10
|
+
/** Prepared node for a static (captured piece) track. */
|
|
11
|
+
export interface PreparedStaticNode extends AnimationTrackStatic {
|
|
12
|
+
root: SVGImageElement;
|
|
13
|
+
}
|
|
14
|
+
export type PreparedTrackNode = PreparedMoveNode | PreparedFadeNode | PreparedStaticNode;
|
|
15
|
+
/** Keyed map from track id → prepared node, for fast lookup during render/clean. */
|
|
16
|
+
export type PreparedNodeMap = Map<number, PreparedTrackNode>;
|
|
17
|
+
/** Input context shared by all prepare/render/clean helpers. */
|
|
18
|
+
export interface AnimationRenderInput {
|
|
19
|
+
tracks: readonly AnimationTrack[];
|
|
20
|
+
layer: SVGElement;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|