start to support live mode (#73)
1. add a liveMode flag to config, when liveMode is set, the timer will keep running even though all the actions casted 2. add a public method addEvent, which will cast newly added event in sync 3. move mouse in sync mode with the latest position info
This commit is contained in:
@@ -45,7 +45,7 @@ export default class Timer {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (actions.length > 0) {
|
||||
if (actions.length > 0 || self.config.liveMode) {
|
||||
self.raf = requestAnimationFrame(check);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user