@@ -53,38 +53,43 @@ type State = {
5353 */ 
5454export  declare  class  ViroARSceneNavigator  extends  React . Component < Props ,  State >  { 
5555    _component : ViroNativeRef ; 
56-     arSceneNavigator : { 
57-         push : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
58-         pop : ( )  =>  void ; 
59-         popN : ( n : number )  =>  void ; 
60-         jump : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
61-         replace : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
62-         startVideoRecording : ( fileName : string ,  saveToCameraRoll : boolean ,  onError : ( errorCode : number )  =>  void )  =>  void ; 
63-         stopVideoRecording : ( )  =>  Promise < any > ; 
64-         takeScreenshot : ( fileName : string ,  saveToCameraRoll : boolean )  =>  Promise < any > ; 
65-         resetARSession : ( resetTracking : any ,  removeAnchors : any )  =>  void ; 
66-         setWorldOrigin : ( worldOrigin : ViroWorldOrigin )  =>  void ; 
67-         project : ( point : Viro3DPoint )  =>  Promise < any > ; 
68-         unproject : ( point : Viro3DPoint )  =>  Promise < any > ; 
69-         viroAppProps : any ; 
70-     } ; 
71-     sceneNavigator : { 
72-         push : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
73-         pop : ( )  =>  void ; 
74-         popN : ( n : number )  =>  void ; 
75-         jump : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
76-         replace : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
77-         startVideoRecording : ( fileName : string ,  saveToCameraRoll : boolean ,  onError : ( errorCode : number )  =>  void )  =>  void ; 
78-         stopVideoRecording : ( )  =>  Promise < any > ; 
79-         takeScreenshot : ( fileName : string ,  saveToCameraRoll : boolean )  =>  Promise < any > ; 
80-         resetARSession : ( resetTracking : any ,  removeAnchors : any )  =>  void ; 
81-         setWorldOrigin : ( worldOrigin : ViroWorldOrigin )  =>  void ; 
82-         project : ( point : Viro3DPoint )  =>  Promise < any > ; 
83-         unproject : ( point : Viro3DPoint )  =>  Promise < any > ; 
84-         viroAppProps : any ; 
85-     } ; 
8656    constructor ( props : Props ) ; 
87-     getRandomTag ( ) : string ; 
57+     /** 
58+      * Starts recording video of the Viro renderer and external audio 
59+      * 
60+      * @param  fileName - name of the file (without extension) 
61+      * @param  saveToCameraRoll - whether or not the file should also be saved to the camera roll 
62+      * @param  onError - callback function that accepts an errorCode. 
63+      */ 
64+     _startVideoRecording : ( fileName : string ,  saveToCameraRoll : boolean ,  onError : ( errorCode : number )  =>  void )  =>  void ; 
65+     /** 
66+      * Stops recording the video of the Viro Renderer. 
67+      * 
68+      * returns Object w/ success, url and errorCode keys. 
69+      * @returns  Promise that resolves when the video has stopped recording. 
70+      */ 
71+     _stopVideoRecording : ( )  =>  Promise < any > ; 
72+     /** 
73+      * Takes a screenshot of the Viro renderer 
74+      * 
75+      * @param  fileName - name of the file (without extension) 
76+      * @param  saveToCameraRoll - whether or not the file should also be saved to the camera roll 
77+      * returns Object w/ success, url and errorCode keys. 
78+      */ 
79+     _takeScreenshot : ( fileName : string ,  saveToCameraRoll : boolean )  =>  Promise < any > ; 
80+     /** 
81+      * @todo  document _project 
82+      * 
83+      * @param  point 
84+      * @returns  
85+      */ 
86+     _project ( point : Viro3DPoint ) : Promise < any > ; 
87+     /** 
88+      * Gets a random tag string. 
89+      * 
90+      * @returns  a random tag. 
91+      */ 
92+     getRandomTag : ( )  =>  string ; 
8893    /** 
8994     * Pushes a scene and reference it with the given key if provided. 
9095     * If the scene has been previously pushed, we simply show the scene again. 
@@ -97,9 +102,10 @@ export declare class ViroARSceneNavigator extends React.Component<Props, State>
97102     * push ("sceneKey", scene); 
98103     * push (scene); 
99104     * 
100-      * @todo : use Typescript function overloading rather than this inaccurate solution 
105+      * @todo  use Typescript function overloading rather than this inaccurate solution 
106+      * @todo  document parameters 
101107     */ 
102-     push ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene ) :  void ; 
108+     push :  ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )   =>  void ; 
103109    /** 
104110     * Replace the top scene in the stack with the given scene. The remainder of the back 
105111     * history is kept in the same order as before. 
@@ -109,9 +115,10 @@ export declare class ViroARSceneNavigator extends React.Component<Props, State>
109115     * replace ("sceneKey", scene); 
110116     * replace (scene); 
111117     * 
112-      * @todo : use Typescript function overloading rather than this inaccurate solution 
118+      * @todo  use Typescript function overloading rather than this inaccurate solution 
119+      * @todo  document parameters 
113120     */ 
114-     replace ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene ) :  void ; 
121+     replace :  ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )   =>  void ; 
115122    /** 
116123     * Jumps to a given scene that had been previously pushed. If the scene was not pushed, we 
117124     * then push and jump to it. The back history is re-ordered such that jumped to scenes are 
@@ -122,46 +129,131 @@ export declare class ViroARSceneNavigator extends React.Component<Props, State>
122129     * jump ("sceneKey", scene); 
123130     * jump (scene); 
124131     * 
125-      * @todo : use Typescript function overloading rather than this inaccurate solution 
132+      * @todo  use Typescript function overloading rather than this inaccurate solution 
133+      * @todo  document parameters 
126134     */ 
127-     jump ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene ) : void ; 
128-     pop ( ) : void ; 
129-     popN ( n : number ) : void ; 
135+     jump : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
136+     /** 
137+      * Pop 1 screen from the stack. 
138+      */ 
139+     pop : ( )  =>  void ; 
140+     /** 
141+      * Pop n screens from the stack. 
142+      * 
143+      * @param  n number of scenes to pop 
144+      * @returns  void 
145+      */ 
146+     popN : ( n : number )  =>  void ; 
130147    /** 
131148     * Increments the reference count for a scene within sceneDictionary that is 
132149     * mapped to the given sceneKey. If no scenes are found / mapped, we create 
133150     * one, initialize it with a reference count of 1, and store it within the 
134151     * sceneDictionary for future reference. 
152+      * 
153+      * @todo  TODO: Document parameters. 
135154     */ 
136-     incrementSceneReference ( scene : ViroScene ,  sceneKey : string ,  limitOne : boolean ) :  void ; 
155+     incrementSceneReference :  ( scene : ViroScene ,  sceneKey : string ,  limitOne : boolean )   =>  void ; 
137156    /** 
138157     * Decrements the reference count for the last N scenes within 
139158     * the sceneHistory by 1. If nothing else references that given scene 
140159     * (counts equals 0), we then remove that scene from sceneDictionary. 
160+      * 
161+      * @param  n number to decrement by. 
141162     */ 
142-     decrementReferenceForLastNScenes ( n : number ) :  void ; 
163+     decrementReferenceForLastNScenes :  ( n : number )   =>  void ; 
143164    /** 
144165     * Adds the given sceneKey to the sceneHistory and updates the currentSceneIndex to point 
145166     * to the scene on the top of the history stack (the most recent scene). 
167+      * 
168+      * @param  sceneKey scene to insert into the stack. 
146169     */ 
147-     addToHistory ( sceneKey : string ) :  void ; 
170+     addToHistory :  ( sceneKey : string )   =>  void ; 
148171    /** 
149172     * Instead of preserving history, we find the last pushed sceneKey within the history stack 
150173     * matching the given sceneKey and re-order it to the front. We then update the 
151174     * currentSceneIndex to point to the scene on the top of the history stack 
152175     * (the most recent scene). 
176+      * 
177+      * @param  sceneKey scene to put at the top of the stack. 
178+      */ 
179+     reorderHistory : ( sceneKey : string )  =>  void ; 
180+     /** 
181+      * Pops the history entries by n screens. 
182+      * 
183+      * @param  n number of history entries to pop. 
153184     */ 
154-     reorderHistory ( sceneKey : string ) : void ; 
155185    popHistoryByN ( n : number ) : void ; 
156-     getSceneIndex ( sceneTag : string ) : number ; 
157-     _startVideoRecording ( fileName : string ,  saveToCameraRoll : boolean ,  onError : ( errorCode : number )  =>  void ) : void ; 
158-     _stopVideoRecording ( ) : Promise < any > ; 
159-     _takeScreenshot ( fileName : string ,  saveToCameraRoll : boolean ) : Promise < any > ; 
160-     _project ( point : Viro3DPoint ) : Promise < any > ; 
161-     _unproject ( point : Viro3DPoint ) : Promise < any > ; 
162-     _resetARSession ( resetTracking : any ,  removeAnchors : any ) : void ; 
163-     _setWorldOrigin ( worldOrigin : ViroWorldOrigin ) : void ; 
164-     _renderSceneStackItems ( ) : JSX . Element [ ] ; 
186+     /** 
187+      * Gets the index of a scene by the scene tag. 
188+      * 
189+      * @param  sceneTag tag of the scene 
190+      * @returns  the index of the scene 
191+      */ 
192+     getSceneIndex : ( sceneTag : string )  =>  number ; 
193+     /** 
194+      * TODO: Document _unproject 
195+      * 
196+      * @param  point 
197+      * @returns  
198+      */ 
199+     _unproject : ( point : Viro3DPoint )  =>  Promise < any > ; 
200+     /** 
201+      * [iOS Only] 
202+      * 
203+      * Resets the tracking of the AR session. 
204+      * 
205+      * @param  resetTracking - determines if the tracking should be reset. 
206+      * @param  removeAnchors - determines if the existing anchors should be removed too. 
207+      */ 
208+     _resetARSession : ( resetTracking : any ,  removeAnchors : any )  =>  void ; 
209+     /** 
210+      * [iOS/ARKit 1.5+ Only] 
211+      * 
212+      * Allows the developer to offset the current world orgin 
213+      * by the given transformation matrix. ie. if this is called twice with the 
214+      * position [0, 0, 1], then current world origin will be at [0, 0, 2] from its 
215+      * initial position (it's additive, not meant to replace the existing origin) 
216+      * 
217+      * @param  worldOrigin - a dictionary that can contain a `position` and `rotation` key with an 
218+      *  array containing 3 floats (note: rotation is in degrees). 
219+      */ 
220+     _setWorldOrigin : ( worldOrigin : ViroWorldOrigin )  =>  void ; 
221+     /** 
222+      * Renders the Scene Views in the stack. 
223+      * 
224+      * @returns  Array of rendered Scene views. 
225+      */ 
226+     _renderSceneStackItems : ( )  =>  JSX . Element [ ] ; 
227+     arSceneNavigator : { 
228+         push : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
229+         pop : ( )  =>  void ; 
230+         popN : ( n : number )  =>  void ; 
231+         jump : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
232+         replace : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
233+         startVideoRecording : ( fileName : string ,  saveToCameraRoll : boolean ,  onError : ( errorCode : number )  =>  void )  =>  void ; 
234+         stopVideoRecording : ( )  =>  Promise < any > ; 
235+         takeScreenshot : ( fileName : string ,  saveToCameraRoll : boolean )  =>  Promise < any > ; 
236+         resetARSession : ( resetTracking : any ,  removeAnchors : any )  =>  void ; 
237+         setWorldOrigin : ( worldOrigin : ViroWorldOrigin )  =>  void ; 
238+         project : ( point : Viro3DPoint )  =>  Promise < any > ; 
239+         unproject : ( point : Viro3DPoint )  =>  Promise < any > ; 
240+         viroAppProps : any ; 
241+     } ; 
242+     sceneNavigator : { 
243+         push : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
244+         pop : ( )  =>  void ; 
245+         popN : ( n : number )  =>  void ; 
246+         jump : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
247+         replace : ( param1 ?: ViroScene  |  string ,  param2 ?: ViroScene )  =>  void ; 
248+         startVideoRecording : ( fileName : string ,  saveToCameraRoll : boolean ,  onError : ( errorCode : number )  =>  void )  =>  void ; 
249+         stopVideoRecording : ( )  =>  Promise < any > ; 
250+         takeScreenshot : ( fileName : string ,  saveToCameraRoll : boolean )  =>  Promise < any > ; 
251+         resetARSession : ( resetTracking : any ,  removeAnchors : any )  =>  void ; 
252+         setWorldOrigin : ( worldOrigin : ViroWorldOrigin )  =>  void ; 
253+         project : ( point : Viro3DPoint )  =>  Promise < any > ; 
254+         unproject : ( point : Viro3DPoint )  =>  Promise < any > ; 
255+         viroAppProps : any ; 
256+     } ; 
165257    render ( ) : JSX . Element ; 
166258} 
167259export  { } ; 
0 commit comments