diff --git a/.gitignore b/.gitignore index a672f32..162f817 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ build .DS_Store .gradle gradle-daemon-jvm.properties +*.html .idea .kotlin local.properties diff --git a/AGENTS.md b/AGENTS.md index ed77795..c387552 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -177,3 +177,8 @@ downloadable HTML file with a line-by-line table of the file and its explanations (and, on request, a second version highlighting changes after a fix) — follow the skill in `docs/file-summary.md`. +- Write the result to `docs/.html` (e.g. `docs/RaylibGLView.html`) and + name the file's Git revision in the header. The file is the source of truth — + document the exact revision requested, not the working tree. +- Existing example: `docs/RaylibGLView.html` (single-cube `RaylibGLView.swift`). + diff --git a/components/root/mac/view/RaylibGLView.swift b/components/root/mac/view/RaylibGLView.swift index 998daf6..68d2019 100644 --- a/components/root/mac/view/RaylibGLView.swift +++ b/components/root/mac/view/RaylibGLView.swift @@ -99,13 +99,11 @@ final class RaylibGLNSView: NSOpenGLView { override func reshape() { super.reshape() - updatePixelSize() needsDisplay = true } override func viewDidChangeBackingProperties() { super.viewDidChangeBackingProperties() - updatePixelSize() needsDisplay = true } @@ -125,7 +123,7 @@ final class RaylibGLNSView: NSOpenGLView { let t = Float(CACurrentMediaTime() - startTime) - sr_set_rotation(t * 18.0, t * 60.0, 0.0) + sr_set_rotation(t * 6.0, t * 18.0, 0.0) sr_render() diff --git a/docs/file-summary.md b/docs/file-summary.md index f5345ec..78cfec4 100644 --- a/docs/file-summary.md +++ b/docs/file-summary.md @@ -4,6 +4,14 @@ This document describes preparing a self-contained HTML file for studying source code in a browser: a line-by-line table with explanations and, if needed, a separate version after the code has been changed. +## Output file + +1. Write the result to `docs/.html`, named after the source file + it documents (for example `docs/RaylibGLView.html` for `RaylibGLView.swift`). +2. The document is the source of truth for the revision it names: capture the + file at the exact Git revision requested and record that revision in the + header, rather than documenting the current working tree. + ## Source code and explanations 1. Use the exact version of the file the user requested. For the version prior to