From 44a03c57df33b638ba4bfee0defee5a4b6609be0 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Sat, 27 Jul 2024 12:10:34 +0700 Subject: [PATCH] - Fix gradient alpha not loading. --- .../_node_VFX_spawner/_node_VFX_spawner.gml | 4 +- scripts/color_function/color_function.gml | 101 +++++++++--------- .../gradients_function/gradients_function.gml | 84 ++++++++------- scripts/node_FLIP_render/node_FLIP_render.gml | 2 +- scripts/node_blur_simple/node_blur_simple.gml | 2 +- scripts/node_colorize/node_colorize.gml | 2 +- scripts/node_edge_shade/node_edge_shade.gml | 2 +- scripts/node_gradient/node_gradient.gml | 2 +- .../node_gradient_extract.gml | 2 +- .../node_gradient_out/node_gradient_out.gml | 10 +- .../node_gradient_palette.gml | 2 +- .../node_gradient_replace_color.gml | 4 +- .../node_gradient_shift.gml | 4 +- scripts/node_grid/node_grid.gml | 2 +- scripts/node_grid_hex/node_grid_hex.gml | 2 +- .../node_grid_pentagonal.gml | 2 +- scripts/node_grid_tri/node_grid_tri.gml | 2 +- scripts/node_group_input/node_group_input.gml | 4 +- .../node_herringbone_tile.gml | 2 +- .../node_interpret_number.gml | 2 +- scripts/node_line/node_line.gml | 4 +- scripts/node_mk_brownian/node_mk_brownian.gml | 2 +- scripts/node_mk_fall/node_mk_fall.gml | 2 +- scripts/node_mk_rain/node_mk_rain.gml | 2 +- scripts/node_mk_saber/node_mk_saber.gml | 2 +- scripts/node_pixel_cloud/node_pixel_cloud.gml | 2 +- .../node_pixel_sampler/node_pixel_sampler.gml | 2 +- scripts/node_plot_linear/node_plot_linear.gml | 4 +- .../node_pytagorean_tile.gml | 2 +- scripts/node_random_tile/node_random_tile.gml | 2 +- scripts/node_repeat/node_repeat.gml | 1 - scripts/node_scatter/node_scatter.gml | 2 +- .../node_strand_render/node_strand_render.gml | 4 +- .../node_strand_render_texture.gml | 2 +- scripts/node_stripe/node_stripe.gml | 2 +- scripts/node_widget_test/node_widget_test.gml | 2 +- 36 files changed, 137 insertions(+), 137 deletions(-) diff --git a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml index b090e62e8..aa7102e29 100644 --- a/scripts/_node_VFX_spawner/_node_VFX_spawner.gml +++ b/scripts/_node_VFX_spawner/_node_VFX_spawner.gml @@ -35,7 +35,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 11] = nodeValue("Scale over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11 ); - inputs[| 12] = nodeValue("Color over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 12] = nodeValue("Color over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); inputs[| 13] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.range, { linked : true }); @@ -82,7 +82,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co inputs[| 27] = nodeValue("Spawn", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - inputs[| 28] = nodeValue("Random blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 28] = nodeValue("Random blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); inputs[| 29] = nodeValue("Directed from center", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Make particle move away from the spawn center."); diff --git a/scripts/color_function/color_function.gml b/scripts/color_function/color_function.gml index 42f6961f8..171447a64 100644 --- a/scripts/color_function/color_function.gml +++ b/scripts/color_function/color_function.gml @@ -1,10 +1,9 @@ #region channels function cola(color, alpha = 1) { INLINE return int64((color & 0xFFFFFF) + (round(alpha * 255) << 24)); } function _cola(color, alpha) { INLINE return int64((color & 0xFFFFFF) + (alpha << 24)); } - function colda(color) { INLINE return real(color & 0xFFFFFF); } - function color_get_alpha(color) { INLINE return is_real(color)? 255 : (color & (0xFF << 24)) >> 24; } - function _color_get_alpha(color) { INLINE return is_real(color)? 1 : color_get_alpha(color) / 255; } + function color_get_alpha(color) { INLINE return (color & (0xFF << 24)) >> 24; } + function _color_get_alpha(color) { INLINE return color_get_alpha(color) / 255; } function _color_get_red(color) { INLINE return color_get_red(color) / 255; } function _color_get_green(color) { INLINE return color_get_green(color) / 255; } @@ -22,7 +21,7 @@ function make_color_hsva(h, s, v, a) { INLINE return _cola(make_color_hsv(h, s, v), a); } - function make_color_oklab(ok, a = 1) { #region + function make_color_oklab(ok, a = 1) { INLINE var k = new __vec3(ok[0], ok[1], ok[2]); k.x = power(k.x, 3); @@ -35,31 +34,31 @@ rg.z = power(rg.z, 1 / 2.2) * 255; return make_color_rgba(rg.x, rg.y, rg.z, a); - } #endregion + } - function make_color_srgba(rgb, a) { #region + function make_color_srgba(rgb, a) { INLINE var r = power(rgb[0], 1 / 2.2) * 255; var g = power(rgb[1], 1 / 2.2) * 255; var b = power(rgb[2], 1 / 2.2) * 255; return int64(round(r) + (round(g) << 8) + (round(b) << 16) + (round(a) << 24)); - } #endregion + } - function colorFromRGBArray(arr) { #region + function colorFromRGBArray(arr) { var r = round(real(arr[0]) * 255); var g = round(real(arr[1]) * 255); var b = round(real(arr[2]) * 255); return make_color_rgb(r, g, b); - } #endregion + } - function colorToArray(clr, alpha = false) { #region + function colorToArray(clr, alpha = false) { INLINE if(alpha) return [ _color_get_red(clr), _color_get_green(clr), _color_get_blue(clr), _color_get_alpha(clr) ]; return [ _color_get_red(clr), _color_get_green(clr), _color_get_blue(clr) ]; - } #endregion + } - function paletteToArray(_pal) { #region + function paletteToArray(_pal) { var _colors = array_create(array_length(_pal) * 4); for(var i = 0; i < array_length(_pal); i++) { _colors[i * 4 + 0] = _color_get_red(_pal[i]); @@ -69,24 +68,24 @@ } return _colors; - } #endregion + } #endregion #region color spaces - function color_rgb(col) { #region + function color_rgb(col) { INLINE return [ color_get_red(col) / 255, color_get_green(col) / 255, color_get_blue(col) / 255 ]; - } #endregion + } - function color_srgb(col) { #region + function color_srgb(col) { INLINE return [ power(color_get_red(col) / 255, 2.2), power(color_get_green(col) / 255, 2.2), power(color_get_blue(col) / 255, 2.2) ]; - } #endregion + } - function color_hsv(col) { #region + function color_hsv(col) { INLINE return [ color_get_hue(col) / 255, color_get_saturation(col) / 255, color_get_value(col) / 255 ]; - } #endregion + } global.CVTMAT_RGB_OKLAB = new __mat3([ 0.4121656120, 0.2118591070, 0.0883097947, 0.5362752080, 0.6807189584, 0.2818474174, @@ -96,7 +95,7 @@ -3.3072168827, 2.6093323231, -0.7034763098, 0.2307590544, -0.3411344290, 1.7068625689 ]); - function color_oklab(col) { #region + function color_oklab(col) { INLINE var v = new __vec3(color_get_red(col) / 255, color_get_green(col) / 255, color_get_blue(col) / 255); v.x = power(v.x, 2.2); @@ -109,17 +108,17 @@ ok.z = power(ok.z, 1 / 3); return [ ok.x, ok.y, ok.z ]; - } #endregion + } #endregion #region data - function colorBrightness(clr, normalize = true) { #region + function colorBrightness(clr, normalize = true) { INLINE var r2 = color_get_red(clr) / (normalize? 255 : 1); var g2 = color_get_green(clr) / (normalize? 255 : 1); var b2 = color_get_blue(clr) / (normalize? 255 : 1); return 0.299 * r2 + 0.587 * g2 + 0.224 * b2; - } #endregion + } function colorMultiplyRGB(c1, c2) { INLINE @@ -181,32 +180,32 @@ // return make_color_rgba((r1 * r2) * 255, (g1 * g2) * 255, (b1 * b2) * 255, (a1 * a2) * 255); } - function colorAdd(c1, c2) { #region - if(c1 == 0) return c2; - if(c2 == 0) return c1; - - var r1 = color_get_red(c1); - var g1 = color_get_green(c1); - var b1 = color_get_blue(c1); - - var r2 = color_get_red(c2); - var g2 = color_get_green(c2); - var b2 = color_get_blue(c2); - - return make_color_rgb(min(r1 + r2, 255), min(g1 + g2, 255), min(b1 + b2, 255)); -} #endregion + function colorAdd(c1, c2) { + if(c1 == 0) return c2; + if(c2 == 0) return c1; + + var r1 = color_get_red(c1); + var g1 = color_get_green(c1); + var b1 = color_get_blue(c1); + + var r2 = color_get_red(c2); + var g2 = color_get_green(c2); + var b2 = color_get_blue(c2); + + return make_color_rgb(min(r1 + r2, 255), min(g1 + g2, 255), min(b1 + b2, 255)); + } #endregion -function color_diff_fast(c1, c2) { #region +function color_diff_fast(c1, c2) { INLINE return (abs(_color_get_red(c1) - _color_get_red(c2)) + abs(_color_get_green(c1) - _color_get_green(c2)) + abs(_color_get_blue(c1) - _color_get_blue(c2)) ) / 3; -} #endregion +} -function color_diff_alpha(c1, c2) { #region +function color_diff_alpha(c1, c2) { INLINE return sqrt(sqr(_color_get_red(c1) - _color_get_red(c2)) + @@ -214,22 +213,22 @@ function color_diff_alpha(c1, c2) { #region sqr(_color_get_blue(c1) - _color_get_blue(c2)) + sqr(_color_get_alpha(c1) - _color_get_alpha(c2)) ); -} #endregion +} -function color_diff(c1, c2) { #region +function color_diff(c1, c2) { INLINE return sqrt(sqr(_color_get_red(c1) - _color_get_red(c2)) + sqr(_color_get_green(c1) - _color_get_green(c2)) + sqr(_color_get_blue(c1) - _color_get_blue(c2)) ); -} #endregion +} #region merge #macro merge_color merge_color_ext #macro __merge_color merge_color - function merge_color_ext(c0, c1, t) { #region + function merge_color_ext(c0, c1, t) { INLINE if(is_real(c0)) return __merge_color(c0, c1, t); @@ -239,9 +238,9 @@ function color_diff(c1, c2) { #region clamp(round(lerp(color_get_blue(c0), color_get_blue(c1), t)), 0, 255), clamp(round(lerp(color_get_alpha(c0), color_get_alpha(c1), t)), 0, 255), ); - } #endregion + } - function merge_color_hsv(c0, c1, t) { #region + function merge_color_hsv(c0, c1, t) { INLINE if(is_real(c0)) return make_color_hsv( clamp(round(lerp(color_get_hue(c0), color_get_hue(c1), t)), 0, 255), @@ -255,9 +254,9 @@ function color_diff(c1, c2) { #region clamp(round(lerp(color_get_value(c0), color_get_value(c1), t)), 0, 255), clamp(round(lerp(color_get_alpha(c0), color_get_alpha(c1), t)), 0, 255), ); - } #endregion + } - function merge_color_oklab(c0, c1, t) { #region + function merge_color_oklab(c0, c1, t) { INLINE var ok0 = color_oklab(c0); @@ -272,9 +271,9 @@ function color_diff(c1, c2) { #region var a = is_real(c0)? 255 : clamp(round(lerp(color_get_alpha(c0), color_get_alpha(c1), t)), 0, 255); return make_color_oklab(ok, a); - } #endregion + } - function merge_color_srgb(c0, c1, t) { #region + function merge_color_srgb(c0, c1, t) { INLINE var sr0 = color_srgb(c0); @@ -289,7 +288,7 @@ function color_diff(c1, c2) { #region var a = is_real(c0)? 255 : clamp(round(lerp(color_get_alpha(c0), color_get_alpha(c1), t)), 0, 255); return make_color_srgba(sr, a); - } #endregion + } #endregion #region sorting functions diff --git a/scripts/gradients_function/gradients_function.gml b/scripts/gradients_function/gradients_function.gml index 7bbe33e5f..99f97738d 100644 --- a/scripts/gradients_function/gradients_function.gml +++ b/scripts/gradients_function/gradients_function.gml @@ -8,15 +8,15 @@ enum GRADIENT_INTER { global.gradient_sort_list = ds_priority_create(); -function gradientKey(time, value) constructor { #region +function gradientKey(time, value) constructor { self.time = time; self.value = value; static clone = function() { return new gradientKey(time, value); } static serialize = function() { return { time, value }; } -} #endregion +} -function gradientObject(color = c_black) constructor { #region +function gradientObject(color = c_black) constructor { static GRADIENT_LIMIT = 128; if(is_array(color)) keys = [ new gradientKey(0, cola(color[0])), new gradientKey(1, cola(color[1])) ]; @@ -39,7 +39,7 @@ function gradientObject(color = c_black) constructor { #region cache(); } - static clone = function() { #region + static clone = function() { var g = new gradientObject(); for( var i = 0, n = array_length(keys); i < n; i++ ) g.keys[i] = keys[i].clone(); @@ -47,9 +47,9 @@ function gradientObject(color = c_black) constructor { #region g.type = type; return g; - } #endregion + } - static add = function(_addkey, _deleteDup = true) { #region + static add = function(_addkey, _deleteDup = true) { if(array_length(keys) > GRADIENT_LIMIT) return; if(array_length(keys) == 0) { array_push(keys, _addkey); @@ -70,9 +70,9 @@ function gradientObject(color = c_black) constructor { #region } array_push(keys, _addkey); - } #endregion + } - static eval = function(position) { #region + static eval = function(position) { var _len = array_length(keys); if(_len == 0) return c_black; if(_len == 1) return keys[0].value; @@ -99,9 +99,9 @@ function gradientObject(color = c_black) constructor { #region } return keys[array_length(keys) - 1].value; //after last color - } #endregion + } - static evalFast = function(position) { #region + static evalFast = function(position) { INLINE var _len = array_length(keys); if(position <= keys[0].time) return keys[0].value; @@ -109,9 +109,9 @@ function gradientObject(color = c_black) constructor { #region var _ind = round(position * cacheRes); return caches[_ind]; - } #endregion + } - static draw = function(_x, _y, _w, _h, _a = 1) { #region + static draw = function(_x, _y, _w, _h, _a = 1) { var uniform_grad_blend = shader_get_uniform(sh_gradient_display, "gradient_blend"); var uniform_grad = shader_get_uniform(sh_gradient_display, "gradient_color"); var uniform_grad_time = shader_get_uniform(sh_gradient_display, "gradient_time"); @@ -177,18 +177,18 @@ function gradientObject(color = c_black) constructor { #region surface_reset_target(); draw_surface(surf, _x, _y); - } #endregion + } - static cache = function(res = 128) { #region + static cache = function(res = 128) { cacheRes = res; caches = array_verify(caches, cacheRes + 1); keyLength = array_length(keys); for( var i = 0; i <= cacheRes; i++ ) caches[i] = eval(i / cacheRes); - } #endregion + } - static toArray = function() { #region + static toArray = function() { var _grad_color = [], _grad_time = []; for(var i = 0; i < array_length(keys); i++) { @@ -203,9 +203,9 @@ function gradientObject(color = c_black) constructor { #region } return [ _grad_color, _grad_time ]; - } #endregion + } - static lerpTo = function(target, amount) { #region + static lerpTo = function(target, amount) { var grad = new gradientObject(); grad.keys = []; grad.type = type; @@ -231,9 +231,9 @@ function gradientObject(color = c_black) constructor { #region } return grad; - } #endregion + } - static shader_submit = function() { #region + static shader_submit = function() { var _grad = toArray(); var _grad_color = _grad[0]; var _grad_time = _grad[1]; @@ -242,9 +242,9 @@ function gradientObject(color = c_black) constructor { #region shader_set_f_array("gradient_color", _grad_color, GRADIENT_LIMIT * 4); shader_set_f("gradient_time", _grad_time); shader_set_i("gradient_keys", array_length(keys)); - } #endregion + } - static clone = function() { #region + static clone = function() { var g = new gradientObject(); g.keys = []; g.type = type; @@ -253,18 +253,19 @@ function gradientObject(color = c_black) constructor { #region g.keys[i] = keys[i].clone(); return g; - } #endregion + } - static serialize = function() { #region - var s = { type: type }; - s.keys = []; + static serialize = function() { + var s = { type, keys: [] }; for( var i = 0, n = array_length(keys); i < n; i++ ) s.keys[i] = keys[i].serialize(); + // print(s); + return json_stringify(s, false); - } #endregion + } - static deserialize = function(str) { #region + static deserialize = function(str) { var s; if(is_array(str)) { @@ -282,19 +283,20 @@ function gradientObject(color = c_black) constructor { #region type = struct_try_get(s, "type"); keys = array_create(array_length(s.keys)); + // print(s.keys); + for( var i = 0, n = array_length(s.keys); i < n; i++ ) { - var _time = real(s.keys[i].time); - var _value = real(s.keys[i].value); - _value = LOADING_VERSION < 11640 && !is_int64(_value)? cola(_value) : int64(_value); + var _time = s.keys[i].time; + var _value = s.keys[i].value; keys[i] = new gradientKey(_time, _value); } return self; - } #endregion -} #endregion + } +} -function loadGradient(path) { #region +function loadGradient(path) { if(path == "") return noone; if(!file_exists_empty(path)) return noone; @@ -323,9 +325,9 @@ function loadGradient(path) { #region file_text_close(_t); return grad; -} #endregion +} -function shader_set_gradient(gradient, surface, range, junc) { #region +function shader_set_gradient(gradient, surface, range, junc) { var use_map = junc.attributes.mapped && is_surface(surface); shader_set_i("gradient_use_map", use_map); @@ -334,9 +336,9 @@ function shader_set_gradient(gradient, surface, range, junc) { #region gpu_set_tex_filter_ext(t, true); gradient.shader_submit(); -} #endregion +} -function evaluate_gradient_map(_x, gradient, surface, range, junc, fast = false) { #region +function evaluate_gradient_map(_x, gradient, surface, range, junc, fast = false) { var use_map = junc.attributes.mapped; if(!use_map) return fast? gradient.evalFast(_x) : gradient.eval(_x); @@ -348,12 +350,12 @@ function evaluate_gradient_map(_x, gradient, surface, range, junc, fast = false) var _sy = lerp(range[1], range[3], _x) * _sh; return surface_getpixel_ext(surface, _sx, _sy); -} #endregion +} globalvar GRADIENTS; GRADIENTS = []; -function __initGradient() { #region +function __initGradient() { GRADIENTS = []; var path = DIRECTORY + "Gradients/" @@ -367,4 +369,4 @@ function __initGradient() { #region file = file_find_next(); } file_find_close(); -} #endregion \ No newline at end of file +} \ No newline at end of file diff --git a/scripts/node_FLIP_render/node_FLIP_render.gml b/scripts/node_FLIP_render/node_FLIP_render.gml index fd5256256..32ddc272a 100644 --- a/scripts/node_FLIP_render/node_FLIP_render.gml +++ b/scripts/node_FLIP_render/node_FLIP_render.gml @@ -33,7 +33,7 @@ function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 10] = nodeValue("Segments", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1); - inputs[| 11] = nodeValue("Color Over Velocity", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)); + inputs[| 11] = nodeValue("Color Over Velocity", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))); inputs[| 12] = nodeValue("Velocity Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 10 ]) .setDisplay(VALUE_DISPLAY.range); diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index 0a2f3ed39..23713b1d9 100644 --- a/scripts/node_blur_simple/node_blur_simple.gml +++ b/scripts/node_blur_simple/node_blur_simple.gml @@ -27,7 +27,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou __init_mask_modifier(6); // inputs 10, 11, - inputs[| 12] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ c_black, c_white ]) ) + inputs[| 12] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ cola(c_black), cola(c_white) ]) ) .setMappable(13); inputs[| 13] = nodeValueMap("Gradient map", self); diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index 4def6f29e..dc66ffbda 100644 --- a/scripts/node_colorize/node_colorize.gml +++ b/scripts/node_colorize/node_colorize.gml @@ -3,7 +3,7 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ c_black, c_white ]) ) + inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ cola(c_black), cola(c_white) ]) ) .setMappable(11); inputs[| 2] = nodeValue("Gradient shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) diff --git a/scripts/node_edge_shade/node_edge_shade.gml b/scripts/node_edge_shade/node_edge_shade.gml index cefecb743..353af3966 100644 --- a/scripts/node_edge_shade/node_edge_shade.gml +++ b/scripts/node_edge_shade/node_edge_shade.gml @@ -6,7 +6,7 @@ function Node_Edge_Shade(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 1; - inputs[| 2] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject( [ c_black, c_white ] )) + inputs[| 2] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject( [ cola(c_black), cola(c_white) ] )) .setMappable(3); ////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_gradient/node_gradient.gml b/scripts/node_gradient/node_gradient.gml index c4c04b752..f1d43586c 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -4,7 +4,7 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ c_black, c_white ]) ) + inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ cola(c_black), cola(c_white) ]) ) .setMappable(15); inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) diff --git a/scripts/node_gradient_extract/node_gradient_extract.gml b/scripts/node_gradient_extract/node_gradient_extract.gml index 30dd4fdcd..17d787333 100644 --- a/scripts/node_gradient_extract/node_gradient_extract.gml +++ b/scripts/node_gradient_extract/node_gradient_extract.gml @@ -3,7 +3,7 @@ function Node_Gradient_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, batch_output = false; setDimension(96); - inputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setVisible(true, true); outputs[| 0] = nodeValue("Colors", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, [] ) diff --git a/scripts/node_gradient_out/node_gradient_out.gml b/scripts/node_gradient_out/node_gradient_out.gml index 02e66c454..7cb17d9bf 100644 --- a/scripts/node_gradient_out/node_gradient_out.gml +++ b/scripts/node_gradient_out/node_gradient_out.gml @@ -9,13 +9,13 @@ function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .setDisplay(VALUE_DISPLAY.slider) .rejectArray(); - outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(c_white) ); + outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); outputs[| 1] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white); _pal = -1; - static processData = function(_outSurf, _data, _output_index, _array_index) { #region + static processData = function(_outSurf, _data, _output_index, _array_index) { var pal = _data[0]; var pos = _data[1]; @@ -24,9 +24,9 @@ function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro if(_output_index == 0) return pal; if(_output_index == 1) return pal.eval(pos); return 0; - } #endregion + } - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; @@ -44,5 +44,5 @@ function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro if(_h != min_h) will_setHeight = true; min_h = _h; - } #endregion + } } \ No newline at end of file diff --git a/scripts/node_gradient_palette/node_gradient_palette.gml b/scripts/node_gradient_palette/node_gradient_palette.gml index a0ccb6a18..4a9cf8866 100644 --- a/scripts/node_gradient_palette/node_gradient_palette.gml +++ b/scripts/node_gradient_palette/node_gradient_palette.gml @@ -15,7 +15,7 @@ function Node_Gradient_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| 3] = nodeValue("Interpolation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) .setDisplay(VALUE_DISPLAY.enum_button, [ "None", "RGB", "HSV", "OKLAB", "sRGB" ]); - outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(c_white) ) + outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) _pal = -1; diff --git a/scripts/node_gradient_replace_color/node_gradient_replace_color.gml b/scripts/node_gradient_replace_color/node_gradient_replace_color.gml index b8e61e938..3e01d9e99 100644 --- a/scripts/node_gradient_replace_color/node_gradient_replace_color.gml +++ b/scripts/node_gradient_replace_color/node_gradient_replace_color.gml @@ -2,7 +2,7 @@ function Node_Gradient_Replace_Color(_x, _y, _group = noone) : Node_Processor(_x name = "Gradient Replace"; setDimension(96, 48);; - inputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setVisible(true, true); inputs[| 1] = nodeValue("Color from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, array_clone(DEF_PALETTE)) @@ -14,7 +14,7 @@ function Node_Gradient_Replace_Color(_x, _y, _group = noone) : Node_Processor(_x inputs[| 3] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) .setDisplay(VALUE_DISPLAY.slider); - outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(c_white) ); + outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); static processData = function(_outSurf, _data, _output_index, _array_index) { #region var gra = _data[0]; diff --git a/scripts/node_gradient_shift/node_gradient_shift.gml b/scripts/node_gradient_shift/node_gradient_shift.gml index 3117ba387..e97c7c9a1 100644 --- a/scripts/node_gradient_shift/node_gradient_shift.gml +++ b/scripts/node_gradient_shift/node_gradient_shift.gml @@ -2,7 +2,7 @@ function Node_Gradient_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _g name = "Gradient Shift"; setDimension(96); - inputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setVisible(true, true); inputs[| 1] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) @@ -13,7 +13,7 @@ function Node_Gradient_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _g inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); - outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(c_white) ); + outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); _pal = -1; diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index 59b9655c0..1b26770df 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -20,7 +20,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.rotation) .setMappable(15); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(20); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); diff --git a/scripts/node_grid_hex/node_grid_hex.gml b/scripts/node_grid_hex/node_grid_hex.gml index e6bb41075..44222be70 100644 --- a/scripts/node_grid_hex/node_grid_hex.gml +++ b/scripts/node_grid_hex/node_grid_hex.gml @@ -20,7 +20,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(17); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); diff --git a/scripts/node_grid_pentagonal/node_grid_pentagonal.gml b/scripts/node_grid_pentagonal/node_grid_pentagonal.gml index be3db8f4b..6222a0767 100644 --- a/scripts/node_grid_pentagonal/node_grid_pentagonal.gml +++ b/scripts/node_grid_pentagonal/node_grid_pentagonal.gml @@ -20,7 +20,7 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.rotation) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(14); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); diff --git a/scripts/node_grid_tri/node_grid_tri.gml b/scripts/node_grid_tri/node_grid_tri.gml index 889364e19..b042f8ed4 100644 --- a/scripts/node_grid_tri/node_grid_tri.gml +++ b/scripts/node_grid_tri/node_grid_tri.gml @@ -20,7 +20,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.rotation) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(17); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); diff --git a/scripts/node_group_input/node_group_input.gml b/scripts/node_group_input/node_group_input.gml index 163ce5376..fb3c4eebf 100644 --- a/scripts/node_group_input/node_group_input.gml +++ b/scripts/node_group_input/node_group_input.gml @@ -339,9 +339,9 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru inParent.setType(VALUE_TYPE.gradient); outputs[| 0].setType(inParent.type); - inParent.animator = new valueAnimator(new gradientObject(c_white), inParent); + inParent.animator = new valueAnimator(new gradientObject(cola(c_white)), inParent); - inParent.def_val = new gradientObject(c_white); + inParent.def_val = new gradientObject(cola(c_white)); inParent.setDisplay(VALUE_DISPLAY._default); break; diff --git a/scripts/node_herringbone_tile/node_herringbone_tile.gml b/scripts/node_herringbone_tile/node_herringbone_tile.gml index 8f8bde6b5..f393ab0a9 100644 --- a/scripts/node_herringbone_tile/node_herringbone_tile.gml +++ b/scripts/node_herringbone_tile/node_herringbone_tile.gml @@ -20,7 +20,7 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(18); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); diff --git a/scripts/node_interpret_number/node_interpret_number.gml b/scripts/node_interpret_number/node_interpret_number.gml index 9262dd95f..4bdd0b9b9 100644 --- a/scripts/node_interpret_number/node_interpret_number.gml +++ b/scripts/node_interpret_number/node_interpret_number.gml @@ -12,7 +12,7 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| 2] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ] ) .setDisplay(VALUE_DISPLAY.range); - inputs[| 3] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 3] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(4); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index 83322b31f..b6b219caa 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -28,7 +28,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 9] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); - inputs[| 10] = nodeValue("Color over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 10] = nodeValue("Color over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); inputs[| 11] = nodeValue("Width over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); @@ -60,7 +60,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 23] = nodeValue("Texture scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 24] = nodeValue("Random Blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 24] = nodeValue("Random Blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ); inputs[| 25] = nodeValue("Invert", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); diff --git a/scripts/node_mk_brownian/node_mk_brownian.gml b/scripts/node_mk_brownian/node_mk_brownian.gml index 00b655d76..b75f3fd28 100644 --- a/scripts/node_mk_brownian/node_mk_brownian.gml +++ b/scripts/node_mk_brownian/node_mk_brownian.gml @@ -17,7 +17,7 @@ function Node_MK_Brownian(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 5] = nodeValue("Speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.range); - inputs[| 6] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)); + inputs[| 6] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))); inputs[| 7] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); diff --git a/scripts/node_mk_fall/node_mk_fall.gml b/scripts/node_mk_fall/node_mk_fall.gml index 915956910..b961ac82a 100644 --- a/scripts/node_mk_fall/node_mk_fall.gml +++ b/scripts/node_mk_fall/node_mk_fall.gml @@ -38,7 +38,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 12] = nodeValue("Wind", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 13] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 13] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) inputs[| 14] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); diff --git a/scripts/node_mk_rain/node_mk_rain.gml b/scripts/node_mk_rain/node_mk_rain.gml index 794b5dce0..7a009b26a 100644 --- a/scripts/node_mk_rain/node_mk_rain.gml +++ b/scripts/node_mk_rain/node_mk_rain.gml @@ -15,7 +15,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 4] = nodeValue("Raindrop length", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 5, 10 ]) .setDisplay(VALUE_DISPLAY.range); - inputs[| 5] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)); + inputs[| 5] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))); inputs[| 6] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 1 ]) .setDisplay(VALUE_DISPLAY.slider_range); diff --git a/scripts/node_mk_saber/node_mk_saber.gml b/scripts/node_mk_saber/node_mk_saber.gml index b9971c49d..fa964ec78 100644 --- a/scripts/node_mk_saber/node_mk_saber.gml +++ b/scripts/node_mk_saber/node_mk_saber.gml @@ -12,7 +12,7 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 3] = nodeValue("Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - inputs[| 4] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)) + inputs[| 4] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))) inputs[| 5] = nodeValue("Trace", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); diff --git a/scripts/node_pixel_cloud/node_pixel_cloud.gml b/scripts/node_pixel_cloud/node_pixel_cloud.gml index 6d96f8e45..5878e0598 100644 --- a/scripts/node_pixel_cloud/node_pixel_cloud.gml +++ b/scripts/node_pixel_cloud/node_pixel_cloud.gml @@ -11,7 +11,7 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 3] = nodeValue("Strength map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 4] = nodeValue("Color over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 4] = nodeValue("Color over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(9); inputs[| 5] = nodeValue("Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); diff --git a/scripts/node_pixel_sampler/node_pixel_sampler.gml b/scripts/node_pixel_sampler/node_pixel_sampler.gml index c7069f5f3..ebd67b92b 100644 --- a/scripts/node_pixel_sampler/node_pixel_sampler.gml +++ b/scripts/node_pixel_sampler/node_pixel_sampler.gml @@ -12,7 +12,7 @@ function Node_Pixel_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 3] = nodeValue("Surfaces", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, [ noone ] ) .setArrayDepth(1); - inputs[| 4] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ c_black, c_white ]) ) + inputs[| 4] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ cola(c_black), cola(c_white) ]) ) .setMappable(5); inputs[| 5] = nodeValueMap("Gradient map", self); diff --git a/scripts/node_plot_linear/node_plot_linear.gml b/scripts/node_plot_linear/node_plot_linear.gml index 3ce72cff3..8c1ce8fe2 100644 --- a/scripts/node_plot_linear/node_plot_linear.gml +++ b/scripts/node_plot_linear/node_plot_linear.gml @@ -53,7 +53,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 12] = nodeValue("Value Offset", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); - inputs[| 13] = nodeValue("Color Over Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)) + inputs[| 13] = nodeValue("Color Over Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))) .setMappable(27); inputs[| 14] = nodeValue("Trim mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) @@ -79,7 +79,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 23] = nodeValue("Smooth", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider); - inputs[| 24] = nodeValue("Color Over Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)) + inputs[| 24] = nodeValue("Color Over Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))) .setMappable(29); inputs[| 25] = nodeValue("Value range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ] ) diff --git a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml index 16a6ed4b7..66d95b858 100644 --- a/scripts/node_pytagorean_tile/node_pytagorean_tile.gml +++ b/scripts/node_pytagorean_tile/node_pytagorean_tile.gml @@ -20,7 +20,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(18); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); diff --git a/scripts/node_random_tile/node_random_tile.gml b/scripts/node_random_tile/node_random_tile.gml index ddd2bddf0..ca61430b2 100644 --- a/scripts/node_random_tile/node_random_tile.gml +++ b/scripts/node_random_tile/node_random_tile.gml @@ -20,7 +20,7 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.001] }) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(17); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index 3f10340b7..722b8a130 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -313,7 +313,6 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var cc = evaluate_gradient_map(i / (_amo - 1), _grad, _grad_map, _grad_range, inputs[| 14]); var aa = _color_get_alpha(cc); - cc = colda(cc); if(_an_use) { cc = merge_color(cc, colorMultiply(cc, _an_bld), _inf); aa += _an_alp * _inf; diff --git a/scripts/node_scatter/node_scatter.gml b/scripts/node_scatter/node_scatter.gml index 5e6845037..a4d09e7da 100644 --- a/scripts/node_scatter/node_scatter.gml +++ b/scripts/node_scatter/node_scatter.gml @@ -44,7 +44,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 10] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 10].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); - inputs[| 11] = nodeValue("Random blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 11] = nodeValue("Random blend", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(28); inputs[| 12] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) diff --git a/scripts/node_strand_render/node_strand_render.gml b/scripts/node_strand_render/node_strand_render.gml index 4fa853bb4..4540e107a 100644 --- a/scripts/node_strand_render/node_strand_render.gml +++ b/scripts/node_strand_render/node_strand_render.gml @@ -17,9 +17,9 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[| 3] = nodeValue("Thickness over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 4] = nodeValue("Random color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)); + inputs[| 4] = nodeValue("Random color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))); - inputs[| 5] = nodeValue("Color over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)); + inputs[| 5] = nodeValue("Color over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))); inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6)) .setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) }); diff --git a/scripts/node_strand_render_texture/node_strand_render_texture.gml b/scripts/node_strand_render_texture/node_strand_render_texture.gml index 9b023804a..fc0b700ea 100644 --- a/scripts/node_strand_render_texture/node_strand_render_texture.gml +++ b/scripts/node_strand_render_texture/node_strand_render_texture.gml @@ -15,7 +15,7 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou inputs[| 2] = nodeValue("Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 8, 8 ]) .setDisplay(VALUE_DISPLAY.range, { linked : true }); - inputs[| 3] = nodeValue("Random color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)); + inputs[| 3] = nodeValue("Random color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))); inputs[| 4] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); diff --git a/scripts/node_stripe/node_stripe.gml b/scripts/node_stripe/node_stripe.gml index 72bafa4aa..29111c11e 100644 --- a/scripts/node_stripe/node_stripe.gml +++ b/scripts/node_stripe/node_stripe.gml @@ -26,7 +26,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 6] = nodeValue("Coloring", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ "Alternate", "Palette", "Random" ]); - inputs[| 7] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + inputs[| 7] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white)) ) .setMappable(15); inputs[| 8] = nodeValue("Color 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); diff --git a/scripts/node_widget_test/node_widget_test.gml b/scripts/node_widget_test/node_widget_test.gml index 4f3e7633a..09f0d0e13 100644 --- a/scripts/node_widget_test/node_widget_test.gml +++ b/scripts/node_widget_test/node_widget_test.gml @@ -27,7 +27,7 @@ function Node_Widget_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 20] = nodeValue("buttonColor", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, 0) .setDisplay(VALUE_DISPLAY._default) inputs[| 21] = nodeValue("buttonPalette", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, array_clone(DEF_PALETTE)) .setDisplay(VALUE_DISPLAY.palette) - inputs[| 22] = nodeValue("buttonGradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)) .setDisplay(VALUE_DISPLAY._default) + inputs[| 22] = nodeValue("buttonGradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(cola(c_white))) .setDisplay(VALUE_DISPLAY._default) inputs[| 23] = nodeValue("pathArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) .setDisplay(VALUE_DISPLAY.path_array, { filter: [ "image|*.png;*.jpg", "" ] }) inputs[| 24] = nodeValue("pathLoad", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_load)