mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-03 14:14:49 +01:00
add alpha to default colors
This commit is contained in:
parent
ba6e8a7eb0
commit
e842d9dc54
75 changed files with 146 additions and 232 deletions
|
@ -31,10 +31,10 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
.setDisplay(VALUE_DISPLAY.slider)
|
.setDisplay(VALUE_DISPLAY.slider)
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
newInput(9, nodeValue_Color("Light color", self, c_white))
|
newInput(9, nodeValue_Color("Light color", self, cola(c_white)))
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
newInput(10, nodeValue_Color("Ambient color", self, c_grey))
|
newInput(10, nodeValue_Color("Ambient color", self, cola(c_grey)))
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
newInput(11, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]))
|
newInput(11, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]))
|
||||||
|
|
|
@ -23,9 +23,9 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||||
newInput(8, nodeValue_Float("Light intensity", self, 1))
|
newInput(8, nodeValue_Float("Light intensity", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
newInput(9, nodeValue_Color("Light color", self, c_white));
|
newInput(9, nodeValue_Color("Light color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(10, nodeValue_Color("Ambient color", self, c_grey));
|
newInput(10, nodeValue_Color("Ambient color", self, cola(c_grey)));
|
||||||
|
|
||||||
newInput(11, nodeValue("3D vertex", self, CONNECT_TYPE.input, VALUE_TYPE.d3vertex, []))
|
newInput(11, nodeValue("3D vertex", self, CONNECT_TYPE.input, VALUE_TYPE.d3vertex, []))
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
|
@ -30,8 +30,8 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
newInput(11, nodeValue_Float("Light intensity", self, 1))
|
newInput(11, nodeValue_Float("Light intensity", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
newInput(12, nodeValue_Color("Light color", self, c_white));
|
newInput(12, nodeValue_Color("Light color", self, cola(c_white)));
|
||||||
newInput(13, nodeValue_Color("Ambient color", self, c_grey));
|
newInput(13, nodeValue_Color("Ambient color", self, cola(c_grey)));
|
||||||
|
|
||||||
newInput(14, nodeValue_Surface("Height map", self));
|
newInput(14, nodeValue_Surface("Height map", self));
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group)
|
||||||
|
|
||||||
newInput(in_d3d + 0, nodeValue_Bool("Active", self, true));
|
newInput(in_d3d + 0, nodeValue_Bool("Active", self, true));
|
||||||
|
|
||||||
newInput(in_d3d + 1, nodeValue_Color("Color", self, c_white));
|
newInput(in_d3d + 1, nodeValue_Color("Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(in_d3d + 2, nodeValue_Float("Intensity", self, 1))
|
newInput(in_d3d + 2, nodeValue_Float("Intensity", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -31,10 +31,10 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
||||||
.setDisplay(VALUE_DISPLAY.slider)
|
.setDisplay(VALUE_DISPLAY.slider)
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
newInput(9, nodeValue_Color("Light color", self, c_white))
|
newInput(9, nodeValue_Color("Light color", self, cola(c_white)))
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
newInput(10, nodeValue_Color("Ambient color", self, c_grey))
|
newInput(10, nodeValue_Color("Ambient color", self, cola(c_grey)))
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
newInput(11, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]));
|
newInput(11, nodeValue_Vec3("Object scale", self, [ 1, 1, 1 ]));
|
||||||
|
|
|
@ -21,8 +21,8 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
newInput(7, nodeValue_Float("Light intensity", self, 1))
|
newInput(7, nodeValue_Float("Light intensity", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
newInput(8, nodeValue_Color("Light color", self, c_white));
|
newInput(8, nodeValue_Color("Light color", self, cola(c_white)));
|
||||||
newInput(9, nodeValue_Color("Ambient color", self, c_grey));
|
newInput(9, nodeValue_Color("Ambient color", self, cola(c_grey)));
|
||||||
|
|
||||||
newInput(10, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]));
|
newInput(10, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]));
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,9 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
newInput(15, nodeValue_Float("Light intensity", self, 1))
|
newInput(15, nodeValue_Float("Light intensity", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
newInput(16, nodeValue_Color("Light color", self, c_white));
|
newInput(16, nodeValue_Color("Light color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(17, nodeValue_Color("Ambient color", self, c_grey));
|
newInput(17, nodeValue_Color("Ambient color", self, cola(c_grey)));
|
||||||
|
|
||||||
newInput(18, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]));
|
newInput(18, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]));
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||||
newInput(12, nodeValue_Float("Light intensity", self, 1))
|
newInput(12, nodeValue_Float("Light intensity", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
newInput(13, nodeValue_Color("Light color", self, c_white));
|
newInput(13, nodeValue_Color("Light color", self, cola(c_white)));
|
||||||
newInput(14, nodeValue_Color("Ambient color", self, c_grey));
|
newInput(14, nodeValue_Color("Ambient color", self, cola(c_grey)));
|
||||||
|
|
||||||
newInput(15, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]));
|
newInput(15, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]));
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
newInput(9, nodeValue_Float("Light intensity", self, 1))
|
newInput(9, nodeValue_Float("Light intensity", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
newInput(10, nodeValue_Color("Light color", self, c_white));
|
newInput(10, nodeValue_Color("Light color", self, cola(c_white)));
|
||||||
newInput(11, nodeValue_Color("Ambient color", self, c_grey));
|
newInput(11, nodeValue_Color("Ambient color", self, cola(c_grey)));
|
||||||
|
|
||||||
newInput(12, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]));
|
newInput(12, nodeValue_Vec3("Object rotation", self, [ 0, 0, 0 ]));
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,10 @@
|
||||||
// .setDisplay(VALUE_DISPLAY.slider)
|
// .setDisplay(VALUE_DISPLAY.slider)
|
||||||
// .rejectArray();
|
// .rejectArray();
|
||||||
|
|
||||||
// newInput(9, nodeValue_Color("Light color", self, c_white))
|
// newInput(9, nodeValue_Color("Light color", self, cola(c_white)))
|
||||||
// .rejectArray();
|
// .rejectArray();
|
||||||
|
|
||||||
// newInput(10, nodeValue_Color("Ambient color", self, c_grey))
|
// newInput(10, nodeValue_Color("Ambient color", self, cola(c_grey)))
|
||||||
// .rejectArray();
|
// .rejectArray();
|
||||||
|
|
||||||
// newInput(15, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]))
|
// newInput(15, nodeValue_Enum_Button("Projection", self, 0, [ "Orthographic", "Perspective" ]))
|
||||||
|
|
|
@ -22,9 +22,9 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
newInput(8, nodeValue_Float("Light intensity", self, 1))
|
newInput(8, nodeValue_Float("Light intensity", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
newInput(9, nodeValue_Color("Light color", self, c_white));
|
newInput(9, nodeValue_Color("Light color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(10, nodeValue_Color("Ambient color", self, c_grey));
|
newInput(10, nodeValue_Color("Ambient color", self, cola(c_grey)));
|
||||||
|
|
||||||
newInput(11, nodeValue("3D object", self, CONNECT_TYPE.input, VALUE_TYPE.d3object, noone))
|
newInput(11, nodeValue("3D object", self, CONNECT_TYPE.input, VALUE_TYPE.d3object, noone))
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
|
@ -23,9 +23,9 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
|
||||||
newInput(8, nodeValue_Float("Light intensity", self, 1))
|
newInput(8, nodeValue_Float("Light intensity", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
newInput(9, nodeValue_Color("Light color", self, c_white));
|
newInput(9, nodeValue_Color("Light color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(10, nodeValue_Color("Ambient color", self, c_grey));
|
newInput(10, nodeValue_Color("Ambient color", self, cola(c_grey)));
|
||||||
|
|
||||||
newInput(11, nodeValue("3D object", self, CONNECT_TYPE.input, VALUE_TYPE.d3object, noone))
|
newInput(11, nodeValue("3D object", self, CONNECT_TYPE.input, VALUE_TYPE.d3object, noone))
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
|
@ -45,7 +45,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
newInput(_index + 3, nodeValue_Float("Intensity", self, 1))
|
newInput(_index + 3, nodeValue_Float("Intensity", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ]});
|
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ]});
|
||||||
|
|
||||||
newInput(_index + 4, nodeValue_Color("Color", self, c_white));
|
newInput(_index + 4, nodeValue_Color("Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(_index + 5, nodeValue_Vec2("Start", self, [ 16, 16 ]));
|
newInput(_index + 5, nodeValue_Vec2("Start", self, [ 16, 16 ]));
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ function Node_3D_Camera_Set(_x, _y, _group = noone) : Node_3D_Camera(_x, _y, _gr
|
||||||
.setName("Vertical angle")
|
.setName("Vertical angle")
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] });
|
||||||
|
|
||||||
newInput(in_cam + 2, nodeValue_Color("L1 Color", self, c_white ))
|
newInput(in_cam + 2, nodeValue_Color("L1 Color", self, cola(c_white) ))
|
||||||
.setName("Color")
|
.setName("Color")
|
||||||
|
|
||||||
newInput(in_cam + 3, nodeValue_Float("L1 Intensity", self, 1 ))
|
newInput(in_cam + 3, nodeValue_Float("L1 Intensity", self, 1 ))
|
||||||
|
@ -26,7 +26,7 @@ function Node_3D_Camera_Set(_x, _y, _group = noone) : Node_3D_Camera(_x, _y, _gr
|
||||||
.setName("Vertical angle")
|
.setName("Vertical angle")
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] });
|
||||||
|
|
||||||
newInput(in_cam + 6, nodeValue_Color("L2 Color", self, c_white ))
|
newInput(in_cam + 6, nodeValue_Color("L2 Color", self, cola(c_white) ))
|
||||||
.setName("Color")
|
.setName("Color")
|
||||||
|
|
||||||
newInput(in_cam + 7, nodeValue_Float("L2 Intensity", self, 0.25 ))
|
newInput(in_cam + 7, nodeValue_Float("L2 Intensity", self, 0.25 ))
|
||||||
|
|
|
@ -21,7 +21,7 @@ function Node_VFX_Triangulate(_x, _y, _group = noone) : Node(_x, _y, _group) con
|
||||||
|
|
||||||
newInput(2, nodeValue_Float("Thickness", self, 1 ));
|
newInput(2, nodeValue_Float("Thickness", self, 1 ));
|
||||||
|
|
||||||
newInput(3, nodeValue_Color("Color", self, c_white ));
|
newInput(3, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(4, nodeValue_Bool("Inherit Thickness", self, false ));
|
newInput(4, nodeValue_Bool("Inherit Thickness", self, false ));
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ function Node_Active_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
|
|
||||||
newInput(4, nodeValue_Vec2("Scale", self, [ 1, 1 ] ));
|
newInput(4, nodeValue_Vec2("Scale", self, [ 1, 1 ] ));
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Color", self, c_white ));
|
newInput(5, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(6, nodeValue_Float("Alpha", self, 1 ))
|
newInput(6, nodeValue_Float("Alpha", self, 1 ))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -13,7 +13,7 @@ function Node_Atlas_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
|
|
||||||
newInput(4, nodeValue_Vec2("Scale", self, [ 0, 0 ]));
|
newInput(4, nodeValue_Vec2("Scale", self, [ 0, 0 ]));
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Blend", self, c_white));
|
newInput(5, nodeValue_Color("Blend", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(6, nodeValue_Float("Alpha", self, 1));
|
newInput(6, nodeValue_Float("Alpha", self, 1));
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
|
|
||||||
newInput(3, nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."));
|
newInput(3, nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."));
|
||||||
|
|
||||||
newInput(4, nodeValue_Color("Color", self, c_black));
|
newInput(4, nodeValue_Color("Color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(5, nodeValue_Surface("Mask", self));
|
newInput(5, nodeValue_Surface("Mask", self));
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
|
|
||||||
newInput(4, nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."));
|
newInput(4, nodeValue_Bool("Override color", self, false, "Replace all color while keeping the alpha. Used to\nfix grey outline when bluring transparent pixel."));
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Color", self, c_black));
|
newInput(5, nodeValue_Color("Color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(6, nodeValue_Surface("Mask", self));
|
newInput(6, nodeValue_Surface("Mask", self));
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@ function Node_Box_Pattern(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
newInput(3, nodeValue_Vec2("Position", self, [0, 0] ))
|
newInput(3, nodeValue_Vec2("Position", self, [0, 0] ))
|
||||||
.setUnitRef(function(index) { return getDimension(index); });
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
newInput(4, nodeValue_Color("Color 1", self, c_white));
|
newInput(4, nodeValue_Color("Color 1", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Color 2", self, c_black));
|
newInput(5, nodeValue_Color("Color 2", self, cola(c_black)));
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
|
|
||||||
newInput( 0, nodeValue_Dimension(self));
|
newInput( 0, nodeValue_Dimension(self));
|
||||||
|
|
||||||
newInput( 1, nodeValue_Color("Color", self, c_white ));
|
newInput( 1, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
newInput( 2, nodeValue_Int("Brush size", self, 1 ))
|
newInput( 2, nodeValue_Int("Brush size", self, 1 ))
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] });
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
newInput(3, nodeValue_Vec2("Position", self, [0, 0] ))
|
newInput(3, nodeValue_Vec2("Position", self, [0, 0] ))
|
||||||
.setUnitRef(function(index) { return getDimension(index); });
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
newInput(4, nodeValue_Color("Color 1", self, c_white));
|
newInput(4, nodeValue_Color("Color 1", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Color 2", self, c_black));
|
newInput(5, nodeValue_Color("Color 2", self, cola(c_black)));
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
||||||
name = "Color";
|
name = "Color";
|
||||||
setDimension(96, 48);
|
setDimension(96, 48);
|
||||||
|
|
||||||
newInput(0, nodeValue_Color("Color", self, c_white));
|
newInput(0, nodeValue_Color("Color", self, cola(c_white)));
|
||||||
|
|
||||||
newOutput(0, nodeValue_Output("Color", self, VALUE_TYPE.color, c_white));
|
newOutput(0, nodeValue_Output("Color", self, VALUE_TYPE.color, c_white));
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ function Node_Color_Data(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||||
name = "Color Data";
|
name = "Color Data";
|
||||||
setDimension(96, 48);
|
setDimension(96, 48);
|
||||||
|
|
||||||
newInput(0, nodeValue_Color("Color", self, c_white))
|
newInput(0, nodeValue_Color("Color", self, cola(c_white)))
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
newInput(1, nodeValue_Bool("Normalize", self, true));
|
newInput(1, nodeValue_Bool("Normalize", self, true));
|
||||||
|
|
|
@ -2,9 +2,9 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
name = "Mix Color";
|
name = "Mix Color";
|
||||||
setDimension(96, 48);;
|
setDimension(96, 48);;
|
||||||
|
|
||||||
newInput(0, nodeValue_Color("Color from", self, c_white));
|
newInput(0, nodeValue_Color("Color from", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(1, nodeValue_Color("Color to", self, c_white));
|
newInput(1, nodeValue_Color("Color to", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(2, nodeValue_Float("Mix", self, 0.5))
|
newInput(2, nodeValue_Float("Mix", self, 0.5))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -11,7 +11,7 @@ function Node_Crop_Content(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
newInput(3, nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ], "Add padding back after crop."));
|
newInput(3, nodeValue_Padding("Padding", self, [ 0, 0, 0, 0 ], "Add padding back after crop."));
|
||||||
|
|
||||||
newInput(4, nodeValue_Color("Background", self, cola(c_black, 0)));
|
newInput(4, nodeValue_Color("Background", self, cola(c_black, 0)));
|
||||||
|
|
||||||
newOutput(0, nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone));
|
newOutput(0, nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone));
|
||||||
|
|
||||||
newOutput(1, nodeValue_Output("Crop distance", self, VALUE_TYPE.integer, [ 0, 0, 0, 0 ]))
|
newOutput(1, nodeValue_Output("Crop distance", self, VALUE_TYPE.integer, [ 0, 0, 0, 0 ]))
|
||||||
|
|
|
@ -1273,19 +1273,20 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
||||||
|
|
||||||
} run_in(1, function() /*=>*/ { refreshNodeDisplay(); });
|
} run_in(1, function() /*=>*/ { refreshNodeDisplay(); });
|
||||||
|
|
||||||
__preDraw_data = { _x: undefined, _y: undefined, _s: undefined };
|
__preDraw_data = { _x: undefined, _y: undefined, _s: undefined, _p: undefined, sp: undefined };
|
||||||
|
|
||||||
static preDraw = function(_x, _y, _s) {
|
static preDraw = function(_x, _y, _s) {
|
||||||
var xx = x * _s + _x;
|
var xx = x * _s + _x;
|
||||||
var yy = y * _s + _y;
|
var yy = y * _s + _y;
|
||||||
|
|
||||||
var _upd = __preDraw_data._x != xx ||
|
var _upd = __preDraw_data._x != xx || __preDraw_data._y != yy || __preDraw_data._s != _s ||
|
||||||
__preDraw_data._y != yy ||
|
__preDraw_data._p != previewable || __preDraw_data.sp != show_parameter
|
||||||
__preDraw_data._s != _s;
|
|
||||||
|
|
||||||
__preDraw_data._x = xx;
|
__preDraw_data._x = xx;
|
||||||
__preDraw_data._y = yy;
|
__preDraw_data._y = yy;
|
||||||
__preDraw_data._s = _s;
|
__preDraw_data._s = _s;
|
||||||
|
__preDraw_data._p = previewable;
|
||||||
|
__preDraw_data.sp = show_parameter;
|
||||||
|
|
||||||
if(!_upd) {
|
if(!_upd) {
|
||||||
if(SHOW_PARAM) h = h_param;
|
if(SHOW_PARAM) h = h_param;
|
||||||
|
@ -1525,7 +1526,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
static drawJunctions = function(_x, _y, _mx, _my, _s) {
|
static drawJunctions = function(_x, _y, _mx, _my, _s) {
|
||||||
if(!active) return;
|
|
||||||
var hover = noone;
|
var hover = noone;
|
||||||
|
|
||||||
for(var i = 0, n = array_length(inputDisplayList); i < n; i++) { //inputs
|
for(var i = 0, n = array_length(inputDisplayList); i < n; i++) { //inputs
|
||||||
|
@ -1572,7 +1572,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
static drawJunctions_fast = function(_x, _y, _mx, _my, _s) {
|
static drawJunctions_fast = function(_x, _y, _mx, _my, _s) {
|
||||||
if(!active) return;
|
|
||||||
var hover = noone;
|
var hover = noone;
|
||||||
|
|
||||||
draw_set_circle_precision(4);
|
draw_set_circle_precision(4);
|
||||||
|
@ -1623,9 +1622,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
||||||
static onDrawJunctions = function(_x, _y, _mx, _my, _s) {}
|
static onDrawJunctions = function(_x, _y, _mx, _my, _s) {}
|
||||||
|
|
||||||
static drawJunctionNames = function(_x, _y, _mx, _my, _s) {
|
static drawJunctionNames = function(_x, _y, _mx, _my, _s) {
|
||||||
if(draw_graph_culled) return;
|
|
||||||
if(!active) return;
|
|
||||||
|
|
||||||
var amo = input_display_list == -1? array_length(inputs) : array_length(input_display_list);
|
var amo = input_display_list == -1? array_length(inputs) : array_length(input_display_list);
|
||||||
var jun;
|
var jun;
|
||||||
|
|
||||||
|
@ -1904,12 +1900,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
||||||
|
|
||||||
static drawNodeFG = function(_x, _y, _mx, _my, _s, display_parameter = noone, _panel = noone) { }
|
static drawNodeFG = function(_x, _y, _mx, _my, _s, display_parameter = noone, _panel = noone) { }
|
||||||
|
|
||||||
static drawNode = function(_x, _y, _mx, _my, _s, display_parameter = noone, _panel = noone) {
|
static drawNode = function(_x, _y, _mx, _my, _s, display_parameter = noone, _panel = noone) {
|
||||||
if(draw_graph_culled) return;
|
if(display_parameter != noone) self.display_parameter = display_parameter;
|
||||||
if(!active) return;
|
|
||||||
|
|
||||||
if(display_parameter != noone)
|
|
||||||
self.display_parameter = display_parameter;
|
|
||||||
|
|
||||||
var xx = x * _s + _x;
|
var xx = x * _s + _x;
|
||||||
var yy = y * _s + _y;
|
var yy = y * _s + _y;
|
||||||
|
@ -1973,8 +1965,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
static drawNodeBehind = function(_x, _y, _mx, _my, _s) {
|
static drawNodeBehind = function(_x, _y, _mx, _my, _s) {
|
||||||
if(!active) return;
|
|
||||||
|
|
||||||
var xx = x * _s + _x;
|
var xx = x * _s + _x;
|
||||||
var yy = y * _s + _y;
|
var yy = y * _s + _y;
|
||||||
|
|
||||||
|
@ -1990,8 +1980,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
||||||
static drawPreviewBackground = function(_x, _y, _mx, _my, _s) { return false; }
|
static drawPreviewBackground = function(_x, _y, _mx, _my, _s) { return false; }
|
||||||
|
|
||||||
static drawBadge = function(_x, _y, _s) {
|
static drawBadge = function(_x, _y, _s) {
|
||||||
if(!active) return;
|
|
||||||
|
|
||||||
badgePreview = lerp_float(badgePreview, !!previewing, 2);
|
badgePreview = lerp_float(badgePreview, !!previewing, 2);
|
||||||
badgeInspect = lerp_float(badgeInspect, inspecting, 2);
|
badgeInspect = lerp_float(badgeInspect, inspecting, 2);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
|
|
||||||
ta_editor = new textArea(TEXTBOX_INPUT.text, function(val) { inputs[1].setValue(val); })
|
ta_editor = new textArea(TEXTBOX_INPUT.text, function(val) { inputs[1].setValue(val); })
|
||||||
|
|
||||||
newInput(0, nodeValue_Color("Color", self, c_white ))
|
newInput(0, nodeValue_Color("Color", self, cola(c_white) ))
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
newInput(1, nodeValue_Text("Text", self, "Text"));
|
newInput(1, nodeValue_Text("Text", self, "Text"));
|
||||||
|
|
|
@ -4,7 +4,7 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||||
|
|
||||||
newInput(0, nodeValue_Surface("Surface in", self));
|
newInput(0, nodeValue_Surface("Surface in", self));
|
||||||
|
|
||||||
newInput(1, nodeValue_Color("Search color", self, c_black));
|
newInput(1, nodeValue_Color("Search color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(2, nodeValue_Float("Tolerance", self, 0))
|
newInput(2, nodeValue_Float("Tolerance", self, 0))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -12,7 +12,7 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
newInput(3, nodeValue_Float("Strength", self, 1))
|
newInput(3, nodeValue_Float("Strength", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ]});
|
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ]});
|
||||||
|
|
||||||
newInput(4, nodeValue_Color("Color", self, c_white));
|
newInput(4, nodeValue_Color("Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(5, nodeValue_Surface("Mask", self));
|
newInput(5, nodeValue_Surface("Mask", self));
|
||||||
|
|
||||||
|
|
|
@ -5,19 +5,19 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _
|
||||||
|
|
||||||
newInput(1, nodeValue_Vec2("Center 1", self, [ 0, 0 ] ))
|
newInput(1, nodeValue_Vec2("Center 1", self, [ 0, 0 ] ))
|
||||||
.setUnitRef(function(index) { return getDimension(index); });
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
newInput(2, nodeValue_Color("Color 1", self, c_white ));
|
newInput(2, nodeValue_Color("Color 1", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(3, nodeValue_Vec2("Center 2", self, [ DEF_SURF_W, 0 ] ))
|
newInput(3, nodeValue_Vec2("Center 2", self, [ DEF_SURF_W, 0 ] ))
|
||||||
.setUnitRef(function(index) { return getDimension(index); });
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
newInput(4, nodeValue_Color("Color 2", self, c_white ));
|
newInput(4, nodeValue_Color("Color 2", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(5, nodeValue_Vec2("Center 3", self, [ 0, DEF_SURF_H ] ))
|
newInput(5, nodeValue_Vec2("Center 3", self, [ 0, DEF_SURF_H ] ))
|
||||||
.setUnitRef(function(index) { return getDimension(index); });
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
newInput(6, nodeValue_Color("Color 3", self, c_white ));
|
newInput(6, nodeValue_Color("Color 3", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(7, nodeValue_Vec2("Center 4", self, DEF_SURF , { useGlobal : false }))
|
newInput(7, nodeValue_Vec2("Center 4", self, DEF_SURF , { useGlobal : false }))
|
||||||
.setUnitRef(function(index) { return getDimension(index); });
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
newInput(8, nodeValue_Color("Color 4", self, c_white ));
|
newInput(8, nodeValue_Color("Color 4", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(9, nodeValue_Bool("Use palette", self, false ));
|
newInput(9, nodeValue_Bool("Use palette", self, false ));
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||||
|
|
||||||
newInput(1, nodeValue_Bool("Replace color", self, true, "Replace output with solid color."));
|
newInput(1, nodeValue_Bool("Replace color", self, true, "Replace output with solid color."));
|
||||||
|
|
||||||
newInput(2, nodeValue_Color("Color", self, c_white));
|
newInput(2, nodeValue_Color("Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(3, nodeValue_Bool("Active", self, true));
|
newInput(3, nodeValue_Bool("Active", self, true));
|
||||||
active_index = 3;
|
active_index = 3;
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
||||||
.setMappable(20);
|
.setMappable(20);
|
||||||
|
|
||||||
newInput(6, nodeValue_Color("Gap color", self, c_black));
|
newInput(6, nodeValue_Color("Gap color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(7, nodeValue_Surface("Texture", self));
|
newInput(7, nodeValue_Surface("Texture", self));
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
||||||
.setMappable(17);
|
.setMappable(17);
|
||||||
|
|
||||||
newInput(6, nodeValue_Color("Gap color", self, c_black));
|
newInput(6, nodeValue_Color("Gap color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"]));
|
newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid", "Texture sample"]));
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _
|
||||||
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
||||||
.setMappable(14);
|
.setMappable(14);
|
||||||
|
|
||||||
newInput(6, nodeValue_Color("Gap color", self, c_black));
|
newInput(6, nodeValue_Color("Gap color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(7, nodeValue_Surface("Texture", self));
|
newInput(7, nodeValue_Surface("Texture", self));
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
||||||
.setMappable(17);
|
.setMappable(17);
|
||||||
|
|
||||||
newInput(6, nodeValue_Color("Gap color", self, c_black));
|
newInput(6, nodeValue_Color("Gap color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(7, nodeValue_Surface("Texture", self));
|
newInput(7, nodeValue_Surface("Texture", self));
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y,
|
||||||
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
||||||
.setMappable(18);
|
.setMappable(18);
|
||||||
|
|
||||||
newInput(6, nodeValue_Color("Gap color", self, c_black));
|
newInput(6, nodeValue_Color("Gap color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]));
|
newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]));
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
|
|
||||||
newInput(13, nodeValue_Enum_Scroll("Filtered Pixel", self, 0, [ "Transparent", "Color" ]));
|
newInput(13, nodeValue_Enum_Scroll("Filtered Pixel", self, 0, [ "Transparent", "Color" ]));
|
||||||
|
|
||||||
newInput(14, nodeValue_Color("Filtered Color", self, c_black))
|
newInput(14, nodeValue_Color("Filtered Color", self, cola(c_black)))
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
["Sprite", false], 0, 1, 6,
|
["Sprite", false], 0, 1, 6,
|
||||||
|
|
|
@ -14,7 +14,7 @@ function Node_Noise_Cristal(_x, _y, _group = noone) : Node_Shader_Generator(_x,
|
||||||
newInput(4, nodeValue_Int("Iteration", self, 15 ));
|
newInput(4, nodeValue_Int("Iteration", self, 15 ));
|
||||||
addShaderProp(SHADER_UNIFORM.integer, "iteration");
|
addShaderProp(SHADER_UNIFORM.integer, "iteration");
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Color", self, c_white ));
|
newInput(5, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
addShaderProp(SHADER_UNIFORM.color, "color");
|
addShaderProp(SHADER_UNIFORM.color, "color");
|
||||||
|
|
||||||
newInput(6, nodeValue_Float("Gamma", self, 1 ))
|
newInput(6, nodeValue_Float("Gamma", self, 1 ))
|
||||||
|
|
|
@ -7,7 +7,7 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
|
|
||||||
newInput(2, nodeValue_Float("Height", self, 1));
|
newInput(2, nodeValue_Float("Height", self, 1));
|
||||||
|
|
||||||
newInput(3, nodeValue_Color("Ambient", self, c_black));
|
newInput(3, nodeValue_Color("Ambient", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(4, nodeValue_Surface("Height map", self));
|
newInput(4, nodeValue_Surface("Height map", self));
|
||||||
|
|
||||||
|
@ -33,12 +33,12 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
|
|
||||||
newInput(_index + 3, nodeValue_Float("Intensity", self, 4));
|
newInput(_index + 3, nodeValue_Float("Intensity", self, 4));
|
||||||
|
|
||||||
newInput(_index + 4, nodeValue_Color("Color", self, c_white));
|
newInput(_index + 4, nodeValue_Color("Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(_index + 5, nodeValue_Vec3("End Position", self, [ 0, 0, 1 ]))
|
newInput(_index + 5, nodeValue_Vec3("End Position", self, [ 0, 0, 1 ]))
|
||||||
.setUnitRef(function(index) /*=>*/ {return getDimension(index)});
|
.setUnitRef(function(index) /*=>*/ {return getDimension(index)});
|
||||||
|
|
||||||
newInput(_index + 6, nodeValue_Color("End Color", self, c_white));
|
newInput(_index + 6, nodeValue_Color("End Color", self, cola(c_white)));
|
||||||
|
|
||||||
refreshDynamicDisplay();
|
refreshDynamicDisplay();
|
||||||
return inputs[_index];
|
return inputs[_index];
|
||||||
|
|
|
@ -10,9 +10,9 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
newInput(2, nodeValue_Float("Alpha", self, 0.5))
|
newInput(2, nodeValue_Float("Alpha", self, 0.5))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
newInput(3, nodeValue_Color("Color pre", self, c_red))
|
newInput(3, nodeValue_Color("Color pre", self, cola(c_red)))
|
||||||
|
|
||||||
newInput(4, nodeValue_Color("Color post", self, c_blue))
|
newInput(4, nodeValue_Color("Color post", self, cola(c_blue)))
|
||||||
|
|
||||||
newInput(5, nodeValue_Int("Step", self, 1))
|
newInput(5, nodeValue_Int("Step", self, 1))
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
.setValidator(VV_min(0))
|
.setValidator(VV_min(0))
|
||||||
.setMappable(15);
|
.setMappable(15);
|
||||||
|
|
||||||
newInput(2, nodeValue_Color("Color", self, c_white));
|
newInput(2, nodeValue_Color("Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(3, nodeValue_Bool("Blend", self, 0, "Blend outline color with the original color."));
|
newInput(3, nodeValue_Bool("Blend", self, 0, "Blend outline color with the original color."));
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
|
|
||||||
newInput(2, nodeValue_Enum_Scroll("Fill method", self, 0, [ "Empty", "Solid" ]));
|
newInput(2, nodeValue_Enum_Scroll("Fill method", self, 0, [ "Empty", "Solid" ]));
|
||||||
|
|
||||||
newInput(3, nodeValue_Color("Fill color", self, c_black));
|
newInput(3, nodeValue_Color("Fill color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(4, nodeValue_Bool("Active", self, true));
|
newInput(4, nodeValue_Bool("Active", self, true));
|
||||||
active_index = 4;
|
active_index = 4;
|
||||||
|
|
|
@ -12,13 +12,13 @@ function Node_Path_Profile(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
|
|
||||||
newInput(4, nodeValue_Bool("Mirror", self, false ));
|
newInput(4, nodeValue_Bool("Mirror", self, false ));
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Color", self, c_white ));
|
newInput(5, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(6, nodeValue_Bool("Anti Aliasing", self, false ));
|
newInput(6, nodeValue_Bool("Anti Aliasing", self, false ));
|
||||||
|
|
||||||
newInput(7, nodeValue_Bool("Background", self, false ));
|
newInput(7, nodeValue_Bool("Background", self, false ));
|
||||||
|
|
||||||
newInput(8, nodeValue_Color("BG Color", self, c_black ));
|
newInput(8, nodeValue_Color("BG Color", self, cola(c_black) ));
|
||||||
|
|
||||||
newInput(9, nodeValue_Enum_Button("Fill", self, 0, [ "Odd", "All" ] ));
|
newInput(9, nodeValue_Enum_Button("Fill", self, 0, [ "Odd", "All" ] ));
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ function Node_PB_Draw(_x, _y, _group = noone) : Node_PB(_x, _y, _group) construc
|
||||||
newInput(0, nodeValue("pBox", self, CONNECT_TYPE.input, VALUE_TYPE.pbBox, noone ))
|
newInput(0, nodeValue("pBox", self, CONNECT_TYPE.input, VALUE_TYPE.pbBox, noone ))
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
newInput(1, nodeValue_Color("Color", self, c_white ));
|
newInput(1, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(2, nodeValue_Bool("Apply Mask", self, true ));
|
newInput(2, nodeValue_Bool("Apply Mask", self, true ));
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ function Node_PB_Fx_Brick(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c
|
||||||
|
|
||||||
newInput(3, nodeValue_Int("Shift", self, 0));
|
newInput(3, nodeValue_Int("Shift", self, 0));
|
||||||
|
|
||||||
newInput(4, nodeValue_Color("Color", self, c_white ));
|
newInput(4, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(5, nodeValue_Float("Dissolve", self, 0. ))
|
newInput(5, nodeValue_Float("Dissolve", self, 0. ))
|
||||||
.setDisplay(VALUE_DISPLAY.slider)
|
.setDisplay(VALUE_DISPLAY.slider)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
function Node_PB_Fx_Hash(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor {
|
function Node_PB_Fx_Hash(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor {
|
||||||
name = "Hash";
|
name = "Hash";
|
||||||
|
|
||||||
newInput(1, nodeValue_Color("Color", self, c_white ));
|
newInput(1, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(2, nodeValue_Float("Hash", self, 2. ));
|
newInput(2, nodeValue_Float("Hash", self, 2. ));
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou
|
||||||
newInput(1, nodeValue_Int("Highlight Area", self, array_create(9) ))
|
newInput(1, nodeValue_Int("Highlight Area", self, array_create(9) ))
|
||||||
.setDisplay(VALUE_DISPLAY.matrix, { size: 3 });
|
.setDisplay(VALUE_DISPLAY.matrix, { size: 3 });
|
||||||
|
|
||||||
newInput(2, nodeValue_Color("Light Color", self, c_white ));
|
newInput(2, nodeValue_Color("Light Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(3, nodeValue_Color("Shadow Color", self, c_black ));
|
newInput(3, nodeValue_Color("Shadow Color", self, cola(c_black) ));
|
||||||
|
|
||||||
newInput(4, nodeValue_Float("Roughness", self, 0 ))
|
newInput(4, nodeValue_Float("Roughness", self, 0 ))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -3,7 +3,7 @@ function Node_PB_Fx_Outline(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group)
|
||||||
|
|
||||||
newInput(1, nodeValue_Bool("Corner", self, false ));
|
newInput(1, nodeValue_Bool("Corner", self, false ));
|
||||||
|
|
||||||
newInput(2, nodeValue_Color("Color", self, c_white ));
|
newInput(2, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(3, nodeValue_Enum_Button("Side", self, 0, [ "Inside", "Outside" ]));
|
newInput(3, nodeValue_Enum_Button("Side", self, 0, [ "Inside", "Outside" ]));
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ function Node_PB_Fx_Shading(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group)
|
||||||
|
|
||||||
newInput(1, nodeValue_Padding("Width", self, [ 1, 1, 1, 1 ] ));
|
newInput(1, nodeValue_Padding("Width", self, [ 1, 1, 1, 1 ] ));
|
||||||
|
|
||||||
newInput(2, nodeValue_Color("Color", self, c_white ));
|
newInput(2, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
|
|
||||||
input_display_list = [ 0,
|
input_display_list = [ 0,
|
||||||
["Effect", false], 1, 2,
|
["Effect", false], 1, 2,
|
||||||
|
|
|
@ -5,11 +5,11 @@ function Node_PB_Fx_Stack(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c
|
||||||
|
|
||||||
newInput(2, nodeValue_Enum_Button("Direction", self, 0 , array_create(4, THEME.obj_direction) ));
|
newInput(2, nodeValue_Enum_Button("Direction", self, 0 , array_create(4, THEME.obj_direction) ));
|
||||||
|
|
||||||
newInput(3, nodeValue_Color("Color", self, c_white ));
|
newInput(3, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(4, nodeValue_Bool("Highlight", self, false ));
|
newInput(4, nodeValue_Bool("Highlight", self, false ));
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Highlight Color", self, c_white ));
|
newInput(5, nodeValue_Color("Highlight Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(6, nodeValue_Bool("Invert", self, false ));
|
newInput(6, nodeValue_Bool("Invert", self, false ));
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ function Node_PB_Fx_Strip(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c
|
||||||
|
|
||||||
newInput(1, nodeValue_Int("Scale", self, 1 ));
|
newInput(1, nodeValue_Int("Scale", self, 1 ));
|
||||||
|
|
||||||
newInput(2, nodeValue_Color("Color", self, c_white ));
|
newInput(2, nodeValue_Color("Color", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(3, nodeValue_Int("Shift", self, 0 ));
|
newInput(3, nodeValue_Int("Shift", self, 0 ));
|
||||||
|
|
||||||
|
|
|
@ -33,13 +33,13 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
|
|
||||||
newInput(5, nodeValue_Float("Scale", self, DEF_SURF_W / 2));
|
newInput(5, nodeValue_Float("Scale", self, DEF_SURF_W / 2));
|
||||||
|
|
||||||
newInput(6, nodeValue_Color("Base Color", self, c_white));
|
newInput(6, nodeValue_Color("Base Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(7, nodeValue_Float("Graph Thickness", self, 1));
|
newInput(7, nodeValue_Float("Graph Thickness", self, 1));
|
||||||
|
|
||||||
newInput(8, nodeValue_Bool("Background", self, false));
|
newInput(8, nodeValue_Bool("Background", self, false));
|
||||||
|
|
||||||
newInput(9, nodeValue_Color("Background color", self, c_black));
|
newInput(9, nodeValue_Color("Background color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(10, nodeValue_Rotation("Direction", self, 0));
|
newInput(10, nodeValue_Rotation("Direction", self, 0));
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _
|
||||||
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
||||||
.setMappable(18);
|
.setMappable(18);
|
||||||
|
|
||||||
newInput(6, nodeValue_Color("Gap color", self, c_black));
|
newInput(6, nodeValue_Color("Gap color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]));
|
newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]));
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
newInput(3, nodeValue_Vec2("Position", self, [ 0, 0 ] ))
|
newInput(3, nodeValue_Vec2("Position", self, [ 0, 0 ] ))
|
||||||
.setUnitRef(function(index) { return getDimension(index); });
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
newInput(4, nodeValue_Color("Color 1", self, c_white));
|
newInput(4, nodeValue_Color("Color 1", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Color 2", self, c_black));
|
newInput(5, nodeValue_Color("Color 2", self, cola(c_black)));
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
newInput(5, nodeValue_Gradient("Tile color", self, new gradientObject(cola(c_white))))
|
||||||
.setMappable(17);
|
.setMappable(17);
|
||||||
|
|
||||||
newInput(6, nodeValue_Color("Gap color", self, c_black));
|
newInput(6, nodeValue_Color("Gap color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]));
|
newInput(7, nodeValue_Enum_Scroll("Render type", self, 0, ["Colored tile", "Height map", "Texture grid"]));
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
|
|
||||||
newInput(4, nodeValueSeed(self));
|
newInput(4, nodeValueSeed(self));
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Target Color", self, c_white));
|
newInput(5, nodeValue_Color("Target Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(6, nodeValue_Bool("Inner only", self, false, "Only fill regions with surrounding pixels."));
|
newInput(6, nodeValue_Bool("Inner only", self, false, "Only fill regions with surrounding pixels."));
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
newInput(_index + 6, nodeValue_Vec2("Anchor Position", self, [ 0.5, 0.5 ]))
|
newInput(_index + 6, nodeValue_Vec2("Anchor Position", self, [ 0.5, 0.5 ]))
|
||||||
.setTooltip("Anchor point for transformation, absolute value for global type, relative for local.");
|
.setTooltip("Anchor point for transformation, absolute value for global type, relative for local.");
|
||||||
|
|
||||||
newInput(_index + 7, nodeValue_Color("Color", self, c_white));
|
newInput(_index + 7, nodeValue_Color("Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(_index + 8, nodeValue_Float("Alpha", self, 0))
|
newInput(_index + 8, nodeValue_Float("Alpha", self, 0))
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range : [ -1, 1, 0.01 ] });
|
.setDisplay(VALUE_DISPLAY.slider, { range : [ -1, 1, 0.01 ] });
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_RM_Combine(_x, _y, _group = noone) : Node_RM(_x, _y, _group) const
|
||||||
|
|
||||||
newInput(6, nodeValue_Bool("Draw BG", self, false));
|
newInput(6, nodeValue_Bool("Draw BG", self, false));
|
||||||
|
|
||||||
newInput(7, nodeValue_Color("Background", self, c_black));
|
newInput(7, nodeValue_Color("Background", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(8, nodeValue_Float("Ambient Level", self, 0.2))
|
newInput(8, nodeValue_Float("Ambient Level", self, 0.2))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -58,7 +58,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con
|
||||||
|
|
||||||
newInput(8, nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ]));
|
newInput(8, nodeValue_Vec3("Light Position", self, [ -.4, -.5, 1 ]));
|
||||||
|
|
||||||
newInput(9, nodeValue_Color("Base Color", self, c_white));
|
newInput(9, nodeValue_Color("Base Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(10, nodeValue_Float("Ambient Level", self, 0.2))
|
newInput(10, nodeValue_Float("Ambient Level", self, 0.2))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
@ -112,7 +112,7 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_RM(_x, _y, _group) con
|
||||||
|
|
||||||
newInput(29, nodeValue_Vec3("Tile Amount", self, [ 1, 1, 1 ]));
|
newInput(29, nodeValue_Vec3("Tile Amount", self, [ 1, 1, 1 ]));
|
||||||
|
|
||||||
newInput(30, nodeValue_Color("Background", self, c_black));
|
newInput(30, nodeValue_Color("Background", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(31, nodeValue_Bool("Draw BG", self, false));
|
newInput(31, nodeValue_Bool("Draw BG", self, false));
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_RM_Render(_x, _y, _group = noone) : Node_RM(_x, _y, _group) constr
|
||||||
|
|
||||||
newInput(6, nodeValue_Bool("Draw BG", self, false));
|
newInput(6, nodeValue_Bool("Draw BG", self, false));
|
||||||
|
|
||||||
newInput(7, nodeValue_Color("Background", self, c_black));
|
newInput(7, nodeValue_Color("Background", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(8, nodeValue_Float("Ambient Level", self, 0.2))
|
newInput(8, nodeValue_Float("Ambient Level", self, 0.2))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -20,7 +20,7 @@ function Node_RM_Terrain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||||
newInput(7, nodeValue_Float("BG Bleed", self, 1))
|
newInput(7, nodeValue_Float("BG Bleed", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
newInput(8, nodeValue_Color("Ambient", self, c_white));
|
newInput(8, nodeValue_Color("Ambient", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(9, nodeValue_Float("Height", self, 1))
|
newInput(9, nodeValue_Float("Height", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] });
|
||||||
|
@ -29,7 +29,7 @@ function Node_RM_Terrain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||||
|
|
||||||
newInput(11, nodeValue_Surface("Texture", self));
|
newInput(11, nodeValue_Surface("Texture", self));
|
||||||
|
|
||||||
newInput(12, nodeValue_Color("Background", self, c_black));
|
newInput(12, nodeValue_Color("Background", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(13, nodeValue_Surface("Reflection", self));
|
newInput(13, nodeValue_Surface("Reflection", self));
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ function Node_Seperate_Shape(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
||||||
newInput(2, nodeValue_Bool("Override color", self, false))
|
newInput(2, nodeValue_Bool("Override color", self, false))
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
newInput(3, nodeValue_Color("Color", self, c_white))
|
newInput(3, nodeValue_Color("Color", self, cola(c_white)))
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
newInput(4, nodeValue_Bool("Ignore blank", self, true, "Skip empty and black shape."))
|
newInput(4, nodeValue_Bool("Ignore blank", self, true, "Skip empty and black shape."))
|
||||||
|
|
|
@ -2,7 +2,7 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
name = "Shadow";
|
name = "Shadow";
|
||||||
|
|
||||||
newInput(0, nodeValue_Surface("Surface in", self));
|
newInput(0, nodeValue_Surface("Surface in", self));
|
||||||
newInput(1, nodeValue_Color("Color", self, c_black));
|
newInput(1, nodeValue_Color("Color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(2, nodeValue_Float("Strength", self, .5))
|
newInput(2, nodeValue_Float("Strength", self, .5))
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] });
|
||||||
|
|
|
@ -30,9 +30,9 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
newInput(5, nodeValue_Enum_Scroll("Light type", self, 0, [ new scrollItem("Point", s_node_shadow_type, 0),
|
newInput(5, nodeValue_Enum_Scroll("Light type", self, 0, [ new scrollItem("Point", s_node_shadow_type, 0),
|
||||||
new scrollItem("Sun", s_node_shadow_type, 1) ]));
|
new scrollItem("Sun", s_node_shadow_type, 1) ]));
|
||||||
|
|
||||||
newInput(6, nodeValue_Color("Ambient color", self, c_grey));
|
newInput(6, nodeValue_Color("Ambient color", self, cola(c_grey)));
|
||||||
|
|
||||||
newInput(7, nodeValue_Color("Light color", self, c_white));
|
newInput(7, nodeValue_Color("Light color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(8, nodeValue_Float("Light radius", self, 16));
|
newInput(8, nodeValue_Float("Light radius", self, 16));
|
||||||
|
|
||||||
|
|
|
@ -74,9 +74,9 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] });
|
||||||
inputs[9].overlay_draw_text = false;
|
inputs[9].overlay_draw_text = false;
|
||||||
|
|
||||||
newInput(10, nodeValue_Color("Shape color", self, c_white));
|
newInput(10, nodeValue_Color("Shape color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(11, nodeValue_Color("Background color", self, c_black));
|
newInput(11, nodeValue_Color("Background color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(12, nodeValue_Bool("Height", self, false));
|
newInput(12, nodeValue_Bool("Height", self, false));
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||||
|
|
||||||
newInput(1, nodeValue_Bool("Background", self, false));
|
newInput(1, nodeValue_Bool("Background", self, false));
|
||||||
|
|
||||||
newInput(2, nodeValue_Color("Background color", self, c_black));
|
newInput(2, nodeValue_Color("Background color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(3, nodeValue_Color("Shape color", self, c_white));
|
newInput(3, nodeValue_Color("Shape color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(4, nodeValue_Enum_Scroll("Shape", self, 0, shapesArray));
|
newInput(4, nodeValue_Enum_Scroll("Shape", self, 0, shapesArray));
|
||||||
|
|
||||||
|
@ -55,11 +55,11 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||||
|
|
||||||
////////////
|
////////////
|
||||||
|
|
||||||
newInput(19, nodeValue_Color("Vertex Color 1", self, c_white));
|
newInput(19, nodeValue_Color("Vertex Color 1", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(20, nodeValue_Color("Vertex Color 2", self, c_white));
|
newInput(20, nodeValue_Color("Vertex Color 2", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(21, nodeValue_Color("Vertex Color 3", self, c_white));
|
newInput(21, nodeValue_Color("Vertex Color 3", self, cola(c_white)));
|
||||||
|
|
||||||
////////////
|
////////////
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
|
|
||||||
newInput(5, nodeValue_Rotation("Rotation", self, 0));
|
newInput(5, nodeValue_Rotation("Rotation", self, 0));
|
||||||
|
|
||||||
newInput(6, nodeValue_Color("Stack blend", self, c_white ));
|
newInput(6, nodeValue_Color("Stack blend", self, cola(c_white) ));
|
||||||
|
|
||||||
newInput(7, nodeValue_Float("Alpha end", self, 1, "Alpha value for the last copy." ))
|
newInput(7, nodeValue_Float("Alpha end", self, 1, "Alpha value for the last copy." ))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
@ -24,7 +24,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
|
|
||||||
newInput(9, nodeValue_Enum_Scroll("Highlight", self, 0, [ "None", "Color", "Inner pixel" ]));
|
newInput(9, nodeValue_Enum_Scroll("Highlight", self, 0, [ "None", "Color", "Inner pixel" ]));
|
||||||
|
|
||||||
newInput(10, nodeValue_Color("Highlight color", self, c_white));
|
newInput(10, nodeValue_Color("Highlight color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(11, nodeValue_Float("Highlight alpha", self, 1))
|
newInput(11, nodeValue_Float("Highlight alpha", self, 1))
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -24,9 +24,9 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
newInput(7, nodeValue_Gradient("Colors", self, new gradientObject(cola(c_white))))
|
newInput(7, nodeValue_Gradient("Colors", self, new gradientObject(cola(c_white))))
|
||||||
.setMappable(15);
|
.setMappable(15);
|
||||||
|
|
||||||
newInput(8, nodeValue_Color("Color 1", self, c_white));
|
newInput(8, nodeValue_Color("Color 1", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(9, nodeValue_Color("Color 2", self, c_black));
|
newInput(9, nodeValue_Color("Color 2", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(10, nodeValue_Float("Strip ratio", self, 0.5))
|
newInput(10, nodeValue_Float("Strip ratio", self, 0.5))
|
||||||
.setDisplay(VALUE_DISPLAY.slider)
|
.setDisplay(VALUE_DISPLAY.slider)
|
||||||
|
|
|
@ -16,7 +16,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
|
|
||||||
newInput(4, nodeValue_Vec2("Character range", self, [ 32, 128 ]));
|
newInput(4, nodeValue_Vec2("Character range", self, [ 32, 128 ]));
|
||||||
|
|
||||||
newInput(5, nodeValue_Color("Color", self, c_white));
|
newInput(5, nodeValue_Color("Color", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(6, nodeValue_Vec2("Fixed dimension", self, DEF_SURF ))
|
newInput(6, nodeValue_Vec2("Fixed dimension", self, DEF_SURF ))
|
||||||
.setVisible(true, false);
|
.setVisible(true, false);
|
||||||
|
@ -42,7 +42,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
|
|
||||||
newInput(16, nodeValue_Bool("Render background", self, false));
|
newInput(16, nodeValue_Bool("Render background", self, false));
|
||||||
|
|
||||||
newInput(17, nodeValue_Color("BG Color", self, c_black));
|
newInput(17, nodeValue_Color("BG Color", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(18, nodeValue_Bool("Wave", self, false));
|
newInput(18, nodeValue_Bool("Wave", self, false));
|
||||||
|
|
||||||
|
|
|
@ -82,11 +82,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ---- animation ----
|
#region ---- animation ----
|
||||||
if(_type == VALUE_TYPE.color) {
|
|
||||||
if(is_array(_value)) for( var i = 0, n = array_length(_value); i < n; i++ ) _value[i] = cola(_value[i]);
|
|
||||||
else _value = cola(_value);
|
|
||||||
}
|
|
||||||
|
|
||||||
key_inter = CURVE_TYPE.linear;
|
key_inter = CURVE_TYPE.linear;
|
||||||
|
|
||||||
is_anim = false;
|
is_anim = false;
|
||||||
|
@ -324,6 +319,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
}
|
}
|
||||||
|
|
||||||
static resetValue = function() {
|
static resetValue = function() {
|
||||||
|
|
||||||
unit.mode = def_unit;
|
unit.mode = def_unit;
|
||||||
setValue(unit.apply(variable_clone(def_val)));
|
setValue(unit.apply(variable_clone(def_val)));
|
||||||
attributes.mapped = false;
|
attributes.mapped = false;
|
||||||
|
@ -2377,89 +2373,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
}
|
}
|
||||||
|
|
||||||
/////========== FUNCTIONS ==========
|
/////========== FUNCTIONS ==========
|
||||||
|
|
||||||
function checkJuncConnection(from, to, params) {
|
|
||||||
#region parameters
|
|
||||||
var _s = params.s;
|
|
||||||
var mx = params.mx;
|
|
||||||
var my = params.my;
|
|
||||||
var _active = params.active;
|
|
||||||
var hovering = noone;
|
|
||||||
|
|
||||||
var jx = to.x, jy = to.y;
|
|
||||||
var frx = from.x, fry = from.y;
|
|
||||||
|
|
||||||
var fromIndex = from.drawLineIndex;
|
|
||||||
var toIndex = to.drawLineIndex;
|
|
||||||
|
|
||||||
var _loop = struct_try_get(params, "loop");
|
|
||||||
|
|
||||||
if(params.minx != 0 && params.maxx != 0) {
|
|
||||||
var minx = params.minx, miny = params.miny;
|
|
||||||
var maxx = params.maxx, maxy = params.maxy;
|
|
||||||
|
|
||||||
if((jx < minx && frx < minx) || (jx > maxx && frx > maxx) || (jy < miny && fry < miny) || (jy > maxy && fry > maxy)) return noone;
|
|
||||||
}
|
|
||||||
|
|
||||||
var shx = to.draw_line_shift_x * _s;
|
|
||||||
var shy = to.draw_line_shift_y * _s;
|
|
||||||
|
|
||||||
var cx = round((frx + jx) / 2 + shx);
|
|
||||||
var cy = round((fry + jy) / 2 + shy);
|
|
||||||
|
|
||||||
var th = max(1, PREFERENCES.connection_line_width * _s);
|
|
||||||
to.draw_line_shift_hover = false;
|
|
||||||
|
|
||||||
var downDirection = to.type == VALUE_TYPE.action || from.type == VALUE_TYPE.action;
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
var _drawParam = {
|
|
||||||
extend : PREFERENCES.connection_line_extend,
|
|
||||||
fromIndex : fromIndex,
|
|
||||||
toIndex : toIndex,
|
|
||||||
}
|
|
||||||
var hovDist = max(th * 2, 6);
|
|
||||||
var hover = false;
|
|
||||||
|
|
||||||
if(PANEL_GRAPH.pHOVER) {
|
|
||||||
if(_loop || from.node == to.node) {
|
|
||||||
hover = distance_line_feedback(mx, my, jx, jy, frx, fry, _s) < hovDist;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
var _hdist = 999999;
|
|
||||||
|
|
||||||
switch(PREFERENCES.curve_connection_line) {
|
|
||||||
case 0 :
|
|
||||||
if(downDirection) _hdist = distance_to_line(mx, my, jx, jy, frx, fry);
|
|
||||||
else _hdist = distance_to_linear_connection(mx, my, frx, fry, jx, jy, _s, _drawParam);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1 :
|
|
||||||
if(downDirection) _hdist = distance_to_curve_corner(mx, my, jx, jy, frx, fry, _s);
|
|
||||||
else _hdist = distance_to_curve(mx, my, jx, jy, frx, fry, cx, cy, _s);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2 :
|
|
||||||
if(downDirection) _hdist = distance_to_elbow_corner(mx, my, frx, fry, jx, jy);
|
|
||||||
else _hdist = distance_to_elbow(mx, my, frx, fry, jx, jy, cx, cy, _s, _drawParam);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3 :
|
|
||||||
if(downDirection) _hdist = distance_to_elbow_diag_corner(mx, my, frx, fry, jx, jy);
|
|
||||||
else _hdist = distance_to_elbow_diag(mx, my, frx, fry, jx, jy, cx, cy, _s, _drawParam);
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
hover = _hdist < hovDist;
|
|
||||||
if(PANEL_GRAPH.value_focus == noone) to.draw_line_shift_hover = hover;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(_active && hover) hovering = self;
|
|
||||||
|
|
||||||
return hovering;
|
|
||||||
}
|
|
||||||
|
|
||||||
function drawJuncConnection(from, to, params) {
|
function drawJuncConnection(from, to, params) {
|
||||||
#region parameters
|
#region parameters
|
||||||
|
|
|
@ -10,9 +10,6 @@ function __NodeValue_Color(_name, _node, _value, _tooltip = "") : NodeValue(_nam
|
||||||
var nod = __curr_get_val[1];
|
var nod = __curr_get_val[1];
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
|
|
||||||
if(nod.type == VALUE_TYPE.integer || nod.type == VALUE_TYPE.float)
|
|
||||||
return val >= 1? cola(val) : make_color_rgb(val * 255, val * 255, val * 255);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static __getAnimValue = function(_time = CURRENT_FRAME) {
|
static __getAnimValue = function(_time = CURRENT_FRAME) {
|
||||||
|
|
|
@ -10,9 +10,9 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
newInput(2, nodeValue_Vec2("Position", self, [0, 0] ))
|
newInput(2, nodeValue_Vec2("Position", self, [0, 0] ))
|
||||||
.setUnitRef(function(index) { return getDimension(index); });
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
newInput(3, nodeValue_Color("Color 1", self, c_white));
|
newInput(3, nodeValue_Color("Color 1", self, cola(c_white)));
|
||||||
|
|
||||||
newInput(4, nodeValue_Color("Color 2", self, c_black));
|
newInput(4, nodeValue_Color("Color 2", self, cola(c_black)));
|
||||||
|
|
||||||
newInput(5, nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]));
|
newInput(5, nodeValue_Enum_Button("Type", self, 0, [ "Solid", "Smooth", "AA" ]));
|
||||||
|
|
||||||
|
|
|
@ -1225,7 +1225,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
||||||
var _node_draw = display_parameter.show_control? nodes_list : array_filter(nodes_list, function(_n) /*=>*/ {return !_n.is_controller});
|
var _node_draw = display_parameter.show_control? nodes_list : array_filter(nodes_list, function(_n) /*=>*/ {return !_n.is_controller});
|
||||||
_node_draw = array_filter( _node_draw, function(_n) /*=>*/ {
|
_node_draw = array_filter( _node_draw, function(_n) /*=>*/ {
|
||||||
_n.preDraw(__gr_x, __gr_y, __gr_s, __gr_x, __gr_y);
|
_n.preDraw(__gr_x, __gr_y, __gr_s, __gr_x, __gr_y);
|
||||||
return _n.cullCheck(__gr_x, __gr_y, __gr_s, -32, -32, __gr_w + 32, __gr_h + 64);
|
var _cull = _n.cullCheck(__gr_x, __gr_y, __gr_s, -32, -32, __gr_w + 32, __gr_h + 64);
|
||||||
|
|
||||||
|
return _n.active && _cull;
|
||||||
});
|
});
|
||||||
|
|
||||||
printIf(log, $"Predraw time: {get_timer() - t}"); t = get_timer();
|
printIf(log, $"Predraw time: {get_timer() - t}"); t = get_timer();
|
||||||
|
@ -1497,12 +1499,12 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
||||||
param.setProp(array_length(nodes_list), display_parameter.highlight);
|
param.setProp(array_length(nodes_list), display_parameter.highlight);
|
||||||
param.setDraw(aa, bg_color);
|
param.setDraw(aa, bg_color);
|
||||||
|
|
||||||
for(var i = 0; i < array_length(nodes_list); i++) {
|
for( var i = 0, n = array_length(nodes_list); i < n; i++ ) {
|
||||||
var _node = nodes_list[i];
|
var _node = nodes_list[i];
|
||||||
if(!display_parameter.show_control && _node.is_controller) continue;
|
if(!_node.active || (!display_parameter.show_control && _node.is_controller))
|
||||||
|
continue;
|
||||||
|
|
||||||
param.cur_layer = i + 1;
|
param.cur_layer = i + 1;
|
||||||
|
|
||||||
var _hov = _node.drawConnections(param);
|
var _hov = _node.drawConnections(param);
|
||||||
if(_hov != noone && is_struct(_hov)) hov = _hov;
|
if(_hov != noone && is_struct(_hov)) hov = _hov;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ function Panel_Nodes() : PanelContent() constructor {
|
||||||
function onResize() { sc_nodes.resize(w - ui(padding + padding), h - ui(padding + padding + 40)); }
|
function onResize() { sc_nodes.resize(w - ui(padding + padding), h - ui(padding + padding + 40)); }
|
||||||
|
|
||||||
function drawNodeList(_arr, _x0, _x1, _y, _m) {
|
function drawNodeList(_arr, _x0, _x1, _y, _m) {
|
||||||
var ww = sc_nodes.surface_w;
|
var _hh = sc_nodes.surface_h;
|
||||||
var hg = ui(28);
|
var hg = ui(28);
|
||||||
|
|
||||||
var _h = 0;
|
var _h = 0;
|
||||||
|
@ -32,10 +32,24 @@ function Panel_Nodes() : PanelContent() constructor {
|
||||||
if(isGroup && !ds_map_exists(node_collapse, node.node_id))
|
if(isGroup && !ds_map_exists(node_collapse, node.node_id))
|
||||||
node_collapse[? node.node_id] = false;
|
node_collapse[? node.node_id] = false;
|
||||||
|
|
||||||
|
var _cull = _y + hg < 0 || _y > _hh;
|
||||||
|
if(_cull) {
|
||||||
|
_y += hg + ui(2);
|
||||||
|
_h += hg + ui(2);
|
||||||
|
|
||||||
|
if(isGroup && !node_collapse[? node.node_id]) {
|
||||||
|
var hh = drawNodeList(node.nodes, _x0 + ui(16), _x1, _y, _m);
|
||||||
|
_y += hh + ui(2);
|
||||||
|
_h += hh + ui(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(pHOVER && point_in_rectangle(_m[0], _m[1], _x0, _y, _x1 - _x0 - ui(32), _y + hg)) {
|
if(pHOVER && point_in_rectangle(_m[0], _m[1], _x0, _y, _x1 - _x0 - ui(32), _y + hg)) {
|
||||||
sc_nodes.hover_content = true;
|
sc_nodes.hover_content = true;
|
||||||
|
|
||||||
var cc = merge_color(COLORS._main_icon_light, COLORS._main_icon, 0.25);
|
var cc = merge_color(COLORS._main_icon_light, COLORS._main_icon, 0.75);
|
||||||
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _x0, _y, _x1 - _x0, hg, cc, 1);
|
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _x0, _y, _x1 - _x0, hg, cc, 1);
|
||||||
|
|
||||||
if(sc_nodes.active) {
|
if(sc_nodes.active) {
|
||||||
|
@ -49,8 +63,8 @@ function Panel_Nodes() : PanelContent() constructor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _x0, _y, _x1 - _x0, hg, COLORS._main_icon_light, 1);
|
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _x0, _y, _x1 - _x0, hg, COLORS._main_icon, 1);
|
||||||
draw_sprite_stretched_add(THEME.ui_panel, 1, _x0, _y, _x1 - _x0, hg, c_white, .1);
|
draw_sprite_stretched_add(THEME.ui_panel, 1, _x0, _y, _x1 - _x0, hg, COLORS._main_icon, .2);
|
||||||
|
|
||||||
var bw = ui(24);
|
var bw = ui(24);
|
||||||
var bh = ui(24);
|
var bh = ui(24);
|
||||||
|
@ -64,18 +78,18 @@ function Panel_Nodes() : PanelContent() constructor {
|
||||||
var _n = ALL_NODES[? instanceof(node)];
|
var _n = ALL_NODES[? instanceof(node)];
|
||||||
var spr = _n.spr;
|
var spr = _n.spr;
|
||||||
draw_sprite_ui(spr, 1, _x0 + ui(4 + 16), _y + hg / 2, 0.25, 0.25, 0, c_white, 1);
|
draw_sprite_ui(spr, 1, _x0 + ui(4 + 16), _y + hg / 2, 0.25, 0.25, 0, c_white, 1);
|
||||||
var cc = COLORS._main_text;
|
|
||||||
draw_set_text(f_p2, fa_left, fa_center, cc);
|
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text_add(_x0 + hg + ui(8) + (isGroup * ui(20)), _y + hg / 2, name);
|
draw_text_add(_x0 + hg + ui(8) + (isGroup * ui(20)), _y + hg / 2, name);
|
||||||
if(isGroup) draw_sprite_ui(THEME.arrow, (!node_collapse[? node.node_id]) * 3, _x0 + hg + ui(16), _y + hg / 2,,,,, 0.75);
|
if(isGroup) draw_sprite_ui(THEME.arrow, (!node_collapse[? node.node_id]) * 3, _x0 + hg + ui(16), _y + hg / 2,,,,, 0.75);
|
||||||
|
|
||||||
_y += hg + ui(4);
|
_y += hg + ui(2);
|
||||||
_h += hg + ui(4);
|
_h += hg + ui(2);
|
||||||
|
|
||||||
if(isGroup && !node_collapse[? node.node_id]) {
|
if(isGroup && !node_collapse[? node.node_id]) {
|
||||||
var hh = drawNodeList(node.nodes, _x0 + ui(16), _x1, _y, _m);
|
var hh = drawNodeList(node.nodes, _x0 + ui(16), _x1, _y, _m);
|
||||||
_y += hh + ui(4);
|
_y += hh + ui(2);
|
||||||
_h += hh + ui(4);
|
_h += hh + ui(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue