mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 02:31:33 +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: {
|
||||
route: 'messages',
|
||||
showNextButton: false
|
||||
showNextButton: false,
|
||||
messageQueueWPM: 150
|
||||
},
|
||||
console: {
|
||||
route: 'console',
|
||||
|
@ -81,7 +81,7 @@ class MessageQueueAttender {
|
||||
private lastMessageLength = 0;
|
||||
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;
|
||||
this.charPerSecond = charPerMinute / 60;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user