mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-31 02:07:21 +00:00
Use f64 not f32 throughout graph; add Vector2 value node (#1618)
* Use doubles in graph * Format .graphite files onto one line * Rename new node to Vector2 * No primary input --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
parent
0e0e347435
commit
229b5dbb20
24 changed files with 477 additions and 445 deletions
|
@ -203,6 +203,8 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
register_node!(graphene_core::ops::AddNode<_>, input: &f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::AddNode<_>, input: f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::AddNode<_>, input: &f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::AddNode<_>, input: f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::AddNode<_>, input: glam::DVec2, params: [glam::DVec2]),
|
||||
register_node!(graphene_core::ops::SubtractNode<_>, input: u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::SubtractNode<_>, input: &u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::SubtractNode<_>, input: u32, params: [&u32]),
|
||||
|
@ -211,6 +213,8 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
register_node!(graphene_core::ops::SubtractNode<_>, input: &f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::SubtractNode<_>, input: f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::SubtractNode<_>, input: &f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::SubtractNode<_>, input: f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::SubtractNode<_>, input: glam::DVec2, params: [glam::DVec2]),
|
||||
register_node!(graphene_core::ops::DivideNode<_>, input: u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::DivideNode<_>, input: &u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::DivideNode<_>, input: u32, params: [&u32]),
|
||||
|
@ -219,6 +223,9 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
register_node!(graphene_core::ops::DivideNode<_>, input: &f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::DivideNode<_>, input: f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::DivideNode<_>, input: &f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::DivideNode<_>, input: f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::DivideNode<_>, input: glam::DVec2, params: [f64]),
|
||||
register_node!(graphene_core::ops::DivideNode<_>, input: glam::DVec2, params: [glam::DVec2]),
|
||||
register_node!(graphene_core::ops::MultiplyNode<_>, input: u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::MultiplyNode<_>, input: &u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::MultiplyNode<_>, input: u32, params: [&u32]),
|
||||
|
@ -227,6 +234,9 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
register_node!(graphene_core::ops::MultiplyNode<_>, input: &f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::MultiplyNode<_>, input: f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::MultiplyNode<_>, input: &f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::MultiplyNode<_>, input: f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::MultiplyNode<_>, input: glam::DVec2, params: [f64]),
|
||||
register_node!(graphene_core::ops::MultiplyNode<_>, input: glam::DVec2, params: [glam::DVec2]),
|
||||
register_node!(graphene_core::ops::ExponentNode<_>, input: u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::ExponentNode<_>, input: &u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::ExponentNode<_>, input: u32, params: [&u32]),
|
||||
|
@ -234,32 +244,34 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
register_node!(graphene_core::ops::ExponentNode<_>, input: f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::ExponentNode<_>, input: &f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::ExponentNode<_>, input: f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::FloorNode, input: f32, params: []),
|
||||
register_node!(graphene_core::ops::CeilingNode, input: f32, params: []),
|
||||
register_node!(graphene_core::ops::RoundNode, input: f32, params: []),
|
||||
register_node!(graphene_core::ops::AbsoluteValue, input: f32, params: []),
|
||||
register_node!(graphene_core::ops::LogarithmNode<_>, input: f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::NaturalLogarithmNode, input: f32, params: []),
|
||||
register_node!(graphene_core::ops::SineNode, input: f32, params: []),
|
||||
register_node!(graphene_core::ops::CosineNode, input: f32, params: []),
|
||||
register_node!(graphene_core::ops::TangentNode, input: f32, params: []),
|
||||
register_node!(graphene_core::ops::ExponentNode<_>, input: f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::FloorNode, input: f64, params: []),
|
||||
register_node!(graphene_core::ops::CeilingNode, input: f64, params: []),
|
||||
register_node!(graphene_core::ops::RoundNode, input: f64, params: []),
|
||||
register_node!(graphene_core::ops::AbsoluteValue, input: f64, params: []),
|
||||
register_node!(graphene_core::ops::LogarithmNode<_>, input: f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::NaturalLogarithmNode, input: f64, params: []),
|
||||
register_node!(graphene_core::ops::SineNode, input: f64, params: []),
|
||||
register_node!(graphene_core::ops::CosineNode, input: f64, params: []),
|
||||
register_node!(graphene_core::ops::TangentNode, input: f64, params: []),
|
||||
register_node!(graphene_core::ops::MaximumNode<_>, input: u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::MaximumNode<_>, input: f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::MaximumNode<_>, input: f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::MinimumNode<_>, input: u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::MinimumNode<_>, input: f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::MinimumNode<_>, input: f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::EqualsNode<_>, input: u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::EqualsNode<_>, input: f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::EqualsNode<_>, input: f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: &u32, params: [u32]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: u32, params: [&u32]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: &u32, params: [&u32]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: &f32, params: [f32]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: &f32, params: [&f32]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: &f64, params: [f64]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: f64, params: [&f64]),
|
||||
register_node!(graphene_core::ops::ModuloNode<_>, input: &f64, params: [&f64]),
|
||||
register_node!(graphene_core::ops::ConstructVector2<_, _>, input: (), params: [f64, f64]),
|
||||
register_node!(graphene_core::ops::SomeNode, input: WasmEditorApi, params: []),
|
||||
register_node!(graphene_core::logic::LogToConsoleNode, input: bool, params: []),
|
||||
register_node!(graphene_core::logic::LogToConsoleNode, input: f32, params: []),
|
||||
register_node!(graphene_core::logic::LogToConsoleNode, input: f64, params: []),
|
||||
register_node!(graphene_core::logic::LogToConsoleNode, input: f64, params: []),
|
||||
register_node!(graphene_core::logic::LogToConsoleNode, input: u32, params: []),
|
||||
register_node!(graphene_core::logic::LogToConsoleNode, input: u64, params: []),
|
||||
|
@ -442,12 +454,12 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
raster_node!(graphene_core::raster::ExtractChannelNode<_>, params: [RedGreenBlue]),
|
||||
raster_node!(graphene_core::raster::ExtractAlphaNode<>, params: []),
|
||||
raster_node!(graphene_core::raster::ExtractOpaqueNode<>, params: []),
|
||||
raster_node!(graphene_core::raster::LevelsNode<_, _, _, _, _>, params: [f32, f32, f32, f32, f32]),
|
||||
raster_node!(graphene_core::raster::LevelsNode<_, _, _, _, _>, params: [f64, f64, f64, f64, f64]),
|
||||
register_node!(graphene_std::image_segmentation::ImageSegmentationNode<_>, input: ImageFrame<Color>, params: [ImageFrame<Color>]),
|
||||
register_node!(graphene_std::image_color_palette::ImageColorPaletteNode<_>, input: ImageFrame<Color>, params: [u32]),
|
||||
register_node!(graphene_core::raster::IndexNode<_>, input: Vec<ImageFrame<Color>>, params: [u32]),
|
||||
register_node!(graphene_core::raster::adjustments::ColorFillNode<_>, input: ImageFrame<Color>, params: [Color]),
|
||||
register_node!(graphene_core::raster::adjustments::ColorOverlayNode<_, _, _>, input: ImageFrame<Color>, params: [Color, BlendMode, f32]),
|
||||
register_node!(graphene_core::raster::adjustments::ColorOverlayNode<_, _, _>, input: ImageFrame<Color>, params: [Color, BlendMode, f64]),
|
||||
register_node!(graphene_core::raster::IndexNode<_>, input: Vec<Color>, params: [u32]),
|
||||
vec![(
|
||||
ProtoNodeIdentifier::new("graphene_core::raster::BlendNode<_, _, _, _>"),
|
||||
|
@ -455,7 +467,7 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
Box::pin(async move {
|
||||
let image: DowncastBothNode<(), ImageFrame<Color>> = DowncastBothNode::new(args[0].clone());
|
||||
let blend_mode: DowncastBothNode<(), BlendMode> = DowncastBothNode::new(args[1].clone());
|
||||
let opacity: DowncastBothNode<(), f32> = DowncastBothNode::new(args[2].clone());
|
||||
let opacity: DowncastBothNode<(), f64> = DowncastBothNode::new(args[2].clone());
|
||||
let blend_node = graphene_core::raster::BlendNode::new(CopiedNode::new(blend_mode.eval(()).await), CopiedNode::new(opacity.eval(()).await));
|
||||
let node = graphene_std::raster::BlendImageNode::new(image, blend_node);
|
||||
let any: DynAnyNode<ImageFrame<Color>, _, _> = graphene_std::any::DynAnyNode::new(node);
|
||||
|
@ -465,21 +477,21 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
NodeIOTypes::new(
|
||||
concrete!(ImageFrame<Color>),
|
||||
concrete!(ImageFrame<Color>),
|
||||
vec![fn_type!(ImageFrame<Color>), fn_type!(BlendMode), fn_type!(f32)],
|
||||
vec![fn_type!(ImageFrame<Color>), fn_type!(BlendMode), fn_type!(f64)],
|
||||
),
|
||||
)],
|
||||
raster_node!(graphene_core::raster::BlackAndWhiteNode<_, _, _, _, _, _, _>, params: [Color, f32, f32, f32, f32, f32, f32]),
|
||||
raster_node!(graphene_core::raster::HueSaturationNode<_, _, _>, params: [f32, f32, f32]),
|
||||
raster_node!(graphene_core::raster::BlackAndWhiteNode<_, _, _, _, _, _, _>, params: [Color, f64, f64, f64, f64, f64, f64]),
|
||||
raster_node!(graphene_core::raster::HueSaturationNode<_, _, _>, params: [f64, f64, f64]),
|
||||
raster_node!(graphene_core::raster::InvertRGBNode, params: []),
|
||||
raster_node!(graphene_core::raster::ThresholdNode<_, _, _>, params: [f32, f32, LuminanceCalculation]),
|
||||
raster_node!(graphene_core::raster::VibranceNode<_>, params: [f32]),
|
||||
raster_node!(graphene_core::raster::ThresholdNode<_, _, _>, params: [f64, f64, LuminanceCalculation]),
|
||||
raster_node!(graphene_core::raster::VibranceNode<_>, params: [f64]),
|
||||
raster_node!(
|
||||
graphene_core::raster::ChannelMixerNode<_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _>,
|
||||
params: [bool, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32]
|
||||
params: [bool, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64]
|
||||
),
|
||||
raster_node!(
|
||||
graphene_core::raster::SelectiveColorNode<_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _>,
|
||||
params: [RelativeAbsolute, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32]
|
||||
params: [RelativeAbsolute, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64, f64]
|
||||
),
|
||||
vec![(
|
||||
ProtoNodeIdentifier::new("graphene_core::raster::BrightnessContrastNode<_, _, _>"),
|
||||
|
@ -487,9 +499,9 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
Box::pin(async move {
|
||||
use graphene_core::raster::brightness_contrast::*;
|
||||
|
||||
let brightness: DowncastBothNode<(), f32> = DowncastBothNode::new(args[0].clone());
|
||||
let brightness: DowncastBothNode<(), f64> = DowncastBothNode::new(args[0].clone());
|
||||
let brightness = ClonedNode::new(brightness.eval(()).await);
|
||||
let contrast: DowncastBothNode<(), f32> = DowncastBothNode::new(args[1].clone());
|
||||
let contrast: DowncastBothNode<(), f64> = DowncastBothNode::new(args[1].clone());
|
||||
let contrast = ClonedNode::new(contrast.eval(()).await);
|
||||
let use_legacy: DowncastBothNode<(), bool> = DowncastBothNode::new(args[2].clone());
|
||||
|
||||
|
@ -547,14 +559,14 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
NodeIOTypes::new(concrete!(ImageFrame<Color>), concrete!(ImageFrame<Color>), vec![fn_type!(graphene_core::raster::curve::Curve)]),
|
||||
),
|
||||
],
|
||||
raster_node!(graphene_core::raster::OpacityNode<_>, params: [f32]),
|
||||
register_node!(graphene_core::raster::OpacityNode<_>, input: VectorData, params: [f32]),
|
||||
register_node!(graphene_core::raster::OpacityNode<_>, input: GraphicGroup, params: [f32]),
|
||||
raster_node!(graphene_core::raster::OpacityNode<_>, params: [f64]),
|
||||
register_node!(graphene_core::raster::OpacityNode<_>, input: VectorData, params: [f64]),
|
||||
register_node!(graphene_core::raster::OpacityNode<_>, input: GraphicGroup, params: [f64]),
|
||||
register_node!(graphene_core::raster::BlendModeNode<_>, input: VectorData, params: [BlendMode]),
|
||||
register_node!(graphene_core::raster::BlendModeNode<_>, input: GraphicGroup, params: [BlendMode]),
|
||||
register_node!(graphene_core::raster::BlendModeNode<_>, input: ImageFrame<Color>, params: [BlendMode]),
|
||||
raster_node!(graphene_core::raster::PosterizeNode<_>, params: [f32]),
|
||||
raster_node!(graphene_core::raster::ExposureNode<_, _, _>, params: [f32, f32, f32]),
|
||||
raster_node!(graphene_core::raster::PosterizeNode<_>, params: [f64]),
|
||||
raster_node!(graphene_core::raster::ExposureNode<_, _, _>, params: [f64, f64, f64]),
|
||||
register_node!(graphene_core::memo::LetNode<_>, input: Option<ImageFrame<Color>>, params: []),
|
||||
register_node!(graphene_core::memo::LetNode<_>, input: Option<WasmEditorApi>, params: []),
|
||||
async_node!(graphene_core::memo::EndLetNode<_, _>, input: WasmEditorApi, output: ImageFrame<Color>, params: [ImageFrame<Color>]),
|
||||
|
@ -628,13 +640,13 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
fn_type!(Option<DVec2>),
|
||||
fn_type!(u32),
|
||||
fn_type!(ImaginateSamplingMethod),
|
||||
fn_type!(f32),
|
||||
fn_type!(f64),
|
||||
fn_type!(String),
|
||||
fn_type!(String),
|
||||
fn_type!(bool),
|
||||
fn_type!(f32),
|
||||
fn_type!(f64),
|
||||
fn_type!(bool),
|
||||
fn_type!(f32),
|
||||
fn_type!(f64),
|
||||
fn_type!(ImaginateMaskStartingFill),
|
||||
fn_type!(bool),
|
||||
fn_type!(bool),
|
||||
|
@ -657,7 +669,7 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
async_node!(graphene_core::memo::ImpureMemoNode<_, _, _>, input: Footprint, output: VectorData, fn_params: [Footprint => VectorData]),
|
||||
register_node!(graphene_core::structural::ConsNode<_, _>, input: Image<Color>, params: [&str]),
|
||||
register_node!(graphene_std::raster::ImageFrameNode<_, _>, input: Image<Color>, params: [DAffine2]),
|
||||
register_node!(graphene_std::raster::NoisePatternNode<_, _, _, _, _, _, _, _, _, _, _, _, _, _, _>, input: (), params: [UVec2, u32, f32, NoiseType, DomainWarpType, f32, FractalType, u32, f32, f32, f32, f32, CellularDistanceFunction, CellularReturnType, f32]),
|
||||
register_node!(graphene_std::raster::NoisePatternNode<_, _, _, _, _, _, _, _, _, _, _, _, _, _, _>, input: (), params: [UVec2, u32, f64, NoiseType, DomainWarpType, f64, FractalType, u32, f64, f64, f64, f64, CellularDistanceFunction, CellularReturnType, f64]),
|
||||
#[cfg(feature = "quantization")]
|
||||
register_node!(graphene_std::quantization::GenerateQuantizationNode<_, _>, input: ImageFrame<Color>, params: [u32, u32]),
|
||||
register_node!(graphene_core::quantization::QuantizeNode<_>, input: Color, params: [QuantizationChannels]),
|
||||
|
@ -679,20 +691,20 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
async_node!(graphene_std::wasm_application_io::RenderNode<_, _, _>, input: WasmEditorApi, output: RenderOutput, fn_params: [Footprint => Option<Color>, () => Arc<WasmSurfaceHandle>]),
|
||||
async_node!(graphene_std::wasm_application_io::RenderNode<_, _, _>, input: WasmEditorApi, output: RenderOutput, fn_params: [() => Vec<Color>, () => Arc<WasmSurfaceHandle>]),
|
||||
async_node!(graphene_std::wasm_application_io::RenderNode<_, _, _>, input: WasmEditorApi, output: RenderOutput, fn_params: [Footprint => Vec<Color>, () => Arc<WasmSurfaceHandle>]),
|
||||
async_node!(graphene_core::transform::TransformNode<_, _, _, _, _, _>, input: Footprint, output: VectorData, fn_params: [Footprint => VectorData, () => DVec2, () => f32, () => DVec2, () => DVec2, () => DVec2]),
|
||||
async_node!(graphene_core::transform::TransformNode<_, _, _, _, _, _>, input: Footprint, output: WasmSurfaceHandleFrame, fn_params: [Footprint => WasmSurfaceHandleFrame, () => DVec2, () => f32, () => DVec2, () => DVec2, () => DVec2]),
|
||||
async_node!(graphene_core::transform::TransformNode<_, _, _, _, _, _>, input: Footprint, output: WasmSurfaceHandleFrame, fn_params: [Footprint => WasmSurfaceHandleFrame, () => DVec2, () => f32, () => DVec2, () => DVec2, () => DVec2]),
|
||||
async_node!(graphene_core::transform::TransformNode<_, _, _, _, _, _>, input: Footprint, output: ImageFrame<Color>, fn_params: [Footprint => ImageFrame<Color>, () => DVec2, () => f32, () => DVec2, () => DVec2, () => DVec2]),
|
||||
async_node!(graphene_core::transform::TransformNode<_, _, _, _, _, _>, input: Footprint, output: GraphicGroup, fn_params: [Footprint => GraphicGroup, () => DVec2, () => f32, () => DVec2, () => DVec2, () => DVec2]),
|
||||
async_node!(graphene_core::transform::TransformNode<_, _, _, _, _, _>, input: Footprint, output: VectorData, fn_params: [Footprint => VectorData, () => DVec2, () => f64, () => DVec2, () => DVec2, () => DVec2]),
|
||||
async_node!(graphene_core::transform::TransformNode<_, _, _, _, _, _>, input: Footprint, output: WasmSurfaceHandleFrame, fn_params: [Footprint => WasmSurfaceHandleFrame, () => DVec2, () => f64, () => DVec2, () => DVec2, () => DVec2]),
|
||||
async_node!(graphene_core::transform::TransformNode<_, _, _, _, _, _>, input: Footprint, output: WasmSurfaceHandleFrame, fn_params: [Footprint => WasmSurfaceHandleFrame, () => DVec2, () => f64, () => DVec2, () => DVec2, () => DVec2]),
|
||||
async_node!(graphene_core::transform::TransformNode<_, _, _, _, _, _>, input: Footprint, output: ImageFrame<Color>, fn_params: [Footprint => ImageFrame<Color>, () => DVec2, () => f64, () => DVec2, () => DVec2, () => DVec2]),
|
||||
async_node!(graphene_core::transform::TransformNode<_, _, _, _, _, _>, input: Footprint, output: GraphicGroup, fn_params: [Footprint => GraphicGroup, () => DVec2, () => f64, () => DVec2, () => DVec2, () => DVec2]),
|
||||
register_node!(graphene_core::transform::SetTransformNode<_>, input: VectorData, params: [VectorData]),
|
||||
register_node!(graphene_core::transform::SetTransformNode<_>, input: ImageFrame<Color>, params: [ImageFrame<Color>]),
|
||||
register_node!(graphene_core::transform::SetTransformNode<_>, input: VectorData, params: [DAffine2]),
|
||||
register_node!(graphene_core::transform::SetTransformNode<_>, input: ImageFrame<Color>, params: [DAffine2]),
|
||||
register_node!(graphene_core::vector::SetFillNode<_, _, _, _, _, _, _>, input: VectorData, params: [graphene_core::vector::style::FillType, Option<graphene_core::Color>, graphene_core::vector::style::GradientType, DVec2, DVec2, DAffine2, Vec<(f64, graphene_core::Color)>]),
|
||||
register_node!(graphene_core::vector::SetStrokeNode<_, _, _, _, _, _, _>, input: VectorData, params: [Option<graphene_core::Color>, f32, Vec<f32>, f32, graphene_core::vector::style::LineCap, graphene_core::vector::style::LineJoin, f32]),
|
||||
register_node!(graphene_core::vector::SetStrokeNode<_, _, _, _, _, _, _>, input: VectorData, params: [Option<graphene_core::Color>, f64, Vec<f64>, f64, graphene_core::vector::style::LineCap, graphene_core::vector::style::LineJoin, f64]),
|
||||
register_node!(graphene_core::vector::RepeatNode<_, _>, input: VectorData, params: [DVec2, u32]),
|
||||
register_node!(graphene_core::vector::BoundingBoxNode, input: VectorData, params: []),
|
||||
register_node!(graphene_core::vector::CircularRepeatNode<_, _, _>, input: VectorData, params: [f32, f32, u32]),
|
||||
register_node!(graphene_core::vector::CircularRepeatNode<_, _, _>, input: VectorData, params: [f64, f64, u32]),
|
||||
vec![(
|
||||
ProtoNodeIdentifier::new("graphene_core::transform::CullNode<_>"),
|
||||
|args| {
|
||||
|
@ -735,18 +747,18 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
)],
|
||||
register_node!(graphene_std::raster::SampleNode<_>, input: Footprint, params: [ImageFrame<Color>]),
|
||||
register_node!(graphene_std::raster::MandelbrotNode, input: Footprint, params: []),
|
||||
async_node!(graphene_core::vector::CopyToPoints<_, _, _, _, _, _>, input: Footprint, output: VectorData, fn_params: [Footprint => VectorData, Footprint => VectorData, () => f32, () => f32, () => f32, () => f32]),
|
||||
async_node!(graphene_core::vector::CopyToPoints<_, _, _, _, _, _>, input: Footprint, output: GraphicGroup, fn_params: [Footprint => VectorData, Footprint => GraphicGroup, () => f32, () => f32, () => f32, () => f32]),
|
||||
async_node!(graphene_core::vector::SamplePoints<_, _, _, _, _, _>, input: Footprint, output: VectorData, fn_params: [Footprint => VectorData, () => f32, () => f32, () => f32, () => bool, Footprint => Vec<Vec<f64>>]),
|
||||
register_node!(graphene_core::vector::PoissonDiskPoints<_>, input: VectorData, params: [f32]),
|
||||
async_node!(graphene_core::vector::CopyToPoints<_, _, _, _, _, _>, input: Footprint, output: VectorData, fn_params: [Footprint => VectorData, Footprint => VectorData, () => f64, () => f64, () => f64, () => f64]),
|
||||
async_node!(graphene_core::vector::CopyToPoints<_, _, _, _, _, _>, input: Footprint, output: GraphicGroup, fn_params: [Footprint => VectorData, Footprint => GraphicGroup, () => f64, () => f64, () => f64, () => f64]),
|
||||
async_node!(graphene_core::vector::SamplePoints<_, _, _, _, _, _>, input: Footprint, output: VectorData, fn_params: [Footprint => VectorData, () => f64, () => f64, () => f64, () => bool, Footprint => Vec<Vec<f64>>]),
|
||||
register_node!(graphene_core::vector::PoissonDiskPoints<_>, input: VectorData, params: [f64]),
|
||||
register_node!(graphene_core::vector::LengthsOfSegmentsOfSubpaths, input: VectorData, params: []),
|
||||
register_node!(graphene_core::vector::SplinesFromPointsNode, input: VectorData, params: []),
|
||||
async_node!(graphene_core::vector::MorphNode<_, _, _, _>, input: Footprint, output: VectorData, fn_params: [Footprint => VectorData, Footprint => VectorData, () => u32, () => f32]),
|
||||
register_node!(graphene_core::vector::generator_nodes::CircleGenerator<_>, input: (), params: [f32]),
|
||||
register_node!(graphene_core::vector::generator_nodes::EllipseGenerator<_, _>, input: (), params: [f32, f32]),
|
||||
register_node!(graphene_core::vector::generator_nodes::RectangleGenerator<_, _>, input: (), params: [f32, f32]),
|
||||
register_node!(graphene_core::vector::generator_nodes::RegularPolygonGenerator<_, _>, input: (), params: [u32, f32]),
|
||||
register_node!(graphene_core::vector::generator_nodes::StarGenerator<_, _, _>, input: (), params: [u32, f32, f32]),
|
||||
async_node!(graphene_core::vector::MorphNode<_, _, _, _>, input: Footprint, output: VectorData, fn_params: [Footprint => VectorData, Footprint => VectorData, () => u32, () => f64]),
|
||||
register_node!(graphene_core::vector::generator_nodes::CircleGenerator<_>, input: (), params: [f64]),
|
||||
register_node!(graphene_core::vector::generator_nodes::EllipseGenerator<_, _>, input: (), params: [f64, f64]),
|
||||
register_node!(graphene_core::vector::generator_nodes::RectangleGenerator<_, _>, input: (), params: [f64, f64]),
|
||||
register_node!(graphene_core::vector::generator_nodes::RegularPolygonGenerator<_, _>, input: (), params: [u32, f64]),
|
||||
register_node!(graphene_core::vector::generator_nodes::StarGenerator<_, _, _>, input: (), params: [u32, f64, f64]),
|
||||
register_node!(graphene_core::vector::generator_nodes::LineGenerator<_, _>, input: (), params: [DVec2, DVec2]),
|
||||
register_node!(graphene_core::vector::generator_nodes::SplineGenerator<_>, input: (), params: [Vec<DVec2>]),
|
||||
register_node!(
|
||||
|
@ -754,7 +766,7 @@ fn node_registry() -> HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes, NodeCons
|
|||
input: Vec<graphene_core::vector::bezier_rs::Subpath<graphene_core::uuid::ManipulatorGroupId>>,
|
||||
params: [Vec<graphene_core::uuid::ManipulatorGroupId>]
|
||||
),
|
||||
register_node!(graphene_core::text::TextGeneratorNode<_, _, _>, input: WasmEditorApi, params: [String, graphene_core::text::Font, f32]),
|
||||
register_node!(graphene_core::text::TextGeneratorNode<_, _, _>, input: WasmEditorApi, params: [String, graphene_core::text::Font, f64]),
|
||||
register_node!(graphene_std::brush::VectorPointsNode, input: VectorData, params: []),
|
||||
register_node!(graphene_core::ExtractImageFrame, input: WasmEditorApi, params: []),
|
||||
async_node!(graphene_core::ConstructLayerNode<_, _>, input: Footprint, output: GraphicGroup, fn_params: [Footprint => graphene_core::GraphicElement, Footprint => GraphicGroup]),
|
||||
|
@ -780,5 +792,5 @@ pub static NODE_REGISTRY: Lazy<HashMap<ProtoNodeIdentifier, HashMap<NodeIOTypes,
|
|||
|
||||
#[cfg(test)]
|
||||
mod protograph_testing {
|
||||
// TODO: adde tests testing the node registry
|
||||
// TODO: add tests testing the node registry
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue