AugmentedSolarSystem icon indicating copy to clipboard operation
AugmentedSolarSystem copied to clipboard

possible improvement on rendering

Open johndpope opened this issue 7 years ago • 0 comments

in this method - func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) { (this is called 60 x / second)

so check that a second has incremented before calculating changes to position.

func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) {
    guard let cameraNode = sceneView.pointOfView else {
        print("we got an update but we don't have a camera. No distance calculations can happen")
        return
    }
     
     let delta = (time - startTime) * 60 * 60 * 24
    //maybe as simple as if 
     if delta < 1 return

fyi - I'm making some progress with celestial sphere. screen shot 2018-02-19 at 4 55 08 pm

johndpope avatar Feb 19 '18 21:02 johndpope