From 5c93de77645c382ee9b8a7fbe7fd7dbb03636aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Mon, 19 Oct 2026 18:13:27 +0300 Subject: [PATCH] smaller --- components/render/mac/view/RenderGLView.swift | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/components/render/mac/view/RenderGLView.swift b/components/render/mac/view/RenderGLView.swift index f39b791..46f05e5 100644 --- a/components/render/mac/view/RenderGLView.swift +++ b/components/render/mac/view/RenderGLView.swift @@ -42,30 +42,10 @@ final class RenderGLView: NSOpenGLView { } private func loadModel() { - var paths: [String] = [] - - if let resources = Bundle.main.resourceURL { - print("ИГР RenderGV.loadM-1 resources: '\(resources.path)'") - paths.append(resources.appendingPathComponent("assets/cube.gltf").path) - } - - let cwd = FileManager.default.currentDirectoryPath - paths.append("\(cwd)/assets/cube.gltf") - print("ИГР RenderGV.loadM-2 cwd: '\(cwd)'") - - if let exe = Bundle.main.executableURL { - let dir = exe.deletingLastPathComponent() - print("ИГР RenderGV.loadM-2 exedir: '\(dir)'") - paths.append(dir.appendingPathComponent("assets/cube.gltf").path) - } - - for path in paths { - print("ИГР RenderGV.loadM-10 path: '\(path)'") - if FileManager.default.fileExists(atPath: path) { - print("ИГР RenderGV.loadM-11 load") - sr_load_model(path) - return - } + guard let resources = Bundle.main.resourceURL else { return } + let path = resources.appendingPathComponent("assets/cube.gltf").path + if FileManager.default.fileExists(atPath: path) { + sr_load_model(path) } }