Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run sample code and getting empty blank screen #63

Open
YogeshSDM opened this issue May 27, 2022 · 2 comments
Open

run sample code and getting empty blank screen #63

YogeshSDM opened this issue May 27, 2022 · 2 comments

Comments

@YogeshSDM
Copy link

I just run sample code and getting empty blank screen.
path for .glb is correct. But still getting blank screen.
See attachment.

I would be appreciated if you help me out

Screenshot 2022-05-27 at 1 17 36 PM

@YogeshSDM
Copy link
Author

some gab files are not showing
dd.zip
dd.zip

@xgkp
Copy link

xgkp commented Jul 19, 2022

import UIKit
import SceneKit
import UIKit
import GLTFSceneKit

class YZGltViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let scnView = SCNView()
        var scene: SCNScene
        do {
            let sceneSource = try GLTFSceneSource(named: "cylinderEngine.glb")
            scene = try sceneSource.scene()
            scnView.scene = scene
            scnView.frame = view.bounds
            scnView.allowsCameraControl = true
            scnView.autoenablesDefaultLighting = true
            view.addSubview(scnView)
        } catch {
            print("\(error.localizedDescription)")
            return
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants