├── .gitignore ├── .java-version ├── LICENSE ├── Makefile ├── README.rst ├── build.sbt ├── docs ├── CNAME ├── assets │ ├── css │ │ ├── notesview.css │ │ └── pg.min.css │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── ico │ │ ├── android-chrome-192x192.png │ │ ├── apple-touch-icon-114x114.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-144x144.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── apple-touch-icon-57x57.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-72x72.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── largetile.png │ │ ├── mediumtile.png │ │ ├── smalltile.png │ │ └── widetile.png │ ├── img │ │ ├── e │ │ │ └── FW.svg │ │ ├── n │ │ │ ├── N1.svg │ │ │ ├── N2.svg │ │ │ ├── N3.svg │ │ │ ├── N4.svg │ │ │ ├── N5.svg │ │ │ ├── N6.svg │ │ │ ├── N7.svg │ │ │ ├── N8.svg │ │ │ └── N9.svg │ │ ├── og │ │ │ └── 2.png │ │ └── p │ │ │ ├── common │ │ │ ├── BL.svg │ │ │ └── WH.svg │ │ │ ├── cz1 │ │ │ ├── BFU.svg │ │ │ ├── BGI.svg │ │ │ ├── BHI.svg │ │ │ ├── BKA.svg │ │ │ ├── BKE.svg │ │ │ ├── BKI.svg │ │ │ ├── BKY.svg │ │ │ ├── BNG.svg │ │ │ ├── BNK.svg │ │ │ ├── BNY.svg │ │ │ ├── BOU.svg │ │ │ ├── BOU2.svg │ │ │ ├── BRY.svg │ │ │ ├── BTO.svg │ │ │ ├── BUM.svg │ │ │ ├── WFU.svg │ │ │ ├── WGI.svg │ │ │ ├── WHI.svg │ │ │ ├── WKA.svg │ │ │ ├── WKE.svg │ │ │ ├── WKI.svg │ │ │ ├── WKY.svg │ │ │ ├── WNG.svg │ │ │ ├── WNK.svg │ │ │ ├── WNY.svg │ │ │ ├── WOU.svg │ │ │ ├── WOU2.svg │ │ │ ├── WRY.svg │ │ │ ├── WTO.svg │ │ │ └── WUM.svg │ │ │ ├── cz2 │ │ │ ├── BFU.svg │ │ │ ├── BGI.svg │ │ │ ├── BHI.svg │ │ │ ├── BKA.svg │ │ │ ├── BKE.svg │ │ │ ├── BKI.svg │ │ │ ├── BKY.svg │ │ │ ├── BNG.svg │ │ │ ├── BNK.svg │ │ │ ├── BNY.svg │ │ │ ├── BOU.svg │ │ │ ├── BOU2.svg │ │ │ ├── BRY.svg │ │ │ ├── BTO.svg │ │ │ ├── BUM.svg │ │ │ ├── WFU.svg │ │ │ ├── WGI.svg │ │ │ ├── WHI.svg │ │ │ ├── WKA.svg │ │ │ ├── WKE.svg │ │ │ ├── WKI.svg │ │ │ ├── WKY.svg │ │ │ ├── WNG.svg │ │ │ ├── WNK.svg │ │ │ ├── WNY.svg │ │ │ ├── WOU.svg │ │ │ ├── WOU2.svg │ │ │ ├── WRY.svg │ │ │ ├── WTO.svg │ │ │ └── WUM.svg │ │ │ ├── en1 │ │ │ ├── FU.svg │ │ │ ├── GI.svg │ │ │ ├── HI.svg │ │ │ ├── KA.svg │ │ │ ├── KE.svg │ │ │ ├── KI.svg │ │ │ ├── KY.svg │ │ │ ├── NG.svg │ │ │ ├── NK.svg │ │ │ ├── NY.svg │ │ │ ├── OU.svg │ │ │ ├── RY.svg │ │ │ ├── TO.svg │ │ │ └── UM.svg │ │ │ ├── hd1 │ │ │ ├── BFU.svg │ │ │ ├── BGI.svg │ │ │ ├── BHI.svg │ │ │ ├── BKA.svg │ │ │ ├── BKE.svg │ │ │ ├── BKI.svg │ │ │ ├── BKY.svg │ │ │ ├── BNG.svg │ │ │ ├── BNK.svg │ │ │ ├── BNY.svg │ │ │ ├── BOU.svg │ │ │ ├── BOU2.svg │ │ │ ├── BRY.svg │ │ │ ├── BTO.svg │ │ │ ├── BUM.svg │ │ │ ├── WFU.svg │ │ │ ├── WGI.svg │ │ │ ├── WHI.svg │ │ │ ├── WKA.svg │ │ │ ├── WKE.svg │ │ │ ├── WKI.svg │ │ │ ├── WKY.svg │ │ │ ├── WNG.svg │ │ │ ├── WNK.svg │ │ │ ├── WNY.svg │ │ │ ├── WOU.svg │ │ │ ├── WOU2.svg │ │ │ ├── WRY.svg │ │ │ ├── WTO.svg │ │ │ └── WUM.svg │ │ │ ├── in1 │ │ │ ├── BFU.svg │ │ │ ├── BGI.svg │ │ │ ├── BGY.svg │ │ │ ├── BHI.svg │ │ │ ├── BKA.svg │ │ │ ├── BKE.svg │ │ │ ├── BKI.svg │ │ │ ├── BKY.svg │ │ │ ├── BNG.svg │ │ │ ├── BNK.svg │ │ │ ├── BNY.svg │ │ │ ├── BOU.svg │ │ │ ├── BOU2.svg │ │ │ ├── BRY.svg │ │ │ ├── BTO.svg │ │ │ ├── BUM.svg │ │ │ ├── WFU.svg │ │ │ ├── WGI.svg │ │ │ ├── WGY.svg │ │ │ ├── WHI.svg │ │ │ ├── WKA.svg │ │ │ ├── WKE.svg │ │ │ ├── WKI.svg │ │ │ ├── WKY.svg │ │ │ ├── WNG.svg │ │ │ ├── WNK.svg │ │ │ ├── WNY.svg │ │ │ ├── WOU.svg │ │ │ ├── WOU2.svg │ │ │ ├── WRY.svg │ │ │ ├── WTO.svg │ │ │ └── WUM.svg │ │ │ ├── in2 │ │ │ ├── BFU.svg │ │ │ ├── BGI.svg │ │ │ ├── BGY.svg │ │ │ ├── BHI.svg │ │ │ ├── BKA.svg │ │ │ ├── BKE.svg │ │ │ ├── BKI.svg │ │ │ ├── BKY.svg │ │ │ ├── BNG.svg │ │ │ ├── BNK.svg │ │ │ ├── BNY.svg │ │ │ ├── BOU.svg │ │ │ ├── BOU2.svg │ │ │ ├── BOU3.svg │ │ │ ├── BRY.svg │ │ │ ├── BTO.svg │ │ │ ├── BUM.svg │ │ │ ├── WFU.svg │ │ │ ├── WGI.svg │ │ │ ├── WGY.svg │ │ │ ├── WHI.svg │ │ │ ├── WKA.svg │ │ │ ├── WKE.svg │ │ │ ├── WKI.svg │ │ │ ├── WKY.svg │ │ │ ├── WNG.svg │ │ │ ├── WNK.svg │ │ │ ├── WNY.svg │ │ │ ├── WOU.svg │ │ │ ├── WOU2.svg │ │ │ ├── WOU3.svg │ │ │ ├── WRY.svg │ │ │ ├── WTO.svg │ │ │ └── WUM.svg │ │ │ ├── jp1 │ │ │ ├── FU.svg │ │ │ ├── GI.svg │ │ │ ├── HI.svg │ │ │ ├── KA.svg │ │ │ ├── KE.svg │ │ │ ├── KI.svg │ │ │ ├── KY.svg │ │ │ ├── NG.svg │ │ │ ├── NK.svg │ │ │ ├── NY.svg │ │ │ ├── OU.svg │ │ │ ├── OU2.svg │ │ │ ├── RY.svg │ │ │ ├── TO.svg │ │ │ └── UM.svg │ │ │ ├── jp2 │ │ │ ├── FU.svg │ │ │ ├── GI.svg │ │ │ ├── HI.svg │ │ │ ├── KA.svg │ │ │ ├── KE.svg │ │ │ ├── KI.svg │ │ │ ├── KY.svg │ │ │ ├── NG.svg │ │ │ ├── NK.svg │ │ │ ├── NY.svg │ │ │ ├── OU.svg │ │ │ ├── RY.svg │ │ │ ├── TO.svg │ │ │ └── UM.svg │ │ │ ├── jp3 │ │ │ ├── FU.svg │ │ │ ├── GI.svg │ │ │ ├── HI.svg │ │ │ ├── KA.svg │ │ │ ├── KE.svg │ │ │ ├── KI.svg │ │ │ ├── KY.svg │ │ │ ├── NG.svg │ │ │ ├── NK.svg │ │ │ ├── NY.svg │ │ │ ├── OU.svg │ │ │ ├── RY.svg │ │ │ ├── TO.svg │ │ │ └── UM.svg │ │ │ ├── jp4 │ │ │ ├── BFU.svg │ │ │ ├── BGI.svg │ │ │ ├── BHI.svg │ │ │ ├── BKA.svg │ │ │ ├── BKE.svg │ │ │ ├── BKI.svg │ │ │ ├── BKY.svg │ │ │ ├── BNG.svg │ │ │ ├── BNK.svg │ │ │ ├── BNY.svg │ │ │ ├── BOU.svg │ │ │ ├── BOU2.svg │ │ │ ├── BRY.svg │ │ │ ├── BTO.svg │ │ │ ├── BUM.svg │ │ │ ├── WFU.svg │ │ │ ├── WGI.svg │ │ │ ├── WHI.svg │ │ │ ├── WKA.svg │ │ │ ├── WKE.svg │ │ │ ├── WKI.svg │ │ │ ├── WKY.svg │ │ │ ├── WNG.svg │ │ │ ├── WNK.svg │ │ │ ├── WNY.svg │ │ │ ├── WOU.svg │ │ │ ├── WOU2.svg │ │ │ ├── WRY.svg │ │ │ ├── WTO.svg │ │ │ └── WUM.svg │ │ │ └── jp5 │ │ │ ├── BFU.svg │ │ │ ├── BGI.svg │ │ │ ├── BHI.svg │ │ │ ├── BKA.svg │ │ │ ├── BKE.svg │ │ │ ├── BKI.svg │ │ │ ├── BKY.svg │ │ │ ├── BNG.svg │ │ │ ├── BNK.svg │ │ │ ├── BNY.svg │ │ │ ├── BOU.svg │ │ │ ├── BOU2.svg │ │ │ ├── BRY.svg │ │ │ ├── BTO.svg │ │ │ ├── BUM.svg │ │ │ ├── WFU.svg │ │ │ ├── WGI.svg │ │ │ ├── WHI.svg │ │ │ ├── WKA.svg │ │ │ ├── WKE.svg │ │ │ ├── WKI.svg │ │ │ ├── WKY.svg │ │ │ ├── WNG.svg │ │ │ ├── WNK.svg │ │ │ ├── WNY.svg │ │ │ ├── WOU.svg │ │ │ ├── WOU2.svg │ │ │ ├── WRY.svg │ │ │ ├── WTO.svg │ │ │ └── WUM.svg │ ├── js │ │ ├── Blob.js │ │ ├── FileSaver.min.js │ │ ├── WebAudioAPISound.js │ │ ├── bootstrap.min.js │ │ ├── clipboard.min.js │ │ ├── debug_console.js │ │ ├── ecl_new.js │ │ ├── lz-string.min.js │ │ └── mog-playground-opt.js │ └── mp3 │ │ ├── beep.mp3 │ │ ├── cancel.mp3 │ │ ├── click.mp3 │ │ ├── select.mp3 │ │ ├── success.mp3 │ │ └── switch.mp3 ├── browserconfig.xml ├── index-debug.html ├── index.html ├── privacy │ └── index.html └── shogibot │ └── help.html ├── favicon.ico ├── index-dev-debug.html ├── index-dev.html ├── project ├── build.properties └── plugins.sbt └── src └── main └── scala └── com └── mogproject └── mogami └── playground ├── App.scala ├── PlaygroundSettings.scala └── view ├── Footer.scala ├── MainPane.scala ├── NavBar.scala ├── PlaygroundSite.scala └── PlaygroundView.scala /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | *.log 3 | 4 | # sbt specific 5 | .cache 6 | .history 7 | .lib/ 8 | dist/* 9 | target/ 10 | lib_managed/ 11 | src_managed/ 12 | project/boot/ 13 | project/plugins/project/ 14 | package-lock.json 15 | 16 | # Scala-IDE specific 17 | .scala_dependencies 18 | .worksheet 19 | 20 | # IntelliJ IDEA specific 21 | .idea/ 22 | .idea_modules/ 23 | *.iml 24 | 25 | # for Mac 26 | .DS_Store 27 | 28 | # for debug 29 | src/debug/ 30 | 31 | # Node.js 32 | node_modules/ 33 | 34 | # for local testing 35 | !src/test/resources/assets/js/ecl_new.js 36 | 37 | # assets 38 | assets/ 39 | !docs/assets/ 40 | 41 | # for sbt 42 | .sbtopts 43 | 44 | -------------------------------------------------------------------------------- /.java-version: -------------------------------------------------------------------------------- 1 | 1.8 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SBT = sbt 2 | OPEN = open 3 | PYTHON = python3 4 | APP_NAME = mog-playground 5 | PROD_RSC = docs 6 | TEST_ASS = assets 7 | PROD_ASS = ${PROD_RSC}/assets 8 | DEV_PORT = 8000 9 | COPY_PROD = cp -f target/scala-2.13/${APP_NAME}-opt.js ${PROD_ASS}/js/ && cp -rf ${TEST_ASS}/* ${PROD_ASS}/ 10 | REMOVE_MAPPING = sed -i '' -e '/\/\/\# sourceMappingURL.*/d' ${PROD_ASS}/js/${APP_NAME}-opt.js 11 | UGLIFY_CSS = rm -f ${PROD_ASS}/css/* && uglifycss ${TEST_ASS}/css/[bmps]* > ${PROD_ASS}/css/pg.min.css && uglifycss ${TEST_ASS}/css/notesview.css > ${PROD_ASS}/css/notesview.css 12 | 13 | build: sync_frontend_assets 14 | ${SBT} fastOptJS 15 | 16 | test: 17 | ${SBT} test 18 | 19 | console: 20 | ${SBT} test:console 21 | 22 | clean: 23 | rm -rf ~/.sbt/1.0/staging/*/mog-* 24 | ${SBT} clean 25 | 26 | local: 27 | ${OPEN} http://localhost:${DEV_PORT}/index-dev-debug.html?debug=true 28 | 29 | local-prod: 30 | ${OPEN} http://localhost:${DEV_PORT}/ 31 | 32 | server: 33 | ${PYTHON} -m 'http.server' ${DEV_PORT} 34 | 35 | server-prod: 36 | cd docs && ${PYTHON} -m 'http.server' ${DEV_PORT} 37 | 38 | sync_frontend_assets: 39 | cp -rf ../mog-frontend/assets . 40 | rm -f assets/js/bootstrap.js 41 | 42 | publish: sync_frontend_assets clean test 43 | sbt fullOptJS 44 | ${COPY_PROD} 45 | ${REMOVE_MAPPING} 46 | ${UGLIFY_CSS} 47 | 48 | publish-commit: publish 49 | git add . 50 | git commit -m Publish 51 | git push 52 | 53 | publish-assets: 54 | ${COPY_PROD} 55 | ${REMOVE_MAPPING} 56 | ${UGLIFY_CSS} 57 | 58 | merge: 59 | git checkout master 60 | git pull 61 | git checkout develop 62 | git merge master 63 | git push 64 | 65 | .PHONY: build test console clean local local-prod server server-prod publish publish-commit publish-assets merge 66 | 67 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ======================================= 2 | Shogi Playground: an online shogi board 3 | ======================================= 4 | 5 | Visit `Shogi Playground `_. 6 | 7 | .. image:: https://readthedocs.org/projects/mog-playground-docs/badge/?version=latest 8 | :target: https://mog-playground-docs.readthedocs.io/en/latest/?badge=latest 9 | :alt: Documentation Status 10 | 11 | .. image:: https://badges.gitter.im/shogi-playground/community.svg 12 | :target: https://gitter.im/shogi-playground/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge 13 | :alt: Gitter 14 | 15 | 16 | What is shogi? 17 | ============== 18 | 19 | Shogi, also known as Japanese chess, is a two-player strategy board game native to Japan. The shogi board has nine by nine squares, and there are eight different piece types. It is said that such pieces were invented as early as the 12th century, yet the present form was established in the 16th century. One of the rules that distinguish shogi from other chess variants is the drop rule. It allows captured pieces to be returned to the board by the capturing player. 20 | 21 | .. figure:: https://mog-playground-docs.readthedocs.io/en/latest/_images/shogi.jpg 22 | :align: right 23 | 24 | [1]_ 25 | 26 | 27 | Shogi has been the most popular board game in Japan for centuries (in fact, much more popular than Western chess), and professionals have been greatly respected by all Japanese population. Recently, the first non-Japanese shogi professional `Karolina Styczyńska `_ and the progeny `Sota Fujii `_ have made headlines many times, acquiring new shogi fans all over the world. 28 | 29 | Please refer to `Wikipedia `_ for further information. 30 | 31 | 32 | What is Shogi Playground? 33 | ========================= 34 | 35 | Shogi Playground is a lightweight, mobile-friendly website where anyone can manage, analyze, and share shogi games as well as mate problems. Without any installation --other than an HTML5-compatible web browser, Shogi Playground provides an out-of-the-box online shogi board with which one can play around. The look and feel will be optimized for your screen. For example, more panels will be shown on a PC, and you can just flick your finger to move a piece on a mobile screen. 36 | 37 | .. figure:: https://mog-playground-docs.readthedocs.io/en/latest/_images/init_pc.jpg 38 | :align: center 39 | 40 | Appearance on PC/tablet 41 | 42 | .. figure:: https://mog-playground-docs.readthedocs.io/en/latest/_images/init_mobile.jpg 43 | :align: center 44 | 45 | Appearance on mobile 46 | 47 | As you move pieces and change positions on the board, Shogi Playground issues different URLs for each position. You may create a shortened URL for free, which is quite handy for sharing with the audience of your social networks. (As a bonus, this shortened URL comes with a nice thumbnail image on Twitter and Facebook!) As far as I know, Shogi Playground is the first website that has employed the idea of **Shogi Record as a URL**. 48 | 49 | 50 | Who uses Shogi Playground? 51 | ========================== 52 | 53 | As of August 2018, Shogi Playground has been accessed from 90 different countries since the launch in the previous year. Frequent users include professional Karolina Styczyńska and members of the Facebook group `Shogi Mania `_. 54 | 55 | - `Shogi Harbour by Karolina Styczyńska `_ 56 | 57 | .. figure:: https://mog-playground-docs.readthedocs.io/en/latest/_images/shogi_harbour.jpg 58 | :align: left 59 | 60 | This website uses the embedded version of Shogi Playground. 61 | 62 | 63 | Features 64 | ======== 65 | 66 | With Shogi Playground you can 67 | 68 | - record your shogi games 69 | - create sharable links for games and mate problems 70 | - create highly-customizable shogi diagrams 71 | - manage record with files (CSA/KIF/KI2 supported) 72 | - analyze games 73 | - embed a playable shogi board onto your website 74 | 75 | and more! 76 | 77 | 78 | Development principles 79 | ====================== 80 | 81 | I, the developer of Shogi Playground, hereby promise the followings. 82 | 83 | - Tool for everyone, regardless of language and location 84 | - Lightweight, mobile-friendly interface 85 | - No ads 86 | - No selling of users' data 87 | - Free, reliable service 88 | - Consistent improvement 89 | 90 | 91 | For developers and contributors 92 | =============================== 93 | 94 | Please refer to the `Developer Guide `_ and `Wiki Page `_. 95 | 96 | 97 | .. [1] Picture taken from https://free-materials.com/ 98 | -------------------------------------------------------------------------------- /build.sbt: -------------------------------------------------------------------------------- 1 | enablePlugins(ScalaJSPlugin) 2 | 3 | lazy val root = (project in file(".")) 4 | .settings( 5 | inThisBuild(List( 6 | organization := "com.mogproject", 7 | scalaVersion := "2.13.2" 8 | )), 9 | name := "mog-playground", 10 | libraryDependencies ++= Seq( 11 | "org.scala-js" %%% "scalajs-dom" % "1.0.0", 12 | "be.doeraene" %%% "scalajs-jquery" % "1.0.0", 13 | "com.lihaoyi" %%% "scalatags" % "0.9.1" 14 | ), 15 | scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation"), 16 | 17 | skip in packageJSDependencies := false, 18 | 19 | jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv( 20 | org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv.Config().withArgs(List("--dns-result-order=ipv4first")) 21 | ) 22 | ) 23 | .dependsOn(mogFrontend) 24 | 25 | lazy val mogFrontend = ProjectRef(uri("ssh://git@github.com/mogproject/mog-frontend.git#master"), "root") 26 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | play.mogproject.com -------------------------------------------------------------------------------- /docs/assets/css/notesview.css: -------------------------------------------------------------------------------- 1 | .shogi-page{table-layout:fixed;width:calc(100% - 26px);margin:10px 6px 10px 20px}.shogi-state{border:1px solid #aaa;line-height:1;width:calc(100% - 16px);height:100%;margin:6px 14px 6px 0;padding:0}.shogi-header{width:100%;font-weight:bold;background-color:#fff;margin:2px 0 0 0;padding:4px 0 4px 14px;border-style:solid;border-width:0 0 3px 0;border-color:#aaa}.shogi-body{width:100%;background-color:#f0f0f0;padding:0 0 0 8px;font-family:"Source Han Serif","Hiragino Mincho ProN",serif;font-size:18px}.shogi-hand{width:208px;padding:6px 0 6px 0;font-size:16px}.shogi-board{width:202px;border-collapse:collapse;background-color:#fff;margin-left:4px}.shogi-board>tbody>tr>td{border:1px solid #000;width:21px;height:21px;text-align:center}.shogi-comment{font-size:14px;line-height:1.6;background-color:#fff;width:100%;height:100%;padding:8px 8px 8px 12px;border-style:solid;border-width:0 0 0 1px;border-color:#aaa}.sb-f{border:none !important;height:10px !important;background-color:#f0f0f0 !important;font-size:12px;vertical-align:bottom}.sb-r{border:none !important;background-color:#f0f0f0 !important;width:10px !important;font-size:12px;text-align:left !important;padding-left:2px}.sp-i{transform:rotate(180deg);transform-origin:50% 50%;padding-left:0 !important}.sp-p{color:#d9534f}.sp-b{font-family:"Hiragino Kaku Gothic ProN",sans-serif;font-weight:bold}tr{page-break-inside:avoid}td{vertical-align:top}p{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all} 2 | -------------------------------------------------------------------------------- /docs/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /docs/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /docs/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /docs/assets/ico/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /docs/assets/ico/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/favicon-16x16.png -------------------------------------------------------------------------------- /docs/assets/ico/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/favicon-32x32.png -------------------------------------------------------------------------------- /docs/assets/ico/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/favicon-96x96.png -------------------------------------------------------------------------------- /docs/assets/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/favicon.ico -------------------------------------------------------------------------------- /docs/assets/ico/largetile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/largetile.png -------------------------------------------------------------------------------- /docs/assets/ico/mediumtile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/mediumtile.png -------------------------------------------------------------------------------- /docs/assets/ico/smalltile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/smalltile.png -------------------------------------------------------------------------------- /docs/assets/ico/widetile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/ico/widetile.png -------------------------------------------------------------------------------- /docs/assets/img/e/FW.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/n/N1.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/n/N2.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/n/N3.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/n/N4.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/n/N5.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/n/N6.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/n/N7.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/n/N8.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/n/N9.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/og/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/img/og/2.png -------------------------------------------------------------------------------- /docs/assets/img/p/common/BL.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/assets/img/p/common/WH.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/FU.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/GI.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/HI.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/KA.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/KE.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/KI.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/KY.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/NG.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/NK.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/NY.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/OU.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/RY.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/TO.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/img/p/en1/UM.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/img/p/hd1/BFU.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 60 | 61 | -------------------------------------------------------------------------------- /docs/assets/img/p/hd1/BNK.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 66 | 67 | -------------------------------------------------------------------------------- /docs/assets/img/p/hd1/BNY.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 65 | 66 | -------------------------------------------------------------------------------- /docs/assets/img/p/hd1/BTO.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 58 | 59 | -------------------------------------------------------------------------------- /docs/assets/img/p/hd1/WFU.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 64 | 65 | -------------------------------------------------------------------------------- /docs/assets/img/p/hd1/WTO.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 63 | 64 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/FU.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/GI.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/HI.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/KA.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/KE.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/KI.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/KY.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/NG.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/NK.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/NY.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/OU.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/OU2.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/RY.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/TO.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp1/UM.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp2/FU.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 63 | 64 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp2/KE.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 66 | 67 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp2/KI.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 67 | 68 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp2/KY.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 63 | 64 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp2/NG.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 66 | 67 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp2/NK.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 63 | 64 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp2/NY.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp2/TO.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 57 | 58 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp3/FU.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 66 | 67 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp3/NK.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 65 | 66 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp3/NY.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 64 | 65 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp3/TO.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53 | 54 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp5/BFU.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 61 | 62 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp5/BNG.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 67 | 68 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp5/BNK.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 59 | 60 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp5/BNY.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 63 | 64 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp5/BTO.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 57 | 58 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp5/WFU.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 65 | 66 | -------------------------------------------------------------------------------- /docs/assets/img/p/jp5/WTO.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 61 | 62 | -------------------------------------------------------------------------------- /docs/assets/js/FileSaver.min.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 2 | var saveAs=saveAs||function(e){"use strict";if(typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),i="download"in r,o=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},a=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),f=e.webkitRequestFileSystem,u=e.requestFileSystem||f||e.mozRequestFileSystem,s=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},c="application/octet-stream",d=0,l=500,w=function(t){var r=function(){if(typeof t==="string"){n().revokeObjectURL(t)}else{t.remove()}};if(e.chrome){r()}else{setTimeout(r,l)}},p=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var i=e["on"+t[r]];if(typeof i==="function"){try{i.call(e,n||e)}catch(o){s(o)}}}},v=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob(["\ufeff",e],{type:e.type})}return e},y=function(t,s,l){if(!l){t=v(t)}var y=this,m=t.type,S=false,h,R,O=function(){p(y,"writestart progress write writeend".split(" "))},g=function(){if(R&&a&&typeof FileReader!=="undefined"){var r=new FileReader;r.onloadend=function(){var e=r.result;R.location.href="data:attachment/file"+e.slice(e.search(/[,;]/));y.readyState=y.DONE;O()};r.readAsDataURL(t);y.readyState=y.INIT;return}if(S||!h){h=n().createObjectURL(t)}if(R){R.location.href=h}else{var i=e.open(h,"_blank");if(i==undefined&&a){e.location.href=h}}y.readyState=y.DONE;O();w(h)},b=function(e){return function(){if(y.readyState!==y.DONE){return e.apply(this,arguments)}}},E={create:true,exclusive:false},N;y.readyState=y.INIT;if(!s){s="download"}if(i){h=n().createObjectURL(t);r.href=h;r.download=s;setTimeout(function(){o(r);O();w(h);y.readyState=y.DONE});return}if(e.chrome&&m&&m!==c){N=t.slice||t.webkitSlice;t=N.call(t,0,t.size,c);S=true}if(f&&s!=="download"){s+=".download"}if(m===c||f){R=e}if(!u){g();return}d+=t.size;u(e.TEMPORARY,d,b(function(e){e.root.getDirectory("saved",E,b(function(e){var n=function(){e.getFile(s,E,b(function(e){e.createWriter(b(function(n){n.onwriteend=function(t){R.location.href=e.toURL();y.readyState=y.DONE;p(y,"writeend",t);w(e)};n.onerror=function(){var e=n.error;if(e.code!==e.ABORT_ERR){g()}};"writestart progress write abort".split(" ").forEach(function(e){n["on"+e]=y["on"+e]});n.write(t);y.abort=function(){n.abort();y.readyState=y.DONE};y.readyState=y.WRITING}),g)}),g)};e.getFile(s,{create:false},b(function(e){e.remove();n()}),b(function(e){if(e.code===e.NOT_FOUND_ERR){n()}else{g()}}))}),g)}),g)},m=y.prototype,S=function(e,t,n){return new y(e,t,n)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,n){if(!n){e=v(e)}return navigator.msSaveOrOpenBlob(e,t||"download")}}m.abort=function(){var e=this;e.readyState=e.DONE;p(e,"abort")};m.readyState=m.INIT=0;m.WRITING=1;m.DONE=2;m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null;return S}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!=null){define([],function(){return saveAs})} -------------------------------------------------------------------------------- /docs/assets/js/WebAudioAPISound.js: -------------------------------------------------------------------------------- 1 | try { 2 | window.AudioContext = window.AudioContext || window.webkitAudioContext; 3 | window.audioContext = new window.AudioContext(); 4 | } catch (e) { 5 | console.log("No Web Audio API support"); 6 | } 7 | 8 | if ("audioContext" in window) { 9 | /* 10 | * WebAudioAPISoundManager Constructor 11 | */ 12 | var WebAudioAPISoundManager = function (context) { 13 | this.context = context; 14 | this.bufferList = {}; 15 | this.playingSounds = {}; 16 | }; 17 | 18 | /* 19 | * WebAudioAPISoundManager Prototype 20 | */ 21 | WebAudioAPISoundManager.prototype = { 22 | addSound: function (url) { 23 | // Load buffer asynchronously 24 | var request = new XMLHttpRequest(); 25 | request.open("GET", url, true); 26 | request.responseType = "arraybuffer"; 27 | 28 | var self = this; 29 | 30 | request.onload = function () { 31 | // Asynchronously decode the audio file data in request.response 32 | self.context.decodeAudioData( 33 | request.response, 34 | 35 | function (buffer) { 36 | if (!buffer) { 37 | alert('error decoding file data: ' + url); 38 | return; 39 | } 40 | self.bufferList[url] = buffer; 41 | } 42 | ); 43 | }; 44 | 45 | request.onerror = function () { 46 | alert('BufferLoader: XHR error'); 47 | }; 48 | 49 | request.send(); 50 | }, 51 | stopSoundWithUrl: function(url) { 52 | if(this.playingSounds.hasOwnProperty(url)){ 53 | for(var i in this.playingSounds[url]){ 54 | if(this.playingSounds[url].hasOwnProperty(i)) 55 | this.playingSounds[url][i].noteOff(0); 56 | } 57 | } 58 | } 59 | }; 60 | 61 | /* 62 | * WebAudioAPISound Constructor 63 | */ 64 | var WebAudioAPISound = function (url, options) { 65 | this.settings = { 66 | loop: false 67 | }; 68 | 69 | for(var i in options){ 70 | if(options.hasOwnProperty(i)) 71 | this.settings[i] = options[i]; 72 | } 73 | 74 | this.url = url + '.mp3'; 75 | window.webAudioAPISoundManager = window.webAudioAPISoundManager || new WebAudioAPISoundManager(window.audioContext); 76 | this.manager = window.webAudioAPISoundManager; 77 | this.manager.addSound(this.url); 78 | }; 79 | 80 | /* 81 | * WebAudioAPISound Prototype 82 | */ 83 | WebAudioAPISound.prototype = { 84 | play: function () { 85 | var buffer = this.manager.bufferList[this.url]; 86 | var bufferLoaded = typeof buffer !== "undefined"; 87 | //Only play if it's loaded yet 88 | if (bufferLoaded) { 89 | var source = this.makeSource(buffer); 90 | source.loop = this.settings.loop; 91 | source.start(); // old -> .noteOn(0) 92 | 93 | if(!this.manager.playingSounds.hasOwnProperty(this.url)) 94 | this.manager.playingSounds[this.url] = []; 95 | this.manager.playingSounds[this.url].push(source); 96 | } 97 | return bufferLoaded; 98 | }, 99 | stop: function () { 100 | this.manager.stopSoundWithUrl(this.url); 101 | }, 102 | getVolume: function () { 103 | return this.translateVolume(this.volume, true); 104 | }, 105 | //Expect to receive in range 0-100 106 | setVolume: function (volume) { 107 | this.volume = this.translateVolume(volume); 108 | }, 109 | translateVolume: function(volume, inverse){ 110 | return inverse ? volume * 100 : volume / 100; 111 | }, 112 | makeSource: function (buffer) { 113 | var source = this.manager.context.createBufferSource(); 114 | var gainNode = this.manager.context.createGain(); // old -> createGainNode() 115 | // gainNode.gain.value = this.volume; // deprecated 116 | gainNode.gain.setTargetAtTime(this.volume, 0, 0.01); 117 | source.buffer = buffer; 118 | source.connect(gainNode); 119 | gainNode.connect(this.manager.context.destination); 120 | return source; 121 | } 122 | }; 123 | } -------------------------------------------------------------------------------- /docs/assets/js/debug_console.js: -------------------------------------------------------------------------------- 1 | // 2 | // Replace the function console.log with this original function. 3 | // 4 | (function() { 5 | 6 | printLog = function() { 7 | var now = new Date().toISOString(); 8 | var logLevel = arguments[0]; 9 | var args = arguments[1]; 10 | var origFunc = arguments[2]; 11 | var logger = document.getElementById('debugLog'); 12 | var prefix = '[' + now + '] ' + (logLevel ? logLevel + ': ' : ''); 13 | for (var i = 0; i < args.length; i++) { 14 | logger.innerHTML += prefix + args[i] + '
'; 15 | } 16 | origFunc.apply(undefined, args); 17 | }; 18 | 19 | 20 | console.log_orig = console.log; 21 | console.log = function() { printLog('', arguments, console.log_orig); }; 22 | 23 | console.info_orig = console.error; 24 | console.info = function() { printLog('INFO', arguments, console.info_orig); }; 25 | 26 | console.warn_orig = console.error; 27 | console.warn = function() { printLog('WARN', arguments, console.warn_orig); }; 28 | 29 | console.error_orig = console.error; 30 | console.error = function() { printLog('ERROR', arguments, console.error_orig); }; 31 | 32 | // catch all errors 33 | window.onerror = function(msg, url, lineNo, columnNo, error) { 34 | console.error(msg); 35 | return false; 36 | } 37 | 38 | console.log("Debug Console enabled.") 39 | })(); 40 | -------------------------------------------------------------------------------- /docs/assets/js/lz-string.min.js: -------------------------------------------------------------------------------- 1 | var LZString=function(){function o(o,r){if(!t[o]){t[o]={};for(var n=0;ne;e++){var s=r.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null===o||void 0===o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;t>e;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(""))},compressToEncodedURIComponent:function(o){return null==o?"":i._compress(o,6,function(o){return e.charAt(o)})},decompressFromEncodedURIComponent:function(r){return null==r?"":""==r?null:(r=r.replace(/ /g,"+"),i._decompress(r.length,32,function(n){return o(e,r.charAt(n))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(o,r,n){if(null==o)return"";var e,t,i,s={},p={},u="",c="",a="",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;ie;e++)m<<=1,v==r-1?(v=0,d.push(n(m)),m=0):v++;for(t=a.charCodeAt(0),e=0;8>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;h>e;e++)m=m<<1|t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=a.charCodeAt(0),e=0;16>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}l--,0==l&&(l=Math.pow(2,h),h++),delete p[a]}else for(t=s[a],e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;l--,0==l&&(l=Math.pow(2,h),h++),s[c]=f++,a=String(u)}if(""!==a){if(Object.prototype.hasOwnProperty.call(p,a)){if(a.charCodeAt(0)<256){for(e=0;h>e;e++)m<<=1,v==r-1?(v=0,d.push(n(m)),m=0):v++;for(t=a.charCodeAt(0),e=0;8>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;h>e;e++)m=m<<1|t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=a.charCodeAt(0),e=0;16>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}l--,0==l&&(l=Math.pow(2,h),h++),delete p[a]}else for(t=s[a],e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;l--,0==l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==r-1){d.push(n(m));break}v++}return d.join("")},decompress:function(o){return null==o?"":""==o?null:i._decompress(o.length,32768,function(r){return o.charCodeAt(r)})},_decompress:function(o,n,e){var t,i,s,p,u,c,a,l,f=[],h=4,d=4,m=3,v="",w=[],A={val:e(0),position:n,index:1};for(i=0;3>i;i+=1)f[i]=i;for(p=0,c=Math.pow(2,2),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;switch(t=p){case 0:for(p=0,c=Math.pow(2,8),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;l=r(p);break;case 1:for(p=0,c=Math.pow(2,16),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;l=r(p);break;case 2:return""}for(f[3]=l,s=l,w.push(l);;){if(A.index>o)return"";for(p=0,c=Math.pow(2,m),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;switch(l=p){case 0:for(p=0,c=Math.pow(2,8),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;f[d++]=r(p),l=d-1,h--;break;case 1:for(p=0,c=Math.pow(2,16),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;f[d++]=r(p),l=d-1,h--;break;case 2:return w.join("")}if(0==h&&(h=Math.pow(2,m),m++),f[l])v=f[l];else{if(l!==d)return null;v=s+s.charAt(0)}w.push(v),f[d++]=s+v.charAt(0),h--,s=v,0==h&&(h=Math.pow(2,m),m++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module&&(module.exports=LZString); 2 | -------------------------------------------------------------------------------- /docs/assets/mp3/beep.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/mp3/beep.mp3 -------------------------------------------------------------------------------- /docs/assets/mp3/cancel.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/mp3/cancel.mp3 -------------------------------------------------------------------------------- /docs/assets/mp3/click.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/mp3/click.mp3 -------------------------------------------------------------------------------- /docs/assets/mp3/select.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/mp3/select.mp3 -------------------------------------------------------------------------------- /docs/assets/mp3/success.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/mp3/success.mp3 -------------------------------------------------------------------------------- /docs/assets/mp3/switch.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/docs/assets/mp3/switch.mp3 -------------------------------------------------------------------------------- /docs/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | #8bc53f 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/index-debug.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Shogi Playground 29 | 30 | 31 | 32 | 33 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 55 | 56 |
57 |

Shogi Playground

58 |

Now Loading...

59 |
60 | 61 | 62 |
63 |
Messages
64 |
65 |
66 |
67 | 68 | 69 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | Shogi Playground 34 | 35 | 36 | 37 | 38 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 59 | 60 | 61 |
62 |

Shogi Playground

63 |

Now Loading...

64 |
65 | 66 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/privacy/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Shogi Playground Privacy Policy 7 | 8 | 9 | 10 | 11 |
12 |

Privacy Policy

13 | 14 |

Shogi Playground is developed by Yosuke Mizutani. This website collects some Personal Data from its User.

15 | 16 |

Personal Data collected

17 | 18 | The following services may collect your Personal Data. 19 | 20 |
    21 |
  • 22 | Google Analytics 23 |

    Purpose: Analytics

    24 |

    Personal Data: Cookies; Usage Data

    25 |
  • 26 |
  • 27 | GitHub Pages 28 |

    Purpose: Hosting and backend infrastructure

    29 |

    Personal Data: various types of Data as specified in the privacy policy of the service

    30 |
  • 31 |
  • 32 | Cloudflare 33 |

    Purpose: Traffic optimization and distribution

    34 |

    Personal Data: Cookies; various types of Data as specified in the privacy policy of the service

    35 |
  • 36 |
37 | 38 |

Cookie policy

39 |

We do not use cookies in the Shogi Playground application. Settings and caches are stored in the localStorage of your browser.

40 | 41 |

Disclosure of your personal information

42 |

We do not sell your personal information. We do not share your information with third parties, unless it is required by law.

43 | 44 | Last update: May 9, 2019 45 |
46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /docs/shogibot/help.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Shogi Bot Help 27 | 28 | 36 | 37 | 38 | 39 |

Shogi Bot - How to text a move

40 |

Shogi Bot recognizes vague descriptions. Each section is optional and case-insensitive. The notation order does not matter except Origin (must be before Destination) and Promotion (must be at the end).

41 | 42 |

1. Destination

43 |

The simplest way to text your move is just to put a destination. Western, Japanese, and CSA notations are acceptable.

44 |
    45 |
  • Western notation: '1a', '7f', '9i', etc.
  • 46 |
  • Japanese notation: '1一', '7六', '9九', '11', '76', '99', etc.
  • 47 |
  • CSA notation: '11', '76', '99', etc.
  • 48 |
49 |

If your notation is ambiguous, additional choice buttons will show up.

50 |

You can omit this notation if your destination is the same as the preceding piece.

51 | 52 |

2. Origin

53 |

To resolve ambiguity, you can also include the coordinate of the origin. The notation is same as Destination. This part must be before Destination.

54 | 55 |

3. Piece

56 |

Shogi Bot accepts both Western, CSA, and other common notations.

57 |
    58 |
  • Pawn: 'P', 'F', 'FU'
  • 59 |
  • Promoted Pawn: '+P', 'PP', 'T', 'TO'
  • 60 | 61 |
  • Lance: 'L', 'KY'
  • 62 |
  • Promoted Lance: '+L', 'PL', 'NY'
  • 63 | 64 |
  • Knight: 'N', 'KE'
  • 65 |
  • Promoted Knight: '+N', 'PN', 'NK'
  • 66 | 67 |
  • Silver: 'S', 'GI'
  • 68 |
  • Promoted Silver: '+S', 'PS', 'NG'
  • 69 | 70 |
  • Gold: 'G', 'KI'
  • 71 | 72 |
  • Bishop: 'B', 'KA'
  • 73 |
  • Promoted Bishop: '+B', 'PB', 'U', 'UM', 'H'
  • 74 | 75 |
  • Rook: 'R', 'HI'
  • 76 |
  • Promoted Rook: '+R', 'PR', 'RY', 'D'
  • 77 | 78 |
  • King: 'K', 'OU', 'GY'
  • 79 |
80 | 81 |

4. Drop or Simple Move

82 |
    83 |
  • Drop: '*', '00'
  • 84 |
  • Simple Move: '-', 'x'
  • 85 |
86 | 87 |

5. Promotion

88 |

You can specify a promotion flag at the end of your text.

89 |
    90 |
  • Promote: '+', 'naru', 'nari'
  • 91 |
  • Unpromote: '=', 'narazu'
  • 92 |
93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mogproject/mog-playground/5e5d74cb6ca7f43b345a624611eeaeeecc71d65f/favicon.ico -------------------------------------------------------------------------------- /index-dev-debug.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | Shogi Playground [Dev] 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 |
31 |

Shogi Playground

32 |

Now Loading...

33 |
34 | 35 | 36 |
37 |
Messages
38 |
39 |
40 |
41 | 42 | 43 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /index-dev.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | Shogi Playground [Dev] 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 |
31 |

Shogi Playground

32 |

Now Loading...

33 |
34 | 35 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version=1.2.8 2 | -------------------------------------------------------------------------------- /project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0") 2 | addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.0") 3 | 4 | libraryDependencies += "org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.1.0" 5 | -------------------------------------------------------------------------------- /src/main/scala/com/mogproject/mogami/playground/App.scala: -------------------------------------------------------------------------------- 1 | package com.mogproject.mogami.playground 2 | 3 | import com.mogproject.mogami.frontend._ 4 | import com.mogproject.mogami.playground.view.PlaygroundView 5 | import org.scalajs.dom.Element 6 | 7 | import scala.scalajs.js.annotation.JSExportTopLevel 8 | 9 | /** 10 | * entry point 11 | */ 12 | @JSExportTopLevel("App") 13 | object App extends PlaygroundAppLike { 14 | PlaygroundSettings 15 | 16 | override def createView(config: PlaygroundConfiguration, rootElem: Element): PlaygroundView = { 17 | PlaygroundView(config.deviceType.isMobile, config.freeMode, config.embeddedMode, config.isDev, config.isDebug, rootElem) 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/scala/com/mogproject/mogami/playground/PlaygroundSettings.scala: -------------------------------------------------------------------------------- 1 | package com.mogproject.mogami.playground 2 | 3 | import com.mogproject.mogami.frontend.FrontendSettings 4 | 5 | /** 6 | * Project-level global settings 7 | */ 8 | object PlaygroundSettings { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/scala/com/mogproject/mogami/playground/view/Footer.scala: -------------------------------------------------------------------------------- 1 | package com.mogproject.mogami.playground.view 2 | 3 | import com.mogproject.mogami.frontend.view.footer.FooterLike 4 | 5 | /** 6 | * 7 | */ 8 | case class Footer(isDev: Boolean, isDebug: Boolean) extends FooterLike -------------------------------------------------------------------------------- /src/main/scala/com/mogproject/mogami/playground/view/MainPane.scala: -------------------------------------------------------------------------------- 1 | package com.mogproject.mogami.playground.view 2 | 3 | 4 | import com.mogproject.mogami.frontend.view.{MainPaneLike, PlaygroundSiteLike} 5 | 6 | case class MainPane(isMobile: Boolean, embeddedMode: Boolean, override val getSite: () => PlaygroundSiteLike) extends MainPaneLike 7 | -------------------------------------------------------------------------------- /src/main/scala/com/mogproject/mogami/playground/view/NavBar.scala: -------------------------------------------------------------------------------- 1 | package com.mogproject.mogami.playground.view 2 | 3 | import com.mogproject.mogami.util.Implicits._ 4 | import com.mogproject.mogami.frontend._ 5 | import com.mogproject.mogami.frontend.action.ChangeModeAction 6 | import com.mogproject.mogami.frontend.state.ObserveFlag 7 | import com.mogproject.mogami.frontend.view.button.RadioButton 8 | import com.mogproject.mogami.frontend.view.nav.NavBarLike 9 | 10 | /** 11 | * 12 | */ 13 | case class NavBar(isMobile: Boolean, embeddedMode: Boolean) extends NavBarLike with PlaygroundSAMObserver { 14 | 15 | private[this] def availableModes: Seq[ModeType] = Seq(PlayModeType, ViewModeType) ++ (!embeddedMode).option(EditModeType) 16 | 17 | lazy val modeButton: RadioButton[ModeType] = RadioButton( 18 | availableModes, 19 | (_: Messages) => Map[ModeType, String](PlayModeType -> "Play", ViewModeType -> "View", EditModeType -> "Edit").view.filterKeys(availableModes.contains).toMap, 20 | (mt: ModeType) => doAction(ChangeModeAction(mt, confirmed = false)), 21 | Seq(classButtonThin, "mode-select"), 22 | Seq.empty 23 | ) 24 | 25 | override lazy val buttons: Seq[WebComponent] = modeButton +: super.buttons 26 | 27 | // 28 | // Observer 29 | // 30 | override val samObserveMask: Long = ObserveFlag.MODE_TYPE 31 | 32 | override def refresh(model: PlaygroundModel, flag: Long): Unit = { 33 | val modeType = model.mode.modeType 34 | modeButton.select(modeType) 35 | replaceClass(navElem, "nav-bg-", s"nav-bg-${modeType.toString.take(4).toLowerCase()}") 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/scala/com/mogproject/mogami/playground/view/PlaygroundSite.scala: -------------------------------------------------------------------------------- 1 | package com.mogproject.mogami.playground.view 2 | 3 | import com.mogproject.mogami.frontend.view.{MainPaneLike, PlaygroundSiteLike} 4 | import com.mogproject.mogami.frontend.view.footer.FooterLike 5 | 6 | case class PlaygroundSite(isMobile: Boolean, freeMode: Boolean, embeddedMode: Boolean, isDev: Boolean, isDebug: Boolean) extends PlaygroundSiteLike { 7 | override lazy val mainPane: MainPaneLike = MainPane(isMobile, embeddedMode, () => this) 8 | 9 | override lazy val navBar: NavBar = NavBar(isMobile, embeddedMode) 10 | 11 | override lazy val footer: FooterLike = Footer(isDev, isDebug) 12 | } 13 | 14 | -------------------------------------------------------------------------------- /src/main/scala/com/mogproject/mogami/playground/view/PlaygroundView.scala: -------------------------------------------------------------------------------- 1 | package com.mogproject.mogami.playground.view 2 | 3 | import com.mogproject.mogami.frontend.view.{BasePlaygroundView, PlaygroundSiteLike} 4 | import org.scalajs.dom.Element 5 | 6 | 7 | case class PlaygroundView(isMobile: Boolean, freeMode: Boolean, embeddedMode: Boolean, isDev: Boolean, isDebug: Boolean, rootElem: Element) extends BasePlaygroundView { 8 | override lazy val website: PlaygroundSiteLike = PlaygroundSite(isMobile, freeMode, embeddedMode, isDev, isDebug) 9 | } 10 | --------------------------------------------------------------------------------