Pārlūkot izejas kodu

Adjustments

customisations
alemart 1 gadu atpakaļ
vecāks
revīzija
0b1467c723
1 mainītis faili ar 9 papildinājumiem un 4 dzēšanām
  1. 9
    4
      src/core/viewport.ts

+ 9
- 4
src/core/viewport.ts Parādīt failu

@@ -166,8 +166,8 @@ class ViewportContainers
166 166
      */
167 167
     release(): void
168 168
     {
169
-        this._container.style.backgroundColor = 'initial';
170
-        this._container.style.touchAction = 'auto';
169
+        this._container.style.removeProperty('background-color');
170
+        this._container.style.removeProperty('touch-action');
171 171
     }
172 172
 }
173 173
 
@@ -215,6 +215,9 @@ class ViewportCanvases
215 215
 
216 216
         parent.appendChild(this._backgroundCanvas);
217 217
         parent.appendChild(this._foregroundCanvas);
218
+
219
+        this._backgroundCanvas.hidden = true;
220
+        this._foregroundCanvas.hidden = true;
218 221
     }
219 222
 
220 223
     /**
@@ -238,6 +241,8 @@ class ViewportCanvases
238 241
      */
239 242
     init(): void
240 243
     {
244
+        this._backgroundCanvas.hidden = false;
245
+        this._foregroundCanvas.hidden = false;
241 246
     }
242 247
 
243 248
     /**
@@ -734,10 +739,10 @@ export class Viewport extends ViewportEventTarget
734 739
     private readonly _containers: ViewportContainers;
735 740
 
736 741
     /** An overlay displayed in front of the augmented scene */
737
-    protected readonly _hud: HUD;
742
+    private readonly _hud: HUD;
738 743
 
739 744
     /** Viewport style */
740
-    protected _style: ViewportStyle;
745
+    private _style: ViewportStyle;
741 746
 
742 747
     /** The canvases of the viewport */
743 748
     private readonly _canvases: ViewportCanvases;

Notiek ielāde…
Atcelt
Saglabāt