Skip to content

Commit 6024c41

Browse files
authored
Merge pull request #41 from dexsper/main
Major Editor Improvements
2 parents 0eea3f3 + 9cbe3eb commit 6024c41

22 files changed

+4358
-836
lines changed

.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[alias]
2+
example2d = "run --example example2d --features _example2d_full"
3+
example3d = "run --example example3d --features _example3d_full"
4+
custom_camera3d = "run --example custom_camera3d --features _example3d_full"
5+
doors_to_other_levels = "run --example doors_to_other_levels --features _doors_to_other_levels_full"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ assets/levels3d/*.yol
99
assets/levels3d/*.yoli
1010
!assets/levels3d/example.yol
1111

12+
#IDES
13+
/.vscode
14+
1215
# No ignored level files in levels_doors

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,59 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
## 0.30.0 - 2025-12-04
9+
### Added
10+
- `console_layer_factory` for routing Bevy logs into the Yoleck console
11+
- `YoleckConsoleLogHistory` for storing up to 1000 recent log entries
12+
- `YoleckConsoleState` for managing console UI state
13+
- `YoleckEditorBottomPanelSections` for extensible bottom-panel tabs
14+
- `Vpeol3dCameraMode` enum with variants: `Fps`, `Sidescroller`, `Topdown`, `Custom(u32)`
15+
- `YoleckCameraChoices` resource for customizing available camera modes in 3D editor
16+
- Camera mode selector dropdown in editor top panel for switching between camera modes
17+
- `Vpeol3dCameraControl::fps()` preset for FPS-style camera with full rotation freedom
18+
- Support for custom camera modes with user-defined movement logic
19+
- `custom_camera3d.rs` example demonstrating custom camera modes (Isometric and Orbital)
20+
- Custom camera modes documentation in vpeol_3d module
21+
- World/Local mode toggle for axis knobs in 3D editor top panel
22+
- Keyboard shortcut to delete selected entities: Press `Delete` key to remove selected entity from the level
23+
- Copy/paste support for entities: Use `Ctrl+C` to copy and `Ctrl+V` to paste entities with all their components and values
24+
- Cross-level entity copying: Entities can be copied between different level editors through system clipboard
25+
- Auto-selection of pasted entities: Newly pasted entities are automatically selected for immediate editing
26+
- UI editing support for `Vpeol3dRotation` using Euler angles (X, Y, Z in degrees)
27+
- UI editing support for `Vpeol3dScale` with separate X, Y, Z drag values
28+
- UI editing support for `Vpeol2dRotatation` using degrees
29+
- UI editing support for `Vpeol2dScale` with separate X, Y drag values
30+
- Drag and drop support for entity references: entities with UUID can now be dragged from the entity list and dropped onto `YoleckEntityRef` fields in the properties panel
31+
- Entity type filtering is automatically applied when dropping entities onto entity reference fields with type constraints
32+
33+
### Changed
34+
- Removed unused `plane_origin` field from `Vpeol3dCameraControl`
35+
- **BREAKING:** `Vpeol3dRotation` now stores Euler angles (`Vec3`) instead of quaternion
36+
- Entity deletion now works via keyboard in addition to the existing UI button
37+
- Updated documentation for vpeol_3d and vpeol_2d to reflect that rotation and scale components now have UI editing support
38+
- Updated code examples in documentation to show optional rotation and scale components
39+
- Improved documentation for `YoleckEntityRef`, `with_uuid()`, and entity reference requirements
40+
- `YoleckEntityRef` now includes comprehensive documentation about requirements and editor features
41+
- Improved editor ergonomics with better organized workspace instead of single cluttered panel
42+
- Axis knobs are now always displayed for all 3 world axes (X, Y, Z) by default
43+
- Scene gizmo now displays axis labels (X, Y, Z) at the end of positive axes
44+
- `YoleckAutoEdit` derive macro now also implements `YoleckEntityRefAccessor`, eliminating the need for separate `YoleckEntityRefs` derive
45+
- `add_yoleck_auto_edit` now registers both auto edit and entity ref edit systems automatically
46+
- `YoleckEntityRef` fields are now automatically hidden from auto edit UI (rendered only by entity ref system)
47+
- Added scene gizmo for camera orientation
48+
- Added automatic UI generation for components using reflection and attributes.
49+
- Supported numeric, boolean, string, vector, color, enum, option, list, asset, and entity fields.
50+
- Added EntityRef type with automatic UI, filtering, and runtime UUID resolution.
51+
- Enabled entity linking with drag-and-drop selection.
52+
- Make camera controls fps style
53+
- Update bevy_egui version to 0.38.
54+
55+
### Removed
56+
- [**BREAKING**] Removed `Vpeol3dThirdAxisWithKnob` component (no longer needed as all axes have knobs by default)
57+
- Removed `YoleckEntityRefPlugin` (was empty/no-op)
58+
- Removed `add_yoleck_entity_ref_edit` method (merged into `add_yoleck_auto_edit`)
59+
- Removed `add_yoleck_full_edit` method (no longer needed)
60+
- Removed `YoleckEntityRefs` derive macro (merged into `YoleckAutoEdit`)
861

962
## 0.29.0 - 2025-10-03
1063
### Changed

Cargo.toml

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ members = ["macros"]
44
[package]
55
name = "bevy-yoleck"
66
description = "Your Own Level Editor Creation Kit"
7-
version = "0.29.0"
7+
version = "0.30.0"
88
edition = "2021"
9-
authors = ["IdanArye <idanarye@gmail.com>"]
9+
authors = ["dexsper <dexsperpro@gmail.com>", "IdanArye <idanarye@gmail.com>"]
1010
license = "MIT OR Apache-2.0"
1111
repository = "https://github.com/idanarye/bevy-yoleck"
1212
documentation = "https://docs.rs/bevy-yoleck"
1313
readme = "README.md"
1414
categories = ["game-development"]
1515
keywords = ["bevy", "gamedev", "level-editor"]
16-
exclude = [
17-
"assets",
18-
]
16+
exclude = ["assets"]
1917

2018
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
2119

@@ -27,25 +25,35 @@ bevy = { version = "^0.17", default-features = false, features = [
2725
"bevy_asset",
2826
"bevy_log",
2927
] }
30-
bevy_egui = { version = "^0.37", default-features = false, features = ["default_fonts", "render"] }
28+
bevy_egui = { version = "^0.38", default-features = false, features = [
29+
"default_fonts",
30+
"render",
31+
] }
3132
serde = "^1"
3233
serde_json = "^1"
3334
thiserror = "^2"
3435
uuid = "1.9.1"
36+
arboard = "3.4"
3537

3638
[features]
3739
bevy_reflect = []
3840
vpeol = []
39-
vpeol_2d = [
40-
"vpeol",
41-
"bevy/bevy_text",
42-
"bevy/bevy_sprite",
43-
"bevy/png",
44-
]
45-
vpeol_3d = [
46-
"vpeol",
47-
"bevy/bevy_pbr",
41+
vpeol_2d = ["vpeol", "bevy/bevy_text", "bevy/bevy_sprite", "bevy/png"]
42+
vpeol_3d = ["vpeol", "bevy/bevy_pbr"]
43+
_example2d_full = ["vpeol_2d", "bevy/bevy_gizmos", "bevy/bevy_sprite_render"]
44+
_example3d_full = [
45+
"vpeol_3d",
46+
"bevy/bevy_scene",
47+
"bevy/bevy_gltf",
48+
"bevy/animation",
49+
"bevy/ktx2",
50+
"bevy/zstd_rust",
51+
"bevy/tonemapping_luts",
52+
"bevy/bevy_gizmos",
53+
"bevy/reflect_auto_register",
54+
"bevy/bevy_sprite_render",
4855
]
56+
_doors_to_other_levels_full = ["vpeol_2d", "bevy/bevy_sprite_render"]
4957

5058
[dev-dependencies]
5159
bevy = { version = "^0.17", default-features = false, features = [
@@ -58,41 +66,24 @@ bevy = { version = "^0.17", default-features = false, features = [
5866

5967
[[example]]
6068
name = "example2d"
61-
required-features = [
62-
"vpeol_2d",
63-
"bevy/png",
64-
"bevy/bevy_gizmos",
65-
"bevy/bevy_sprite_render",
66-
]
69+
required-features = ["_example2d_full"]
6770

6871
[[example]]
6972
name = "example3d"
70-
required-features = [
71-
"vpeol_3d",
72-
"bevy/bevy_scene",
73-
"bevy/bevy_gltf",
74-
"bevy/animation",
75-
"bevy/ktx2",
76-
"bevy/zstd_rust",
77-
"bevy/tonemapping_luts",
78-
"bevy/bevy_gizmos",
79-
"bevy/reflect_auto_register",
80-
"bevy/bevy_pbr",
81-
"bevy/bevy_sprite_render",
82-
]
73+
required-features = ["_example3d_full"]
74+
75+
[[example]]
76+
name = "custom_camera3d"
77+
required-features = ["_example3d_full"]
8378

8479
[[example]]
8580
name = "doors_to_other_levels"
86-
required-features = [
87-
"vpeol_2d",
88-
"bevy/png",
89-
"bevy/bevy_sprite_render",
90-
]
81+
required-features = ["_doors_to_other_levels_full"]
9182

9283
[package.metadata.docs.rs]
9384

9485
all-features = true
9586
features = [
96-
"bevy/x11", # required for bevy_egui
97-
"bevy/bevy_gltf", # required for SceneRoot in vpeol_3d's doctests
87+
"bevy/x11", # required for bevy_egui
88+
"bevy/bevy_gltf", # required for SceneRoot in vpeol_3d's doctests
9889
]

README.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1-
[![Build Status](https://github.com/idanarye/bevy-yoleck/workflows/CI/badge.svg)](https://github.com/idanarye/bevy-yoleck/actions)
2-
[![Latest Version](https://img.shields.io/crates/v/bevy-yoleck.svg)](https://crates.io/crates/bevy-yoleck)
3-
[![Rust Documentation](https://img.shields.io/badge/nightly-rustdoc-blue.svg)](https://idanarye.github.io/bevy-yoleck/)
4-
[![Rust Documentation](https://img.shields.io/badge/stable-rustdoc-purple.svg)](https://docs.rs/bevy-yoleck/)
1+
> **Fork Notice:** This project is a fork of [bevy-yoleck](https://github.com/idanarye/bevy-yoleck) by IdanArye.
2+
3+
<img width="1919" height="1034" alt="image" src="https://github.com/user-attachments/assets/9c6b353e-59fa-4967-a484-b20dc873a722" />
4+
5+
## Fork Improvements
6+
7+
| Feature | Description |
8+
|---------|-------------|
9+
| **Redesigned Editor UI** | Complete UI/UX overhaul with split-screen layout: top panel for level management and playmode controls, right panel for entity properties editor, bottom panel for entity list, left panel for entity creation tools |
10+
| **Automatic UI Generation** | Automatic UI generation for components with support for numeric, boolean, string, vector, color, enum, option, list, asset, and entity fields |
11+
| **EntityRef System** | Entity linking system with automatic UI, filtering, and runtime UUID resolution. Supports drag-and-drop |
12+
| **Scene Gizmo** | Visual scene gizmo for camera orientation and control |
13+
| **Colored Axis Knobs** | Color-coded axis knobs (red for X, green for Y, blue for Z) automatically displayed for all three world axes |
14+
| **Camera Schemas** | Add camera controls with FPS-style movement for better 3D navigation, and ui switcher for camera modes |
15+
| **Simplified Macro API** | Streamlined derive macros with automatic trait implementations - `YoleckAutoEdit` now handles both auto edit and entity ref systems |
16+
| **Keyboard Shortcuts** | Delete entities with `Delete` key, copy/paste entities with `Ctrl+C`/`Ctrl+V` |
17+
| **Console System** | Optional console system for displaying logs in the UI |
518

619
# Bevy YOLECK - Your Own Level Editor Creation Kit
720

@@ -26,26 +39,24 @@ own level editor.
2639

2740
## Examples:
2841

29-
* WASM examples - you can't save the levels because it's WASM, but you can edit the levels run playtests:
30-
* 2D editor: https://idanarye.github.io/bevy-yoleck/demos/example2d
31-
32-
https://user-images.githubusercontent.com/1149255/228007948-31a37b3f-7bd3-4a36-a3bc-4617d359c7c2.mp4
33-
* 3D editor: https://idanarye.github.io/bevy-yoleck/demos/example3d
42+
**Note:** This fork is not published on crates.io yet. To run the examples, you need to clone this repository first:
3443

35-
https://user-images.githubusercontent.com/1149255/228008014-825ef02e-2edc-49f5-a15c-1fa6044f84de.mp4
44+
```bash
45+
git clone https://github.com/dexsper/bevy-yoleck-fork
46+
cd bevy-yoleck
47+
```
3648

37-
* Loading multiple levels and unloading them on the fly: https://idanarye.github.io/bevy-yoleck/demos/doors_to_other_levels
49+
Then you can run the examples:
3850

39-
https://github.com/idanarye/bevy-yoleck/assets/1149255/590beba4-2ca5-4218-af52-143321bb5946
51+
* 2D example:
52+
```bash
53+
cargo example2d
54+
```
4055

41-
The WASM version of this example is gameplay only. To see how the editor for it looks like, clone/download the repository and run:
42-
```rust
43-
cargo run --example doors_to_other_levels --features vpeol_2d,bevy/png
44-
```
45-
* Example game:
46-
* Download binaries from https://aeon-felis.itch.io/danger-doofus
47-
* See the code at https://github.com/idanarye/sidekick-jam-entry-danger-doofus
48-
* Run the exeutable with `--editor` to edit the game levels with Yoleck.
56+
* 3D example:
57+
```bash
58+
cargo example3d
59+
```
4960

5061
## File Format
5162

@@ -78,6 +89,7 @@ at a directory's contents). The index file contains a tuple of two values:
7889

7990
| bevy | bevy-yoleck | bevy_egui |
8091
|------|-------------|-----------|
92+
| 0.17 | 0.30 | 0.38 |
8193
| 0.17 | 0.29 | 0.37 |
8294
| 0.16 | 0.28 | 0.36 |
8395
| 0.16 | 0.27 | 0.35 |

assets/levels3d/example.yol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"format_version":2,"app_format_version":0},{},[[{"type":"Planet","name":"","uuid":"f4d84809-0c8e-49a9-8b7c-fb779715c518"},{"Vpeol3dPosition":[10.016812324523926,1.400029182434082,0.0]}],[{"type":"Planet","name":"","uuid":"0ed26981-7f4b-47d2-b5f8-c93c9c8d9c72"},{"Vpeol3dPosition":[-6.555315017700195,1.343174934387207,10.238651275634766]}],[{"type":"Spaceship","name":""},{"Vpeol3dPosition":[0.520146369934082,-6.667301177978516,13.79182243347168]}],[{"type":"PlanetPointer","name":""},{"LaserPointer":{"target":"f4d84809-0c8e-49a9-8b7c-fb779715c518"},"Vpeol3dPosition":[4.84351921081543,4.557557106018066,-9.821765899658203]}]]]
1+
[{"format_version":2,"app_format_version":0},{},[[{"type":"Planet","name":"","uuid":"c8aa8fdd-5431-473c-8774-b069c95f794f"},{"PlanetSettings":{"radius":1.0},"Vpeol3dPosition":[-7.047080993652344,6.785710334777832,0.0]}],[{"type":"Planet","name":"","uuid":"2d676a47-146f-49f0-bba7-cf58a8833b1f"},{"PlanetSettings":{"radius":1.0},"Vpeol3dPosition":[16.688783645629883,-3.0687923431396484,0.0]}],[{"type":"PlanetPointer","name":""},{"LaserPointer":{"target":{"uuid":"c8aa8fdd-5431-473c-8774-b069c95f794f"}},"Vpeol3dPosition":[15.614945411682129,-6.67572021484375e-6,-34.80355453491211]}],[{"type":"Spaceship","name":""},{"SpaceshipSettings":{"enabled":true,"rotation_speed":2.0,"speed":2.0},"Vpeol3dPosition":[1.2451118230819702,-2.86102294921875e-6,21.062850952148438]}]]]

0 commit comments

Comments
 (0)