Fix some typos in the node graph code (#1970)
This commit is contained in:
parent
f17f8ddf61
commit
507210b961
|
|
@ -142,7 +142,7 @@ The definition for the constructor of a node that applies the opacity transforma
|
|||
Box::pin(async move {
|
||||
// Creates an instance of the struct that defines the node.
|
||||
let node = construct_node!(args, graphene_core::raster::OpacityNode<_>, [f64]).await;
|
||||
// Create a new map image node, that calles the `node` for each pixel.
|
||||
// Create a new map image node, that calls the `node` for each pixel.
|
||||
let map_node = graphene_std::raster::MapImageNode::new(graphene_core::value::ValueNode::new(node));
|
||||
// Wraps this in a type erased future `Box<Pin<dyn core::future::Future<Output = T> + 'n>>` - this allows it to work with async.
|
||||
let map_node = graphene_std::any::FutureWrapperNode::new(map_node);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ pub use types::Cow;
|
|||
/// See `node-graph/README.md` for information on how to define a new node.
|
||||
pub trait Node<'i, Input: 'i>: 'i {
|
||||
type Output: 'i;
|
||||
/// Evalutes the node with the single specified input.
|
||||
/// Evaluates the node with the single specified input.
|
||||
fn eval(&'i self, input: Input) -> Self::Output;
|
||||
/// Resets the node, e.g. the LetNode's cache is set to None.
|
||||
fn reset(&self) {}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ impl core::fmt::Display for NodeId {
|
|||
}
|
||||
}
|
||||
|
||||
/// Hash two IDs together, returning a new ID that is always consistant for two input IDs in a specific order.
|
||||
/// This is used during [`NodeNetwork::flatten`] in order to ensure consistant yet non-conflicting IDs for inner networks.
|
||||
/// Hash two IDs together, returning a new ID that is always consistent for two input IDs in a specific order.
|
||||
/// This is used during [`NodeNetwork::flatten`] in order to ensure consistent yet non-conflicting IDs for inner networks.
|
||||
fn merge_ids(a: NodeId, b: NodeId) -> NodeId {
|
||||
let mut hasher = DefaultHasher::new();
|
||||
a.hash(&mut hasher);
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ impl Deref for NodeContainer {
|
|||
}
|
||||
|
||||
/// #Safety
|
||||
/// Marks NodeContainer as Sync. This dissallows the use of threadlocal stroage for nodes as this would invalidate references to them.
|
||||
// TODO: implement this on a higher level wrapper to avoid missuse
|
||||
/// Marks NodeContainer as Sync. This disallows the use of threadlocal storage for nodes as this would invalidate references to them.
|
||||
// TODO: implement this on a higher level wrapper to avoid misuse
|
||||
#[cfg(feature = "dealloc_nodes")]
|
||||
unsafe impl Send for NodeContainer {}
|
||||
#[cfg(feature = "dealloc_nodes")]
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ fn mask_image<
|
|||
return image;
|
||||
}
|
||||
|
||||
// Transforms a point from the background image to the forground image
|
||||
// Transforms a point from the background image to the foreground image
|
||||
let bg_to_fg = image.transform() * DAffine2::from_scale(1. / image_size);
|
||||
let stencil_transform_inverse = stencil.transform().inverse();
|
||||
|
||||
|
|
@ -343,7 +343,7 @@ where
|
|||
MapFn: Fn(_P, _P) -> _P,
|
||||
{
|
||||
let background_size = DVec2::new(background.width() as f64, background.height() as f64);
|
||||
// Transforms a point from the background image to the forground image
|
||||
// Transforms a point from the background image to the foreground image
|
||||
let bg_to_fg = background.transform() * DAffine2::from_scale(1. / background_size);
|
||||
|
||||
// Footprint of the foreground image (0,0) (1, 1) in the background image space
|
||||
|
|
|
|||
Loading…
Reference in New Issue