git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

nodes/page_shape.json (4K)

 1 {
 2  "name": "Page Shape",
 3  "type": "page_shape",
 4  "inputs": 1,
 5  "outputs": 1,
 6  "params": [
 7   { "name": "input", "label": "Input", "type": "node", "default": "", "description": "The page node (or page chain) whose image the shape is drawn onto. Without one the node produces nothing." },
 8   { "name": "shape", "label": "Shape", "type": "choice:Rectangle,Ellipse,Line,Polygon", "default": "Rectangle", "description": "Outline to draw: a rectangle, an ellipse, a straight line, or a regular polygon fitted inside the Width by Height box." },
 9   { "name": "x", "label": "X", "type": "float", "default": "4.25", "description": "Horizontal position of the shape's centre, in the page's Units from the page's left edge.", "group": "geometry" },
10   { "name": "y", "label": "Y", "type": "float", "default": "5.50", "description": "Vertical position of the shape's centre, in the page's Units from the page's top edge (y runs down).", "group": "geometry" },
11   { "name": "width", "label": "Width", "type": "float", "default": "3.00", "description": "Width of the shape's box before rotation, in the page's Units. For a line, its length.", "group": "geometry" },
12   { "name": "height", "label": "Height", "type": "float", "default": "2.00", "show_when": "shape != Line", "description": "Height of the shape's box before rotation, in the page's Units. A line's thickness comes from Stroke Width instead.", "group": "geometry" },
13   { "name": "rotation", "label": "Rotation", "type": "slider", "default": "0", "min": -180.0, "max": 180.0, "step": 1.0, "description": "Turns the shape about its centre, in degrees; positive is clockwise as the page is viewed.", "group": "geometry" },
14   { "name": "corner_radius", "label": "Corner Radius", "type": "float", "default": "0.00", "show_when": "shape == Rectangle", "description": "Rounds the rectangle's corners, in the page's Units. 0 gives sharp corners; limited to half the shorter side.", "group": "geometry" },
15   { "name": "sides", "label": "Sides", "type": "spinbox", "default": "3", "min": 3, "max": 64, "step": 1, "show_when": "shape == Polygon", "description": "Number of corners of the polygon, 3 to 64, with the first corner at the top. More sides approach an ellipse.", "group": "geometry" },
16   { "name": "fill", "label": "Fill", "type": "toggle", "default": "true", "show_when": "shape != Line", "description": "When on, the inside of the shape is filled with Fill Color. Turn off for an outline only.", "group": "fill" },
17   { "name": "fill_color", "label": "Fill Color", "type": "float3", "default": "0.20:0.45:0.85", "min": 0.0, "max": 1.0, "show_when": "shape != Line && fill == true", "description": "Colour of the shape's fill; how solid it is comes from Fill Opacity.", "group": "fill" },
18   { "name": "fill_opacity", "label": "Fill Opacity", "type": "slider", "default": "1.00", "min": 0.0, "max": 1.0, "step": 0.01, "show_when": "shape != Line && fill == true", "description": "Opacity of the fill, 0 (invisible) to 1 (solid), blended over what is already on the page.", "group": "fill" },
19   { "name": "stroke", "label": "Stroke", "type": "toggle", "default": "true", "description": "When on, the outline is drawn in Stroke Color at Stroke Width. A line shape is drawn only while this is on.", "group": "stroke" },
20   { "name": "stroke_color", "label": "Stroke Color", "type": "float3", "default": "0.00:0.00:0.00", "min": 0.0, "max": 1.0, "show_when": "stroke == true", "description": "Colour of the outline, and of the whole line for the Line shape.", "group": "stroke" },
21   { "name": "stroke_opacity", "label": "Stroke Opacity", "type": "slider", "default": "1.00", "min": 0.0, "max": 1.0, "step": 0.01, "show_when": "stroke == true", "description": "Opacity of the outline, 0 (invisible) to 1 (solid), blended over the fill and the page.", "group": "stroke" },
22   { "name": "stroke_width", "label": "Stroke Width", "type": "float", "default": "0.02", "show_when": "stroke == true", "description": "Thickness of the outline in the page's Units, centred on the shape's edge (half inside, half out). For a line, its thickness.", "group": "stroke" }
23  ]
24 }