Browse Source

Change the implementation of Frame.results

customisations
alemart 11 months ago
parent
commit
675c8244a3
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      src/core/frame.ts

+ 4
- 3
src/core/frame.ts View File

58
     private readonly _session: Session;
58
     private readonly _session: Session;
59
 
59
 
60
     /** Results of all trackers (in the current frame) */
60
     /** Results of all trackers (in the current frame) */
61
-    private readonly _results: IterableTrackerResults;
61
+    private readonly _results: TrackerResult[];
62
 
62
 
63
 
63
 
64
 
64
 
70
     constructor(session: Session, results: TrackerResult[])
70
     constructor(session: Session, results: TrackerResult[])
71
     {
71
     {
72
         this._session = session;
72
         this._session = session;
73
-        this._results = new IterableTrackerResults(results);
73
+        this._results = results;
74
     }
74
     }
75
 
75
 
76
     /**
76
     /**
86
      */
86
      */
87
     get results(): Iterable<TrackerResult>
87
     get results(): Iterable<TrackerResult>
88
     {
88
     {
89
-        return this._results;
89
+        // we want to be able to iterate over the results of a frame multiple times
90
+        return new IterableTrackerResults(this._results);
90
     }
91
     }
91
 }
92
 }

Loading…
Cancel
Save