From db893adcff082641a4f6d6cc3de760a809c9e2fa Mon Sep 17 00:00:00 2001 From: bill-the-dev Date: Sun, 13 Feb 2022 17:03:40 -0500 Subject: [PATCH] add background animation on game start, needs turn flip --- dist/main.css | 39 +++++++++++++++++++++++++++++++--- dist/main.js | 2 +- index.html | 2 +- notes_bugs.md | 3 +++ src/index.js | 15 +++++++++++-- src/styles/index.css | 50 +++++++++++++++++++++++++++++++++++++++++--- 6 files changed, 101 insertions(+), 10 deletions(-) diff --git a/dist/main.css b/dist/main.css index 874d817..df470c5 100644 --- a/dist/main.css +++ b/dist/main.css @@ -8,10 +8,43 @@ body { background-color: #aee1f9; - background-image: linear-gradient(315deg, #aee1f9 0%, #f6ebe6 74%); - margin: 1px; + background-image: linear-gradient(45deg, #aee1f9 0%, #f6ebe6 74%); + background-size: 400%; + margin: 0px; + background-position: center; +} + +/* idea: animate 5s transition on turn flip */ +.turn-blue { + animation: bg-animationBlue 5s; + animation-fill-mode: forwards; +} + +.turn-red { + animation: bg-animationBlue 5s; + animation-fill-mode: forwards; } +.turn-null { + animation: bg-animationNull 2s; + animation-fill-mode: forwards; +} + +@keyframes bg-animationRed { + 100% { + background-position: left; + } +} +@keyframes bg-animationBlue { + 100% { + background-position: left; + } +} +@keyframes bg-animationNull { + 100% { + background-position: center; + } +} #container { width: 100%; height: 100%; @@ -22,7 +55,7 @@ body { height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); - grid-template-rows: 0.25fr 1fr 2fr 1fr 0.25fr; + grid-template-rows: 0.1fr 1fr 2fr 1fr 0.25fr; /* grid-auto-rows: minmax(100px, auto); */ /* flex-direction: column; */ } diff --git a/dist/main.js b/dist/main.js index 04587ed..b07955b 100644 --- a/dist/main.js +++ b/dist/main.js @@ -16,7 +16,7 @@ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _styles_index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./styles/index.css */ \"./src/styles/index.css\");\n/* harmony import */ var _styles_cards_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./styles/cards.css */ \"./src/styles/cards.css\");\n/* harmony import */ var _styles_pieces_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./styles/pieces.css */ \"./src/styles/pieces.css\");\n/* harmony import */ var _styles_menu_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./styles/menu.css */ \"./src/styles/menu.css\");\n/* harmony import */ var _scripts_game_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./scripts/game.js */ \"./src/scripts/game.js\");\n/* harmony import */ var _scripts_board__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./scripts/board */ \"./src/scripts/board.js\");\n/* harmony import */ var _scripts_modal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./scripts/modal */ \"./src/scripts/modal.js\");\n\n\n\n\n\n\n\n\n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n var game = new _scripts_game_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]();\n var board = new _scripts_board__WEBPACK_IMPORTED_MODULE_7__[\"default\"](); // let deck = Deck;\n // let piece = Piece;\n\n window.Game = _scripts_game_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\n window.Board = _scripts_board__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n\n function addGlobalEventListener(type, selector, callback) {\n document.addEventListener(type, function (e) {\n if (e.target.matches(selector)) callback(e);\n });\n } // TO-DO const list:\n // allPawns, allCards\n // activePawn, activeCard\n // pawn - select and highlight\n\n\n addGlobalEventListener(\"click\", \"#pawn\", function (e) {\n console.log(\"You clicked a pawn\");\n var allPawns = document.querySelectorAll(\"#pawn\");\n allPawns.forEach(function (pawn) {\n if (pawn.classList.contains(\"active-pawn\")) {\n pawn.classList.remove(\"active-pawn\");\n pawn.classList.add(\"inactive-pawn\");\n }\n });\n e.target.classList.remove(\"inactive-pawn\");\n e.target.classList.add(\"active-pawn\");\n\n if (game.checkHighlight()) {\n console.log(\"Check highlight pass\");\n } else {\n console.log(\"Check highlight fail\");\n }\n }); // card - select and highlight \n\n addGlobalEventListener(\"click\", \".back\", function (e) {\n console.log(\"You clicked a card\");\n var allCards = document.querySelectorAll(\".back\");\n allCards.forEach(function (card) {\n card.classList.remove(\"active-card\");\n card.classList.add(\"inactive-card\");\n });\n e.target.classList.remove(\"inactive-card\");\n e.target.classList.add(\"active-card\");\n\n if (game.checkHighlight()) {\n console.log(\"Check highlight pass\");\n } else {\n console.log(\"Check highlight fail\");\n }\n }); // move pawn to square \n\n addGlobalEventListener(\"click\", \".square.active\", function (e) {\n var posEndEle = e.target;\n game.viewMovePiece(posEndEle);\n }); // Modal consts\n\n var modalHowTo = document.querySelector(\".modal__howTo\");\n var modalView = document.querySelector(\".modal__fill\");\n document.querySelector(\".modal__fill\").innerHTML = _scripts_modal__WEBPACK_IMPORTED_MODULE_8__.modalFill; // const sanitizer = new Sanitizer(); \n // Modal How To on\n\n addGlobalEventListener(\"click\", \"#how-to-play\", function (e) {\n e.preventDefault();\n console.log(\"on\"); // modalView.setHTML(\"Hellooooooo\");\n // modalView.innerHTML = modalFill;\n // document.querySelector(\".modal__fill\").innerHTML = modalFill;\n // document.querySelector(\".modal__fill\").innerHTML = modalFill;\n\n modalHowTo.classList.add(\"modal__fill-active\");\n }); // Modal How To off\n\n modalHowTo.addEventListener(\"click\", function (e) {\n e.preventDefault();\n console.log(\"off\");\n modalHowTo.classList.remove(\"modal__fill-active\");\n }); // Start / End game dynamic\n\n addGlobalEventListener(\"click\", \"#start\", function (e) {\n if (game.activeGame === false) {\n console.log(\"You clicked start\");\n game.start();\n var startEle = document.querySelector(\".start-inactive\");\n startEle.classList.remove(\"start-inactive\");\n startEle.classList.add(\"start-active\");\n startEle.innerText = \"End Game\";\n } else {\n console.log(\"You clicked end game\");\n history.go(0);\n }\n });\n}); // addGlobalEventListener(\"click\", \".start-active\", e => {\n// });\n// bindEvents() {\n// document.querySelectorAll(\"ul li\").forEach((li) => {\n// li.addEventListener(\"click\", this.handleClick);\n// });\n// }\n// // Get this:\n// addGlobalEventListener(\"click\", \"div\", e => {\n// console.log(\"hi\")\n// })\n// // From this:\n// document.addEventListener(\"click\", e => {\n// if (e.target.matches(\"div\")) {\n// console.log(\"you clicked a div\");\n// }\n// })//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvaW5kZXguanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBRyxRQUFRLENBQUNDLGdCQUFULENBQTBCLGtCQUExQixFQUE4QyxZQUFNO0FBRWxELE1BQUlDLElBQUksR0FBRyxJQUFJTCx3REFBSixFQUFYO0FBQ0EsTUFBSU0sS0FBSyxHQUFHLElBQUlMLHNEQUFKLEVBQVosQ0FIa0QsQ0FLbEQ7QUFDQTs7QUFF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tlZCBhIGRpdlwiKTtcbi8vICAgfVxuLy8gfSlcbiJdLCJuYW1lcyI6WyJHYW1lIiwiQm9hcmQiLCJtb2RhbEZpbGwiLCJkb2N1bWVudCIsImFkZEV2ZW50TGlzdGVuZXIiLCJnYW1lIiwiYm9hcmQiLCJ3aW5kb3ciLCJhZGRHbG9iYWxFdmVudExpc3RlbmVyIiwidHlwZSIsInNlbGVjdG9yIiwiY2FsbGJhY2siLCJlIiwidGFyZ2V0IiwibWF0Y2hlcyIsImNvbnNvbGUiLCJsb2ciLCJhbGxQYXducyIsInF1ZXJ5U2VsZWN0b3JBbGwiLCJmb3JFYWNoIiwicGF3biIsImNsYXNzTGlzdCIsImNvbnRhaW5zIiwicmVtb3ZlIiwiYWRkIiwiY2hlY2tIaWdobGlnaHQiLCJhbGxDYXJkcyIsImNhcmQiLCJwb3NFbmRFbGUiLCJ2aWV3TW92ZVBpZWNlIiwibW9kYWxIb3dUbyIsInF1ZXJ5U2VsZWN0b3IiLCJtb2RhbFZpZXciLCJpbm5lckhUTUwiLCJwcmV2ZW50RGVmYXVsdCIsImFjdGl2ZUdhbWUiLCJzdGFydCIsInN0YXJ0RWxlIiwiaW5uZXJUZXh0IiwiaGlzdG9yeSIsImdvIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/index.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _styles_index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./styles/index.css */ \"./src/styles/index.css\");\n/* harmony import */ var _styles_cards_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./styles/cards.css */ \"./src/styles/cards.css\");\n/* harmony import */ var _styles_pieces_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./styles/pieces.css */ \"./src/styles/pieces.css\");\n/* harmony import */ var _styles_menu_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./styles/menu.css */ \"./src/styles/menu.css\");\n/* harmony import */ var _scripts_game_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./scripts/game.js */ \"./src/scripts/game.js\");\n/* harmony import */ var _scripts_board__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./scripts/board */ \"./src/scripts/board.js\");\n/* harmony import */ var _scripts_modal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./scripts/modal */ \"./src/scripts/modal.js\");\n\n\n\n\n\n\n\n\n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n var game = new _scripts_game_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"]();\n var board = new _scripts_board__WEBPACK_IMPORTED_MODULE_7__[\"default\"](); // let deck = Deck;\n // let piece = Piece;\n\n window.Game = _scripts_game_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"];\n window.Board = _scripts_board__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n\n function addGlobalEventListener(type, selector, callback) {\n document.addEventListener(type, function (e) {\n if (e.target.matches(selector)) callback(e);\n });\n } // TO-DO const list:\n // allPawns, allCards\n // activePawn, activeCard\n // pawn - select and highlight\n\n\n addGlobalEventListener(\"click\", \"#pawn\", function (e) {\n console.log(\"You clicked a pawn\");\n var allPawns = document.querySelectorAll(\"#pawn\");\n allPawns.forEach(function (pawn) {\n if (pawn.classList.contains(\"active-pawn\")) {\n pawn.classList.remove(\"active-pawn\");\n pawn.classList.add(\"inactive-pawn\");\n }\n });\n e.target.classList.remove(\"inactive-pawn\");\n e.target.classList.add(\"active-pawn\");\n\n if (game.checkHighlight()) {\n console.log(\"Check highlight pass\");\n } else {\n console.log(\"Check highlight fail\");\n }\n }); // card - select and highlight \n\n addGlobalEventListener(\"click\", \".back\", function (e) {\n console.log(\"You clicked a card\");\n var allCards = document.querySelectorAll(\".back\");\n allCards.forEach(function (card) {\n card.classList.remove(\"active-card\");\n card.classList.add(\"inactive-card\");\n });\n e.target.classList.remove(\"inactive-card\");\n e.target.classList.add(\"active-card\");\n\n if (game.checkHighlight()) {\n console.log(\"Check highlight pass\");\n } else {\n console.log(\"Check highlight fail\");\n }\n }); // move pawn to square \n\n addGlobalEventListener(\"click\", \".square.active\", function (e) {\n var posEndEle = e.target;\n game.viewMovePiece(posEndEle);\n }); // Modal consts\n\n var modalHowTo = document.querySelector(\".modal__howTo\");\n var modalView = document.querySelector(\".modal__fill\");\n document.querySelector(\".modal__fill\").innerHTML = _scripts_modal__WEBPACK_IMPORTED_MODULE_8__.modalFill; // const sanitizer = new Sanitizer(); \n // Modal How To on\n\n addGlobalEventListener(\"click\", \"#how-to-play\", function (e) {\n e.preventDefault();\n console.log(\"on\"); // modalView.setHTML(\"Hellooooooo\");\n // modalView.innerHTML = modalFill;\n // document.querySelector(\".modal__fill\").innerHTML = modalFill;\n // document.querySelector(\".modal__fill\").innerHTML = modalFill;\n\n modalHowTo.classList.add(\"modal__fill-active\");\n }); // Modal How To off\n\n modalHowTo.addEventListener(\"click\", function (e) {\n e.preventDefault();\n console.log(\"off\");\n modalHowTo.classList.remove(\"modal__fill-active\");\n }); // Start / End game dynamic\n\n addGlobalEventListener(\"click\", \"#start\", function (e) {\n var body = document.querySelector(\".body\");\n var startEle = document.querySelector(\".start-inactive\");\n\n if (game.activeGame === false) {\n console.log(\"You clicked start\");\n game.start();\n startEle.classList.remove(\"start-inactive\");\n startEle.classList.add(\"start-active\");\n body.classList.remove(\"turn-null\");\n body.classList.add(\"turn-blue\");\n startEle.innerText = \"End Game\";\n } else {\n console.log(\"You clicked end game\");\n body.classList.add(\"turn-null\");\n setTimeout(function () {\n body.classList.remove(\"turn-blue\");\n body.classList.remove(\"turn-red\");\n history.go(0);\n }, 3001);\n }\n });\n}); // addGlobalEventListener(\"click\", \".start-active\", e => {\n// });\n// bindEvents() {\n// document.querySelectorAll(\"ul li\").forEach((li) => {\n// li.addEventListener(\"click\", this.handleClick);\n// });\n// }\n// // Get this:\n// addGlobalEventListener(\"click\", \"div\", e => {\n// console.log(\"hi\")\n// })\n// // From this:\n// document.addEventListener(\"click\", e => {\n// if (e.target.matches(\"div\")) {\n// console.log(\"you clicked a div\");\n// }\n// })//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvaW5kZXguanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBRyxRQUFRLENBQUNDLGdCQUFULENBQTBCLGtCQUExQixFQUE4QyxZQUFNO0FBRWxELE1BQUlDLElBQUksR0FBRyxJQUFJTCx3REFBSixFQUFYO0FBQ0EsTUFBSU0sS0FBSyxHQUFHLElBQUlMLHNEQUFKLEVBQVosQ0FIa0QsQ0FLbEQ7QUFDQTs7QUFFQU0sRUFBQUEsTUFBTSxDQUFDUCxJQUFQLEdBQWNBLHdEQUFkO0FBQ0FPLEVBQUFBLE1BQU0sQ0FBQ04sS0FBUCxHQUFlQSxzREFBZjs7QUFFQSxXQUFTTyxzQkFBVCxDQUF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ldCIsIm1hdGNoZXMiLCJjb25zb2xlIiwibG9nIiwiYWxsUGF3bnMiLCJxdWVyeVNlbGVjdG9yQWxsIiwiZm9yRWFjaCIsInBhd24iLCJjbGFzc0xpc3QiLCJjb250YWlucyIsInJlbW92ZSIsImFkZCIsImNoZWNrSGlnaGxpZ2h0IiwiYWxsQ2FyZHMiLCJjYXJkIiwicG9zRW5kRWxlIiwidmlld01vdmVQaWVjZSIsIm1vZGFsSG93VG8iLCJxdWVyeVNlbGVjdG9yIiwibW9kYWxWaWV3IiwiaW5uZXJIVE1MIiwicHJldmVudERlZmF1bHQiLCJib2R5Iiwic3RhcnRFbGUiLCJhY3RpdmVHYW1lIiwic3RhcnQiLCJpbm5lclRleHQiLCJzZXRUaW1lb3V0IiwiaGlzdG9yeSIsImdvIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/index.js\n"); /***/ }), diff --git a/index.html b/index.html index 03cc9bb..d50d766 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ rel="stylesheet"> Onitama JS - +