Implement cons node

This commit is contained in:
Dennis
2022-08-13 14:54:12 +02:00
committed by Keavon Chambers
parent a6a41c4b97
commit abf04753e2
6 changed files with 97 additions and 213 deletions

View File

@@ -1,11 +1,11 @@
// use serde::{Deserialize, Serialize};
use serde::{Deserialize, Serialize};
/// Structure that represents a color.
/// Internally alpha is stored as `f32` that ranges from `0.0` (transparent) to `1.0` (opaque).
/// The other components (RGB) are stored as `f32` that range from `0.0` up to `f32::MAX`,
/// the values encode the brightness of each channel proportional to the light intensity in cd/m² (nits) in HDR, and `0.0` (black) to `1.0` (white) in SDR color.
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Default)] //, Serialize, Deserialize)]
#[derive(Debug, Clone, Copy, PartialEq, Default, Serialize, Deserialize)]
pub struct Color {
red: f32,
green: f32,