This commit is contained in:
Михаил Капелько committed 2026-10-19 06:35:18 +03:00
1 parent 0010ef00a6
commit fbea0673c1
7 files changed
+26 -22

No files matched your search

+8 -4
View File
@@ -44,10 +44,12 @@ game/ver-mac/ macOS app (SPM executable target "ogs-mahjong")
AppDelegate.swift Creates RootComponent + RootVM, calls root.setup()
dialect.swift GENERATED — do not hand-edit (see chicken-egg below)
other/other.swift -> symlink components/other/other.swift
render/renderConstShader.swift -> symlink components/render/renderConstShader.swift
render/view/RenderGLView.swift -> symlink components/render/mac/view/RenderGLView.swift
render/view/RenderView.swift -> symlink components/render/mac/view/RenderView.swift
root/root.swift -> symlink components/root/root.swift
root/rootVM.swift -> symlink components/root/rootVM.swift
root/view/RootView.swift-> symlink components/root/mac/view/RootView.swift
root/view/RaylibGLView.swift -> symlink components/root/mac/view/RaylibGLView.swift
ref/swiftraylib Symlink to ../../swiftraylib — the raylib/SwiftUI
renderer sample the game will use for 3D rendering.
@@ -71,10 +73,12 @@ directories whose files are **relative symlinks** back into `components/`:
```
src/other/other.swift -> ../../../../components/other/other.swift (4 up)
src/render/renderConstShader.swift -> ../../../../components/render/renderConstShader.swift (4 up)
src/root/root.swift -> ../../../../components/root/root.swift (4 up)
src/root/rootVM.swift -> ../../../../components/root/rootVM.swift (4 up)
src/root/view/RootView.swift-> ../../../../../components/root/mac/view/RootView.swift (5 up)
src/root/view/RaylibGLView.swift -> ../../../../../components/root/mac/view/RaylibGLView.swift (5 up)
src/render/view/RenderGLView.swift -> ../../../../../components/render/mac/view/RenderGLView.swift (5 up)
src/render/view/RenderView.swift -> ../../../../../components/render/mac/view/RenderView.swift (5 up)
```
SPM silently **skips** a dangling symlink (no error), so after moving
@@ -108,8 +112,8 @@ The 3D scene links against Homebrew **raylib** (`brew install raylib`). The
`RaylibBridge` C target and the link step read `RAYLIB_PREFIX` (default
`/opt/homebrew`); `util/step/buildMac` auto-detects it via `brew --prefix raylib`.
The bridge renders with raylib's rlgl layer into an `NSOpenGLView` — raylib never
creates its own window. `RootView` puts `RaylibGLView` behind the SwiftUI UI in a
`ZStack`. A textured cube is drawn from `Resources/assets` (`cube.gltf` +
creates its own window. `RootView` puts `RenderView` (backed by `RenderGLView`)
behind the SwiftUI UI in a `ZStack`. A textured cube is drawn from `Resources/assets` (`cube.gltf` +
`cube_texture.png`); the app rotates it each frame via `sr_set_rotation`.
(raylib's `LoadModelAnimations` only handles *skinned* meshes, so a plain
node-rotation glTF animation cannot be played by the renderer — hence the cube is