mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-04-03 11:52:40 +00:00
Add config.ts option to condigure messageQueue WPM
This commit is contained in:
parent
09823331d1
commit
ee448a32c9
@ -38,7 +38,8 @@ export const config = {
|
|||||||
},
|
},
|
||||||
messages: {
|
messages: {
|
||||||
route: 'messages',
|
route: 'messages',
|
||||||
showNextButton: false
|
showNextButton: false,
|
||||||
|
messageQueueWPM: 150
|
||||||
},
|
},
|
||||||
console: {
|
console: {
|
||||||
route: 'console',
|
route: 'console',
|
||||||
|
@ -81,7 +81,7 @@ class MessageQueueAttender {
|
|||||||
private lastMessageLength = 0;
|
private lastMessageLength = 0;
|
||||||
private queue: MessagesMessage[] = [];
|
private queue: MessagesMessage[] = [];
|
||||||
|
|
||||||
constructor(private messageEmitter: Observer<MessagesMessage>, wordPerMinute: number = 150) {
|
constructor(private messageEmitter: Observer<MessagesMessage>, wordPerMinute: number = config.messages.messageQueueWPM) {
|
||||||
const charPerMinute = wordPerMinute * 5;
|
const charPerMinute = wordPerMinute * 5;
|
||||||
this.charPerSecond = charPerMinute / 60;
|
this.charPerSecond = charPerMinute / 60;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user