Reorganise geometry usage#755
Conversation
…o public/usage-examples/geometry/center_point/center_point-1-example-oop.cs
…l.cs to public/usage-examples/geometry/center_point/center_point-1-example-top-level.cs
…ublic/usage-examples/geometry/center_point/center_point-1-example.cpp
…ublic/usage-examples/geometry/center_point/center_point-1-example.png
…blic/usage-examples/geometry/center_point/center_point-1-example.py
…ublic/usage-examples/geometry/center_point/center_point-1-example.txt
…op-level.cs to public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example-top-level.cs
…pp to public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.cpp
…ng to public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.png
…y to public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.py
…xt to public/usage-examples/geometry/random_portals/random_window_point-1-example.txt
…op.cs to public/usage-examples/geometry/random_portals/random_window_point-1-example-oop.cs
…op-level.cs to public/usage-examples/geometry/random_portals/random_window_point-1-example-top-level.cs
…pp to public/usage-examples/geometry/random_portals/random_window_point-1-example.cpp
…ng to public/usage-examples/geometry/random_portals/random_window_point-1-example.png
…y to public/usage-examples/geometry/random_portals/random_window_point-1-example.py
….zip to public/usage-examples/geometry/random_portals/random_window_point-1-resources.zip
…-example.txt to public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.txt
…-example-oop.cs to public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example-oop.cs
…-example.cpp to public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.cpp
…-example.cs to public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.cs
…-example.png to public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.png
…-example.py to public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.py
…lic/usage-examples/geometry/game_2dpoint/same_point-1-example.txt
…public/usage-examples/geometry/game_2dpoint/same_point-1-example-oop.cs
…cs to public/usage-examples/geometry/game_2dpoint/same_point-1-example-top-level.cs
…lic/usage-examples/geometry/game_2dpoint/same_point-1-example.cpp
…lic/usage-examples/geometry/game_2dpoint/same_point-1-example.png
…ic/usage-examples/geometry/game_2dpoint/same_point-1-example.py
…-example.txt to public/usage-examples/geometry/point_point_angle-1-example.txt
❌ Deploy Preview for splashkit failed.
|
|
This looks like a very large repo structure change. Because it affects a lot of files and folders at once, I think it needs very careful review and probably mentor confirmation before approval. |
222448082Ashen
left a comment
There was a problem hiding this comment.
Description
This PR performs a large-scale reorganization of the geometry usage examples, grouping related files into logical subfolders. It also transitions the documentation build process to a dynamic directory scanner, removing the need for the manual JSON registry. Additionally, a new buoyancy simulation example has been added to the physics category.
Type of change
- New feature (Boat buoyancy example)
- Breaking change (Structural reorganization and infrastructure refactor)
- Documentation (Pathing and organization updates)
How Has This Been Tested?
- Manual verification of folder structure.
- Logic review of
scripts/api-pages-script.cjs. - Awaiting Fix: Identified a pathing bug where nested subfolders are not correctly resolved by the import script.
Checklist
If involving code
- My code follows the style guidelines of this project
- I have performed a self-review of my own code
- I have made corresponding changes to the documentation
If involving Usage Examples
- Example is registered (via new dynamic scanner)
- Title in
.txtfile is a single line - Includes examples for C++, C# (Top-level & OOP), and Python
- Image (.png) or GIF (.gif) output is included
- Files are organized into a subfolder (e.g.,
public/usage-examples/geometry/mouse_click_location/)
If involving structural / repo-wide changes
- Large-scale change: This PR moves dozens of files and replaces the legacy scraping system.
- Verified Pathing: IN PROGRESS (Fixing path resolution in
api-pages-script.cjs). - Mentor Confirmation: Required before merging due to the scale of the structural changes.
himanshigaba22
left a comment
There was a problem hiding this comment.
This is a solid idea, but there is quite a bit to sort out before it can merge. The deploy is failing due to a known pathing issue with nested subfolders not resolving correctly in the import script, so that should be the priority fix. There are also branch conflicts that need to be resolved.
A few specific issues I noticed: closest_point_on_circle-1-example.txt has 2 lines when it should be title only, the ray_circle_intersect folder has a .cs file instead of the required -top-level.cs naming, and the point_point_distance files seem to be scattered across inconsistent folders during the reorganisation.
Since this PR touches 187 files and replaces the JSON registry entirely, I think mentor confirmation is needed before this goes near a merge. The boat_buoyancy example is a nice addition, and the folder structure idea is good overall - it just needs the pathing and naming issues cleaned up first.
Grouped related usage example files into individual folders for better organisation and readability.
Each example now contains its associated files (cpp, cs, py, png, txt) within its own folder.
Tested and confirmed that the website functionality remains unaffected.