configurable storm/racer animation speed
parent
2baeeac5d2
commit
acb50ecffd
|
@ -99,6 +99,15 @@ case class Pref(
|
|||
case _ => 250
|
||||
}
|
||||
|
||||
def animationMillisForSpeedPuzzles: Int =
|
||||
animation match {
|
||||
case Animation.NONE => 0
|
||||
case Animation.FAST => 70
|
||||
case Animation.NORMAL => 100
|
||||
case Animation.SLOW => 160
|
||||
case _ => 100
|
||||
}
|
||||
|
||||
def isBlindfold = blindfold == Pref.Blindfold.YES
|
||||
|
||||
def bgImgOrDefault = bgImg | Pref.defaultBgImg
|
||||
|
|
|
@ -23,7 +23,8 @@ final class StormJson(sign: StormSign) {
|
|||
"destination" -> p.destination,
|
||||
"moveEvent" -> p.moveEvent,
|
||||
"highlight" -> p.highlight,
|
||||
"is3d" -> p.is3d
|
||||
"is3d" -> p.is3d,
|
||||
"animation" -> p.animationMillisForSpeedPuzzles
|
||||
)
|
||||
|
||||
def newHigh(n: Option[StormHigh.NewHigh]) =
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"ceval": "2.0.0",
|
||||
"chat": "2.0.0",
|
||||
"chess": "2.0.0",
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"chessops": "^0.9.0",
|
||||
"common": "2.0.0",
|
||||
"game": "2.0.0",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"prod": "yarn run compile"
|
||||
},
|
||||
"dependencies": {
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"common": "2.0.0",
|
||||
"snabbdom": "^3.0.1"
|
||||
},
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"@build/rollupProject": "2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"chessops": "^0.9.0",
|
||||
"snabbdom": "^3.0.1",
|
||||
"common": "2.0.0"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"@types/lichess": "2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"common": "2.0.0",
|
||||
"snabbdom": "^3.0.1"
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"dependencies": {
|
||||
"chessops": "^0.9.0",
|
||||
"snabbdom": "^3.0.1",
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"common": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -9,6 +9,7 @@ export interface PuzPrefs {
|
|||
rookCastle: boolean;
|
||||
moveEvent: number;
|
||||
highlight: boolean;
|
||||
animation: number;
|
||||
}
|
||||
|
||||
export type UserMove = (orig: Key, dest: Key) => void;
|
||||
|
|
|
@ -46,8 +46,7 @@ export function makeConfig(opts: CgConfig, pref: PuzPrefs, userMove: UserMove):
|
|||
check: pref.highlight,
|
||||
},
|
||||
animation: {
|
||||
enabled: true,
|
||||
duration: 100,
|
||||
duration: pref.animation,
|
||||
},
|
||||
disableContextMenu: true,
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"ceval": "2.0.0",
|
||||
"chart.js": "^2.9",
|
||||
"chess": "2.0.0",
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"chessops": "^0.9.0",
|
||||
"common": "2.0.0",
|
||||
"nvui": "2.0.0",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"dependencies": {
|
||||
"chess": "2.0.0",
|
||||
"chessops": "^0.9.0",
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"snabbdom": "^3.0.1",
|
||||
"common": "2.0.0",
|
||||
"puz": "2.0.0"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"ab": "https://github.com/lichess-org/ab-stub",
|
||||
"chat": "2.0.0",
|
||||
"chess": "2.0.0",
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"common": "2.0.0",
|
||||
"game": "2.0.0",
|
||||
"nvui": "2.0.0",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"dependencies": {
|
||||
"chess": "2.0.0",
|
||||
"chessops": "^0.9.0",
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"snabbdom": "^3.0.1",
|
||||
"common": "2.0.0",
|
||||
"puz": "2.0.0"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"chat": "2.0.0",
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"common": "2.0.0",
|
||||
"game": "2.0.0",
|
||||
"snabbdom": "^3.0.1"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"chat": "2.0.0",
|
||||
"chessground": "^8.1.2",
|
||||
"chessground": "^8.1.3",
|
||||
"common": "2.0.0",
|
||||
"game": "2.0.0",
|
||||
"snabbdom": "^3.0.1"
|
||||
|
|
|
@ -967,10 +967,10 @@ chessground@^4.4:
|
|||
merge "1.2.0"
|
||||
mithril "github:ornicar/mithril.js#v1.0.1"
|
||||
|
||||
chessground@^8.1.2:
|
||||
version "8.1.2"
|
||||
resolved "https://registry.yarnpkg.com/chessground/-/chessground-8.1.2.tgz#08be47dc838316054a03b441c370c09613bf487a"
|
||||
integrity sha512-DRRBUbagjfKGnWAU9heiIfM1mowYxcV2Q/gukdR+TxjJwW9s0QjgTqipBqt0xki+SanQRuqhi37t2gLMd09RuQ==
|
||||
chessground@^8.1.3:
|
||||
version "8.1.3"
|
||||
resolved "https://registry.yarnpkg.com/chessground/-/chessground-8.1.3.tgz#8c573e86c6b37cdd154870ade24f7f874959d1e8"
|
||||
integrity sha512-ca6NJKA0AUsDD0Z6Niuj4MubMlv37yVguB43mn3I2G05uT9x/z0yWmpDCsjci75xrDgX7yKFchgDpZ08YT1nrA==
|
||||
|
||||
chessops@^0.9.0:
|
||||
version "0.9.0"
|
||||
|
|
Loading…
Reference in New Issue