Browse Source

Remove the Watermark for now

customisations
alemart 3 months ago
parent
commit
b2f689ab3e
5 changed files with 3 additions and 252 deletions
  1. 0
    1
      docs/api/viewport.md
  2. 1
    15
      plugins/aframe-with-encantar.js
  3. 1
    9
      src/core/hud.ts
  4. 1
    6
      src/core/viewport.ts
  5. 0
    221
      src/ui/watermark.ts

+ 0
- 1
docs/api/viewport.md View File

19
     * `canvas: HTMLCanvasElement, optional`. An existing canvas on which the virtual scene will be drawn. The engine automatically creates a canvas. You should only specify an existing canvas if you must. Experimental.
19
     * `canvas: HTMLCanvasElement, optional`. An existing canvas on which the virtual scene will be drawn. The engine automatically creates a canvas. You should only specify an existing canvas if you must. Experimental.
20
     * `style: string, optional`. The [viewport style](#style). *Since:* 0.3.0
20
     * `style: string, optional`. The [viewport style](#style). *Since:* 0.3.0
21
     * `fullscreenUI: boolean, optional`. Whether or not to include, as a convenience, the built-in fullscreen button on platforms in which the fullscreen mode is [available](#fullscreenavailable). Defaults to `true`. *Since:* 0.3.0
21
     * `fullscreenUI: boolean, optional`. Whether or not to include, as a convenience, the built-in fullscreen button on platforms in which the fullscreen mode is [available](#fullscreenavailable). Defaults to `true`. *Since:* 0.3.0
22
-    * `watermark: boolean, optional`. Whether or not to display the encantar.js watermark and the accompanying about box. *Since:* 0.4.4
23
 
22
 
24
 **Returns**
23
 **Returns**
25
 
24
 

+ 1
- 15
plugins/aframe-with-encantar.js View File

1064
         const scene = this.el.sceneEl;
1064
         const scene = this.el.sceneEl;
1065
         const huds = [];
1065
         const huds = [];
1066
         const fullscreenUI = this.el.components['ar-viewport-fullscreen-ui'];
1066
         const fullscreenUI = this.el.components['ar-viewport-fullscreen-ui'];
1067
-        const watermark = this.el.components['ar-viewport-watermark'];
1068
 
1067
 
1069
         for(const child of this.el.children) {
1068
         for(const child of this.el.children) {
1070
             if(child.components !== undefined) {
1069
             if(child.components !== undefined) {
1089
                 resolution: this.data.resolution,
1088
                 resolution: this.data.resolution,
1090
                 style: this.data.style,
1089
                 style: this.data.style,
1091
             },
1090
             },
1092
-            !fullscreenUI ? {} : { fullscreenUI: fullscreenUI.data.enabled },
1093
-            !watermark ? {} : { watermark: watermark.data.visible }
1091
+            !fullscreenUI ? {} : { fullscreenUI: fullscreenUI.data.enabled }
1094
         ));
1092
         ));
1095
     },
1093
     },
1096
 
1094
 
1104
         'resolution': 'ar-viewport.resolution',
1102
         'resolution': 'ar-viewport.resolution',
1105
         'style': 'ar-viewport.style',
1103
         'style': 'ar-viewport.style',
1106
         'fullscreen-ui': 'ar-viewport-fullscreen-ui',
1104
         'fullscreen-ui': 'ar-viewport-fullscreen-ui',
1107
-        'watermark': 'ar-viewport-watermark'
1108
     }
1105
     }
1109
 });
1106
 });
1110
 
1107
 
1119
 
1116
 
1120
 }));
1117
 }));
1121
 
1118
 
1122
-AFRAME.registerComponent('ar-viewport-watermark', ARComponent({
1123
-
1124
-    schema: {
1125
-
1126
-        /** whether or not to display the encantar.js watermark */
1127
-        'visible': { type: 'boolean', default: true },
1128
-
1129
-    }
1130
-
1131
-}));
1132
-
1133
 /**
1119
 /**
1134
  * AR Heads-Up Display
1120
  * AR Heads-Up Display
1135
  */
1121
  */

+ 1
- 9
src/core/hud.ts View File

23
 import { Viewport } from './viewport';
23
 import { Viewport } from './viewport';
24
 import { StatsPanel } from '../ui/stats-panel';
24
 import { StatsPanel } from '../ui/stats-panel';
25
 import { FullscreenButton } from '../ui/fullscreen-button';
25
 import { FullscreenButton } from '../ui/fullscreen-button';
26
-import { Watermark } from '../ui/watermark';
27
 import { Nullable, Utils } from '../utils/utils';
26
 import { Nullable, Utils } from '../utils/utils';
28
 
27
 
29
 /** HUD container */
28
 /** HUD container */
49
     /** Fullscreen button */
48
     /** Fullscreen button */
50
     #fullscreenButton: FullscreenButton;
49
     #fullscreenButton: FullscreenButton;
51
 
50
 
52
-    /** Watermark */
53
-    #watermark: Watermark;
54
-
55
 
51
 
56
 
52
 
57
 
53
 
85
         // create internal components
81
         // create internal components
86
         this.#statsPanel = new StatsPanel();
82
         this.#statsPanel = new StatsPanel();
87
         this.#fullscreenButton = new FullscreenButton(viewport);
83
         this.#fullscreenButton = new FullscreenButton(viewport);
88
-        this.#watermark = new Watermark();
89
     }
84
     }
90
 
85
 
91
     /**
86
     /**
128
      * @param zIndex the z-index of the container
123
      * @param zIndex the z-index of the container
129
      * @param wantStatsPanel
124
      * @param wantStatsPanel
130
      * @param wantFullscreenButton
125
      * @param wantFullscreenButton
131
-     * @param wantWatermark
132
      * @internal
126
      * @internal
133
      */
127
      */
134
-    _init(zIndex: number, wantStatsPanel: boolean, wantFullscreenButton: boolean, wantWatermark: boolean): void
128
+    _init(zIndex: number, wantStatsPanel: boolean, wantFullscreenButton: boolean): void
135
     {
129
     {
136
         const parent = this._internalContainer;
130
         const parent = this._internalContainer;
137
         this.#statsPanel.init(parent, wantStatsPanel);
131
         this.#statsPanel.init(parent, wantStatsPanel);
138
         this.#fullscreenButton.init(parent, wantFullscreenButton);
132
         this.#fullscreenButton.init(parent, wantFullscreenButton);
139
-        this.#watermark.init(parent, wantWatermark);
140
 
133
 
141
         for(const element of parent.children as any as HTMLElement[]) {
134
         for(const element of parent.children as any as HTMLElement[]) {
142
             if(element.style.getPropertyValue('pointer-events') == '')
135
             if(element.style.getPropertyValue('pointer-events') == '')
164
     {
157
     {
165
         this._visible = false;
158
         this._visible = false;
166
 
159
 
167
-        this.#watermark.release();
168
         this.#fullscreenButton.release();
160
         this.#fullscreenButton.release();
169
         this.#statsPanel.release();
161
         this.#statsPanel.release();
170
 
162
 

+ 1
- 6
src/core/viewport.ts View File

76
 
76
 
77
     /** Whether or not to include the built-in fullscreen button */
77
     /** Whether or not to include the built-in fullscreen button */
78
     fullscreenUI?: boolean;
78
     fullscreenUI?: boolean;
79
-
80
-    /** Whether or not to display the encantar.js watermark */
81
-    watermark?: boolean;
82
 }
79
 }
83
 
80
 
84
 /** Default viewport constructor settings */
81
 /** Default viewport constructor settings */
89
     style: 'best-fit',
86
     style: 'best-fit',
90
     canvas: null,
87
     canvas: null,
91
     fullscreenUI: true,
88
     fullscreenUI: true,
92
-    watermark: true,
93
 };
89
 };
94
 
90
 
95
 
91
 
1231
 
1227
 
1232
         // initialize the HUD
1228
         // initialize the HUD
1233
         const wantFullscreenButton = this.fullscreenAvailable && this._settings.fullscreenUI;
1229
         const wantFullscreenButton = this.fullscreenAvailable && this._settings.fullscreenUI;
1234
-        const wantWatermark = this._settings.watermark;
1235
-        this._hud._init(HUD_ZINDEX, wantStatsPanel, wantFullscreenButton, wantWatermark);
1230
+        this._hud._init(HUD_ZINDEX, wantStatsPanel, wantFullscreenButton);
1236
     }
1231
     }
1237
 
1232
 
1238
     /**
1233
     /**

+ 0
- 221
src/ui/watermark.ts
File diff suppressed because it is too large
View File


Loading…
Cancel
Save