GLTFSceneKit icon indicating copy to clipboard operation
GLTFSceneKit copied to clipboard

run sample code and getting empty blank screen

Open YogeshSDM opened this issue 3 years ago • 2 comments

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 avatar May 27 '22 07:05 YogeshSDM

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

YogeshSDM avatar May 27 '22 09:05 YogeshSDM

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
        }
    }
}

xgkp avatar Jul 19 '22 02:07 xgkp