- [Shape] Add line shape. - [Shape] Arrow shape now use 2 points instead of area.
|
@ -190,6 +190,8 @@ event_inherited();
|
|||
for( var i = 0, n = array_length(_new_node.outputs); i < n; i++ )
|
||||
array_push(_outputs, _new_node.outputs[i]);
|
||||
|
||||
PANEL_INSPECTOR.setInspecting(_new_node);
|
||||
|
||||
} else if(is_instanceof(_node, NodeAction)) { // NOT IMPLEMENTED
|
||||
_node.build(node_target_x, node_target_y,, _param);
|
||||
return;
|
||||
|
|
|
@ -114,12 +114,12 @@ function draw_anchor_line(_index, _x, _y, _r, _a, _type = 0) {
|
|||
shader_reset();
|
||||
}
|
||||
|
||||
function draw_empty() {
|
||||
function draw_empty(_w = 0, _h = 0) {
|
||||
var _s = surface_get_target();
|
||||
if(_s == -1) return;
|
||||
|
||||
var _w = surface_get_width(_s);
|
||||
var _h = surface_get_height(_s);
|
||||
_w = _w? _w : surface_get_width(_s);
|
||||
_h = _h? _h : surface_get_height(_s);
|
||||
|
||||
draw_sprite_stretched(s_fx_pixel, 0, 0, 0, _w, _h);
|
||||
}
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
LATEST_VERSION = 1_18_00_0;
|
||||
VERSION = 1_18_01_0;
|
||||
SAVE_VERSION = 1_18_00_0;
|
||||
SAVE_VERSION = 1_18_01_0;
|
||||
VERSION_STRING = MAC? "1.18.003m" : "1.18.1";
|
||||
BUILD_NUMBER = 1_18_01_0;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ function mask_apply(original, edited, mask, mix = 1) {
|
|||
shader_set_i("invMask", __mask_invert);
|
||||
shader_set_f("mixRatio", mix);
|
||||
|
||||
draw_sprite_stretched(s_fx_pixel, 0, 0, 0, surface_get_width_safe(original), surface_get_height_safe(original));
|
||||
draw_empty();
|
||||
surface_reset_shader();
|
||||
|
||||
surface_free(edited);
|
||||
|
|
|
@ -27,9 +27,9 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
|||
var cHov = false;
|
||||
|
||||
switch(instanceof(wid)) {
|
||||
case "textArea" :
|
||||
case "textArea" :
|
||||
case "controlPointBox" :
|
||||
case "transformBox" :
|
||||
case "transformBox" :
|
||||
breakLine = true;
|
||||
break;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
inputs[1].editWidget.setSize(_siz);
|
||||
_ker = array_verify(_ker, _siz * _siz);
|
||||
|
||||
surface_set_shader(_outSurf, sh_convolution);
|
||||
surface_set_shader(_outSurf, sh_convolution, true, BLEND.over);
|
||||
shader_set_dim("dimension", _outSurf);
|
||||
shader_set_f("kernel", _ker);
|
||||
shader_set_i("size", _siz);
|
||||
|
|
|
@ -39,7 +39,8 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
"Rectangle", "Diamond", "Trapezoid", "Parallelogram",
|
||||
-1, "Ellipse", "Arc", "Donut", "Crescent", "Disk Segment", "Pie", "Squircle",
|
||||
-1, "Regular polygon", "Star", "Cross", "Rounded Cross",
|
||||
-1, "Teardrop", "Leaf", "Heart", "Arrow", "Gear",
|
||||
-1, "Line", "Arrow",
|
||||
-1, "Teardrop", "Leaf", "Heart", "Gear",
|
||||
];
|
||||
shape_types_str = [];
|
||||
|
||||
|
@ -49,6 +50,8 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
|
||||
newInput(2, nodeValue_Enum_Scroll("Shape", self, 0, { data: shape_types_str, horizontal: true, text_pad: ui(16) }));
|
||||
|
||||
inputs[2].options_histories = [ shape_types, { cond: function() /*=>*/ {return LOADING_VERSION < 1_18_00_0}, list: global.node_shape_keys_18 } ];
|
||||
|
||||
newInput(3, nodeValue_Area("Position", self, DEF_AREA_REF, { onSurfaceSize, useShape : false }))
|
||||
.setUnitRef(onSurfaceSize, VALUE_UNIT.reference);
|
||||
|
||||
|
@ -102,9 +105,9 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
newInput(22, nodeValue_Float("Skew", self, 0.5 ))
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
newInput(23, nodeValue_Slider_Range("Arrow Sizes", self, [ 0.2, 0.3 ] ));
|
||||
|
||||
newInput(24, nodeValue_Float("Arrow Head", self, 3 ));
|
||||
newInput(23, nodeValue_Float("Arrow Sizes", self, 0.3 ));
|
||||
|
||||
newInput(24, nodeValue_Float("Arrow Head", self, 1 ));
|
||||
|
||||
newInput(25, nodeValue_Int("Teeth Amount", self, 6 ));
|
||||
|
||||
|
@ -121,12 +124,24 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
|
||||
newInput(31, nodeValue_Float("Factor", self, 2.5));
|
||||
|
||||
newInput(32, nodeValue_Vec2("Point 1", self, [ 0, 0 ]))
|
||||
.setUnitRef(onSurfaceSize, VALUE_UNIT.reference);
|
||||
|
||||
newInput(33, nodeValue_Vec2("Point 2", self, [ 1, 1 ]))
|
||||
.setUnitRef(onSurfaceSize, VALUE_UNIT.reference);
|
||||
|
||||
newInput(34, nodeValue_Float("Thickness", self, 0.1))
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
newInput(35, nodeValue_Vec2("Point 3", self, [ 1, 0 ]))
|
||||
.setUnitRef(onSurfaceSize, VALUE_UNIT.reference);
|
||||
|
||||
newOutput(0, nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone));
|
||||
|
||||
input_display_list = [
|
||||
["Output", false], 0, 6,
|
||||
["Transform", false], 15, 3, 16, 17, 19, 28,
|
||||
["Shape", false], 14, 2, 9, 4, 13, 5, 7, 8, 21, 22, 23, 24, 25, 26, 27, 30, 31,
|
||||
["Shape", false], 14, 2, 32, 33, 35, 34, /**/ 9, 4, 13, 5, 7, 8, 21, 22, 23, 24, 25, 26, 27, 30, 31,
|
||||
["Render", true], 10, 18,
|
||||
["Height", true, 12], 29, 20,
|
||||
["Background", true, 1], 11,
|
||||
|
@ -163,7 +178,8 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
return _hov;
|
||||
}
|
||||
|
||||
var _type = current_data[15];
|
||||
var _shape = current_data[ 2];
|
||||
var _posMode = current_data[15];
|
||||
var _pos = [ 0, 0 ];
|
||||
var _sca = [ 1, 1 ];
|
||||
var _px, _py;
|
||||
|
@ -172,51 +188,60 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
var _hov = false;
|
||||
var _int = hover;
|
||||
|
||||
if(_type == 0) {
|
||||
var _shp = array_safe_get(shape_types, _shape, "");
|
||||
if(is_struct(_shp)) _shp = _shp.data;
|
||||
|
||||
switch(_shp) {
|
||||
case "Arrow" :
|
||||
case "Line" :
|
||||
hv = inputs[32].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov;
|
||||
hv = inputs[33].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov;
|
||||
return _hov;
|
||||
}
|
||||
|
||||
if(_posMode == 0) {
|
||||
_pos = [ current_data[3][0], current_data[3][1] ];
|
||||
_sca = [ current_data[3][2], current_data[3][3] ];
|
||||
|
||||
} else if(_type == 1) {
|
||||
} else if(_posMode == 1) {
|
||||
_pos = current_data[16];
|
||||
_sca = current_data[17];
|
||||
|
||||
}
|
||||
|
||||
if(_type != 2) {
|
||||
if(inputs[9].show_in_inspector) {
|
||||
var _px = _x + _pos[0] * _s;
|
||||
var _py = _y + _pos[1] * _s;
|
||||
|
||||
var _x0 = _px - _sca[0] * _s;
|
||||
var _y0 = _py - _sca[1] * _s;
|
||||
var _x1 = _px + _sca[0] * _s;
|
||||
var _y1 = _py + _sca[1] * _s;
|
||||
|
||||
var aa = -45;
|
||||
var ar = 90;
|
||||
|
||||
if(_sca[0] < 0 && _sca[1] < 0) { aa = 135; ar = -90; }
|
||||
else if(_sca[0] < 0 && _sca[1] > 0) { aa = -135; ar = 0; }
|
||||
else if(_sca[0] > 0 && _sca[1] < 0) { aa = 45; ar = 180; }
|
||||
|
||||
var _max_s = max(abs(_sca[0]), abs(_sca[1]));
|
||||
var _corr = current_data[9] * _s * _max_s;
|
||||
var _cor = _corr / (sqrt(2) - 1);
|
||||
|
||||
var cx = _x0 + lengthdir_x(_cor, aa);
|
||||
var cy = _y0 + lengthdir_y(_cor, aa);
|
||||
|
||||
draw_set_color(COLORS._main_accent);
|
||||
draw_arc(cx, cy, _cor - _corr, ar, ar + 90, 2);
|
||||
|
||||
hv = inputs[9].drawOverlay(_int, active, _x0, _y0, _s, _mx, _my, _snx, _sny, aa, _max_s, 1); _hov |= hv; _int &= !_hov;
|
||||
}
|
||||
if(inputs[9].show_in_inspector && _posMode != 2) { // corner
|
||||
var _px = _x + _pos[0] * _s;
|
||||
var _py = _y + _pos[1] * _s;
|
||||
|
||||
var _x0 = _px - _sca[0] * _s;
|
||||
var _y0 = _py - _sca[1] * _s;
|
||||
var _x1 = _px + _sca[0] * _s;
|
||||
var _y1 = _py + _sca[1] * _s;
|
||||
|
||||
var aa = -45;
|
||||
var ar = 90;
|
||||
|
||||
if(_sca[0] < 0 && _sca[1] < 0) { aa = 135; ar = -90; }
|
||||
else if(_sca[0] < 0 && _sca[1] > 0) { aa = -135; ar = 0; }
|
||||
else if(_sca[0] > 0 && _sca[1] < 0) { aa = 45; ar = 180; }
|
||||
|
||||
var _max_s = max(abs(_sca[0]), abs(_sca[1]));
|
||||
var _corr = current_data[9] * _s * _max_s;
|
||||
var _cor = _corr / (sqrt(2) - 1);
|
||||
|
||||
var cx = _x0 + lengthdir_x(_cor, aa);
|
||||
var cy = _y0 + lengthdir_y(_cor, aa);
|
||||
|
||||
draw_set_color(COLORS._main_accent);
|
||||
draw_arc(cx, cy, _cor - _corr, ar, ar + 90, 2);
|
||||
|
||||
hv = inputs[9].drawOverlay(_int, active, _x0, _y0, _s, _mx, _my, _snx, _sny, aa, _max_s, 1); _hov |= hv; _int &= !_hov;
|
||||
}
|
||||
|
||||
if(_type == 0) {
|
||||
if(_posMode == 0) {
|
||||
hv = inputs[3].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov;
|
||||
|
||||
} else if(_type == 1) {
|
||||
} else if(_posMode == 1) {
|
||||
_px = _x + _pos[0] * _s;
|
||||
_py = _y + _pos[1] * _s;
|
||||
|
||||
|
@ -281,18 +306,17 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
inputs[16].setVisible(_posTyp == 1);
|
||||
inputs[17].setVisible(_posTyp == 1);
|
||||
|
||||
inputs[ 4].setVisible(true);
|
||||
inputs[ 5].setVisible(true);
|
||||
inputs[ 6].setVisible(_path == noone);
|
||||
inputs[ 7].setVisible(true);
|
||||
inputs[ 8].setVisible(true);
|
||||
inputs[ 9].setVisible(true);
|
||||
inputs[12].setVisible(_path == noone);
|
||||
inputs[20].setVisible(_path == noone);
|
||||
inputs[13].setVisible(true);
|
||||
inputs[15].setVisible(true);
|
||||
|
||||
inputs[30].setVisible(false);
|
||||
inputs[31].setVisible(false);
|
||||
inputs[32].setVisible(false);
|
||||
inputs[33].setVisible(false);
|
||||
inputs[34].setVisible(false);
|
||||
inputs[35].setVisible(false);
|
||||
|
||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
||||
use_path = _path != noone && struct_has(_path, "getPointRatio");
|
||||
|
@ -533,10 +557,28 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
case "Arrow":
|
||||
inputs[23].setVisible(true);
|
||||
inputs[24].setVisible(true);
|
||||
inputs[32].setVisible(true);
|
||||
inputs[33].setVisible(true);
|
||||
inputs[34].setVisible(true);
|
||||
|
||||
shader_set_i("shape", 17);
|
||||
shader_set_2("arrow", _data[23]);
|
||||
shader_set_f("arrow", _data[23] / _data[24]);
|
||||
shader_set_f("arrow_head", _data[24]);
|
||||
|
||||
shader_set_2("point1", _data[32]);
|
||||
shader_set_2("point2", _data[33]);
|
||||
shader_set_f("thickness", _data[34]);
|
||||
break;
|
||||
|
||||
case "Line":
|
||||
inputs[32].setVisible(true);
|
||||
inputs[33].setVisible(true);
|
||||
inputs[34].setVisible(true);
|
||||
|
||||
shader_set_i("shape", 20);
|
||||
shader_set_2("point1", _data[32]);
|
||||
shader_set_2("point2", _data[33]);
|
||||
shader_set_f("thickness", _data[34]);
|
||||
break;
|
||||
|
||||
case "Gear":
|
||||
|
@ -555,7 +597,6 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
shader_set_f("teethAngle", _data[27]);
|
||||
break;
|
||||
|
||||
|
||||
case "Squircle" :
|
||||
inputs[31].setVisible(true);
|
||||
|
||||
|
@ -586,4 +627,19 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
|
||||
return _outSurf;
|
||||
}
|
||||
}
|
||||
|
||||
static postDeserialize = function() {
|
||||
if(LOADING_VERSION < 1_18_01_0) {
|
||||
var _dat = load_map.inputs[23].raw_value;
|
||||
for( var i = 0, n = array_length(_dat); i < n; i++ )
|
||||
_dat[i][1] = is_array(_dat[i][1])? array_safe_get(_dat[i][1], 1) : _dat[i][1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
global.node_shape_keys_18 = [
|
||||
"Rectangle", "Diamond", "Trapezoid", "Parallelogram",
|
||||
-1, "Ellipse", "Arc", "Donut", "Crescent", "Disk Segment", "Pie", "Squircle",
|
||||
-1, "Regular polygon", "Star", "Cross", "Rounded Cross",
|
||||
-1, "Teardrop", "Leaf", "Heart", "Arrow", "Gear",
|
||||
];
|
|
@ -44,10 +44,14 @@ uniform int teeth;
|
|||
uniform vec2 teethSize;
|
||||
uniform float teethAngle;
|
||||
|
||||
uniform vec2 arrow;
|
||||
uniform float arrow;
|
||||
uniform float arrow_head;
|
||||
uniform float squircle_factor;
|
||||
|
||||
uniform vec2 point1;
|
||||
uniform vec2 point2;
|
||||
uniform float thickness;
|
||||
|
||||
uniform vec4 bgColor;
|
||||
|
||||
#define PI 3.14159265359
|
||||
|
@ -352,56 +356,52 @@ float sdRoundedCross( in vec2 p, in float h ) {
|
|||
dot2(p-vec2(1,0)))); // right corner
|
||||
}
|
||||
|
||||
float sdArrow( in vec2 p, float w1, float w2, float k ) { // The arrow goes from a to b. It's thickness is w1. The arrow head's thickness is w2.
|
||||
float sdArrow( in vec2 p, vec2 a, vec2 b, float w1, float w2, float k ) { // The arrow goes from a to b. It's thickness is w1. The arrow head's thickness is w2.
|
||||
// constant setup
|
||||
vec2 a = vec2(-1., 0.);
|
||||
vec2 b = vec2(1., 0.);
|
||||
|
||||
vec2 ba = b - a;
|
||||
float l2 = dot(ba,ba);
|
||||
float l = sqrt(l2);
|
||||
float l = sqrt(l2);
|
||||
|
||||
// pixel setup
|
||||
p = p-a;
|
||||
p = mat2(ba.x,-ba.y,ba.y,ba.x)*p/l;
|
||||
p = p - a;
|
||||
p = mat2(ba.x, -ba.y, ba.y, ba.x) * p / l;
|
||||
p.y = abs(p.y);
|
||||
vec2 pz = p-vec2(l-w2*k,w2);
|
||||
|
||||
vec2 pz = p - vec2(l - w2 * k, w2);
|
||||
|
||||
// === distance (four segments) ===
|
||||
|
||||
|
||||
vec2 q = p;
|
||||
q.x -= clamp( q.x, 0.0, l-w2*k );
|
||||
q.x -= clamp( q.x, 0.0, l - w2 * k );
|
||||
q.y -= w1;
|
||||
float di = dot(q,q);
|
||||
//----
|
||||
q = pz;
|
||||
q.y -= clamp( q.y, w1-w2, 0.0 );
|
||||
di = min( di, dot(q,q) );
|
||||
q.y -= clamp( q.y, w1 - w2, 0.0 );
|
||||
di = min( di, dot(q, q) );
|
||||
//----
|
||||
if( p.x<w1 ) // conditional is optional
|
||||
{
|
||||
q = p;
|
||||
q.y -= clamp( q.y, 0.0, w1 );
|
||||
di = min( di, dot(q,q) );
|
||||
if( p.x < w1 ) { // conditional is optional
|
||||
q = p;
|
||||
q.y -= clamp( q.y, 0.0, w1 );
|
||||
di = min( di, dot(q, q) );
|
||||
}
|
||||
//----
|
||||
if( pz.x>0.0 ) // conditional is optional
|
||||
{
|
||||
q = pz;
|
||||
q -= vec2(k,-1.0)*clamp( (q.x*k-q.y)/(k*k+1.0), 0.0, w2 );
|
||||
di = min( di, dot(q,q) );
|
||||
if( pz.x > 0.0 ) { // conditional is optional
|
||||
q = pz;
|
||||
q -= vec2(k, -1.0) * clamp( (q.x * k - q.y) / (k * k + 1.0), 0.0, w2 );
|
||||
di = min( di, dot(q, q) );
|
||||
}
|
||||
|
||||
// === sign ===
|
||||
|
||||
float si = 1.0;
|
||||
float z = l - p.x;
|
||||
if( min(p.x,z)>0.0 ) //if( p.x>0.0 && z>0.0 )
|
||||
{
|
||||
float h = (pz.x<0.0) ? w1 : z/k;
|
||||
if( p.y<h ) si = -1.0;
|
||||
if( min(p.x, z) > 0.0 ) { //if( p.x>0.0 && z>0.0 )
|
||||
float h = (pz.x < 0.0) ? w1 : z / k;
|
||||
if( p.y < h ) si = -1.0;
|
||||
}
|
||||
return si*sqrt(di);
|
||||
|
||||
return si * sqrt(di);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -411,6 +411,9 @@ void main() {
|
|||
vec2 ratio = dimension / dimension.y;
|
||||
float d;
|
||||
|
||||
vec2 p1 = point1 / dimension;
|
||||
vec2 p2 = point2 / dimension;
|
||||
|
||||
if(tile == 1) coord = mod(coord + 1., 2.) - 1.;
|
||||
|
||||
if(shape == 0) {
|
||||
|
@ -428,26 +431,28 @@ void main() {
|
|||
d = sdStar( coord, 0.9 - corner, sides, 2. + inner * (float(sides) - 2.), angle );
|
||||
d -= corner;
|
||||
|
||||
} else if(shape == 4) { d = sdArc( coord, vec2(sin(angle), cos(angle)), angle_range, 1. - inner, inner ); }
|
||||
else if(shape == 5) { d = sdTearDrop( coord + vec2(0., 0.5), stRad, edRad, 1. ); }
|
||||
else if(shape == 6) { d = sdCross( coord, vec2(1. + corner, outer), corner ); }
|
||||
else if(shape == 7) { d = sdVesica( coord, inner, outer ); }
|
||||
else if(shape == 8) { d = sdCrescent( coord, inner, outer, angle ); }
|
||||
else if(shape == 9) { d = sdDonut( coord, inner ); }
|
||||
else if(shape == 10) { d = sdRhombus( coord, vec2(1. - corner) ) - corner; }
|
||||
else if(shape == 11) { d = sdTrapezoid( coord, trep.x - corner, trep.y - corner, 1. - corner ) - corner; }
|
||||
else if(shape == 12) { d = sdParallelogram( coord, 1. - corner - parall, 1. - corner, parall) - corner; }
|
||||
else if(shape == 13) { d = sdHeart( coord ); }
|
||||
else if(shape == 14) { d = sdCutDisk( coord, 1., inner ); }
|
||||
else if(shape == 15) { d = sdPie( coord, vec2(sin(angle), cos(angle)), 1. ); }
|
||||
else if(shape == 16) { d = sdRoundedCross( coord, 1. - corner ) - corner; }
|
||||
else if(shape == 17) { d = sdArrow( coord, arrow.x, arrow.y, arrow_head); }
|
||||
else if(shape == 18) { d = sdGear( coord, inner, teeth, teethSize, teethAngle); }
|
||||
else if(shape == 19) { d = pow(pow(abs(coord.x), squircle_factor) + pow(abs(coord.y), squircle_factor), 1. / squircle_factor) - 1.; }
|
||||
}
|
||||
else if(shape == 4) { d = sdArc( coord, vec2(sin(angle), cos(angle)), angle_range, 1. - inner, inner ); }
|
||||
else if(shape == 5) { d = sdTearDrop( coord + vec2(0., 0.5), stRad, edRad, 1. ); }
|
||||
else if(shape == 6) { d = sdCross( coord, vec2(1. + corner, outer), corner ); }
|
||||
else if(shape == 7) { d = sdVesica( coord, inner, outer ); }
|
||||
else if(shape == 8) { d = sdCrescent( coord, inner, outer, angle ); }
|
||||
else if(shape == 9) { d = sdDonut( coord, inner ); }
|
||||
else if(shape == 10) { d = sdRhombus( coord, vec2(1. - corner) ) - corner; }
|
||||
else if(shape == 11) { d = sdTrapezoid( coord, trep.x - corner, trep.y - corner, 1. - corner ) - corner; }
|
||||
else if(shape == 12) { d = sdParallelogram( coord, 1. - corner - parall, 1. - corner, parall) - corner; }
|
||||
else if(shape == 13) { d = sdHeart( coord ); }
|
||||
else if(shape == 14) { d = sdCutDisk( coord, 1., inner ); }
|
||||
else if(shape == 15) { d = sdPie( coord, vec2(sin(angle), cos(angle)), 1. ); }
|
||||
else if(shape == 16) { d = sdRoundedCross( coord, 1. - corner ) - corner; }
|
||||
else if(shape == 18) { d = sdGear( coord, inner, teeth, teethSize, teethAngle); }
|
||||
else if(shape == 19) { d = pow(pow(abs(coord.x), squircle_factor) + pow(abs(coord.y), squircle_factor), 1. / squircle_factor) - 1.; }
|
||||
else if(shape == 17) { d = sdArrow( v_vTexcoord, p1, p2, thickness, arrow, arrow_head); }
|
||||
else if(shape == 20) { d = sdSegment(v_vTexcoord, p1, p2) - thickness; }
|
||||
|
||||
float cc, color = 0.;
|
||||
|
||||
if(aa == 0)
|
||||
if(aa == 0)
|
||||
cc = step(d, 0.0);
|
||||
else {
|
||||
float _aa = 1. / max(dimension.x, dimension.y);
|
||||
|
|
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 455 B |
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 479 B |
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 515 B |
Before Width: | Height: | Size: 439 B After Width: | Height: | Size: 439 B |
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 493 B |
Before Width: | Height: | Size: 456 B After Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 380 B |
After Width: | Height: | Size: 374 B |
Before Width: | Height: | Size: 531 B After Width: | Height: | Size: 531 B |
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 448 B |
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 467 B |
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 455 B |
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 479 B |
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 515 B |
Before Width: | Height: | Size: 439 B After Width: | Height: | Size: 439 B |
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 493 B |
Before Width: | Height: | Size: 456 B After Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 380 B |
After Width: | Height: | Size: 374 B |
Before Width: | Height: | Size: 531 B After Width: | Height: | Size: 531 B |
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 448 B |
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 467 B |
|
@ -27,10 +27,11 @@
|
|||
{"$GMSpriteFrame":"","%Name":"d2df5faf-acdc-4267-9fc3-e2587ea46ffb","name":"d2df5faf-acdc-4267-9fc3-e2587ea46ffb","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"9fbc0143-c73b-4d43-9ab1-2b54fdf9dfa0","name":"9fbc0143-c73b-4d43-9ab1-2b54fdf9dfa0","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"68cedd47-7826-45d0-936a-09d3f0b2514e","name":"68cedd47-7826-45d0-936a-09d3f0b2514e","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"6f6b7c89-ea42-4cfb-bb35-4037443cb1b2","name":"6f6b7c89-ea42-4cfb-bb35-4037443cb1b2","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"49f66653-48bb-46ca-adb5-39604325a9d1","name":"49f66653-48bb-46ca-adb5-39604325a9d1","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"d327df90-02a8-4278-a2f0-bad7924956ff","name":"d327df90-02a8-4278-a2f0-bad7924956ff","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"4dd803df-0824-47d6-a1d9-a4c0b94aa30f","name":"4dd803df-0824-47d6-a1d9-a4c0b94aa30f","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"60deee41-cb26-435b-b3dd-7f03e79b3f50","name":"60deee41-cb26-435b-b3dd-7f03e79b3f50","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"49f66653-48bb-46ca-adb5-39604325a9d1","name":"49f66653-48bb-46ca-adb5-39604325a9d1","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"71e478b1-ed0d-4f73-b942-57d5680a935e","name":"71e478b1-ed0d-4f73-b942-57d5680a935e","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
],
|
||||
"gridX":0,
|
||||
|
@ -68,7 +69,7 @@
|
|||
},
|
||||
"eventStubScript":null,
|
||||
"eventToFunction":{},
|
||||
"length":20.0,
|
||||
"length":21.0,
|
||||
"lockOrigin":false,
|
||||
"moments":{
|
||||
"$KeyframeStore<MomentsEventKeyframe>":"",
|
||||
|
@ -133,20 +134,23 @@
|
|||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"68cedd47-7826-45d0-936a-09d3f0b2514e","path":"sprites/s_node_shape_type/s_node_shape_type.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"9b4d9126-b4d4-4c7a-82ce-cce6f63de1b1","IsCreationKey":false,"Key":14.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"d327df90-02a8-4278-a2f0-bad7924956ff","path":"sprites/s_node_shape_type/s_node_shape_type.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"08e182fb-9797-4ce1-b4bd-d39862c036c0","IsCreationKey":false,"Key":15.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"4dd803df-0824-47d6-a1d9-a4c0b94aa30f","path":"sprites/s_node_shape_type/s_node_shape_type.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"7b49830e-1876-4d95-99a2-c9a3f8401044","IsCreationKey":false,"Key":16.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"60deee41-cb26-435b-b3dd-7f03e79b3f50","path":"sprites/s_node_shape_type/s_node_shape_type.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"ebd5e057-56d6-4239-9544-690c95b076f6","IsCreationKey":false,"Key":17.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"6f6b7c89-ea42-4cfb-bb35-4037443cb1b2","path":"sprites/s_node_shape_type/s_node_shape_type.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"f16951f5-5941-4d97-b0ee-db674a17d555","IsCreationKey":false,"Key":15.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"49f66653-48bb-46ca-adb5-39604325a9d1","path":"sprites/s_node_shape_type/s_node_shape_type.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"cd22fe67-e516-45a9-96de-b624bf5c6754","IsCreationKey":false,"Key":18.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
},"Disabled":false,"id":"cd22fe67-e516-45a9-96de-b624bf5c6754","IsCreationKey":false,"Key":16.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"d327df90-02a8-4278-a2f0-bad7924956ff","path":"sprites/s_node_shape_type/s_node_shape_type.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"08e182fb-9797-4ce1-b4bd-d39862c036c0","IsCreationKey":false,"Key":17.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"4dd803df-0824-47d6-a1d9-a4c0b94aa30f","path":"sprites/s_node_shape_type/s_node_shape_type.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"7b49830e-1876-4d95-99a2-c9a3f8401044","IsCreationKey":false,"Key":18.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"60deee41-cb26-435b-b3dd-7f03e79b3f50","path":"sprites/s_node_shape_type/s_node_shape_type.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"ebd5e057-56d6-4239-9544-690c95b076f6","IsCreationKey":false,"Key":19.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"71e478b1-ed0d-4f73-b942-57d5680a935e","path":"sprites/s_node_shape_type/s_node_shape_type.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"e6879ae7-52d0-4dfe-89fe-0ec9d4d53e26","IsCreationKey":false,"Key":19.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
},"Disabled":false,"id":"e6879ae7-52d0-4dfe-89fe-0ec9d4d53e26","IsCreationKey":false,"Key":20.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange":null,
|
||||
|
|