not
not
Performs a logical NOT operation, inverting the input boolean condition (true becomes false, false becomes true), used to create inverse logic or masks.
Core Advantages
Common Uses
Inverting an existing mask to apply an effect to its outer region, such as applying a filter outside a circle.
Implementing an 'exclusion' or 'subtraction' effect in compound logic, such as `isMetal.and(not(isScratch))`.
Used with the original condition in a `cond` node to ensure two effects are mutually exclusive.
How to adjust
Adjust by changing the condition fed into the `not` node. For example, in a logical expression like `A.and(not(B))`, the `not` node acts to 'punch a hole' defined by B out of the area defined by A. Visually, this creates an 'exclusion' or 'donut' effect.
Code Examples
1// Create condition: is the pixel inside the circle?
2const isInsideCircle = lessThan( dist, radius );
3
4// Use 'not' to get the inverse condition: is the pixel outside the circle?
5const isOutsideCircle = not( isInsideCircle );