Skip to content

Commit 847c26b

Browse files
committed
Rename shapes examples for consistency (bevyengine#6082)
# Objective I was about to submit a PR to add these two examples to `bevy-website` and re-discovered the inconsistency. Although it's not a major issue on the website where only the filenames are shown, this would help to visually distinguish the two examples in the list because the names are very prominent. This also helps out when fuzzy-searching the codebase for these files. ## Solution Rename `shapes` to `2d_shapes`. Now the filename matches the example name, and the naming structure matches the 3d example. ## Notes @Nilirad proposed this in bevyengine#4613 (comment) but it had slipped away from my brain at that time.
1 parent 481eec2 commit 847c26b

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

.github/workflows/validation-jobs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- uses: actions-rs/toolchain@v1
4242
with:
4343
toolchain: stable
44-
44+
4545
- uses: actions/cache@v3
4646
with:
4747
path: |
@@ -51,13 +51,13 @@ jobs:
5151
~/.cargo/git/db/
5252
target/
5353
key: ${{ runner.os }}-cargo-build-android-${{ hashFiles('**/Cargo.toml') }}
54-
54+
5555
- name: Install Android targets
5656
run: rustup target add aarch64-linux-android armv7-linux-androideabi
57-
57+
5858
- name: Install Cargo APK
5959
run: cargo install --force cargo-apk
60-
60+
6161
- name: Build APK
6262
run: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME cargo apk build --example android_example
6363

@@ -147,7 +147,7 @@ jobs:
147147
# start a webserver
148148
python3 -m http.server --directory examples/wasm &
149149
150-
xvfb-run cargo run -p build-wasm-example -- --browsers chromium --browsers firefox --frames 25 --test shapes lighting text_debug breakout
150+
xvfb-run cargo run -p build-wasm-example -- --browsers chromium --browsers firefox --frames 25 --test 2d_shapes lighting text_debug breakout
151151
152152
- name: Save screenshots
153153
uses: actions/upload-artifact@v3

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ category = "2D Rendering"
193193
wasm = true
194194

195195
[[example]]
196-
name = "shapes"
197-
path = "examples/2d/shapes.rs"
196+
name = "2d_shapes"
197+
path = "examples/2d/2d_shapes.rs"
198198

199-
[package.metadata.example.shapes]
200-
name = "Shapes"
199+
[package.metadata.example.2d_shapes]
200+
name = "2D Shapes"
201201
description = "Renders a rectangle, circle, and hexagon"
202202
category = "2D Rendering"
203203
wasm = true
@@ -275,7 +275,7 @@ wasm = true
275275

276276
[[example]]
277277
name = "3d_shapes"
278-
path = "examples/3d/shapes.rs"
278+
path = "examples/3d/3d_shapes.rs"
279279

280280
[package.metadata.example.3d_shapes]
281281
name = "3D Shapes"
File renamed without changes.
File renamed without changes.

examples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ Example | Description
8888
Example | Description
8989
--- | ---
9090
[2D Rotation](../examples/2d/rotation.rs) | Demonstrates rotating entities in 2D with quaternions
91+
[2D Shapes](../examples/2d/2d_shapes.rs) | Renders a rectangle, circle, and hexagon
9192
[Manual Mesh 2D](../examples/2d/mesh2d_manual.rs) | Renders a custom mesh "manually" with "mid-level" renderer apis
9293
[Mesh 2D](../examples/2d/mesh2d.rs) | Renders a 2d mesh
9394
[Mesh 2D With Vertex Colors](../examples/2d/mesh2d_vertex_color_texture.rs) | Renders a 2d mesh with vertex color attributes
9495
[Move Sprite](../examples/2d/move_sprite.rs) | Changes the transform of a sprite
95-
[Shapes](../examples/2d/shapes.rs) | Renders a rectangle, circle, and hexagon
9696
[Sprite](../examples/2d/sprite.rs) | Renders a sprite
9797
[Sprite Flipping](../examples/2d/sprite_flipping.rs) | Renders a sprite flipped along an axis
9898
[Sprite Sheet](../examples/2d/sprite_sheet.rs) | Renders an animated sprite
@@ -105,7 +105,7 @@ Example | Description
105105
Example | Description
106106
--- | ---
107107
[3D Scene](../examples/3d/3d_scene.rs) | Simple 3D scene with basic shapes and lighting
108-
[3D Shapes](../examples/3d/shapes.rs) | A scene showcasing the built-in 3D shapes
108+
[3D Shapes](../examples/3d/3d_shapes.rs) | A scene showcasing the built-in 3D shapes
109109
[Lighting](../examples/3d/lighting.rs) | Illustrates various lighting options in a simple scene
110110
[Lines](../examples/3d/lines.rs) | Create a custom material to draw 3d lines
111111
[Load glTF](../examples/3d/load_gltf.rs) | Loads and renders a glTF file as a scene

0 commit comments

Comments
 (0)