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
216 changes: 186 additions & 30 deletions neuronify-core/src/app.rs

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions neuronify-core/src/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,27 @@ impl Default for AdaptationCurrent {
}
}

/// Neuronify 1's burst neuron. A spike after a quiet spell starts a boost current
/// that drains linearly and keeps the neuron firing until it runs out.
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct BurstCurrent {
/// The current at the start of a burst
pub peak: f64,
/// How fast the current drains, in amperes per second
pub drain: f64,
pub boost: f64,
}

impl Default for BurstCurrent {
fn default() -> Self {
Self {
peak: 1.2e-9,
drain: 6e-9,
boost: 0.0,
}
}
}

#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct CurrentClamp {
pub current_output: f64,
Expand Down Expand Up @@ -239,6 +260,9 @@ pub struct StaticConnectionSource {}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Deletable {}

#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Dendrite;

#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Position {
pub position: Vec3,
Expand Down
4 changes: 3 additions & 1 deletion neuronify-core/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pub const TRIGGER_SPHERE_SCALE: f32 = 0.5;

pub const FHN_FIRE_VOLTAGE: f64 = 1.0;

pub const BEZIER_SEGMENTS: usize = 16;
pub const BEZIER_BEND_FRACTION: f32 = 0.2;

pub const MIN_CREATION_DISTANCE_AXON: f32 = 2.0 * NODE_RADIUS;
Expand All @@ -48,3 +47,6 @@ pub const CAMERA_MAX_DISTANCE: f32 = 200.0;
pub const CAMERA_DEFAULT_DISTANCE: f32 = 50.0;
pub const CAMERA_FIELD_OF_VIEW_DEGREES: f32 = 40.0;
pub const CAMERA_FRAMING_MARGIN: f32 = 1.15;

pub const FLOOR_HEIGHT: f32 = -NODE_RADIUS;
pub const FLOOR_SIZE: f32 = 100_000.0;
Loading
Loading