mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2025-09-24 23:41:30 +02:00
really basic implementation of rpl types
This commit is contained in:
parent
b4d48a598a
commit
f046393af8
6 changed files with 201 additions and 10 deletions
41
crates/rpl/src/instructions/mod.rs
Normal file
41
crates/rpl/src/instructions/mod.rs
Normal file
|
@ -0,0 +1,41 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub mod read;
|
||||
pub mod write;
|
||||
|
||||
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug)]
|
||||
pub enum Instruction {
|
||||
Read(read::Read),
|
||||
Write(write::Write),
|
||||
Math(MathInstruction),
|
||||
Blend(BlendInstruction),
|
||||
Noise(NoiseInstruction),
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug)]
|
||||
pub enum MathInstruction {
|
||||
Add,
|
||||
Subtract,
|
||||
Multiply,
|
||||
Divide,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug)]
|
||||
pub enum BlendInstruction {
|
||||
Normal,
|
||||
Multiply,
|
||||
Additive,
|
||||
Overlay,
|
||||
Screen,
|
||||
Subtractive,
|
||||
Difference,
|
||||
Darken,
|
||||
Lighten,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, PartialEq, Eq, Debug)]
|
||||
pub enum NoiseInstruction {
|
||||
Perlin,
|
||||
Simplex,
|
||||
Voronoi,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue