Skip to content

possible improvement on rendering #61

@johndpope

Description

@johndpope

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions