Skip to content

Commit 958e810

Browse files
committed
gcore-shaders: move registry::types
1 parent 5376550 commit 958e810

3 files changed

Lines changed: 26 additions & 24 deletions

File tree

node-graph/gcore-shaders/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pub use glam;
33
pub mod blending;
44
pub mod choice_type;
55
pub mod color;
6+
pub mod registry;
67

78
pub trait AsU32 {
89
fn as_u32(&self) -> u32;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
pub mod types {
2+
/// 0% - 100%
3+
pub type Percentage = f64;
4+
/// -100% - 100%
5+
pub type SignedPercentage = f64;
6+
/// -180° - 180°
7+
pub type Angle = f64;
8+
/// Ends in the unit of x
9+
pub type Multiplier = f64;
10+
/// Non-negative integer with px unit
11+
pub type PixelLength = f64;
12+
/// Non-negative
13+
pub type Length = f64;
14+
/// 0 to 1
15+
pub type Fraction = f64;
16+
/// Unsigned integer
17+
pub type IntegerCount = u32;
18+
/// Unsigned integer to be used for random seeds
19+
pub type SeedValue = u32;
20+
/// DVec2 with px unit
21+
pub type PixelSize = glam::DVec2;
22+
/// String with one or more than one line
23+
pub type TextArea = String;
24+
}

node-graph/gcore/src/registry.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,7 @@ use std::ops::Deref;
66
use std::pin::Pin;
77
use std::sync::{LazyLock, Mutex};
88

9-
pub mod types {
10-
/// 0% - 100%
11-
pub type Percentage = f64;
12-
/// -100% - 100%
13-
pub type SignedPercentage = f64;
14-
/// -180° - 180°
15-
pub type Angle = f64;
16-
/// Ends in the unit of x
17-
pub type Multiplier = f64;
18-
/// Non-negative integer with px unit
19-
pub type PixelLength = f64;
20-
/// Non-negative
21-
pub type Length = f64;
22-
/// 0 to 1
23-
pub type Fraction = f64;
24-
/// Unsigned integer
25-
pub type IntegerCount = u32;
26-
/// Unsigned integer to be used for random seeds
27-
pub type SeedValue = u32;
28-
/// DVec2 with px unit
29-
pub type PixelSize = glam::DVec2;
30-
/// String with one or more than one line
31-
pub type TextArea = String;
32-
}
9+
pub use graphene_core_shaders::registry::types;
3310

3411
// Translation struct between macro and definition
3512
#[derive(Clone)]

0 commit comments

Comments
 (0)