Skip to content

Commit 065f0f9

Browse files
authored
Merge pull request #1 from Nasko-5/feature/teacher-request
v1.3.0
2 parents 8ac9dab + da53765 commit 065f0f9

File tree

8 files changed

+826
-139
lines changed

8 files changed

+826
-139
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,4 +360,7 @@ MigrationBackup/
360360
.ionide/
361361

362362
# Fody - auto-generated XML schema
363-
FodyWeavers.xsd
363+
FodyWeavers.xsd
364+
365+
#
366+
build.bat

README.md

Lines changed: 58 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,74 @@
22

33
![Gif showcasing the program](https://github.com/user-attachments/assets/0718bbc4-e1bd-47b5-ad11-239344e5ab9c)
44

5-
Small application I made to practice some things I learnt in physics class! \
5+
Small application I made to practice some things I learned in physics class! \
66
Made with [Raylib-CsLo](https://github.com/NotNotTech/Raylib-CsLo)
77

88
## Controls
9-
### Editing
10-
- **Right-click** to add a positive charge.
11-
- **Left-click** to add a negative charge.
12-
- **Right-click** on a charge to remove it.
13-
- **Left Shift + Middle-click** to clear all charges.
14-
- **Hold Middle-click** on top of a charge and move the mouse up/down to change its strength.
15-
- **Hold Middle-click** on top of a charge + **Right-click** to set the charge to 0.
16-
17-
### Movement
18-
- **Hold Left-click** on a charge to move it around.
19-
- **Hold Middle-click** in empty space and move the mouse to pan around the simulation.
9+
With the new GUI added in 1.3.0, the controls are a bit different!
10+
11+
### Tools
12+
13+
- <img src="https://github.com/user-attachments/assets/01e300be-c6ea-41a6-b3fe-c787f014288c" width="30" height="30" border="solid 10px black"> This is the **`Tools`** button.\
14+
Click on it to reveal/hide all of the tools you can use!
15+
- <img src="https://github.com/user-attachments/assets/2369651f-2dc9-4d75-ab11-4874da1624b8" width="30" height="30" border="solid 10px black"> This is the **`Add`** button. \
16+
Two more will appear after you click on it. The plus button lets you spawn positive charges with a left-click and negative charges with a right-click. The minus button does the opposite.\
17+
If you click on a charge while in add mode, you can drag it around!
18+
19+
- <img src="https://github.com/user-attachments/assets/aff078f4-682a-4b68-8201-ebfb72ef5b11" width="30" height="30" border="solid 10px black"> This is the **`Erase`** button. \
20+
Another button will appear after you click on this one, called "Clear." You can use it to clear your work area of all charges. \
21+
If you don’t want to clear everything, you can click on individual charges to remove them.
22+
- <img src="https://github.com/user-attachments/assets/3fe40b86-be78-4d0d-a970-d5f750b24332" width="30" height="30" border="solid 10px black"> This is the **`Edit Charge`** button. \
23+
Another button will appear after you click on this one, called "Set 0". Once you click on it, any charge you click on will be turned into a neutral one. To disable it, click on the **`Edit Charge`** button again. \
24+
To edit a charge, hover your mouse over one, and hold left-click. Moving your mouse up will add to the charge, and moving it down will subtract.
25+
26+
- <img src="https://github.com/user-attachments/assets/36e7afaf-5ba4-4ac5-b02e-12fa7b0ba03b" width="30" height="30" border="solid 10px black"> This is the **`Drag Move`** button. \
27+
As the name suggests, this button allows you to drag and move around your work area! This makes it a bit more intuitive than before, so it should be easier to use.
28+
29+
- <img src="https://github.com/user-attachments/assets/ef2be2d4-70bf-4608-be4a-2eaed6f461b9" width="30" height="30" border="solid 10px black"> This is the **`Zoom`** button. \
30+
Similarly to the **`Edit Charge`** button, you can hold left-click anywhere that is not on a UI element, and move your mouse left and right. \
31+
Moving to the right makes you zoom out, and moving to the left makes you zoom in!
32+
33+
### Settings
34+
35+
<img src="https://github.com/user-attachments/assets/a8376a9b-aab6-4c09-9670-0d0ab876efce" width="30" height="30" border="solid 10px black"> This is the **`Settings`** button. \
36+
Click on it to reveal the settings (wow).
37+
38+
The **LoD box** is a rectangle drawn around all of the charges that helps boost performance by decreasing the quality outside of it.
39+
40+
Here’s a list of all of them and what they control:
41+
- **Quality**: This value controls the quality inside of the LoD box.
42+
- **LoD Quality**: This value controls the quality outside of the LoD box.
43+
- **Probe Radius**: This value controls the radius at which probes start out around each positive charge.
44+
- **Probes Per Charge**: This value controls the number of probes that spawn around each positive charge.
45+
- **UI Scale**: This value is used to make the UI bigger if your display requires it.
46+
- **Field Line Thickness**: This value changes how wide/thick the field lines are, if needed. (Note: The field lines may appear to tear at widths larger than 10 due to rendering limitations.)
47+
- **Show Field Direction**: This is a dropdown menu with three options; Static, Animated, and None.
48+
- **Static** shows a static visualization of the direction of the field, with 10 arrows on each field line.
49+
- **Animated** shows an animated visualization of the direction of the field, moving from positive charges to negative ones.
50+
- **None** shows no visualization.
2051

2152
## Installation
2253
Make sure you have the [.NET 6 Runtime](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) installed!
23-
1. Go to the latest release on the [releases page](https://github.com/Nasko-5/csElectricFieldSimulator/releases), and download the file corresponding to your operating system
24-
3. Extract the contents of the `.zip` into a folder
25-
4. Run the csElectricFieldSimulator executable
54+
1. Go to the latest release on the [releases page](https://github.com/Nasko-5/csElectricFieldSimulator/releases), and download the file corresponding to your operating system.
55+
3. Extract the contents of the `.zip` into a folder.
56+
4. Run the `csElectricFieldSimulator` executable.
2657

2758
## Building
28-
1. Clone the repository with `git clone https://github.com/Nasko-5/csElectricFieldSimulator`
29-
2. Navigate to the resulting folder
59+
1. Clone the repository with `git clone https://github.com/Nasko-5/csElectricFieldSimulator`.
60+
2. Navigate to the resulting folder.
3061
3. Run the appropriate command for your operating system:
3162
- Windows: `dotnet publish -r win-x64 -o ./win-x64`
3263
- Linux: `dotnet publish -r linux-x64 -o ./linux-x64`
3364
- macOS: `dotnet publish -r osx-arm64 -o ./osx-arm64`
34-
4. The build files will be created in a folder named after the platform you specified (e.g., `win-x64`, `linux-x64`, `osx-arm64`)
65+
4. The build files will be created in a folder named after the platform you specified (e.g., `win-x64`, `linux-x64`, `osx-arm64`).
66+
67+
## Notes
68+
69+
You may need the .NET SDK to build the project. If you encounter any issues, feel free to open an issue on GitHub, and I’ll work on a fix! \
70+
\
71+
There is a bug that makes the program freeze if you try to exit the program with the close button on your OS, and i am going to work out a fix for this sooner or later! \
72+
but i dont think it's serious enough to delay this release.\
73+
For now, exit the program by either closing the accompanying command prompt, or by pressing `Esc` while focused on the window.
74+
3575

36-
## Note
37-
Visual Studio mentioned missing files when I created this repo. If you run into any issues, feel free to open an issue, and I'll fix it!

0 commit comments

Comments
 (0)