File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 35353535
35363536 const moveMesh = _makeMoveMesh ( 'volume' ) ;
35373537 moveMesh . xrIframe = xrIframe ;
3538+ moveMesh . startTime = Date . now ( ) ;
35383539 scene . add ( moveMesh ) ;
35393540 moveMeshes . push ( moveMesh ) ;
35403541 currentMoveMeshes [ controllerIndex ] = moveMesh ;
56325633 } ;
56335634 _updateTrayMeshAnimation ( ) ;
56345635
5636+ const _updateMoveMeshes = ( ) => {
5637+ for ( let i = 0 ; i < moveMeshes . length ; i ++ ) {
5638+ const moveMesh = moveMeshes [ i ] ;
5639+ moveMesh . scale . set ( 1 , 1 , 1 ) ;
5640+ if ( ! moveMesh . xrIframe . loaded ) {
5641+ const f = ( ( Date . now ( ) - moveMesh . startTime ) % 1000 ) / 1000 ;
5642+ const angle = Math . pow ( f , 0.5 ) * Math . PI * 2 ;
5643+ moveMesh . scale . multiplyScalar ( 1 + ( 1 - Math . cos ( angle ) ) * 0.2 ) ;
5644+ }
5645+ }
5646+ } ;
5647+ _updateMoveMeshes ( ) ;
5648+
56355649 const _updateTeleportMeshes = ( ) => {
56365650 for ( let i = 0 ; i < teleportMeshes . length ; i ++ ) {
56375651 teleportMeshes [ i ] . visible = false ;
You can’t perform that action at this time.
0 commit comments