mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-23 19:38:05 +01:00
several things
This commit is contained in:
parent
372107426e
commit
6d9b90ca2a
75 changed files with 709 additions and 159 deletions
|
@ -24,8 +24,8 @@
|
||||||
{"name":"Compat","order":6,"path":"folders/functions/fluid_sim/Compat.yy",},
|
{"name":"Compat","order":6,"path":"folders/functions/fluid_sim/Compat.yy",},
|
||||||
{"name":"Internal","order":7,"path":"folders/functions/fluid_sim/Internal.yy",},
|
{"name":"Internal","order":7,"path":"folders/functions/fluid_sim/Internal.yy",},
|
||||||
{"name":"Shaders","order":8,"path":"folders/functions/fluid_sim/Shaders.yy",},
|
{"name":"Shaders","order":8,"path":"folders/functions/fluid_sim/Shaders.yy",},
|
||||||
{"name":"svg","order":47,"path":"folders/functions/svg.yy",},
|
|
||||||
{"name":"dynamic_surface","order":8,"path":"folders/functions/surface/dynamic_surface.yy",},
|
{"name":"dynamic_surface","order":8,"path":"folders/functions/surface/dynamic_surface.yy",},
|
||||||
|
{"name":"svg","order":47,"path":"folders/functions/svg.yy",},
|
||||||
{"name":"__base__","order":11,"path":"folders/nodes/data/__base__.yy",},
|
{"name":"__base__","order":11,"path":"folders/nodes/data/__base__.yy",},
|
||||||
{"name":"3D","order":12,"path":"folders/nodes/data/3D.yy",},
|
{"name":"3D","order":12,"path":"folders/nodes/data/3D.yy",},
|
||||||
{"name":"2d_effects","order":1,"path":"folders/nodes/data/3D/2d_effects.yy",},
|
{"name":"2d_effects","order":1,"path":"folders/nodes/data/3D/2d_effects.yy",},
|
||||||
|
@ -164,6 +164,7 @@
|
||||||
{"name":"Flag","order":3,"path":"folders/shader/MK effects/Flag.yy",},
|
{"name":"Flag","order":3,"path":"folders/shader/MK effects/Flag.yy",},
|
||||||
{"name":"Tile","order":4,"path":"folders/shader/MK effects/Tile.yy",},
|
{"name":"Tile","order":4,"path":"folders/shader/MK effects/Tile.yy",},
|
||||||
{"name":"ray march","order":1,"path":"folders/shader/ray march.yy",},
|
{"name":"ray march","order":1,"path":"folders/shader/ray march.yy",},
|
||||||
|
{"name":"svg","order":2,"path":"folders/shader/svg.yy",},
|
||||||
{"name":"histogram","order":3,"path":"folders/shader/UI/histogram.yy",},
|
{"name":"histogram","order":3,"path":"folders/shader/UI/histogram.yy",},
|
||||||
{"name":"node","order":5,"path":"folders/shader/UI/node.yy",},
|
{"name":"node","order":5,"path":"folders/shader/UI/node.yy",},
|
||||||
{"name":"palette mixer","order":2,"path":"folders/shader/UI/palette mixer.yy",},
|
{"name":"palette mixer","order":2,"path":"folders/shader/UI/palette mixer.yy",},
|
||||||
|
@ -1517,6 +1518,7 @@
|
||||||
{"name":"sh_surface_replace_fast_find","order":2,"path":"shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.yy",},
|
{"name":"sh_surface_replace_fast_find","order":2,"path":"shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.yy",},
|
||||||
{"name":"sh_surface_replace_fast_replace","order":3,"path":"shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.yy",},
|
{"name":"sh_surface_replace_fast_replace","order":3,"path":"shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.yy",},
|
||||||
{"name":"sh_surface_replace_replace","order":1,"path":"shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy",},
|
{"name":"sh_surface_replace_replace","order":1,"path":"shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy",},
|
||||||
|
{"name":"sh_svg_fill","order":1,"path":"shaders/sh_svg_fill/sh_svg_fill.yy",},
|
||||||
{"name":"sh_texture_atlas","order":22,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",},
|
{"name":"sh_texture_atlas","order":22,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",},
|
||||||
{"name":"sh_texture_remap","order":11,"path":"shaders/sh_texture_remap/sh_texture_remap.yy",},
|
{"name":"sh_texture_remap","order":11,"path":"shaders/sh_texture_remap/sh_texture_remap.yy",},
|
||||||
{"name":"sh_threshold","order":18,"path":"shaders/sh_threshold/sh_threshold.yy",},
|
{"name":"sh_threshold","order":18,"path":"shaders/sh_threshold/sh_threshold.yy",},
|
||||||
|
|
|
@ -90,7 +90,6 @@
|
||||||
{"$GMFolder":"","%Name":"Shaders","folderPath":"folders/functions/fluid_sim/Shaders.yy","name":"Shaders","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"Shaders","folderPath":"folders/functions/fluid_sim/Shaders.yy","name":"Shaders","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"geometry","folderPath":"folders/functions/geometry.yy","name":"geometry","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"geometry","folderPath":"folders/functions/geometry.yy","name":"geometry","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"GLSL","folderPath":"folders/functions/GLSL.yy","name":"GLSL","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"GLSL","folderPath":"folders/functions/GLSL.yy","name":"GLSL","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"svg","folderPath":"folders/functions/svg.yy","name":"svg","resourceType":"GMFolder","resourceVersion":"2.0",},
|
|
||||||
{"$GMFolder":"","%Name":"importers","folderPath":"folders/functions/importers.yy","name":"importers","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"importers","folderPath":"folders/functions/importers.yy","name":"importers","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"inputs","folderPath":"folders/functions/inputs.yy","name":"inputs","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"inputs","folderPath":"folders/functions/inputs.yy","name":"inputs","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"lua","folderPath":"folders/functions/lua.yy","name":"lua","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"lua","folderPath":"folders/functions/lua.yy","name":"lua","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
@ -107,6 +106,7 @@
|
||||||
{"$GMFolder":"","%Name":"string","folderPath":"folders/functions/string.yy","name":"string","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"string","folderPath":"folders/functions/string.yy","name":"string","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"surface","folderPath":"folders/functions/surface.yy","name":"surface","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"surface","folderPath":"folders/functions/surface.yy","name":"surface","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"dynamic_surface","folderPath":"folders/functions/surface/dynamic_surface.yy","name":"dynamic_surface","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"dynamic_surface","folderPath":"folders/functions/surface/dynamic_surface.yy","name":"dynamic_surface","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
{"$GMFolder":"","%Name":"svg","folderPath":"folders/functions/svg.yy","name":"svg","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"test","folderPath":"folders/functions/test.yy","name":"test","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"test","folderPath":"folders/functions/test.yy","name":"test","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"tooltip","folderPath":"folders/functions/tooltip.yy","name":"tooltip","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"tooltip","folderPath":"folders/functions/tooltip.yy","name":"tooltip","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"tween","folderPath":"folders/functions/tween.yy","name":"tween","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"tween","folderPath":"folders/functions/tween.yy","name":"tween","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
@ -300,6 +300,7 @@
|
||||||
{"$GMFolder":"","%Name":"pixel_builder","folderPath":"folders/shader/pixel_builder.yy","name":"pixel_builder","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"pixel_builder","folderPath":"folders/shader/pixel_builder.yy","name":"pixel_builder","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"ray march","folderPath":"folders/shader/ray march.yy","name":"ray march","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"ray march","folderPath":"folders/shader/ray march.yy","name":"ray march","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"sprites","folderPath":"folders/shader/sprites.yy","name":"sprites","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"sprites","folderPath":"folders/shader/sprites.yy","name":"sprites","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
{"$GMFolder":"","%Name":"svg","folderPath":"folders/shader/svg.yy","name":"svg","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"transition","folderPath":"folders/shader/transition.yy","name":"transition","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"transition","folderPath":"folders/shader/transition.yy","name":"transition","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"UI","folderPath":"folders/shader/UI.yy","name":"UI","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"UI","folderPath":"folders/shader/UI.yy","name":"UI","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"histogram","folderPath":"folders/shader/UI/histogram.yy","name":"histogram","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"histogram","folderPath":"folders/shader/UI/histogram.yy","name":"histogram","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
@ -471,7 +472,6 @@
|
||||||
{"$GMIncludedFile":"","%Name":"CommonVS.hlsl","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"CommonVS.hlsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"CommonVS.hlsl","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"CommonVS.hlsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
{"$GMIncludedFile":"","%Name":"rubber_duck_toy_1k.bin","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"rubber_duck_toy_1k.bin","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"rubber_duck_toy_1k.bin","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"rubber_duck_toy_1k.bin","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
{"$GMIncludedFile":"","%Name":"snap_license.txt","CopyToMask":-1,"filePath":"datafiles","name":"snap_license.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"snap_license.txt","CopyToMask":-1,"filePath":"datafiles","name":"snap_license.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
{"$GMIncludedFile":"","%Name":"snap_license.txt","CopyToMask":-1,"filePath":"datafiles","name":"snap_license.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
|
||||||
{"$GMIncludedFile":"","%Name":"ucrtbased.dll","ConfigValues":{},"CopyToMask":-1,"filePath":"datafiles","name":"ucrtbased.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"ucrtbased.dll","ConfigValues":{},"CopyToMask":-1,"filePath":"datafiles","name":"ucrtbased.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
{"$GMIncludedFile":"","%Name":"webpmux.exe","CopyToMask":-1,"filePath":"datafiles/webp","name":"webpmux.exe","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"webpmux.exe","CopyToMask":-1,"filePath":"datafiles/webp","name":"webpmux.exe","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
{"$GMIncludedFile":"","%Name":"Welcome files.zip","CopyToMask":-1,"filePath":"datafiles","name":"Welcome files.zip","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"Welcome files.zip","CopyToMask":-1,"filePath":"datafiles","name":"Welcome files.zip","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
|
@ -2059,6 +2059,8 @@
|
||||||
{"id":{"name":"sh_surface_replace_fast_replace","path":"shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.yy",},},
|
{"id":{"name":"sh_surface_replace_fast_replace","path":"shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.yy",},},
|
||||||
{"id":{"name":"sh_surface_replace_find","path":"shaders/sh_surface_replace_find/sh_surface_replace_find.yy",},},
|
{"id":{"name":"sh_surface_replace_find","path":"shaders/sh_surface_replace_find/sh_surface_replace_find.yy",},},
|
||||||
{"id":{"name":"sh_surface_replace_replace","path":"shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy",},},
|
{"id":{"name":"sh_surface_replace_replace","path":"shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy",},},
|
||||||
|
{"id":{"name":"sh_svg_curve_quad","path":"shaders/sh_svg_curve_quad/sh_svg_curve_quad.yy",},},
|
||||||
|
{"id":{"name":"sh_svg_fill","path":"shaders/sh_svg_fill/sh_svg_fill.yy",},},
|
||||||
{"id":{"name":"sh_texture_atlas","path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",},},
|
{"id":{"name":"sh_texture_atlas","path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",},},
|
||||||
{"id":{"name":"sh_texture_remap","path":"shaders/sh_texture_remap/sh_texture_remap.yy",},},
|
{"id":{"name":"sh_texture_remap","path":"shaders/sh_texture_remap/sh_texture_remap.yy",},},
|
||||||
{"id":{"name":"sh_threshold","path":"shaders/sh_threshold/sh_threshold.yy",},},
|
{"id":{"name":"sh_threshold","path":"shaders/sh_threshold/sh_threshold.yy",},},
|
||||||
|
|
|
@ -49,7 +49,7 @@ function Node_VFX_effector(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) })
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) })
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
effector_input_length = ds_list_size(inputs);
|
effector_input_length = ds_list_size(inputs);
|
||||||
|
|
|
@ -85,10 +85,10 @@ function polygon_triangulate_convex(points) { #region
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
function polygon_triangulate(points, tolerance = 4) { #region // ear clipping
|
function polygon_triangulate(points, tolerance = 4) { #region // ear clipping
|
||||||
if(array_length(points) < 3) return [ [], points ];
|
if(array_length(points) < 3) return [ [], points, 1 ];
|
||||||
|
|
||||||
if(tolerance > 0) points = polygon_simplify(points, tolerance);
|
if(tolerance > 0) points = polygon_simplify(points, tolerance);
|
||||||
if(array_length(points) < 3) return [ [], points ];
|
if(array_length(points) < 3) return [ [], points, 1 ];
|
||||||
|
|
||||||
var classes = polygon_points_classify(points);
|
var classes = polygon_points_classify(points);
|
||||||
var convexes = classes[0];
|
var convexes = classes[0];
|
||||||
|
@ -96,7 +96,7 @@ function polygon_triangulate(points, tolerance = 4) { #region // ear clipping
|
||||||
var checkSide = classes[2];
|
var checkSide = classes[2];
|
||||||
|
|
||||||
if(array_length(reflected) == 0)
|
if(array_length(reflected) == 0)
|
||||||
return [ polygon_triangulate_convex(points), points ];
|
return [ polygon_triangulate_convex(points), points, checkSide ];
|
||||||
|
|
||||||
var pointInd = array_create_ext(array_length(points), function(i) /*=>*/ { return i; });
|
var pointInd = array_create_ext(array_length(points), function(i) /*=>*/ { return i; });
|
||||||
var triangles = [];
|
var triangles = [];
|
||||||
|
@ -105,7 +105,7 @@ function polygon_triangulate(points, tolerance = 4) { #region // ear clipping
|
||||||
//print($"Ear cutting : {array_length(points)} verticies");
|
//print($"Ear cutting : {array_length(points)} verticies");
|
||||||
|
|
||||||
while(array_length(pointInd) > 3) {
|
while(array_length(pointInd) > 3) {
|
||||||
if(array_length(convexes) == 0) return [ triangles, points ];
|
if(array_length(convexes) == 0) return [ triangles, points, checkSide ];
|
||||||
|
|
||||||
var len = array_length(pointInd);
|
var len = array_length(pointInd);
|
||||||
var c0 = convexes[0];
|
var c0 = convexes[0];
|
||||||
|
@ -182,7 +182,7 @@ function polygon_triangulate(points, tolerance = 4) { #region // ear clipping
|
||||||
if(array_length(pointInd) == 3)
|
if(array_length(pointInd) == 3)
|
||||||
array_push(triangles, [ points[pointInd[0]], points[pointInd[1]], points[pointInd[2]] ]);
|
array_push(triangles, [ points[pointInd[0]], points[pointInd[1]], points[pointInd[2]] ]);
|
||||||
|
|
||||||
return [ triangles, points ];
|
return [ triangles, points, checkSide ];
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
function polygon_triangulate_convex_fan(points) { #region
|
function polygon_triangulate_convex_fan(points) { #region
|
||||||
|
|
|
@ -92,7 +92,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co
|
||||||
inputs[| 31] = nodeValue("Atlas", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, [] );
|
inputs[| 31] = nodeValue("Atlas", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, [] );
|
||||||
|
|
||||||
inputs[| 32] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 32] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 32].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 32].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 33] = nodeValue("Gravity direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, -90 )
|
inputs[| 33] = nodeValue("Gravity direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, -90 )
|
||||||
.setDisplay(VALUE_DISPLAY.rotation);
|
.setDisplay(VALUE_DISPLAY.rotation);
|
||||||
|
|
|
@ -33,3 +33,5 @@ function lerp_color(from, to, ratio) {
|
||||||
if(abs(from - to) < 1) return to;
|
if(abs(from - to) < 1) return to;
|
||||||
return merge_color(from, to, ratio);
|
return merge_color(from, to, ratio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function lerp_invert(val, from, to) { return (val - from) / (to - from); }
|
|
@ -19,7 +19,7 @@ function Node_MK_Delay_Machine(_x, _y, _group = noone) : Node(_x, _y, _group) co
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Loop", "Pingpong", "Random" ]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Loop", "Pingpong", "Random" ]);
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
outputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] });
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 10] = nodeValue("Spawn Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 45, 135, 0, 0 ] )
|
inputs[| 10] = nodeValue("Spawn Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 45, 135, 0, 0 ] )
|
||||||
.setDisplay(VALUE_DISPLAY.rotation_random);
|
.setDisplay(VALUE_DISPLAY.rotation_random);
|
||||||
|
|
|
@ -7,7 +7,7 @@ function Node_Array_Shuffle(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) })
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) })
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Shuffled array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, []);
|
outputs[| 0] = nodeValue("Shuffled array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, []);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
function Node_create_ASE_File_Read(_x, _y, _group = noone) { #region
|
function Node_create_ASE_File_Read(_x, _y, _group = noone) {
|
||||||
var path = "";
|
var path = "";
|
||||||
if(NODE_NEW_MANUAL) {
|
if(NODE_NEW_MANUAL) {
|
||||||
path = get_open_filename_pxc("Aseprite file (*.aseprite, *.ase)|*.aseprite;*.ase", "");
|
path = get_open_filename_pxc("Aseprite file (*.aseprite, *.ase)|*.aseprite;*.ase", "");
|
||||||
|
@ -11,9 +11,9 @@ function Node_create_ASE_File_Read(_x, _y, _group = noone) { #region
|
||||||
if(NODE_NEW_MANUAL) node.doUpdate();
|
if(NODE_NEW_MANUAL) node.doUpdate();
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
function Node_create_ASE_File_Read_path(_x, _y, path) { #region
|
function Node_create_ASE_File_Read_path(_x, _y, path) {
|
||||||
if(!file_exists_empty(path)) return noone;
|
if(!file_exists_empty(path)) return noone;
|
||||||
|
|
||||||
var node = new Node_ASE_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext());
|
var node = new Node_ASE_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext());
|
||||||
|
@ -21,7 +21,7 @@ function Node_create_ASE_File_Read_path(_x, _y, path) { #region
|
||||||
node.doUpdate();
|
node.doUpdate();
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
name = "ASE File In";
|
name = "ASE File In";
|
||||||
|
@ -49,7 +49,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
.setDisplay(VALUE_DISPLAY.palette);
|
.setDisplay(VALUE_DISPLAY.palette);
|
||||||
|
|
||||||
hold_visibility = true;
|
hold_visibility = true;
|
||||||
layer_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region
|
layer_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
|
||||||
var amo = array_length(layers);
|
var amo = array_length(layers);
|
||||||
var hh = 28;
|
var hh = 28;
|
||||||
var _h = hh * amo + 16;
|
var _h = hh * amo + 16;
|
||||||
|
@ -85,9 +85,9 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
}
|
}
|
||||||
|
|
||||||
return _h;
|
return _h;
|
||||||
}); #endregion
|
});
|
||||||
|
|
||||||
tag_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region
|
tag_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
|
||||||
var current_tag = getInputData(2);
|
var current_tag = getInputData(2);
|
||||||
var amo = array_length(tags);
|
var amo = array_length(tags);
|
||||||
var abx = ui(24);
|
var abx = ui(24);
|
||||||
|
@ -118,19 +118,20 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
draw_sprite_stretched_ext(THEME.timeline_node, 0, _x + 8, _tgy, _w - 16, _tgh, cc, 0.5);
|
draw_sprite_stretched_ext(THEME.timeline_node, 0, _x + 8, _tgy, _w - 16, _tgh, cc, 0.5);
|
||||||
|
|
||||||
draw_sprite_stretched_ext(THEME.timeline_node, 0, _x + 8, _tgy, (_w - 16) * prog, _tgh, cc, 0.85);
|
draw_sprite_stretched_ext(THEME.timeline_node, 0, _x + 8, _tgy, (_w - 16) * prog, _tgh, cc, 0.85);
|
||||||
draw_sprite_stretched_ext(THEME.timeline_node, 1, _x + 8, _tgy, (_w - 16) * prog, _tgh, c_white, 0.25);
|
draw_sprite_stretched_add(THEME.timeline_node, 1, _x + 8, _tgy, (_w - 16) * prog, _tgh, c_white, 0.1);
|
||||||
|
|
||||||
txt = $"{progFr}/{rn}";
|
txt = $"{progFr}/{rn}";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
draw_sprite_stretched_ext(THEME.timeline_node, 0, _x + 8, _tgy, 8, _tgh, cc, 0.85);
|
draw_sprite_stretched_ext(THEME.timeline_node, 0, _x + 8, _tgy, 10, _tgh, cc, 0.85);
|
||||||
draw_sprite_stretched_ext(THEME.timeline_node, 1, _x + 8, _tgy, 8, _tgh, c_white, 0.25);
|
draw_sprite_stretched_add(THEME.timeline_node, 1, _x + 8, _tgy, 10, _tgh, c_white, 0.1);
|
||||||
|
|
||||||
txt = $"{rn}";
|
txt = $"{rn}";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_hover && point_in_rectangle(_m[0], _m[1], _x + 8, _yy, _x + _w - 8, _yy + hh)) {
|
if(_hover && point_in_rectangle(_m[0], _m[1], _x + 8, _yy, _x + _w - 8, _yy + hh)) {
|
||||||
draw_sprite_stretched_ext(THEME.timeline_node, 0, _x + 8, _tgy, _w - 16, _tgh, c_white, 0.1);
|
draw_sprite_stretched_add(THEME.timeline_node, 0, _x + 8, _tgy, _w - 16, _tgh, c_white, 0.1);
|
||||||
|
|
||||||
if(mouse_press(mb_left, _focus)) {
|
if(mouse_press(mb_left, _focus)) {
|
||||||
var _currTag = getInputData(2);
|
var _currTag = getInputData(2);
|
||||||
var _tagName = tag[? "Name"];
|
var _tagName = tag[? "Name"];
|
||||||
|
@ -139,15 +140,19 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text_add(_x + 24, _yy + hh / 2, tag[? "Name"]);
|
draw_set_alpha(1);
|
||||||
|
draw_text_add(_x + 28, _yy + hh / 2, tag[? "Name"]);
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_right, fa_center, COLORS._main_text_sub);
|
draw_set_halign(fa_right);
|
||||||
|
draw_set_alpha(0.4);
|
||||||
draw_text_add(_x + _w - 20, _yy + hh / 2, txt);
|
draw_text_add(_x + _w - 20, _yy + hh / 2, txt);
|
||||||
|
|
||||||
|
draw_set_alpha(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
tag_renderer.h = _h;
|
tag_renderer.h = _h;
|
||||||
return _h;
|
return _h;
|
||||||
}); #endregion
|
});
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
["File", true], 0,
|
["File", true], 0,
|
||||||
|
@ -170,13 +175,13 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
|
|
||||||
first_update = false;
|
first_update = false;
|
||||||
|
|
||||||
on_drop_file = function(path) { #region
|
on_drop_file = function(path) {
|
||||||
inputs[| 0].setValue(path);
|
inputs[| 0].setValue(path);
|
||||||
doUpdate();
|
doUpdate();
|
||||||
return true;
|
return true;
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
function refreshLayers() { #region
|
function refreshLayers() {
|
||||||
var _nh = 64;
|
var _nh = 64;
|
||||||
var nx = x + w + 32;
|
var nx = x + w + 32;
|
||||||
var nh = (array_length(layers) - 1) / 2 * _nh;
|
var nh = (array_length(layers) - 1) / 2 * _nh;
|
||||||
|
@ -208,11 +213,14 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
lvs[i].inputs[| 1].setValue(use_cel);
|
lvs[i].inputs[| 1].setValue(use_cel);
|
||||||
lvs[i].setDisplayName(_name);
|
lvs[i].setDisplayName(_name);
|
||||||
}
|
}
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
function updatePaths(path = path_current) { #region
|
function updatePaths(path = path_current) {
|
||||||
if(path == -1) return false;
|
if(path == -1) return false;
|
||||||
if(!file_exists_empty(path)) return false;
|
if(!file_exists_empty(path)) {
|
||||||
|
noti_warning("File not exist.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
path_current = path;
|
path_current = path;
|
||||||
edit_time = max(edit_time, file_get_modify_s(path_current));
|
edit_time = max(edit_time, file_get_modify_s(path_current));
|
||||||
|
@ -288,27 +296,27 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
insp1UpdateTooltip = __txt("Refresh");
|
insp1UpdateTooltip = __txt("Refresh");
|
||||||
insp1UpdateIcon = [ THEME.refresh_icon, 1, COLORS._main_value_positive ];
|
insp1UpdateIcon = [ THEME.refresh_icon, 1, COLORS._main_value_positive ];
|
||||||
|
|
||||||
static onInspector1Update = function() { #region
|
static onInspector1Update = function() {
|
||||||
updatePaths(path_get(getInputData(0)));
|
updatePaths(path_get(getInputData(0)));
|
||||||
triggerRender();
|
triggerRender();
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static step = function() { #region
|
static step = function() {
|
||||||
if(!attributes.file_checker) return;
|
if(!attributes.file_checker) return;
|
||||||
if(path_current == "") return;
|
if(!file_exists_empty(path_current)) return;
|
||||||
|
|
||||||
if(file_get_modify_s(path_current) > edit_time) {
|
if(file_get_modify_s(path_current) > edit_time) {
|
||||||
updatePaths();
|
updatePaths();
|
||||||
triggerRender();
|
triggerRender();
|
||||||
}
|
}
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) { #region
|
static update = function(frame = CURRENT_FRAME) {
|
||||||
var path = path_get(getInputData(0));
|
var path = path_get(getInputData(0));
|
||||||
var current_tag = getInputData(2);
|
var current_tag = getInputData(2);
|
||||||
|
|
||||||
|
@ -359,19 +367,19 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
draw_surface_safe(_inSurf, xx, yy);
|
draw_surface_safe(_inSurf, xx, yy);
|
||||||
}
|
}
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static attributeSerialize = function() { #region
|
static attributeSerialize = function() {
|
||||||
var att = {};
|
var att = {};
|
||||||
att.layer_visible = attributes.layer_visible;
|
att.layer_visible = attributes.layer_visible;
|
||||||
|
|
||||||
return att;
|
return att;
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static attributeDeserialize = function(attr) { #region
|
static attributeDeserialize = function(attr) {
|
||||||
struct_append(attributes, attr);
|
struct_append(attributes, attr);
|
||||||
|
|
||||||
if(struct_has(attr, "layer_visible"))
|
if(struct_has(attr, "layer_visible"))
|
||||||
attributes.layer_visible = attr.layer_visible;
|
attributes.layer_visible = attr.layer_visible;
|
||||||
} #endregion
|
}
|
||||||
}
|
}
|
|
@ -16,31 +16,23 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
static onValueFromUpdate = function(index) { findLayer(); }
|
static onValueFromUpdate = function(index) { findLayer(); }
|
||||||
|
|
||||||
static findLayer = function() { #region
|
static findLayer = function() { #region
|
||||||
|
layer_object = noone;
|
||||||
|
|
||||||
var data = getInputData(0);
|
var data = getInputData(0);
|
||||||
if(data == noone) return;
|
if(data == noone) return;
|
||||||
|
|
||||||
var layer_index = 0;
|
|
||||||
layer_object = noone;
|
|
||||||
|
|
||||||
for( var i = 0, n = array_length(data.layers); i < n; i++ ) {
|
for( var i = 0, n = array_length(data.layers); i < n; i++ ) {
|
||||||
if(data.layers[i].name != display_name) continue;
|
if(data.layers[i].name == display_name)
|
||||||
|
layer_object = data.layers[i];
|
||||||
layer_object = data.layers[i];
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) { #region
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
var data = getInputData(0);
|
findLayer();
|
||||||
if(data == noone) return;
|
|
||||||
|
|
||||||
if(_name != display_name) {
|
|
||||||
_name = display_name;
|
|
||||||
findLayer();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(layer_object == noone) return;
|
if(layer_object == noone) return;
|
||||||
var cel = layer_object.getCel(CURRENT_FRAME - data._tag_delay);
|
|
||||||
|
var data = getInputData(0);
|
||||||
|
var cel = layer_object.getCel(CURRENT_FRAME - data._tag_delay);
|
||||||
|
|
||||||
var celDim = getInputData(1);
|
var celDim = getInputData(1);
|
||||||
var ww = data.content[? "Width"];
|
var ww = data.content[? "Width"];
|
||||||
|
|
|
@ -12,7 +12,7 @@ function Node_Caustic(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _g
|
||||||
addShaderProp(SHADER_UNIFORM.float, "scale");
|
addShaderProp(SHADER_UNIFORM.float, "scale");
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
inputs[| 4] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
|
|
|
@ -12,7 +12,7 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
.setMappable(11);
|
.setMappable(11);
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 4] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Point", "Edge", "Cell", "Crystal" ]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Point", "Edge", "Cell", "Crystal" ]);
|
||||||
|
|
|
@ -1328,6 +1328,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
||||||
|
|
||||||
for(var i = 0; i < ds_list_size(outputs); i++) {
|
for(var i = 0; i < ds_list_size(outputs); i++) {
|
||||||
var jun = outputs[| i];
|
var jun = outputs[| i];
|
||||||
|
if(!jun.isVisible()) continue;
|
||||||
|
|
||||||
if(jun.drawJunction_fast(_s, _mx, _my))
|
if(jun.drawJunction_fast(_s, _mx, _my))
|
||||||
hover = jun;
|
hover = jun;
|
||||||
|
|
|
@ -17,7 +17,7 @@ function Node_Diffuse(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
.setDisplay(VALUE_DISPLAY.slider_range);
|
.setDisplay(VALUE_DISPLAY.slider_range);
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 7] = nodeValue("External", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
|
inputs[| 7] = nodeValue("External", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
__init_mask_modifier(7); // inputs 11, 12,
|
__init_mask_modifier(7); // inputs 11, 12,
|
||||||
|
|
||||||
inputs[| 13] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 13] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 13].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 13].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 14] = nodeValue("Use palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
inputs[| 14] = nodeValue("Use palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ function Node_Wiggler(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) construc
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] });
|
||||||
|
|
||||||
inputs[| inl + 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| inl + 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| inl + 3] = nodeValue("Clip", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b11 )
|
inputs[| inl + 3] = nodeValue("Clip", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b11 )
|
||||||
.setDisplay(VALUE_DISPLAY.toggle, { data : [ "Start", "End" ] });
|
.setDisplay(VALUE_DISPLAY.toggle, { data : [ "Start", "End" ] });
|
||||||
|
|
|
@ -13,7 +13,7 @@ function Node_Gabor_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y
|
||||||
addShaderProp(SHADER_UNIFORM.float, "scale");
|
addShaderProp(SHADER_UNIFORM.float, "scale");
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2)
|
inputs[| 4] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2)
|
||||||
|
|
|
@ -38,7 +38,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid", "Texture sample"]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid", "Texture sample"]);
|
||||||
|
|
||||||
inputs[| 11] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 11] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 11].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 11].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 12] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
inputs[| 12] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid", "Texture sample"]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid", "Texture sample"]);
|
||||||
|
|
||||||
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
inputs[| 4] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [-0.5, 0.5, 0.01] });
|
||||||
|
|
|
@ -31,7 +31,7 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]);
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 10] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
inputs[| 10] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid", "Texture sample"]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid", "Texture sample"]);
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 10] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
inputs[| 10] = nodeValue("Anti aliasing", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y,
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]);
|
||||||
|
|
||||||
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ function Node_Lovify(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
|
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 )
|
inputs[| 2] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 )
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -228,7 +228,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
new scrollItem("Custom", s_node_mesh_type, 1), ] );
|
new scrollItem("Custom", s_node_mesh_type, 1), ] );
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 9].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||||
inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
inputs[| 3] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -22,7 +22,7 @@ function Node_MK_Brownian(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
inputs[| 7] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11);
|
inputs[| 7] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11);
|
||||||
|
|
||||||
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Angular speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ -45, 45 ])
|
inputs[| 9] = nodeValue("Angular speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ -45, 45 ])
|
||||||
.setDisplay(VALUE_DISPLAY.range);
|
.setDisplay(VALUE_DISPLAY.range);
|
||||||
|
|
|
@ -8,7 +8,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA)
|
inputs[| 3] = nodeValue("Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA)
|
||||||
.setDisplay(VALUE_DISPLAY.area);
|
.setDisplay(VALUE_DISPLAY.area);
|
||||||
|
|
|
@ -15,7 +15,7 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
inputs[| 4] = nodeValue("Scatter", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
|
inputs[| 4] = nodeValue("Scatter", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
|
||||||
|
|
||||||
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Shading", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
inputs[| 6] = nodeValue("Shading", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
|
@ -10,7 +10,7 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Surface back", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
inputs[| 4] = nodeValue("Surface back", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
.setDisplay(VALUE_DISPLAY.range);
|
.setDisplay(VALUE_DISPLAY.range);
|
||||||
|
|
||||||
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 9] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Rain", s_node_mk_rain_type, 0),
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Rain", s_node_mk_rain_type, 0),
|
||||||
|
|
|
@ -5,7 +5,7 @@ function Node_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 2] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]);
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]);
|
||||||
|
|
|
@ -8,7 +8,7 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
.setMappable(6);
|
.setMappable(6);
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
inputs[| 3] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector)
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
|
|
@ -7,7 +7,7 @@ function Node_Noise_Bubble(_x, _y, _group = noone) : Node_Shader_Generator(_x, _
|
||||||
addShaderProp(SHADER_UNIFORM.float, "density");
|
addShaderProp(SHADER_UNIFORM.float, "density");
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.8 ] )
|
inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.8 ] )
|
||||||
|
|
|
@ -5,7 +5,7 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
|
@ -15,7 +15,7 @@ function Node_Noise_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0] )
|
inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0] )
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
|
@ -12,7 +12,7 @@ function Node_Noise_Strand(_x, _y, _group = noone) : Node_Shader_Generator(_x, _
|
||||||
addShaderProp(SHADER_UNIFORM.float, "density");
|
addShaderProp(SHADER_UNIFORM.float, "density");
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Slope", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 )
|
inputs[| 4] = nodeValue("Slope", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 )
|
||||||
|
|
|
@ -15,7 +15,7 @@ function Node_Noise_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0] )
|
inputs[| 2] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0] )
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
|
@ -8,7 +8,7 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6), "Random seed to be used to initialize K-mean algorithm.")
|
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6), "Random seed to be used to initialize K-mean algorithm.")
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) })
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) })
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 3] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
|
|
@ -30,7 +30,7 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
.setDisplay(VALUE_DISPLAY.rotation);
|
.setDisplay(VALUE_DISPLAY.rotation);
|
||||||
|
|
||||||
inputs[| 7] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 7] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 7].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 7].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
static createNewInput = function() {
|
static createNewInput = function() {
|
||||||
var index = ds_list_size(inputs);
|
var index = ds_list_size(inputs);
|
||||||
|
|
|
@ -17,7 +17,7 @@ function Node_Path_Wave(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
inputs[| 4] = nodeValue("Smooth", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
inputs[| 4] = nodeValue("Smooth", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Wiggle", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
inputs[| 6] = nodeValue("Wiggle", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou
|
||||||
inputs[| 5] = nodeValue("Roughness Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 );
|
inputs[| 5] = nodeValue("Roughness Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 );
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
holding_side = noone;
|
holding_side = noone;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
inputs[| 4] = nodeValue("Tile", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
inputs[| 4] = nodeValue("Tile", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||||
|
|
||||||
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 6] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]);
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]);
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _
|
||||||
addShaderProp(SHADER_UNIFORM.integer, "tile");
|
addShaderProp(SHADER_UNIFORM.integer, "tile");
|
||||||
|
|
||||||
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 6] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
|
|
@ -4,7 +4,7 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1)
|
inputs[| 2] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1)
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] });
|
||||||
|
|
|
@ -29,7 +29,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]);
|
||||||
|
|
||||||
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ function Node_Random_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Colored tile", "Height map", "Texture grid"]);
|
||||||
|
|
||||||
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
inputs[| 9] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
||||||
inputs[| 3] = nodeValue("Fill", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
inputs[| 3] = nodeValue("Fill", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 4] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 4].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 4].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 5] = nodeValue("Target Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
|
inputs[| 5] = nodeValue("Target Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Order", "Random", "Spread" ]);
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Order", "Random", "Spread" ]);
|
||||||
|
|
||||||
inputs[| 17] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 17] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 17].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 17].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 18] = nodeValue("Column", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4);
|
inputs[| 18] = nodeValue("Column", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ function Node_Rigid_Object_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
inputs[| 7] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 7] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 7].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 7].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.output, VALUE_TYPE.rigid, object);
|
outputs[| 0] = nodeValue("Object", self, JUNCTION_CONNECT.output, VALUE_TYPE.rigid, object);
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Uniform", "Random" ]);
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Uniform", "Random" ]);
|
||||||
|
|
||||||
inputs[| 10] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 10] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 10].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.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(c_white) )
|
||||||
.setMappable(28);
|
.setMappable(28);
|
||||||
|
|
|
@ -24,7 +24,7 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) })
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) })
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Fixed position", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Fix point position, and only select point in the area.");
|
inputs[| 6] = nodeValue("Fixed position", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Fix point position, and only select point in the area.");
|
||||||
|
|
|
@ -13,7 +13,7 @@ function Node_Shard_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y
|
||||||
addShaderProp(SHADER_UNIFORM.float, "scale");
|
addShaderProp(SHADER_UNIFORM.float, "scale");
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Sharpness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
|
inputs[| 4] = nodeValue("Sharpness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
|
||||||
|
|
|
@ -18,7 +18,7 @@ function Node_Shell(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
static update = function() {
|
static update = function() {
|
||||||
var _pro = getInputData(0);
|
var _pro = getInputData(0);
|
||||||
var _scr = getInputData(1);
|
var _scr = getInputData(1);
|
||||||
if(_pro == "" || _scr == "") return;
|
if(_pro == "" && _scr == "") return;
|
||||||
|
|
||||||
if(trusted) {
|
if(trusted) {
|
||||||
shell_execute_async(_pro, _scr);
|
shell_execute_async(_pro, _scr);
|
||||||
|
|
|
@ -17,7 +17,7 @@ function Node_Smoke_Turbulence(_x, _y, _group = noone) : Node_Smoke(_x, _y, _gro
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.01] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.01] });
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 4] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 4].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 4].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 5] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 5] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Override", "Add" ]);
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Override", "Add" ]);
|
||||||
|
|
|
@ -10,7 +10,7 @@ function Node_Strand_Break(_x, _y, _group = noone) : _Node_Strand_Affector(_x, _
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
inputs[| input_fix_len + 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| input_fix_len + 1] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| input_fix_len + 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| input_fix_len + 1].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
array_push(input_display_list,
|
array_push(input_display_list,
|
||||||
["Break", false], input_fix_len + 0, input_fix_len + 1
|
["Break", false], input_fix_len + 0, input_fix_len + 1
|
||||||
|
|
|
@ -35,7 +35,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
.setDisplay(VALUE_DISPLAY.slider);
|
.setDisplay(VALUE_DISPLAY.slider);
|
||||||
|
|
||||||
inputs[| 10] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| 10] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 10].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.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("Curl frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
|
inputs[| 11] = nodeValue("Curl frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ function Node_Strand_Force_Apply(_x, _y, _group = noone) : _Node_Strand_Affector
|
||||||
inputs[| input_fix_len + 1] = nodeValue("Turbulence", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
|
inputs[| input_fix_len + 1] = nodeValue("Turbulence", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
|
||||||
|
|
||||||
inputs[| input_fix_len + 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
inputs[| input_fix_len + 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| input_fix_len + 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| input_fix_len + 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| input_fix_len + 3] = nodeValue("Turbulence frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5);
|
inputs[| input_fix_len + 3] = nodeValue("Turbulence frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5);
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
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(c_white));
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 6] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 6].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 7] = nodeValue("Child", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Render extra strands between the real strands.");
|
inputs[| 7] = nodeValue("Child", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Render extra strands between the real strands.");
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou
|
||||||
inputs[| 4] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
inputs[| 4] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 5].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Match index", "Randomized" ], update_hover: false });
|
.setDisplay(VALUE_DISPLAY.enum_scroll, { data: [ "Match index", "Randomized" ], update_hover: false });
|
||||||
|
|
||||||
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 8] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 8].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
|
|
||||||
inputs[| 9] = nodeValue("Replace Empty", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false)
|
inputs[| 9] = nodeValue("Replace Empty", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false)
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,13 @@ function Node_SVG(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
triggerRender();
|
triggerRender();
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
var _scale = getInputData(1);
|
||||||
|
|
||||||
|
if(is_instanceof(content, SVG))
|
||||||
|
content.drawOverlay(hover, active, _x, _y, _s * _scale, _mx, _my, _snx, _sny);
|
||||||
|
}
|
||||||
|
|
||||||
static step = function() { #region
|
static step = function() { #region
|
||||||
var path = path_get(getInputData(0));
|
var path = path_get(getInputData(0));
|
||||||
if(!file_exists_empty(path)) return;
|
if(!file_exists_empty(path)) return;
|
||||||
|
@ -88,18 +95,19 @@ function Node_SVG(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
if(path != curr_path)
|
if(path != curr_path)
|
||||||
readFile(path);
|
readFile(path);
|
||||||
|
|
||||||
|
if(!is_instanceof(content, SVG)) return;
|
||||||
outputs[| 1].setValue(path);
|
outputs[| 1].setValue(path);
|
||||||
|
|
||||||
|
var _scale = getInputData(1);
|
||||||
var _outsurf = outputs[| 0].getValue();
|
var _outsurf = outputs[| 0].getValue();
|
||||||
|
|
||||||
var ww = 1;
|
var ww = content.width * _scale;
|
||||||
var hh = 1;
|
var hh = content.height * _scale;
|
||||||
|
|
||||||
_outsurf = surface_verify(_outsurf, ww, hh, attrDepth());
|
_outsurf = surface_verify(_outsurf, ww, hh, attrDepth());
|
||||||
print(content);
|
|
||||||
|
|
||||||
surface_set_shader(_outsurf, noone);
|
surface_set_shader(_outsurf, noone);
|
||||||
|
content.draw(_scale);
|
||||||
surface_reset_shader();
|
surface_reset_shader();
|
||||||
|
|
||||||
outputs[| 0].setValue(_outsurf);
|
outputs[| 0].setValue(_outsurf);
|
||||||
|
|
|
@ -12,7 +12,7 @@ function Node_Voronoi_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x,
|
||||||
addShaderProp(SHADER_UNIFORM.float, "scale");
|
addShaderProp(SHADER_UNIFORM.float, "scale");
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
inputs[| 4] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
|
|
|
@ -13,7 +13,7 @@ function Node_Wavelet_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x,
|
||||||
addShaderProp(SHADER_UNIFORM.float, "scale");
|
addShaderProp(SHADER_UNIFORM.float, "scale");
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
inputs[| 4] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
|
|
|
@ -78,16 +78,16 @@ function surfaceBox(_onModify, def_path = "") : widget() constructor {
|
||||||
var _arrInd = 0;
|
var _arrInd = 0;
|
||||||
|
|
||||||
if(is_array(_surface)) {
|
if(is_array(_surface)) {
|
||||||
var _sprd = array_spread(_surface);
|
if(array_length(_surface)) {
|
||||||
|
_arrLen = array_length(_surface);
|
||||||
if(array_length(_sprd)) {
|
|
||||||
_arrLen = array_length(_sprd);
|
|
||||||
_arrInd = safe_mod(round(current_time / 250), _arrLen);
|
_arrInd = safe_mod(round(current_time / 250), _arrLen);
|
||||||
_surface = _sprd[_arrInd];
|
_surface = _surface[_arrInd];
|
||||||
} else
|
} else
|
||||||
_surface = noone;
|
_surface = noone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!is_surface(_surface)) _surface = noone;
|
||||||
|
|
||||||
if(is_instanceof(_surface, __d3dMaterial)) _surface = _surface.surface;
|
if(is_instanceof(_surface, __d3dMaterial)) _surface = _surface.surface;
|
||||||
else if(is_instanceof(_surface, dynaSurf)) _surface = array_safe_get_fast(_surface.surfaces, 0, noone);
|
else if(is_instanceof(_surface, dynaSurf)) _surface = array_safe_get_fast(_surface.surfaces, 0, noone);
|
||||||
else if(is_instanceof(_surface, Atlas)) _surface = _surface.getSurface();
|
else if(is_instanceof(_surface, Atlas)) _surface = _surface.getSurface();
|
||||||
|
|
|
@ -1,14 +1,87 @@
|
||||||
function SVG() constructor {
|
function SVG() constructor {
|
||||||
width = 1;
|
width = 1;
|
||||||
height = 1;
|
height = 1;
|
||||||
fill = c_black;
|
bbox = [ 1, 1, 1, 1 ];
|
||||||
bbox = [ 0, 0, 0, 0 ];
|
|
||||||
|
fill = c_black;
|
||||||
|
fill_opacity = 1;
|
||||||
|
|
||||||
|
stroke = undefined;
|
||||||
|
stroke_width = undefined;
|
||||||
|
|
||||||
contents = [];
|
contents = [];
|
||||||
|
|
||||||
|
static mapX = function(px) { return lerp_invert(px, bbox[0], bbox[0] + bbox[2]) * width; }
|
||||||
|
static mapY = function(py) { return lerp_invert(py, bbox[1], bbox[1] + bbox[3]) * height; }
|
||||||
|
|
||||||
|
static getSurface = function(scale = 1) { return surface_create(width * scale, height * scale); }
|
||||||
|
|
||||||
|
static draw = function(scale = 1) {
|
||||||
|
if(!is_undefined(fill))
|
||||||
|
draw_set_color(fill);
|
||||||
|
|
||||||
|
if(!is_undefined(fill_opacity))
|
||||||
|
draw_set_alpha(fill_opacity);
|
||||||
|
|
||||||
|
for (var i = 0, n = array_length(contents); i < n; i++)
|
||||||
|
contents[i].draw(scale);
|
||||||
|
}
|
||||||
|
|
||||||
|
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
for (var i = 0, n = array_length(contents); i < n; i++)
|
||||||
|
contents[i].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function SVG_path() constructor {
|
function SVG_path(svgObj) constructor {
|
||||||
anchors = [];
|
parent = svgObj;
|
||||||
|
|
||||||
|
fill = undefined;
|
||||||
|
fill_opacity = undefined;
|
||||||
|
|
||||||
|
stroke = undefined;
|
||||||
|
stroke_width = undefined;
|
||||||
|
|
||||||
|
segments = [];
|
||||||
|
shapes = [];
|
||||||
|
|
||||||
|
static setTris = function() {
|
||||||
|
shapes = [];
|
||||||
|
var ox, oy, nx, ny, x0, y0;
|
||||||
|
|
||||||
|
for (var i = 0, n = array_length(segments); i < n; i++) {
|
||||||
|
var _seg = segments[i];
|
||||||
|
var _p = array_create(array_length(_seg));
|
||||||
|
|
||||||
|
for (var j = 0, m = array_length(_seg); j < m; j++)
|
||||||
|
_p[j] = new __vec2(_seg[j][0], _seg[j][1]);
|
||||||
|
|
||||||
|
var _pTri = polygon_triangulate(_p);
|
||||||
|
var _ctri = [];
|
||||||
|
|
||||||
|
for (var j = 0, m = array_length(_seg); j < m; j++) {
|
||||||
|
var _s = _seg[j];
|
||||||
|
nx = _s[0];
|
||||||
|
ny = _s[1];
|
||||||
|
|
||||||
|
if(j && array_length(_s) == 4) {
|
||||||
|
x0 = _s[2];
|
||||||
|
y0 = _s[3];
|
||||||
|
|
||||||
|
array_push(_ctri, [ ox, oy, x0, y0, nx, ny ]);
|
||||||
|
}
|
||||||
|
|
||||||
|
ox = nx;
|
||||||
|
oy = ny;
|
||||||
|
}
|
||||||
|
|
||||||
|
_pTri[3] = _ctri;
|
||||||
|
shapes[i] = _pTri;
|
||||||
|
|
||||||
|
// print($"{i}: {array_length(_pTri[0])} - {_pTri[2]}");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static setDef = function(def) {
|
static setDef = function(def) {
|
||||||
var _mode = "";
|
var _mode = "";
|
||||||
|
@ -25,51 +98,426 @@ function SVG_path() constructor {
|
||||||
var _od = ord(".");
|
var _od = ord(".");
|
||||||
var _os = ord(" ");
|
var _os = ord(" ");
|
||||||
|
|
||||||
var _tx = 0;
|
var _sx = 0, _sy = 0;
|
||||||
var _ty = 0;
|
var _tx = 0, _ty = 0;
|
||||||
|
var _cx = 0, _cy = 0;
|
||||||
|
|
||||||
|
segments = [];
|
||||||
|
var anchors = [];
|
||||||
|
// print("=========================================================================");
|
||||||
|
// print(def);
|
||||||
|
|
||||||
repeat(_len) {
|
repeat(_len) {
|
||||||
var _chr = string_char_at(def, _ind);
|
var _chr = string_char_at(def, _ind);
|
||||||
|
var _chrn = _ind < _len? ord(string_char_at(def, _ind + 1)) : 0;
|
||||||
var _och = ord(_chr);
|
var _och = ord(_chr);
|
||||||
var _eval = 0;
|
var _eval = false;
|
||||||
|
_ind++;
|
||||||
|
|
||||||
if((_och >= _oa && _och <= _oz) || (_och >= _oA && _och <= _oZ))
|
if((_och >= _oa && _och <= _oz) || (_och >= _oA && _och <= _oZ)) {
|
||||||
_eval = 2;
|
|
||||||
else if(_och == _os)
|
if(_chr == "Z" || _chr == "z") {
|
||||||
_eval = 1;
|
array_push(anchors, [ parent.mapX(_sx), parent.mapY(_sy) ]);
|
||||||
else if((_och >= _o0 && _och >= _o9) || _och == _om || _och == _od)
|
|
||||||
|
if(!array_empty(anchors))
|
||||||
|
array_push(segments, anchors);
|
||||||
|
anchors = [];
|
||||||
|
|
||||||
|
} else if(_chr == "M" || _chr == "m") {
|
||||||
|
|
||||||
|
if(!array_empty(anchors))
|
||||||
|
array_push(segments, anchors);
|
||||||
|
anchors = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
_mode = _chr;
|
||||||
|
_val = "";
|
||||||
|
|
||||||
|
} else if((_och >= _o0 && _och <= _o9) || _och == _od || _och == _om) {
|
||||||
_val += _chr;
|
_val += _chr;
|
||||||
|
}
|
||||||
|
|
||||||
if(_eval == 1)
|
if(_och == _os || _chrn == _om || (_chrn >= _oa && _chrn <= _oz) || (_chrn >= _oA && _chrn <= _oZ)) {
|
||||||
array_push(_par, real(_val));
|
|
||||||
|
|
||||||
else if(_eval == 2) {
|
if(_val != "")
|
||||||
array_push(_par, real(_val));
|
array_push(_par, real(_val));
|
||||||
_val = "";
|
_val = "";
|
||||||
|
_eval = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_eval) {
|
||||||
|
// print($"Eval [{_mode}]: ({anchors}) - {_par}");
|
||||||
|
|
||||||
switch(_mode) {
|
switch(_mode) {
|
||||||
case "M" : //Move to absolute
|
case "M" : //Move to absolute
|
||||||
var _nx = array_safe_get(_par, 0);
|
|
||||||
var _ny = array_safe_get(_par, 1);
|
|
||||||
|
|
||||||
_tx = _nx;
|
if(array_length(_par) >= 2) {
|
||||||
_ty = _ny;
|
_tx = _par[0];
|
||||||
|
_ty = _par[1];
|
||||||
|
_sx = _tx;
|
||||||
|
_sy = _ty;
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "m" : //Move to relative
|
case "m" : //Move to relative
|
||||||
var _nx = array_safe_get(_par, 0);
|
|
||||||
var _ny = array_safe_get(_par, 1);
|
|
||||||
|
|
||||||
_tx += _nx;
|
if(array_length(_par) >= 2) {
|
||||||
_ty += _ny;
|
_tx += _par[0];
|
||||||
|
_ty += _par[1];
|
||||||
|
_sx = _tx;
|
||||||
|
_sy = _ty;
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "L" : //Line to absolute
|
||||||
|
if(array_length(_par) >= 2) {
|
||||||
|
_tx = _par[0];
|
||||||
|
_ty = _par[1];
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "l" : //Line to relative
|
||||||
|
if(array_length(_par) >= 2) {
|
||||||
|
_tx += _par[0];
|
||||||
|
_ty += _par[1];
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "H" : //Line to horizontal absolute
|
||||||
|
if(array_length(_par) >= 1) {
|
||||||
|
_tx = _par[0];
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "h" : //Line to horizontal relative
|
||||||
|
if(array_length(_par) >= 1) {
|
||||||
|
_tx += _par[0];
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "V" : //Line to vertical absolute
|
||||||
|
if(array_length(_par) >= 1) {
|
||||||
|
_ty = _par[0];
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "v" : //Line to vertical relative
|
||||||
|
if(array_length(_par) >= 1) {
|
||||||
|
_ty += _par[0];
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "C" : //Cubic bezier absolute
|
||||||
|
if(array_length(_par) >= 6) {
|
||||||
|
var _x1 = _par[0];
|
||||||
|
var _y1 = _par[1];
|
||||||
|
var _x2 = _par[2];
|
||||||
|
var _y2 = _par[3];
|
||||||
|
_tx = _par[4];
|
||||||
|
_ty = _par[5];
|
||||||
|
|
||||||
|
_cx = _x2 - _tx;
|
||||||
|
_cy = _y2 - _ty;
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty),
|
||||||
|
parent.mapX(_x1),
|
||||||
|
parent.mapY(_y1),
|
||||||
|
parent.mapX(_x2),
|
||||||
|
parent.mapY(_y2) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "c" : //Cubic bezier relative
|
||||||
|
if(array_length(_par) >= 6) {
|
||||||
|
var _x1 = _tx + _par[0];
|
||||||
|
var _y1 = _ty + _par[1];
|
||||||
|
var _x2 = _tx + _par[2];
|
||||||
|
var _y2 = _ty + _par[3];
|
||||||
|
_tx = _tx + _par[4];
|
||||||
|
_ty = _ty + _par[5];
|
||||||
|
|
||||||
|
_cx = _x2 - _tx;
|
||||||
|
_cy = _y2 - _ty;
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty),
|
||||||
|
parent.mapX(_x1),
|
||||||
|
parent.mapY(_y1),
|
||||||
|
parent.mapX(_x2),
|
||||||
|
parent.mapY(_y2) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "S" : //Smooth cubic bezier absolute
|
||||||
|
if(array_length(_par) >= 4) {
|
||||||
|
var _x1 = _tx + _cx;
|
||||||
|
var _y1 = _ty + _cy;
|
||||||
|
var _x2 = _par[0];
|
||||||
|
var _y2 = _par[1];
|
||||||
|
_tx = _par[2];
|
||||||
|
_ty = _par[3];
|
||||||
|
|
||||||
|
_cx = _x2 - _tx;
|
||||||
|
_cy = _y2 - _ty;
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty),
|
||||||
|
parent.mapX(_x1),
|
||||||
|
parent.mapY(_y1),
|
||||||
|
parent.mapX(_x2),
|
||||||
|
parent.mapY(_y2) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "s" : //Smooth cubic bezier relative
|
||||||
|
if(array_length(_par) >= 4) {
|
||||||
|
var _x1 = _tx + _cx;
|
||||||
|
var _y1 = _ty + _cy;
|
||||||
|
var _x2 = _tx + _par[0];
|
||||||
|
var _y2 = _ty + _par[1];
|
||||||
|
_tx = _tx + _par[2];
|
||||||
|
_ty = _ty + _par[3];
|
||||||
|
|
||||||
|
_cx = _x2 - _tx;
|
||||||
|
_cy = _y2 - _ty;
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty),
|
||||||
|
parent.mapX(_x1),
|
||||||
|
parent.mapY(_y1),
|
||||||
|
parent.mapX(_x2),
|
||||||
|
parent.mapY(_y2) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "Q" : //Quadratic bezier absolute
|
||||||
|
if(array_length(_par) >= 4) {
|
||||||
|
var _x1 = _par[0];
|
||||||
|
var _y1 = _par[1];
|
||||||
|
_tx = _par[2];
|
||||||
|
_ty = _par[3];
|
||||||
|
|
||||||
|
_cx = _tx - _x1;
|
||||||
|
_cy = _ty - _y1;
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty),
|
||||||
|
parent.mapX(_x1),
|
||||||
|
parent.mapY(_y1) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "q" : //Quadratic bezier relative
|
||||||
|
if(array_length(_par) >= 4) {
|
||||||
|
var _x1 = _tx + _par[0];
|
||||||
|
var _y1 = _ty + _par[1];
|
||||||
|
_tx = _tx + _par[2];
|
||||||
|
_ty = _ty + _par[3];
|
||||||
|
|
||||||
|
_cx = _tx - _x1;
|
||||||
|
_cy = _ty - _y1;
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty),
|
||||||
|
parent.mapX(_x1),
|
||||||
|
parent.mapY(_y1) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "T" : //Smooth quadratic bezier absolute
|
||||||
|
if(array_length(_par) >= 2) {
|
||||||
|
var _x1 = _tx + _cx;
|
||||||
|
var _y1 = _ty + _cy;
|
||||||
|
_tx = _par[0];
|
||||||
|
_ty = _par[1];
|
||||||
|
|
||||||
|
_cx = _tx - _x1;
|
||||||
|
_cy = _ty - _y1;
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty),
|
||||||
|
parent.mapX(_x1),
|
||||||
|
parent.mapY(_y1) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "t" : //Smooth quadratic bezier relative
|
||||||
|
if(array_length(_par) >= 2) {
|
||||||
|
var _x1 = _tx + _cx;
|
||||||
|
var _y1 = _ty + _cy;
|
||||||
|
_tx = _tx + _par[0];
|
||||||
|
_ty = _ty + _par[1];
|
||||||
|
|
||||||
|
_cx = _tx - _x1;
|
||||||
|
_cy = _ty - _y1;
|
||||||
|
|
||||||
|
array_push(anchors, [ parent.mapX(_tx),
|
||||||
|
parent.mapY(_ty),
|
||||||
|
parent.mapX(_x1),
|
||||||
|
parent.mapY(_y1) ]);
|
||||||
|
_par = [];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setTris();
|
||||||
|
// print(segments);
|
||||||
|
}
|
||||||
|
|
||||||
|
static draw = function(scale = 1) {
|
||||||
|
if(!is_undefined(fill))
|
||||||
|
draw_set_color(fill);
|
||||||
|
|
||||||
|
if(!is_undefined(fill_opacity))
|
||||||
|
draw_set_alpha(fill_opacity);
|
||||||
|
|
||||||
|
var _temp = [
|
||||||
|
parent.getSurface(scale),
|
||||||
|
parent.getSurface(scale),
|
||||||
|
];
|
||||||
|
|
||||||
|
var _sw = surface_get_width_safe(_temp[0]);
|
||||||
|
var _sh = surface_get_height_safe(_temp[0]);
|
||||||
|
|
||||||
|
surface_clear(_temp[0]);
|
||||||
|
surface_clear(_temp[1]);
|
||||||
|
|
||||||
|
var _surf = parent.getSurface(scale);
|
||||||
|
|
||||||
|
for (var i = 0, n = array_length(shapes); i < n; i++) {
|
||||||
|
var shp = shapes[i];
|
||||||
|
var _tri = shp[0];
|
||||||
|
var _sid = shp[2];
|
||||||
|
var _ctr = shp[3];
|
||||||
|
|
||||||
|
surface_set_target(_surf);
|
||||||
|
DRAW_CLEAR
|
||||||
|
BLEND_OVERRIDE
|
||||||
|
|
||||||
|
draw_primitive_begin(pr_trianglelist);
|
||||||
|
for (var j = 0, m = array_length(_tri); j < m; j++) {
|
||||||
|
draw_vertex(_tri[j][0].x * scale, _tri[j][0].y * scale);
|
||||||
|
draw_vertex(_tri[j][1].x * scale, _tri[j][1].y * scale);
|
||||||
|
draw_vertex(_tri[j][2].x * scale, _tri[j][2].y * scale);
|
||||||
|
}
|
||||||
|
draw_primitive_end();
|
||||||
|
|
||||||
|
shader_set(sh_svg_curve_quad);
|
||||||
|
draw_primitive_begin(pr_trianglelist);
|
||||||
|
for (var j = 0, m = array_length(_ctr); j < m; j++) {
|
||||||
|
draw_vertex_texture(_ctr[j][0] * scale, _ctr[j][1] * scale, 0.0, 0);
|
||||||
|
draw_vertex_texture(_ctr[j][2] * scale, _ctr[j][3] * scale, 0.5, 0);
|
||||||
|
draw_vertex_texture(_ctr[j][4] * scale, _ctr[j][5] * scale, 1.0, 1);
|
||||||
|
}
|
||||||
|
draw_primitive_end();
|
||||||
|
shader_reset();
|
||||||
|
|
||||||
|
BLEND_NORMAL
|
||||||
|
surface_reset_target();
|
||||||
|
|
||||||
|
surface_set_shader(_temp[i % 2], sh_svg_fill);
|
||||||
|
|
||||||
|
shader_set_surface("bg", _temp[!(i % 2)]);
|
||||||
|
shader_set_surface("fg", _surf);
|
||||||
|
|
||||||
|
draw_sprite_stretched_ext(s_fx_pixel, 0, 0, 0, _sw, _sh, draw_get_color(), draw_get_alpha());
|
||||||
|
|
||||||
|
surface_reset_shader();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
draw_surface(_temp[!(i % 2)], 0, 0);
|
||||||
|
|
||||||
|
surface_free(_surf);
|
||||||
|
surface_free(_temp[0]);
|
||||||
|
surface_free(_temp[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
|
||||||
|
for (var i = 0, n = array_length(segments); i < n; i++) {
|
||||||
|
var _seg = segments[i];
|
||||||
|
var _ox, _oy, _nx, _ny;
|
||||||
|
|
||||||
|
draw_set_color(COLORS._main_accent);
|
||||||
|
|
||||||
|
for (var j = 0, m = array_length(_seg); j < m; j++) {
|
||||||
|
var _pnt = _seg[j];
|
||||||
|
_nx = _pnt[0];
|
||||||
|
_ny = _pnt[1];
|
||||||
|
|
||||||
|
_nx = _x + _nx * _s;
|
||||||
|
_ny = _y + _ny * _s;
|
||||||
|
|
||||||
|
if(j) draw_line(_ox, _oy, _nx, _ny);
|
||||||
|
draw_circle(_nx, _ny, 4, false);
|
||||||
|
|
||||||
|
if(array_length(_pnt) >= 4) {
|
||||||
|
var _nx1 = _pnt[2];
|
||||||
|
var _ny1 = _pnt[3];
|
||||||
|
|
||||||
|
_nx1 = _x + _nx1 * _s;
|
||||||
|
_ny1 = _y + _ny1 * _s;
|
||||||
|
|
||||||
|
draw_circle(_nx1, _ny1, 4, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
_par = [];
|
if(array_length(_pnt) >= 6) {
|
||||||
_mode = _chr;
|
var _nx1 = _pnt[4];
|
||||||
}
|
var _ny1 = _pnt[5];
|
||||||
|
|
||||||
_ind++;
|
_nx1 = _x + _nx1 * _s;
|
||||||
|
_ny1 = _y + _ny1 * _s;
|
||||||
|
|
||||||
|
draw_circle(_nx1, _ny1, 4, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
_ox = _nx;
|
||||||
|
_oy = _ny;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -21,12 +21,14 @@ function svg_parse(xmlStr) {
|
||||||
var bbox = attr.viewBox;
|
var bbox = attr.viewBox;
|
||||||
bbox = string_splice(bbox);
|
bbox = string_splice(bbox);
|
||||||
for (var i = 0, n = array_length(bbox); i < n; i++)
|
for (var i = 0, n = array_length(bbox); i < n; i++)
|
||||||
bbox[i] = toNumber(string_digits(bbox[i]))
|
bbox[i] = real(bbox[i])
|
||||||
svg.bbox = bbox;
|
svg.bbox = bbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(struct_has(attr, "fill")) {
|
if(struct_has(attr, "fill")) {
|
||||||
svg.fill = attr.fill;
|
var _f = attr.fill;
|
||||||
|
_f = string_replace_all(_f, "#", "");
|
||||||
|
svg.fill = color_from_rgb(_f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(struct_has(svg_object, "children")) {
|
if(struct_has(svg_object, "children")) {
|
||||||
|
@ -36,7 +38,7 @@ function svg_parse(xmlStr) {
|
||||||
var _ch = svg_object.children[i];
|
var _ch = svg_object.children[i];
|
||||||
|
|
||||||
switch(_ch.type) {
|
switch(_ch.type) {
|
||||||
case "path" : svg.contents[_ind++] = svg_parse_path(_ch); break;
|
case "path" : svg.contents[_ind++] = svg_parse_path(_ch, svg); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,8 +46,8 @@ function svg_parse(xmlStr) {
|
||||||
return svg;
|
return svg;
|
||||||
}
|
}
|
||||||
|
|
||||||
function svg_parse_path(pathStr) {
|
function svg_parse_path(pathStr, svgObj) {
|
||||||
var _path = new SVG_path();
|
var _path = new SVG_path(svgObj);
|
||||||
var attr = pathStr.attributes;
|
var attr = pathStr.attributes;
|
||||||
|
|
||||||
if(struct_has(attr, "d"))
|
if(struct_has(attr, "d"))
|
||||||
|
|
7
shaders/sh_svg_curve_quad/sh_svg_curve_quad.fsh
Normal file
7
shaders/sh_svg_curve_quad/sh_svg_curve_quad.fsh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
float inner = step(v_vTexcoord.x * v_vTexcoord.x, v_vTexcoord.y);
|
||||||
|
gl_FragColor = v_vColour * inner;
|
||||||
|
}
|
19
shaders/sh_svg_curve_quad/sh_svg_curve_quad.vsh
Normal file
19
shaders/sh_svg_curve_quad/sh_svg_curve_quad.vsh
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
//
|
||||||
|
// Simple passthrough vertex shader
|
||||||
|
//
|
||||||
|
attribute vec3 in_Position; // (x,y,z)
|
||||||
|
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||||
|
attribute vec4 in_Colour; // (r,g,b,a)
|
||||||
|
attribute vec2 in_TextureCoord; // (u,v)
|
||||||
|
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||||
|
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||||
|
|
||||||
|
v_vColour = in_Colour;
|
||||||
|
v_vTexcoord = in_TextureCoord;
|
||||||
|
}
|
12
shaders/sh_svg_curve_quad/sh_svg_curve_quad.yy
Normal file
12
shaders/sh_svg_curve_quad/sh_svg_curve_quad.yy
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"$GMShader":"",
|
||||||
|
"%Name":"sh_svg_curve_quad",
|
||||||
|
"name":"sh_svg_curve_quad",
|
||||||
|
"parent":{
|
||||||
|
"name":"svg",
|
||||||
|
"path":"folders/shader/svg.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMShader",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
"type":1,
|
||||||
|
}
|
16
shaders/sh_svg_fill/sh_svg_fill.fsh
Normal file
16
shaders/sh_svg_fill/sh_svg_fill.fsh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
uniform sampler2D bg, fg;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
vec4 _bc = texture2D(bg, v_vTexcoord);
|
||||||
|
vec4 _fc = texture2D(fg, v_vTexcoord);
|
||||||
|
|
||||||
|
// gl_FragColor = _fc; return;
|
||||||
|
|
||||||
|
gl_FragColor = _bc;
|
||||||
|
if(_fc.a == 0.) return;
|
||||||
|
|
||||||
|
gl_FragColor = _bc.a == 0.? v_vColour : vec4(0.);
|
||||||
|
}
|
19
shaders/sh_svg_fill/sh_svg_fill.vsh
Normal file
19
shaders/sh_svg_fill/sh_svg_fill.vsh
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
//
|
||||||
|
// Simple passthrough vertex shader
|
||||||
|
//
|
||||||
|
attribute vec3 in_Position; // (x,y,z)
|
||||||
|
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||||
|
attribute vec4 in_Colour; // (r,g,b,a)
|
||||||
|
attribute vec2 in_TextureCoord; // (u,v)
|
||||||
|
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||||
|
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||||
|
|
||||||
|
v_vColour = in_Colour;
|
||||||
|
v_vTexcoord = in_TextureCoord;
|
||||||
|
}
|
12
shaders/sh_svg_fill/sh_svg_fill.yy
Normal file
12
shaders/sh_svg_fill/sh_svg_fill.yy
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"$GMShader":"",
|
||||||
|
"%Name":"sh_svg_fill",
|
||||||
|
"name":"sh_svg_fill",
|
||||||
|
"parent":{
|
||||||
|
"name":"svg",
|
||||||
|
"path":"folders/shader/svg.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMShader",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
"type":1,
|
||||||
|
}
|
Loading…
Reference in a new issue