@@ -53,38 +53,24 @@ type State = {
53
53
*/
54
54
export declare class ViroARSceneNavigator extends React . Component < Props , State > {
55
55
_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
- } ;
86
56
constructor ( props : Props ) ;
87
- getRandomTag ( ) : string ;
57
+ private _startVideoRecording ;
58
+ /**
59
+ * Stops recording the video of the Viro Renderer.
60
+ *
61
+ * returns Object w/ success, url and errorCode keys.
62
+ * @returns Promise that resolves when the video has stopped recording.
63
+ */
64
+ private _stopVideoRecording ;
65
+ /**
66
+ * Takes a screenshot of the Viro renderer
67
+ * @param fileName - name of the file (without extension)
68
+ * @param saveToCameraRoll - whether or not the file should also be saved to the camera roll
69
+ * returns Object w/ success, url and errorCode keys.
70
+ */
71
+ private _takeScreenshot ;
72
+ _project ( point : Viro3DPoint ) : Promise < any > ;
73
+ getRandomTag : ( ) => string ;
88
74
/**
89
75
* Pushes a scene and reference it with the given key if provided.
90
76
* If the scene has been previously pushed, we simply show the scene again.
@@ -99,7 +85,7 @@ export declare class ViroARSceneNavigator extends React.Component<Props, State>
99
85
*
100
86
* @todo : use Typescript function overloading rather than this inaccurate solution
101
87
*/
102
- push ( param1 ?: ViroScene | string , param2 ?: ViroScene ) : void ;
88
+ push : ( param1 ?: ViroScene | string , param2 ?: ViroScene ) => void ;
103
89
/**
104
90
* Replace the top scene in the stack with the given scene. The remainder of the back
105
91
* history is kept in the same order as before.
@@ -111,7 +97,7 @@ export declare class ViroARSceneNavigator extends React.Component<Props, State>
111
97
*
112
98
* @todo : use Typescript function overloading rather than this inaccurate solution
113
99
*/
114
- replace ( param1 ?: ViroScene | string , param2 ?: ViroScene ) : void ;
100
+ replace : ( param1 ?: ViroScene | string , param2 ?: ViroScene ) => void ;
115
101
/**
116
102
* Jumps to a given scene that had been previously pushed. If the scene was not pushed, we
117
103
* then push and jump to it. The back history is re-ordered such that jumped to scenes are
@@ -124,44 +110,70 @@ export declare class ViroARSceneNavigator extends React.Component<Props, State>
124
110
*
125
111
* @todo : use Typescript function overloading rather than this inaccurate solution
126
112
*/
127
- jump ( param1 ?: ViroScene | string , param2 ?: ViroScene ) : void ;
128
- pop ( ) : void ;
129
- popN ( n : number ) : void ;
113
+ jump : ( param1 ?: ViroScene | string , param2 ?: ViroScene ) => void ;
114
+ pop : ( ) => void ;
115
+ popN : ( n : number ) => void ;
130
116
/**
131
117
* Increments the reference count for a scene within sceneDictionary that is
132
118
* mapped to the given sceneKey. If no scenes are found / mapped, we create
133
119
* one, initialize it with a reference count of 1, and store it within the
134
120
* sceneDictionary for future reference.
135
121
*/
136
- incrementSceneReference ( scene : ViroScene , sceneKey : string , limitOne : boolean ) : void ;
122
+ incrementSceneReference : ( scene : ViroScene , sceneKey : string , limitOne : boolean ) => void ;
137
123
/**
138
124
* Decrements the reference count for the last N scenes within
139
125
* the sceneHistory by 1. If nothing else references that given scene
140
126
* (counts equals 0), we then remove that scene from sceneDictionary.
141
127
*/
142
- decrementReferenceForLastNScenes ( n : number ) : void ;
128
+ decrementReferenceForLastNScenes : ( n : number ) => void ;
143
129
/**
144
130
* Adds the given sceneKey to the sceneHistory and updates the currentSceneIndex to point
145
131
* to the scene on the top of the history stack (the most recent scene).
146
132
*/
147
- addToHistory ( sceneKey : string ) : void ;
133
+ addToHistory : ( sceneKey : string ) => void ;
148
134
/**
149
135
* Instead of preserving history, we find the last pushed sceneKey within the history stack
150
136
* matching the given sceneKey and re-order it to the front. We then update the
151
137
* currentSceneIndex to point to the scene on the top of the history stack
152
138
* (the most recent scene).
153
139
*/
154
- reorderHistory ( sceneKey : string ) : void ;
140
+ reorderHistory : ( sceneKey : string ) => void ;
155
141
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 [ ] ;
142
+ getSceneIndex : ( sceneTag : string ) => number ;
143
+ private _unproject ;
144
+ private _resetARSession ;
145
+ private _setWorldOrigin ;
146
+ private _renderSceneStackItems ;
147
+ arSceneNavigator : {
148
+ push : ( param1 ?: ViroScene | string , param2 ?: ViroScene ) => void ;
149
+ pop : ( ) => void ;
150
+ popN : ( n : number ) => void ;
151
+ jump : ( param1 ?: ViroScene | string , param2 ?: ViroScene ) => void ;
152
+ replace : ( param1 ?: ViroScene | string , param2 ?: ViroScene ) => void ;
153
+ startVideoRecording : ( fileName : string , saveToCameraRoll : boolean , onError : ( errorCode : number ) => void ) => void ;
154
+ stopVideoRecording : ( ) => Promise < any > ;
155
+ takeScreenshot : ( fileName : string , saveToCameraRoll : boolean ) => Promise < any > ;
156
+ resetARSession : ( resetTracking : any , removeAnchors : any ) => void ;
157
+ setWorldOrigin : ( worldOrigin : ViroWorldOrigin ) => void ;
158
+ project : ( point : Viro3DPoint ) => Promise < any > ;
159
+ unproject : ( point : Viro3DPoint ) => Promise < any > ;
160
+ viroAppProps : any ;
161
+ } ;
162
+ sceneNavigator : {
163
+ push : ( param1 ?: ViroScene | string , param2 ?: ViroScene ) => void ;
164
+ pop : ( ) => void ;
165
+ popN : ( n : number ) => void ;
166
+ jump : ( param1 ?: ViroScene | string , param2 ?: ViroScene ) => void ;
167
+ replace : ( param1 ?: ViroScene | string , param2 ?: ViroScene ) => void ;
168
+ startVideoRecording : ( fileName : string , saveToCameraRoll : boolean , onError : ( errorCode : number ) => void ) => void ;
169
+ stopVideoRecording : ( ) => Promise < any > ;
170
+ takeScreenshot : ( fileName : string , saveToCameraRoll : boolean ) => Promise < any > ;
171
+ resetARSession : ( resetTracking : any , removeAnchors : any ) => void ;
172
+ setWorldOrigin : ( worldOrigin : ViroWorldOrigin ) => void ;
173
+ project : ( point : Viro3DPoint ) => Promise < any > ;
174
+ unproject : ( point : Viro3DPoint ) => Promise < any > ;
175
+ viroAppProps : any ;
176
+ } ;
165
177
render ( ) : JSX . Element ;
166
178
}
167
179
export { } ;
0 commit comments