Pārlūkot izejas kodu

Make ImageTracker.resolution readonly

customisations
alemart 9 mēnešus atpakaļ
vecāks
revīzija
661e37daaa

+ 3
- 1
docs/api/image-tracker.md Parādīt failu

63
 
63
 
64
 ### resolution
64
 ### resolution
65
 
65
 
66
-`tracker.resolution: Resolution`
66
+`tracker.resolution: Resolution, read-only`
67
 
67
 
68
 The [resolution](resolution.md) adopted by the computer vision algorithms implemented in the tracker. Higher resolutions improve the tracking quality, but are computationally more expensive. Note that this resolution is different from, and should not be larger than, the [resolution of the camera](camera-source.md#resolution)!
68
 The [resolution](resolution.md) adopted by the computer vision algorithms implemented in the tracker. Higher resolutions improve the tracking quality, but are computationally more expensive. Note that this resolution is different from, and should not be larger than, the [resolution of the camera](camera-source.md#resolution)!
69
 
69
 
70
+*Note:* this property is read-only since 0.4.0. Set the resolution when instantiating the tracker.
71
+
70
 ## Events
72
 ## Events
71
 
73
 
72
 An ImageTracker is an [AREventTarget](ar-event-target.md). You can listen to the following events:
74
 An ImageTracker is an [AREventTarget](ar-event-target.md). You can listen to the following events:

+ 5
- 3
src/trackers/image-tracker/image-tracker.ts Parādīt failu

203
     }
203
     }
204
 
204
 
205
     /**
205
     /**
206
-     * Resolution of the AR screen space
206
+     * Resolution of the tracker
207
      */
207
      */
208
     get resolution(): Resolution
208
     get resolution(): Resolution
209
     {
209
     {
211
     }
211
     }
212
 
212
 
213
     /**
213
     /**
214
-     * Resolution of the AR screen space
214
+     * Resolution of the tracker
215
+     * @readonly
215
      */
216
      */
216
     set resolution(resolution: Resolution)
217
     set resolution(resolution: Resolution)
217
     {
218
     {
218
-        this._resolution = resolution;
219
+        // this property is readonly, but this setter has been kept because
220
+        // it wasn't readonly in previous versions of the engine. FIXME
219
     }
221
     }
220
 
222
 
221
     /**
223
     /**

Notiek ielāde…
Atcelt
Saglabāt