Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Bug report
description: Report a bug in LP
body:

- type: markdown
attributes:
value: |
When reporting bugs, please follow the guidelines in this template. This helps identify the problem precisely and thus enables contributors to fix it faster.
- Write a descriptive issue title above.
- The golden rule is to **always open *one* issue for *one* bug**. If you notice several bugs and want to report them, make sure to create one new issue for each of them.
- Search [open issues](https://github.com/erematorg/LP/issues) and [closed issues](https://github.com/erematorg/LP/issues?q=is%3Aissue+is%3Aclosed) to ensure it has not already been reported. If you don't find a relevant match or if you're unsure, don't hesitate to **open a new issue**. The bugsquad will handle it from there if it's a duplicate.
- Please always check if your issue is reproducible in the latest version – it may already have been fixed!

- type: textarea
attributes:
label: Tested versions
description: |
To properly fix a bug, we need to identify if the bug was recently introduced in the LP project or if it has been present from the beginning.
- Specify the LP version you found the issue in. If you are using a specific build, include relevant details.
- If you can, **please test earlier LP versions** and, if applicable, newer versions. Mention whether the bug is reproducible or not in the versions you tested.
placeholder: |

- Reproducible in: v1.0, v1.1
- Not reproducible in: v0.9
validations:
required: true

- type: input
attributes:
label: System information
description: |
- Specify the OS version, and when relevant, hardware information.
- For issues that are likely OS-specific and/or graphics-related, please specify the CPU model and architecture.
placeholder: Windows 10 - LP v1.0 - dedicated GPU NVIDIA GeForce GTX 970 - Intel Core i7-10700KF CPU @ 3.80GHz (16 Threads)
validations:
required: true

- type: textarea
attributes:
label: Issue description
description: |
Describe your issue briefly. What doesn't work, and how do you expect it to work instead?
You can include images or videos with drag and drop, and format code blocks or logs with <code>```</code> tags.
validations:
required: true

- type: textarea
attributes:
label: Steps to reproduce
description: |
List the steps or sample code that reproduces the issue. Having reproducible issues is a prerequisite for contributors to be able to solve them.
If you include a minimal reproduction project below, detail how to use it here.
validations:
required: true
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Feature request
description: Suggest a new feature for LP
body:

- type: markdown
attributes:
value: |
When suggesting new features, please follow the guidelines in this template. This helps provide clear and actionable suggestions.
- Write a descriptive title above.
- Clearly describe the problem or need that this feature aims to address.
- If you have multiple feature suggestions, create a new request for each to maintain clarity.
- Search [open issues](https://github.com/erematorg/LP/issues) to ensure a similar feature request has not already been submitted. If you don't find a relevant match or if you're unsure, feel free to **open a new request**.

- type: textarea
attributes:
label: Problem Description
description: |
A clear and concise description of the problem or need that this feature aims to address.

- type: textarea
attributes:
label: Proposed Solution
description: |
A clear and concise description of the solution or functionality you would like to see implemented.

- type: textarea
attributes:
label: Alternatives Considered
description: |
Describe any alternative solutions or features you have considered or think might be viable.

- type: textarea
attributes:
label: Additional Context
description: |
Add any other context, examples, or use cases that provide additional information about the feature request.
129 changes: 129 additions & 0 deletions .github/code_of_conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
contact@eremat.org.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

14 changes: 14 additions & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These are supported funding model platforms

github: [erematorg]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: eremat
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

3 changes: 2 additions & 1 deletion crates/energy/src/electromagnetism/interactions.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use super::fields::{ElectricField, MagneticField};
use bevy::prelude::*;

use super::fields::{ElectricField, MagneticField};

// Speed of light (in m/s) constant physical value
//TODO: Making this cleaner later on to make units of measure dynamic rather than admiting 1 meter = 1 meter, same for seconds and much more
const C: f32 = 299_792_458.0;
Expand Down
12 changes: 12 additions & 0 deletions crates/energy/src/waves/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
pub mod oscillation;
pub mod propagation;

use bevy::prelude::Vec2;

/// Helper function to normalize a vector or return a fallback if the vector is too small
#[inline]
pub(crate) fn normalize_or(vec: Vec2, fallback: Vec2) -> Vec2 {
if vec.length_squared() > f32::EPSILON {
vec.normalize()
} else {
fallback
}
}
pub mod superposition;
pub mod wave_equation;

Expand Down
14 changes: 1 addition & 13 deletions crates/energy/src/waves/oscillation.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
use bevy::prelude::*;

#[inline]
fn normalize_or(vec: Vec2, fallback: Vec2) -> Vec2 {
if vec.length_squared() > f32::EPSILON {
vec.normalize()
} else {
fallback
}
}
use super::normalize_or;

/// Wave parameters for configuring wave behavior
#[derive(Component, Debug, Clone, Copy, Reflect)]
Expand Down Expand Up @@ -47,11 +40,6 @@ impl Default for WaveParameters {
}

impl WaveParameters {
/// Builder-style method for creating custom wave parameters
pub fn new() -> Self {
Self::default()
}

/// Fluent interface for setting speed
pub fn with_speed(mut self, speed: f32) -> Self {
self.speed = speed;
Expand Down
11 changes: 2 additions & 9 deletions crates/energy/src/waves/propagation.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
use super::oscillation::{WaveParameters, angular_frequency, wave_number};
use bevy::prelude::*;

#[inline]
fn normalize_or(vec: Vec2, fallback: Vec2) -> Vec2 {
if vec.length_squared() > f32::EPSILON {
vec.normalize()
} else {
fallback
}
}
use super::normalize_or;
use super::oscillation::{WaveParameters, angular_frequency, wave_number};

// Calculate modified angular frequency with dispersion
#[inline]
Expand Down
Loading
Loading