1.5
This commit is contained in:
parent
c9dd7182aa
commit
acf93ec6df
22 changed files with 320 additions and 261 deletions
|
|
@ -16,6 +16,7 @@
|
|||
const h = helpers;
|
||||
const end = global.TarinaiPerf.begin("update.tarinai.individual") || null;
|
||||
const visibleRect = h.updateVisibleWorldRect(worldRef, 160);
|
||||
const nearVisibleRect = h.updateVisibleWorldRect(worldRef, 520);
|
||||
const now = worldRef.time || 0;
|
||||
const stats = {
|
||||
total: 0,
|
||||
|
|
@ -48,7 +49,7 @@
|
|||
stats.total += 1;
|
||||
const behaviorId = updatePolicy.behaviorId(t);
|
||||
inc(stats.states, behaviorId);
|
||||
const cadence = updatePolicy.updateCadence(worldRef, t, visibleRect);
|
||||
const cadence = updatePolicy.updateCadence(worldRef, t, visibleRect, nearVisibleRect);
|
||||
const interval = Number.isFinite(cadence.interval) ? cadence.interval : Infinity;
|
||||
inc(stats.lanes, cadence.lane || "unknown");
|
||||
if (worldRef.selected === t) stats.selected += 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue