File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ a:hover {
426426 }
427427
428428 # satellite {
429- transform : translate (145 px , -2px ); /* max right: 160+145=305px < 320px */
429+ transform : translate (165 px , -2px ); /* orbit > Earth radius (150px); right: 160+165=325px, within 360px+ viewports */
430430 }
431431
432432 # comet {
@@ -451,7 +451,7 @@ a:hover {
451451 }
452452
453453 # satellite {
454- transform : translate (128 px , -2px ); /* max right: 150+128=278px < 300px */
454+ transform : translate (155 px , -2px ); /* orbit > Earth radius (140px); right: 150+155=305px, within 360px viewports */
455455 }
456456
457457 # comet {
Original file line number Diff line number Diff line change @@ -169,8 +169,11 @@ <h1>Pyotr Void</h1>
169169 var ey = cRect . top - wRect . top + cRect . height / 2 ;
170170 var er = cRect . width / 2 ;
171171
172- var angle = ( Math . random ( ) * 140 - 70 ) * Math . PI / 180 ;
173172 var dist = er * 1.45 + Math . random ( ) * er * 0.15 ;
173+ var skyR = el . offsetWidth / 2 || 32 ;
174+ var maxX = wRect . width / 2 - skyR - 8 ;
175+ var maxAngle = Math . min ( 70 * Math . PI / 180 , Math . asin ( Math . min ( 0.99 , maxX / dist ) ) ) ;
176+ var angle = ( Math . random ( ) * 2 - 1 ) * maxAngle ;
174177 var x = ex + dist * Math . sin ( angle ) ;
175178 var y = ey - dist * Math . cos ( angle ) ;
176179
You can’t perform that action at this time.
0 commit comments