File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 639639 html,
640640 } ) ) ;
641641 } ;
642+ rtcWs . pushAssets = ( ) => {
643+ const landXrIframe = root . childNodes [ 0 ] ;
644+ const extentXrIframes = _getChildXrIframes ( landXrIframe ) ;
645+ let assetXrIframes = extentXrIframes . map ( extentXrIframe => _getChildXrIframes ( extentXrIframe ) ) ;
646+ assetXrIframes = assetXrIframes . flat ( ) ;
647+ const html = `<xr-site>\n${ assetXrIframes . filter ( xrIframe => ! ! xrIframe . id ) . map ( xrIframe => ' ' + xrIframe . outerHTML ) . join ( '\n' ) } \n</xr-site>\n` ;
648+ rtcWs . send ( JSON . stringify ( {
649+ method : 'setInitialHtml' ,
650+ html,
651+ } ) ) ;
652+ } ;
642653 const pingInterval = setInterval ( ( ) => {
643654 rtcWs . send ( JSON . stringify ( {
644655 method : 'ping' ,
42714282 const p = _connectLand ( ) ;
42724283 _updateTextureDynamic ( ) ;
42734284 await p ;
4285+ rtcWs . pushAssets ( ) ;
42744286 _updateTextureDynamic ( ) ;
42754287 } else if ( id === 'app' && href ) {
42764288 const xrIframe = document . createElement ( 'xr-iframe' ) ;
You can’t perform that action at this time.
0 commit comments