Add r3f stress + Ticker.__ticks counter
This commit is contained in:
parent
ea3e7434c6
commit
62def1e883
6 changed files with 1341 additions and 2 deletions
|
@ -42,6 +42,11 @@ export default class Ticker {
|
|||
private _scheduledForNextTick: Set<ICallback>
|
||||
private _timeAtCurrentTick: number
|
||||
private _ticking: boolean = false
|
||||
/**
|
||||
* Counts up for every tick executed.
|
||||
* Internally, this is used to measure ticks per second.
|
||||
*/
|
||||
public __ticks = 0
|
||||
|
||||
constructor() {
|
||||
this._scheduledForThisOrNextTick = new Set()
|
||||
|
@ -127,6 +132,9 @@ export default class Ticker {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
this.__ticks++
|
||||
|
||||
this._ticking = true
|
||||
this._timeAtCurrentTick = t
|
||||
for (const v of this._scheduledForNextTick) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue