Selaa lähdekoodia

Rename getter

customisations
alemart 10 kuukautta sitten
vanhempi
commit
b278c5c396

+ 2
- 2
src/core/session.ts Näytä tiedosto

@@ -172,7 +172,7 @@ export class Session extends AREventTarget<SessionEventType>
172 172
         // setup the viewport
173 173
         this._viewport = viewport;
174 174
         if(this._primarySource !== null)
175
-            this._viewport._init(() => this._primarySource!._data.size, mode);
175
+            this._viewport._init(() => this._primarySource!._internalMedia.size, mode);
176 176
         else
177 177
             this._viewport._init(() => Utils.resolution('sm', window.innerWidth / window.innerHeight), mode);
178 178
 
@@ -529,7 +529,7 @@ export class Session extends AREventTarget<SessionEventType>
529 529
      */
530 530
     private _renderUserMedia(): void
531 531
     {
532
-        const media = this._primarySource?._data;
532
+        const media = this._primarySource?._internalMedia;
533 533
         const canvas = this._viewport._backgroundCanvas;
534 534
         const ctx = canvas.getContext('2d', { alpha: false });
535 535
 

+ 1
- 1
src/sources/canvas-source.ts Näytä tiedosto

@@ -64,7 +64,7 @@ export class CanvasSource implements Source
64 64
      * Get media
65 65
      * @internal
66 66
      */
67
-    get _data(): SpeedyMedia
67
+    get _internalMedia(): SpeedyMedia
68 68
     {
69 69
         if(this._media == null)
70 70
             throw new IllegalOperationError(`The media of the source of data isn't loaded`);

+ 1
- 1
src/sources/video-source.ts Näytä tiedosto

@@ -71,7 +71,7 @@ export class VideoSource implements Source
71 71
      * Get media
72 72
      * @internal
73 73
      */
74
-    get _data(): SpeedyMedia
74
+    get _internalMedia(): SpeedyMedia
75 75
     {
76 76
         if(this._media == null)
77 77
             throw new IllegalOperationError(`The media of the source of data isn't loaded`);

+ 1
- 1
src/trackers/image-tracker/image-tracker.ts Näytä tiedosto

@@ -310,7 +310,7 @@ export class ImageTracker extends AREventTarget<ImageTrackerEventType> implement
310 310
 
311 311
         // compute the screen size for image processing purposes
312 312
         // note: this may change over time...!
313
-        const media = this._source!._data;
313
+        const media = this._source!._internalMedia;
314 314
         const aspectRatio = media.width / media.height;
315 315
         const screenSize = Utils.resolution(this._resolution, aspectRatio);
316 316
 

Loading…
Peruuta
Tallenna