som
This commit is contained in:
1 parent
fab65fb5ad
commit
813490c0ea
1 file changed
+4
-8
@@ -42,13 +42,6 @@ final class RenderGLView: NSOpenGLView {
|
||||
}
|
||||
|
||||
private func loadModel() {
|
||||
for path in modelCandidates() where FileManager.default.fileExists(atPath: path) {
|
||||
sr_load_model(path)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
private func modelCandidates() -> [String] {
|
||||
var paths: [String] = []
|
||||
|
||||
if let resources = Bundle.main.resourceURL {
|
||||
@@ -63,7 +56,10 @@ final class RenderGLView: NSOpenGLView {
|
||||
paths.append(dir.appendingPathComponent("assets/cube.gltf").path)
|
||||
}
|
||||
|
||||
return paths
|
||||
for path in paths where FileManager.default.fileExists(atPath: path) {
|
||||
sr_load_model(path)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
override func reshape() {
|
||||
|
||||
Reference in new issue
Block a user