Pārlūkot izejas kodu

Update plugins

customisations
alemart 8 mēnešus atpakaļ
vecāks
revīzija
f6dedda8e5
2 mainītis faili ar 5 papildinājumiem un 15 dzēšanām
  1. 2
    7
      plugins/babylon-with-encantar.js
  2. 3
    8
      plugins/three-with-encantar.js

+ 2
- 7
plugins/babylon-with-encantar.js Parādīt failu

@@ -28,21 +28,18 @@ class ARDemo
28 28
     /**
29 29
      * Initialization
30 30
      * @returns {void | Promise<void> | SpeedyPromise<void>}
31
-     * @abstract
32 31
      */
33 32
     init()
34 33
     {
35
-        throw new Error('Abstract method');
34
+        return Promise.resolve();
36 35
     }
37 36
 
38 37
     /**
39
-     * Animation loop
38
+     * Animation step
40 39
      * @returns {void}
41
-     * @abstract
42 40
      */
43 41
     update()
44 42
     {
45
-        throw new Error('Abstract method');
46 43
     }
47 44
 
48 45
     /**
@@ -51,7 +48,6 @@ class ARDemo
51 48
      */
52 49
     release()
53 50
     {
54
-        // optional implementation
55 51
     }
56 52
 
57 53
     /**
@@ -60,7 +56,6 @@ class ARDemo
60 56
      */
61 57
     preload()
62 58
     {
63
-        // optional implementation
64 59
         return Promise.resolve();
65 60
     }
66 61
 

+ 3
- 8
plugins/three-with-encantar.js Parādīt failu

@@ -17,8 +17,8 @@ class ARDemo
17 17
 {
18 18
     /**
19 19
      * Start the AR session
20
-     * @abstract
21 20
      * @returns {Promise<Session> | SpeedyPromise<Session>}
21
+     * @abstract
22 22
      */
23 23
     startSession()
24 24
     {
@@ -28,21 +28,18 @@ class ARDemo
28 28
     /**
29 29
      * Initialization
30 30
      * @returns {void | Promise<void> | SpeedyPromise<void>}
31
-     * @abstract
32 31
      */
33 32
     init()
34 33
     {
35
-        throw new Error('Abstract method');
34
+        return Promise.resolve();
36 35
     }
37 36
 
38 37
     /**
39
-     * Animation loop
38
+     * Animation step
40 39
      * @returns {void}
41
-     * @abstract
42 40
      */
43 41
     update()
44 42
     {
45
-        throw new Error('Abstract method');
46 43
     }
47 44
 
48 45
     /**
@@ -51,7 +48,6 @@ class ARDemo
51 48
      */
52 49
     release()
53 50
     {
54
-        // optional implementation
55 51
     }
56 52
 
57 53
     /**
@@ -60,7 +56,6 @@ class ARDemo
60 56
      */
61 57
     preload()
62 58
     {
63
-        // optional implementation
64 59
         return Promise.resolve();
65 60
     }
66 61
 

Notiek ielāde…
Atcelt
Saglabāt