<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ashwin</title>
    <description>The latest articles on DEV Community by Ashwin (@ashwin_c717a8fe8e72bd4541).</description>
    <link>https://dev.to/ashwin_c717a8fe8e72bd4541</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3056658%2Fdc034032-31dc-42b5-900b-733e285046b3.jpeg</url>
      <title>DEV Community: Ashwin</title>
      <link>https://dev.to/ashwin_c717a8fe8e72bd4541</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ashwin_c717a8fe8e72bd4541"/>
    <language>en</language>
    <item>
      <title>I built a 3D globe where you can dig straight through the Earth</title>
      <dc:creator>Ashwin</dc:creator>
      <pubDate>Tue, 20 Oct 2026 10:12:18 +0000</pubDate>
      <link>https://dev.to/ashwin_c717a8fe8e72bd4541/i-built-a-3d-globe-where-you-can-dig-straight-through-the-earth-19p</link>
      <guid>https://dev.to/ashwin_c717a8fe8e72bd4541/i-built-a-3d-globe-where-you-can-dig-straight-through-the-earth-19p</guid>
      <description>&lt;p&gt;I've been building a browser globe called Planet-X on my own. It has live radio, TV and webcams for every country. But the feature people keep coming back to is one I almost didn't ship.&lt;/p&gt;

&lt;p&gt;It's called Dig. You pick a spot, dig straight down, and the camera shows you where you'd come out on the other side of the Earth. Try it: &lt;a href="https://planet-x.world/dig" rel="noopener noreferrer"&gt;https://planet-x.world/dig&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most people come out in the ocean. If you want dry land, dig from Spain and you'll end up in New Zealand.&lt;/p&gt;

&lt;h2&gt;
  
  
  The math is almost nothing
&lt;/h2&gt;

&lt;p&gt;The point opposite you is your antipode. Flip the latitude and shift the longitude by 180°:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;antipode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lng&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;lat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;lat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;lng&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;lng&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;lng&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;lng&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;antipode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;40.4168&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;3.7038&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Madrid → { lat: -40.4168, lng: 176.2962 }, on New Zealand's North Island&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function was never the hard part. The hard part was the camera move into the ground, so it feels like one motion and not a teleport. I replaced a simple damped fly-to with a planned zoom-and-pan path (van Wijk &amp;amp; Nuij), and the globe stopped feeling like a map viewer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the launch taught me
&lt;/h2&gt;

&lt;p&gt;I posted on Product Hunt and asked for unflattering feedback. Two comments changed what I did next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Someone tapped a shared link and hit a login screen, even though exploring never needs an account. I removed it. A broken first impression costs more than a missing feature.&lt;/li&gt;
&lt;li&gt;Someone said it took a while to understand what "dig to the other side" meant. A clever name doesn't help if people don't get it in two seconds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have about ten other features (Guess Where, a daily World Question, buried secrets you can only find by digging). My takeaway is that the hard job isn't building them. It's making the first ten seconds obvious.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;p&gt;Three.js, Vercel and Supabase. Radio comes from the community-run &lt;a href="https://www.radio-browser.info/" rel="noopener noreferrer"&gt;Radio Browser&lt;/a&gt; directory, and I only show stations that are working and stream securely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two questions for you
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What confused you first?&lt;/li&gt;
&lt;li&gt;Where did you come out? I'm curious how many of you landed on land.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;👉 &lt;a href="https://planet-x.world/?ref=devto" rel="noopener noreferrer"&gt;https://planet-x.world/?ref=devto&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>threejs</category>
    </item>
  </channel>
</rss>
