* Queues the events to be flushed when tick function is set. * * @param {TickEventDef} data Tick data to be queued. * @private
(data)
| 908 | * @private |
| 909 | */ |
| 910 | queueTick_(data) { |
| 911 | // Start dropping the head of the queue if we've reached the limit |
| 912 | // so that we don't take up too much memory in the runtime. |
| 913 | if (this.events_.length >= QUEUE_LIMIT) { |
| 914 | this.events_.shift(); |
| 915 | } |
| 916 | |
| 917 | this.events_.push(data); |
| 918 | } |
| 919 | |
| 920 | /** |
| 921 | * Forwards all queued ticks to the viewer tick method. |