Giter Site home page Giter Site logo

swiftglobe's Introduction

SwiftGlobe

An interactive 3D globe in SceneKit for iOS, watchOS, tvOS, and MacOS X. Built in Swift 5 with XCode 11.4.

Requires iOS 11, tvOS 11, macOS 10.13 (High Sierra)

Screenshot on iOSScreenshot on Apple WatchScreenshot on MacOS XScreenshot on tvOS

Features

  • Targets for macOS, iOS, & tvOS
  • Visual quality
    • mountains cast shadows (implemented with a normal map)
    • water is reflecty, land is matte (implemented with metalness & roughness maps)
    • detailed milkyway in the background
    • use high-quality earth texture on macOS (looks great on retina displays, even when zoomed in)
  • Accurate modeling
    • earth's axis varies by the current day of the year (north pole gets more sun in the summer, less in the winter)
    • tilt the milkyway relative to the solar system's orbital plane
  • Interactive
    • support pan & zoom gestures
    • support tvOS remote, too (pan & zoom)
    • glowing dots for markers

TODOs

In no particular order:

  • Add AR target (for iPhone/iPad)
    • babystep: Add target, with automatic globe placement. (done but glitchy)
    • Add placement tracking & lock feedback
  • Add Apple Watch support, using SwiftUI
    • use small textures
    • handle pan & crown-zoom events (nb: no pinch gesture on the watch!)
    • NB: integrating the globe into your own app will take a little work: e.g. the gesture & crown behavior must be handled in your InterfaceController
  • show city lights on darkside (shader modifier)
  • align globe up&down along the natural axis (or optionally along the day/night terminator instead)
  • Use current day-of-year to compute accurate seasonal tilt
  • add point-to-point connection visualization
  • cubemap for earth texture (fix slight smearing at poles)
  • fix normal map 'dimple' at the north pole
  • add an orbiting moon
  • support scrollwheel zoom on Mac
  • Support new Apple TV 'Siri Remote' (introduced Oct 2015)
  • Support new Apple TV game controllers (new in tvOS 13.0, Sept 2019)
    • Sony DualShock

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

swiftglobe's People

Contributors

dmojdehi avatar

Stargazers

Kaishin R. avatar Ravi avatar Meiwin avatar r3econ avatar Paul Wong avatar ramazan demir avatar  avatar vanyuan avatar André Løfaldli avatar Liam Ronan avatar anthonioez avatar beforeold avatar Frederick Pietschmann avatar Mattias Holm avatar  avatar Maksym Gontar avatar  avatar Tim Kersey avatar Miguel de Icaza avatar  avatar Yi Wang avatar Sergey Minakov avatar Dan Burkhardt avatar Brook avatar Riccardo Persello avatar Dmitry Starkov avatar  avatar Yu Gao avatar Michael Stebel avatar @herrhelms avatar Pho Hale avatar Joe Barbour avatar Mark Thomas avatar  avatar  avatar Raymond Pittman avatar  avatar  avatar Serhii Londar avatar Pavel Lyskov avatar Jinya avatar luohaoyuan avatar ritchie avatar  avatar MohsinAli avatar Jake Rockland avatar yutoji avatar  avatar John D. Pope avatar Max Zou avatar  avatar

Watchers

 avatar MohsinAli avatar

swiftglobe's Issues

not an issue - pointOfView + Arkit

I've been working on a solar system with ARKit
https://github.com/johndpope/solarSystem-1
it's leveraging someone else's code base.

My updates are all mostly a bin job - just using to extend understanding before porting updates to
https://github.com/ThumbWorks/AugmentedSolarSystem

I'm stuck on getting the earth as the pointOfView as per you app - and having the celestial bodies spin around them in conjunction with ARKit. I wonder if you had any desire to extend app to support ARKit? I'm looking to create a geocentric point of view of universe. the camera angle would ideally be street view where by the planets match up to their corresponding positions in real life.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.