Ver código fonte

Use named import

customisations
alemart 7 meses atrás
pai
commit
a91142a474
4 arquivos alterados com 5 adições e 5 exclusões
  1. 2
    2
      esbuild.mjs
  2. 1
    1
      src/core/viewport.ts
  3. 1
    1
      src/main.ts
  4. 1
    1
      src/ui/stats-panel.ts

+ 2
- 2
esbuild.mjs Ver arquivo

@@ -10,9 +10,9 @@ const minify = (argv.indexOf('--minify') >= 0);
10 10
 const serve = (argv.indexOf('--serve') >= 0);
11 11
 
12 12
 const options = {
13
-    //entryPoints: ['src/main.ts'], // AR.default
13
+    //entryPoints: ['src/main.ts'], // AR.AR
14 14
     stdin: {
15
-        contents: 'import AR from "./main.ts";\nmodule.exports = AR;',
15
+        contents: 'import { AR } from "./main.ts";\nmodule.exports = AR;',
16 16
         resolveDir: 'src',
17 17
         sourcefile: 'index.ts',
18 18
     },

+ 1
- 1
src/core/viewport.ts Ver arquivo

@@ -20,7 +20,7 @@
20 20
  * Viewport
21 21
  */
22 22
 
23
-import AR from '../main';
23
+import { AR } from '../main';
24 24
 import Speedy from 'speedy-vision';
25 25
 import { SpeedySize } from 'speedy-vision/types/core/speedy-size';
26 26
 import { SpeedyPromise } from 'speedy-vision/types/core/speedy-promise';

+ 1
- 1
src/main.ts Ver arquivo

@@ -37,7 +37,7 @@ declare const __AR_WEBSITE__: string;
37 37
 /**
38 38
  * GPU-accelerated Augmented Reality for the web
39 39
  */
40
-export default class AR
40
+export class AR
41 41
 {
42 42
     /**
43 43
      * Start a new session

+ 1
- 1
src/ui/stats-panel.ts Ver arquivo

@@ -26,7 +26,7 @@ import { Viewport } from '../core/viewport';
26 26
 import { Tracker } from '../trackers/tracker';
27 27
 import { Source } from '../sources/source';
28 28
 import { Nullable } from '../utils/utils';
29
-import AR from '../main';
29
+import { AR } from '../main';
30 30
 
31 31
 
32 32
 /** Update interval, in ms */

Carregando…
Cancelar
Salvar