MCPcopy
hub / github.com/cpaczek/skylight / push

Method push

tracker/src/vision/tracks.ts:98–111  ·  view source on GitHub ↗
(o: WorldObs)

Source from the content-addressed store, hash-verified

96 }
97
98 push(o: WorldObs): void {
99 this.obs.push(o);
100 if (this.obs.length > MAX_OBS) this.obs.shift();
101 this.hits++;
102 this.lastSeen = o.t;
103 this.emaContrast = this.emaContrast
104 ? this.emaContrast + 0.3 * (o.contrastSigma - this.emaContrast)
105 : o.contrastSigma;
106 if (o.netScore && o.netScore > 0) {
107 this.netHits++;
108 this.netBest = Math.max(this.netBest, o.netScore);
109 this.lastNetAt = o.t;
110 }
111 }
112
113 latest(): WorldObs {
114 return this.obs[this.obs.length - 1];

Callers 15

constructorMethod · 0.95
tracks.test.tsFile · 0.80
runFunction · 0.80
startMethod · 0.80
tickMethod · 0.80
nibblesFunction · 0.80
selectTargetFunction · 0.80
observeMethod · 0.80
addMethod · 0.80
captureMethod · 0.80
visibleBodiesFunction · 0.80

Calls

no outgoing calls

Tested by 2

runFunction · 0.64
describeFunction · 0.64