@@ -36,7 +36,7 @@ const EngineScreen: FunctionComponent<ViewProps> = (props: ViewProps) => {
3636 ( scene . activeCamera as ArcRotateCamera ) . beta -= Math . PI / 8 ;
3737 setCamera ( scene . activeCamera ! ) ;
3838 scene . createDefaultLight ( true ) ;
39- const rootNode = new TransformNode ( " Root Container" , scene ) ;
39+ const rootNode = new TransformNode ( ' Root Container' , scene ) ;
4040 setRootNode ( rootNode ) ;
4141
4242 const deviceSourceManager = new DeviceSourceManager ( engine ) ;
@@ -63,7 +63,7 @@ const EngineScreen: FunctionComponent<ViewProps> = (props: ViewProps) => {
6363 }
6464 } ) ;
6565
66- const transformContainer = new TransformNode ( " Transform Container" , scene ) ;
66+ const transformContainer = new TransformNode ( ' Transform Container' , scene ) ;
6767 transformContainer . parent = rootNode ;
6868 transformContainer . scaling . scaleInPlace ( 0.2 ) ;
6969 transformContainer . position . y -= .2 ;
@@ -72,7 +72,7 @@ const EngineScreen: FunctionComponent<ViewProps> = (props: ViewProps) => {
7272 transformContainer . rotate ( Vector3 . Up ( ) , 0.005 * scene . getAnimationRatio ( ) ) ;
7373 } ;
7474
75- SceneLoader . ImportMeshAsync ( "" , " https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/BoxAnimated/glTF-Binary/BoxAnimated.glb" ) . then ( result => {
75+ SceneLoader . ImportMeshAsync ( '' , ' https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/BoxAnimated/glTF-Binary/BoxAnimated.glb' ) . then ( result => {
7676 const mesh = result . meshes [ 0 ] ;
7777 mesh . parent = transformContainer ;
7878 } ) ;
@@ -86,7 +86,7 @@ const EngineScreen: FunctionComponent<ViewProps> = (props: ViewProps) => {
8686 } , [ rootNode , scale ] ) ;
8787
8888 const trackingStateToString = ( trackingState : WebXRTrackingState | undefined ) : string => {
89- return trackingState === undefined ? "" : WebXRTrackingState [ trackingState ] ;
89+ return trackingState === undefined ? '' : WebXRTrackingState [ trackingState ] ;
9090 } ;
9191
9292 const onToggleXr = useCallback ( ( ) => {
@@ -96,7 +96,7 @@ const EngineScreen: FunctionComponent<ViewProps> = (props: ViewProps) => {
9696 } else {
9797 if ( rootNode !== undefined && scene !== undefined ) {
9898 const xr = await scene . createDefaultXRExperienceAsync ( { disableDefaultUI : true , disableTeleportation : true } )
99- const session = await xr . baseExperience . enterXRAsync ( " immersive-ar" , " unbounded" , xr . renderTarget ) ;
99+ const session = await xr . baseExperience . enterXRAsync ( ' immersive-ar' , ' unbounded' , xr . renderTarget ) ;
100100 setXrSession ( session ) ;
101101 session . onXRSessionEnded . add ( ( ) => {
102102 setXrSession ( undefined ) ;
@@ -124,24 +124,24 @@ const EngineScreen: FunctionComponent<ViewProps> = (props: ViewProps) => {
124124
125125 const onSnapshot = useCallback ( async ( ) => {
126126 if ( engineViewCallbacks ) {
127- setSnapshotData ( " data:image/jpeg;base64," + await engineViewCallbacks . takeSnapshot ( ) ) ;
127+ setSnapshotData ( ' data:image/jpeg;base64,' + await engineViewCallbacks . takeSnapshot ( ) ) ;
128128 }
129129 } , [ engineViewCallbacks ] ) ;
130130
131131 return (
132132 < >
133133 < View style = { props . style } >
134134 < Button title = "Toggle EngineView" onPress = { ( ) => { setToggleView ( ! toggleView ) } } />
135- < Button title = { xrSession ? " Stop XR" : " Start XR" } onPress = { onToggleXr } />
135+ < Button title = { xrSession ? ' Stop XR' : ' Start XR' } onPress = { onToggleXr } />
136136 { ! toggleView &&
137137 < View style = { { flex : 1 } } >
138138 { enableSnapshots &&
139139 < View style = { { flex : 1 } } >
140- < Button title = { " Take Snapshot" } onPress = { onSnapshot } />
140+ < Button title = { ' Take Snapshot' } onPress = { onSnapshot } />
141141 < Image style = { { flex : 1 } } source = { { uri : snapshotData } } />
142142 </ View >
143143 }
144- < EngineView style = { props . style } camera = { camera } onInitialized = { onInitialized } />
144+ < EngineView camera = { camera } onInitialized = { onInitialized } />
145145 < Slider style = { { position : 'absolute' , minHeight : 50 , margin : 10 , left : 0 , right : 0 , bottom : 0 } } minimumValue = { 0.2 } maximumValue = { 2 } step = { 0.01 } value = { defaultScale } onValueChange = { setScale } />
146146 < Text style = { { fontSize : 12 , color : 'yellow' , position : 'absolute' , margin : 10 } } > { trackingStateToString ( trackingState ) } </ Text >
147147 </ View >
@@ -163,7 +163,7 @@ const App = () => {
163163 return (
164164 < >
165165 < StatusBar barStyle = "dark-content" />
166- < SafeAreaView style = { { flex : 1 , backgroundColor : " white" } } >
166+ < SafeAreaView style = { { flex : 1 , backgroundColor : ' white' } } >
167167 { ! toggleScreen &&
168168 < EngineScreen style = { { flex : 1 } } />
169169 }
@@ -173,7 +173,7 @@ const App = () => {
173173 < Text style = { { fontSize : 12 } } > Engine has been disposed, and will be recreated.</ Text >
174174 </ View >
175175 }
176- < Button title = "Toggle EngineScreen" onPress = { ( ) => { setToggleScreen ( ! toggleScreen ) } } />
176+ < Button title = "Toggle EngineScreen" onPress = { ( ) => { setToggleScreen ( ! toggleScreen ) ; } } />
177177 </ SafeAreaView >
178178 </ >
179179 ) ;
0 commit comments