1.16.6.1 patch
|
@ -1034,7 +1034,7 @@
|
|||
{"name":"s_node_pb_layer","order":18,"path":"sprites/s_node_pb_layer/s_node_pb_layer.yy",},
|
||||
{"name":"FirebaseREST_HTTP_Success_Firestore","order":19,"path":"scripts/FirebaseREST_HTTP_Success_Firestore/FirebaseREST_HTTP_Success_Firestore.yy",},
|
||||
{"name":"s_node_pb_draw_rectangle","order":13,"path":"sprites/s_node_pb_draw_rectangle/s_node_pb_draw_rectangle.yy",},
|
||||
{"name":"panel_animation","order":1,"path":"scripts/panel_animation/panel_animation.yy",},
|
||||
{"name":"panel_animation","order":3,"path":"scripts/panel_animation/panel_animation.yy",},
|
||||
{"name":"sh_blend_edge_blend","order":1,"path":"shaders/sh_blend_edge_blend/sh_blend_edge_blend.yy",},
|
||||
{"name":"sh_bend_arc","order":13,"path":"shaders/sh_bend_arc/sh_bend_arc.yy",},
|
||||
{"name":"node_array_rearrange","order":19,"path":"scripts/node_array_rearrange/node_array_rearrange.yy",},
|
||||
|
@ -1403,7 +1403,7 @@
|
|||
{"name":"sh_perlin_extra","order":9,"path":"shaders/sh_perlin_extra/sh_perlin_extra.yy",},
|
||||
{"name":"s_node_plot_linear_type","order":10,"path":"sprites/s_node_plot_linear_type/s_node_plot_linear_type.yy",},
|
||||
{"name":"node_text","order":9,"path":"scripts/node_text/node_text.yy",},
|
||||
{"name":"panel_collection","order":3,"path":"scripts/panel_collection/panel_collection.yy",},
|
||||
{"name":"panel_collection","order":1,"path":"scripts/panel_collection/panel_collection.yy",},
|
||||
{"name":"node_delay","order":5,"path":"scripts/node_delay/node_delay.yy",},
|
||||
{"name":"node_string_trim","order":4,"path":"scripts/node_string_trim/node_string_trim.yy",},
|
||||
{"name":"node_mk_rain","order":1,"path":"scripts/node_mk_rain/node_mk_rain.yy",},
|
||||
|
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
@ -43,6 +43,8 @@
|
|||
kb_hold = false;
|
||||
kb_hkey = 0;
|
||||
|
||||
watcher_surface = surface_create(1, 1);
|
||||
|
||||
panelInit();
|
||||
|
||||
addHotkey("", "New file", "N", MOD_KEY.ctrl, NEW);
|
||||
|
|
|
@ -31,6 +31,11 @@ _HOVERING_ELEMENT = noone;
|
|||
}
|
||||
|
||||
CURSOR = cr_default;
|
||||
|
||||
if(!is_surface(watcher_surface)) {
|
||||
RENDER_ALL
|
||||
watcher_surface = surface_create(1, 1);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region focus
|
||||
|
|
|
@ -153,7 +153,7 @@ function Node_Custom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
|
||||
matrix_set(matrix_world, matrix_build(0, 0, 0, 0, 0, 0,
|
||||
surface_get_width_safe(_surf), surface_get_height_safe(_surf), 1));
|
||||
vertex_submit(global.HLSL_VB, pr_trianglestrip, surface_get_texture(_surf));
|
||||
vertex_submit(global.HLSL_VB_PLANE, pr_trianglestrip, surface_get_texture(_surf));
|
||||
matrix_set(matrix_world, matrix_build_identity());
|
||||
|
||||
d3d11_shader_override_vs(-1);
|
||||
|
|
|
@ -65,9 +65,7 @@ function ase_layer(name) constructor {
|
|||
cels = [];
|
||||
tag = noone;
|
||||
|
||||
static setFrameCel = function(index, cel) {
|
||||
cels[index] = cel;
|
||||
}
|
||||
static setFrameCel = function(index, cel) { INLINE cels[index] = cel; }
|
||||
|
||||
static getCel = function(index = CURRENT_FRAME) {
|
||||
var ind;
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
return make_color_rgba(rg.x, rg.y, rg.z, a);
|
||||
} #endregion
|
||||
|
||||
function make_color_srgba(r, g, b, a) { #region
|
||||
function make_color_srgba(rgb, a) { #region
|
||||
INLINE
|
||||
r = power(r, 1 / 2.2) * 255;
|
||||
g = power(g, 1 / 2.2) * 255;
|
||||
b = power(b, 1 / 2.2) * 255;
|
||||
var r = power(rgb[0], 1 / 2.2) * 255;
|
||||
var g = power(rgb[1], 1 / 2.2) * 255;
|
||||
var b = power(rgb[2], 1 / 2.2) * 255;
|
||||
|
||||
return int64(round(r) + (round(g) << 8) + (round(b) << 16) + (round(a) << 24));
|
||||
} #endregion
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
|
||||
|
||||
LATEST_VERSION = 11600;
|
||||
VERSION = 11660;
|
||||
VERSION = 11661;
|
||||
SAVE_VERSION = 11660;
|
||||
VERSION_STRING = "1.16.6.0";
|
||||
BUILD_NUMBER = 11660;
|
||||
VERSION_STRING = "1.16.6.1";
|
||||
BUILD_NUMBER = 11661;
|
||||
|
||||
globalvar APPEND_MAP;
|
||||
APPEND_MAP = ds_map_create();
|
||||
|
|
|
@ -280,10 +280,11 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
}
|
||||
|
||||
update_on_frame = false;
|
||||
|
||||
for( var i = 0, n = array_length(layers); i < n; i++ ) {
|
||||
if(!struct_has(layers[i], "cel")) continue;
|
||||
if(!struct_has(layers[i], "cels")) continue;
|
||||
|
||||
var cel = layers[i].cel;
|
||||
var cel = layers[i].cels;
|
||||
if(array_length(cel)) update_on_frame = true;
|
||||
}
|
||||
|
||||
|
@ -302,8 +303,9 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
} #endregion
|
||||
|
||||
static update = function(frame = CURRENT_FRAME) { #region
|
||||
var path = getInputData(0);
|
||||
var path = getInputData(0);
|
||||
var current_tag = getInputData(2);
|
||||
|
||||
if(path_current != path) updatePaths(path);
|
||||
if(ds_map_empty(content)) return;
|
||||
|
||||
|
@ -327,28 +329,27 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
var hh = content[? "Height"];
|
||||
|
||||
var surf = outputs[| 0].getValue();
|
||||
surf = surface_verify(surf, ww, hh);
|
||||
surf = surface_verify(surf, ww, hh);
|
||||
outputs[| 0].setValue(surf);
|
||||
|
||||
surface_set_target(surf);
|
||||
DRAW_CLEAR
|
||||
DRAW_CLEAR
|
||||
|
||||
for( var i = 0, n = array_length(layers); i < n; i++ ) {
|
||||
layers[i].tag = tag;
|
||||
var cel = layers[i].getCel(CURRENT_FRAME - _tag_delay);
|
||||
if(!cel) continue;
|
||||
if(!array_safe_get(vis, i, true)) continue;
|
||||
for( var i = 0, n = array_length(layers); i < n; i++ ) {
|
||||
layers[i].tag = tag;
|
||||
var cel = layers[i].getCel(CURRENT_FRAME - _tag_delay);
|
||||
if(!cel) continue;
|
||||
if(!array_safe_get(vis, i, true)) continue;
|
||||
|
||||
var _inSurf = cel.getSurface();
|
||||
if(!is_surface(_inSurf))
|
||||
continue;
|
||||
var _inSurf = cel.getSurface();
|
||||
if(!is_surface(_inSurf))
|
||||
continue;
|
||||
|
||||
var xx = cel.data[? "X"];
|
||||
var yy = cel.data[? "Y"];
|
||||
var xx = cel.data[? "X"];
|
||||
var yy = cel.data[? "Y"];
|
||||
|
||||
draw_surface_safe(_inSurf, xx, yy);
|
||||
}
|
||||
|
||||
draw_surface_safe(_inSurf, xx, yy);
|
||||
}
|
||||
surface_reset_target();
|
||||
} #endregion
|
||||
|
||||
|
|
|
@ -347,17 +347,9 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
array_resize(canvas_buffer, fr);
|
||||
} #endregion
|
||||
|
||||
function getCanvasSurface(index = preview_index) { #region
|
||||
INLINE
|
||||
|
||||
return array_safe_get(canvas_surface, index);
|
||||
} #endregion
|
||||
function getCanvasSurface(index = preview_index) { INLINE return array_safe_get(canvas_surface, index); }
|
||||
|
||||
function setCanvasSurface(surface, index = preview_index) { #region
|
||||
INLINE
|
||||
|
||||
canvas_surface[index] = surface;
|
||||
} #endregion
|
||||
function setCanvasSurface(surface, index = preview_index) { INLINE canvas_surface[index] = surface; }
|
||||
|
||||
function storeAction() { #region
|
||||
var action = recordAction(ACTION_TYPE.custom, function(data) {
|
||||
|
@ -387,10 +379,13 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
var cDep = attrDepth();
|
||||
|
||||
var _canvas_surface = getCanvasSurface(index);
|
||||
print($"Applying surface {index} - {_canvas_surface} [{is_surface(_canvas_surface)}]");
|
||||
|
||||
if(!is_surface(_canvas_surface)) {
|
||||
setCanvasSurface(surface_create_from_buffer(_dim[0], _dim[1], canvas_buffer[index]));
|
||||
} else if(surface_get_width_safe(_canvas_surface) != _dim[0] || surface_get_height_safe(_canvas_surface) != _dim[1]) {
|
||||
if(!is_surface(_canvas_surface)) { // recover surface
|
||||
//print($"recovering surface from buffer {random(1)}");
|
||||
|
||||
setCanvasSurface(surface_create_from_buffer(_dim[0], _dim[1], canvas_buffer[index]), index);
|
||||
} else if(surface_get_width_safe(_canvas_surface) != _dim[0] || surface_get_height_safe(_canvas_surface) != _dim[1]) { // resize surface
|
||||
var _cbuff = array_safe_get(canvas_buffer, index);
|
||||
if(buffer_exists(_cbuff)) buffer_delete(_cbuff);
|
||||
|
||||
|
@ -752,10 +747,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
|
||||
var _canvas_surface = getCanvasSurface();
|
||||
|
||||
if(!surface_exists(_canvas_surface)) {
|
||||
surface_store_buffer();
|
||||
_canvas_surface = getCanvasSurface();
|
||||
}
|
||||
if(!surface_exists(_canvas_surface)) return;
|
||||
|
||||
var _surf_w = surface_get_width_safe(_canvas_surface);
|
||||
var _surf_h = surface_get_height_safe(_canvas_surface);
|
||||
|
@ -911,7 +903,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
surface_reset_shader();
|
||||
|
||||
mouse_holding = true;
|
||||
if(mouse_pre_draw_x != undefined && mouse_pre_draw_y != undefined && key_mod_press(SHIFT)) { ///////////////// LINE
|
||||
if(mouse_pre_draw_x != undefined && mouse_pre_draw_y != undefined && key_mod_press(SHIFT)) { ///////////////// shift line
|
||||
surface_set_shader(drawing_surface, noone, true, BLEND.alpha);
|
||||
brush_next_dist = 0;
|
||||
draw_line_size(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y, true);
|
||||
|
@ -925,7 +917,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
mouse_pre_draw_y = mouse_cur_y;
|
||||
}
|
||||
|
||||
if(mouse_holding && mouse_click(mb_left, active)) {
|
||||
if(mouse_holding) {
|
||||
var _move = mouse_pre_draw_x != mouse_cur_x || mouse_pre_draw_y != mouse_cur_y;
|
||||
var _1stp = brush_dist_min == brush_dist_max && brush_dist_min == 1;
|
||||
|
||||
|
@ -938,12 +930,11 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
|
||||
mouse_pre_draw_x = mouse_cur_x;
|
||||
mouse_pre_draw_y = mouse_cur_y;
|
||||
}
|
||||
|
||||
if(mouse_holding && mouse_release(mb_left)) {
|
||||
mouse_holding = false;
|
||||
|
||||
apply_draw_surface();
|
||||
if(mouse_release(mb_left)) {
|
||||
mouse_holding = false;
|
||||
apply_draw_surface();
|
||||
}
|
||||
}
|
||||
|
||||
BLEND_NORMAL;
|
||||
|
|
|
@ -1466,6 +1466,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
|||
if(active) return;
|
||||
enable();
|
||||
ds_list_add(group == noone? PROJECT.nodes : group.getNodeList(), self);
|
||||
|
||||
RENDER_ALL_REORDER
|
||||
} #endregion
|
||||
|
||||
static onValidate = function() { #region
|
||||
|
|
|
@ -5,24 +5,26 @@
|
|||
vertex_format_add_texcoord();
|
||||
global.HLSL_VB_FORMAT = vertex_format_end();
|
||||
|
||||
global.HLSL_VB = vertex_create_buffer();
|
||||
vertex_begin(global.HLSL_VB, global.HLSL_VB_FORMAT);
|
||||
vertex_position(global.HLSL_VB, 0, 0);
|
||||
vertex_color(global.HLSL_VB, c_white, 1);
|
||||
vertex_texcoord(global.HLSL_VB, 0, 0);
|
||||
global.HLSL_VB_PLANE = vertex_create_buffer();
|
||||
vertex_begin(global.HLSL_VB_PLANE, global.HLSL_VB_FORMAT);
|
||||
|
||||
vertex_position(global.HLSL_VB, 0, 1);
|
||||
vertex_color(global.HLSL_VB, c_white, 1);
|
||||
vertex_texcoord(global.HLSL_VB, 0, 1);
|
||||
vertex_position(global.HLSL_VB_PLANE, 0, 0);
|
||||
vertex_color( global.HLSL_VB_PLANE, c_white, 1);
|
||||
vertex_texcoord(global.HLSL_VB_PLANE, 0, 0);
|
||||
|
||||
vertex_position(global.HLSL_VB, 1, 0);
|
||||
vertex_color(global.HLSL_VB, c_white, 1);
|
||||
vertex_texcoord(global.HLSL_VB, 1, 0);
|
||||
vertex_position(global.HLSL_VB_PLANE, 0, 1);
|
||||
vertex_color( global.HLSL_VB_PLANE, c_white, 1);
|
||||
vertex_texcoord(global.HLSL_VB_PLANE, 0, 1);
|
||||
|
||||
vertex_position(global.HLSL_VB_PLANE, 1, 0);
|
||||
vertex_color( global.HLSL_VB_PLANE, c_white, 1);
|
||||
vertex_texcoord(global.HLSL_VB_PLANE, 1, 0);
|
||||
|
||||
vertex_position(global.HLSL_VB, 1, 1);
|
||||
vertex_color(global.HLSL_VB, c_white, 1);
|
||||
vertex_texcoord(global.HLSL_VB, 1, 1);
|
||||
vertex_end(global.HLSL_VB);
|
||||
vertex_position(global.HLSL_VB_PLANE, 1, 1);
|
||||
vertex_color( global.HLSL_VB_PLANE, c_white, 1);
|
||||
vertex_texcoord(global.HLSL_VB_PLANE, 1, 1);
|
||||
|
||||
vertex_end(global.HLSL_VB_PLANE);
|
||||
#endregion
|
||||
|
||||
function Node_HLSL(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||
|
@ -232,19 +234,19 @@ struct PixelShaderOutput {
|
|||
var _arg_type = getInputData(i + 1);
|
||||
|
||||
switch(_arg_type) {
|
||||
case 0 : fs_param += $"float {_arg_name};\n"; break; //u_float
|
||||
case 1 : fs_param += $"int {_arg_name};\n"; break; //u_int
|
||||
case 2 : fs_param += $"float2 {_arg_name};\n"; break; //u_vec2
|
||||
case 3 : fs_param += $"float3 {_arg_name};\n"; break; //u_vec3
|
||||
case 4 : fs_param += $"float4 {_arg_name};\n"; break; //u_vec4
|
||||
case 5 : fs_param += $"float3x3 {_arg_name};\n"; break; //u_mat3
|
||||
case 6 : fs_param += $"float4x4 {_arg_name};\n"; break; //u_mat4
|
||||
case 7 : //u_sampler2D
|
||||
case 0 : fs_param += $"float {_arg_name};\n"; break; //u_float
|
||||
case 1 : fs_param += $"int {_arg_name};\n"; break; //u_int
|
||||
case 2 : fs_param += $"float2 {_arg_name};\n"; break; //u_vec2
|
||||
case 3 : fs_param += $"float3 {_arg_name};\n"; break; //u_vec3
|
||||
case 4 : fs_param += $"float4 {_arg_name};\n"; break; //u_vec4
|
||||
case 5 : fs_param += $"float3x3 {_arg_name};\n"; break; //u_mat3
|
||||
case 6 : fs_param += $"float4x4 {_arg_name};\n"; break; //u_mat4
|
||||
case 7 : //u_sampler2D
|
||||
fs_sample += $"Texture2D {_arg_name}Object : register(t{sampler_slot});\n";
|
||||
fs_sample += $"SamplerState {_arg_name} : register(s{sampler_slot});\n";
|
||||
sampler_slot++;
|
||||
break;
|
||||
case 8 : fs_param += $"float4 {_arg_name};\n"; break; //u_vec4
|
||||
case 8 : fs_param += $"float4 {_arg_name};\n"; break; //u_vec4
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -286,85 +288,88 @@ struct PixelShaderOutput {
|
|||
if(!d3d11_shader_exists(shader.fs)) return noone;
|
||||
|
||||
_output = surface_verify(_output, surface_get_width_safe(_surf), surface_get_height_safe(_surf));
|
||||
|
||||
|
||||
surface_set_target(_output);
|
||||
DRAW_CLEAR
|
||||
|
||||
d3d11_shader_override_vs(shader.vs);
|
||||
d3d11_shader_override_ps(shader.fs);
|
||||
|
||||
var uTypes = array_create(8, 0);
|
||||
var sampler_slot = 1;
|
||||
|
||||
d3d11_cbuffer_begin();
|
||||
var _buffer = buffer_create(1, buffer_grow, 1);
|
||||
var _cbSize = 0;
|
||||
|
||||
for( var i = input_fix_len, n = array_length(_data); i < n; i += data_length ) {
|
||||
var _arg_name = _data[i + 0];
|
||||
var _arg_type = _data[i + 1];
|
||||
var _arg_valu = _data[i + 2];
|
||||
DRAW_CLEAR
|
||||
|
||||
if(_arg_name == "") continue;
|
||||
// ############################ SET SHADER ############################
|
||||
d3d11_shader_override_vs(shader.vs);
|
||||
d3d11_shader_override_ps(shader.fs);
|
||||
|
||||
var _uni = shader_get_uniform(shader.fs, _arg_name);
|
||||
#region uniforms
|
||||
var uTypes = array_create(8, 0);
|
||||
var sampler_slot = 1;
|
||||
|
||||
d3d11_cbuffer_begin();
|
||||
var _buffer = buffer_create(1, buffer_grow, 1);
|
||||
var _cbSize = 0;
|
||||
|
||||
for( var i = input_fix_len, n = array_length(_data); i < n; i += data_length ) {
|
||||
var _arg_name = _data[i + 0];
|
||||
var _arg_type = _data[i + 1];
|
||||
var _arg_valu = _data[i + 2];
|
||||
|
||||
switch(_arg_type) {
|
||||
case 1 :
|
||||
d3d11_cbuffer_add_int(1);
|
||||
_cbSize++;
|
||||
if(_arg_name == "") continue;
|
||||
|
||||
var _uni = shader_get_uniform(shader.fs, _arg_name);
|
||||
|
||||
switch(_arg_type) {
|
||||
case 1 :
|
||||
d3d11_cbuffer_add_int(1);
|
||||
_cbSize++;
|
||||
|
||||
buffer_write(_buffer, buffer_s32, _arg_valu);
|
||||
break;
|
||||
case 0 :
|
||||
d3d11_cbuffer_add_float(1);
|
||||
_cbSize++;
|
||||
buffer_write(_buffer, buffer_s32, _arg_valu);
|
||||
break;
|
||||
case 0 :
|
||||
d3d11_cbuffer_add_float(1);
|
||||
_cbSize++;
|
||||
|
||||
buffer_write(_buffer, buffer_f32, _arg_valu);
|
||||
break;
|
||||
case 2 :
|
||||
case 3 :
|
||||
case 4 :
|
||||
case 5 :
|
||||
case 6 :
|
||||
if(is_array(_arg_valu)) {
|
||||
d3d11_cbuffer_add_float(array_length(_arg_valu));
|
||||
_cbSize += array_length(_arg_valu);
|
||||
buffer_write(_buffer, buffer_f32, _arg_valu);
|
||||
break;
|
||||
case 2 :
|
||||
case 3 :
|
||||
case 4 :
|
||||
case 5 :
|
||||
case 6 :
|
||||
if(is_array(_arg_valu)) {
|
||||
d3d11_cbuffer_add_float(array_length(_arg_valu));
|
||||
_cbSize += array_length(_arg_valu);
|
||||
|
||||
for( var j = 0, m = array_length(_arg_valu); j < m; j++ )
|
||||
buffer_write(_buffer, buffer_f32, _arg_valu[j]);
|
||||
}
|
||||
break;
|
||||
case 8 :
|
||||
var _clr = colToVec4(_arg_valu);
|
||||
d3d11_cbuffer_add_float(4);
|
||||
_cbSize += 4;
|
||||
for( var j = 0, m = array_length(_arg_valu); j < m; j++ )
|
||||
buffer_write(_buffer, buffer_f32, _arg_valu[j]);
|
||||
}
|
||||
break;
|
||||
case 8 :
|
||||
var _clr = colToVec4(_arg_valu);
|
||||
d3d11_cbuffer_add_float(4);
|
||||
_cbSize += 4;
|
||||
|
||||
for( var j = 0, m = 4; j < m; j++ )
|
||||
buffer_write(_buffer, buffer_f32, _clr[i]);
|
||||
break;
|
||||
case 7 :
|
||||
if(is_surface(_arg_valu))
|
||||
d3d11_texture_set_stage_ps(sampler_slot, surface_get_texture(_arg_valu));
|
||||
sampler_slot++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for( var j = 0, m = 4; j < m; j++ )
|
||||
buffer_write(_buffer, buffer_f32, _clr[i]);
|
||||
break;
|
||||
case 7 :
|
||||
if(is_surface(_arg_valu))
|
||||
d3d11_texture_set_stage_ps(sampler_slot, surface_get_texture(_arg_valu));
|
||||
sampler_slot++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
d3d11_cbuffer_add_float(4 - _cbSize % 4);
|
||||
var cbuff = d3d11_cbuffer_end();
|
||||
d3d11_cbuffer_update(cbuff, _buffer);
|
||||
buffer_delete(_buffer);
|
||||
|
||||
d3d11_shader_set_cbuffer_ps(10, cbuff);
|
||||
d3d11_cbuffer_add_float(4 - _cbSize % 4);
|
||||
var cbuff = d3d11_cbuffer_end();
|
||||
d3d11_cbuffer_update(cbuff, _buffer);
|
||||
buffer_delete(_buffer);
|
||||
|
||||
d3d11_shader_set_cbuffer_ps(10, cbuff);
|
||||
#endregion
|
||||
|
||||
matrix_set(matrix_world, matrix_build(0, 0, 0, 0, 0, 0,
|
||||
surface_get_width_safe(_surf), surface_get_height_safe(_surf), 1));
|
||||
vertex_submit(global.HLSL_VB, pr_trianglestrip, surface_get_texture(_surf));
|
||||
matrix_set(matrix_world, matrix_build_identity());
|
||||
matrix_set(matrix_world, matrix_build(0, 0, 0, 0, 0, 0, surface_get_width_safe(_surf), surface_get_height_safe(_surf), 1));
|
||||
vertex_submit(global.HLSL_VB_PLANE, pr_trianglestrip, surface_get_texture(_surf));
|
||||
matrix_set(matrix_world, matrix_build_identity());
|
||||
|
||||
d3d11_shader_override_vs(-1);
|
||||
d3d11_shader_override_ps(-1);
|
||||
|
||||
d3d11_shader_override_vs(-1);
|
||||
d3d11_shader_override_ps(-1);
|
||||
surface_reset_target();
|
||||
|
||||
return _output;
|
||||
|
|
|
@ -7,7 +7,7 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
inputs[| 1] = nodeValue("Background texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||
|
||||
inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Corner (18 sprites)", "Corner + Side (55 sprites)" ] );
|
||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "GMS Corner (18 sprites)", "GMS Corner + Side (55 sprites)", "Godot Blob (48 sprites)" ] );
|
||||
|
||||
inputs[| 3] = nodeValue("Output type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Sheet", "Array" ] );
|
||||
|
@ -75,6 +75,8 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
0, /**/ 0, 0, 1, /**/ 4, 0,
|
||||
0, /**/ 0, 0, 2, /**/ 4, 3];
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
index_55 = [208, 224, 104, /**/ 64, /**/ 80, 120, 216, 72, /**/ 88, 219, -1,
|
||||
148, 255, 41, /**/ 66, /**/ 86, 127, 223, 75, /**/ 95, 126, -1,
|
||||
22, 7, 11, /**/ 2, /**/ 210, 251, 254, 106, /**/ 250, 218, 122,
|
||||
|
@ -104,6 +106,34 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
0, 0, 2, /**/ 2, /**/ 4, 4, 0, 1, /**/ 4, 4, 6,
|
||||
0, 0, 5, /**/ 5, /**/ 4, 4, 0, 2, /**/ 4, 3, 6,
|
||||
0, 0, 0, /**/ 0, /**/ 6, 6, 0, 1, /**/ 6, 0, 0, ];
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
index_48 = [ 64, 80, 88, 72, /**/ 91, 216, 120, 94, /**/ 208, 250, 224, 104,
|
||||
66, 82, 90, 74, /**/ 210, 254, 251, 106, /**/ 148, 126, -1, 123,
|
||||
2, 18, 26, 10, /**/ 86, 223, 127, 75, /**/ 222, 255, 219, 41,
|
||||
0, 16, 24, 8, /**/ 122, 30, 27, 218, /**/ 22, 7, 95, 11, ];
|
||||
|
||||
index_48_et = [ 5, 0, 1, 2, 4, 1, 1, 3, 0, 6, 1, 2,
|
||||
0, 3, 6, 4, 3, 4, 3, 4, 0, 4, 0, 3,
|
||||
0, 3, 6, 4, 0, 0, 0, 0, 4, 0, 3, 0,
|
||||
5, 0, 1, 2, 6, 4, 3, 6, 0, 0, 0, 0, ];
|
||||
|
||||
index_48_eb = [ 0, 3, 6, 4, 6, 4, 3, 6, 0, 0, 0, 0,
|
||||
0, 3, 6, 4, 0, 0, 0, 0, 0, 3, 0, 3,
|
||||
5, 0, 1, 2, 3, 4, 3, 4, 4, 0, 4, 0,
|
||||
5, 0, 1, 2, 3, 1, 1, 4, 0, 1, 6, 2, ];
|
||||
|
||||
index_48_el = [ 0, 0, 4, 3, 3, 3, 0, 6, 0, 4, 0, 0,
|
||||
1, 1, 6, 6, 1, 4, 0, 4, 1, 4, 0, 0,
|
||||
2, 2, 4, 4, 1, 3, 0, 3, 6, 0, 3, 0,
|
||||
5, 5, 0, 0, 4, 4, 0, 6, 2, 0, 4, 0, ];
|
||||
|
||||
index_48_er = [ 0, 3, 3, 0, 6, 0, 3, 3, 0, 4, 0, 0,
|
||||
1, 6, 6, 1, 4, 0, 4, 1, 0, 3, 0, 6,
|
||||
2, 4, 4, 2, 3, 0, 3, 1, 0, 0, 4, 1,
|
||||
5, 0, 0, 5, 6, 0, 4, 4, 0, 0, 3, 2, ];
|
||||
|
||||
#endregion
|
||||
|
||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
||||
|
@ -121,105 +151,9 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
inputs[| 13].setVisible(_edgType == 0);
|
||||
} #endregion
|
||||
|
||||
static generate18 = function(_data, _tex0, _tex1, _edge, _crop) { #region
|
||||
var _sprs = array_create(18);
|
||||
var _use1 = is_surface(_tex1);
|
||||
var _sw = surface_get_width_safe(_tex0);
|
||||
var _sh = surface_get_height_safe(_tex0);
|
||||
|
||||
var r = _crop[0];
|
||||
var t = _crop[1];
|
||||
var l = _crop[2];
|
||||
var b = _crop[3];
|
||||
|
||||
var _edgeShf = _data[10];
|
||||
var _edgFull = _data[11];
|
||||
|
||||
for( var i = 0; i < 18; i++ ) {
|
||||
var _index = index_18[i];
|
||||
if(_index < 0) {
|
||||
_sprs[i] = noone;
|
||||
continue;
|
||||
}
|
||||
var _s = surface_verify(temp_surface[i], _sw, _sh);
|
||||
|
||||
surface_set_target(_s);
|
||||
DRAW_CLEAR
|
||||
BLEND_ALPHA_MULP
|
||||
|
||||
if(_index == 15) draw_surface(_tex0, 0, 0);
|
||||
else if(_use1) draw_surface(_tex1, 0, 0);
|
||||
|
||||
if(_index & 0b0001) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0);
|
||||
if(_index & 0b0010) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0);
|
||||
if(_index & 0b0100) draw_surface_part(_tex0, 0, t, _sw - r, _sh - t, 0, t);
|
||||
if(_index & 0b1000) draw_surface_part(_tex0, l, t, _sw - l, _sh - t, l, t);
|
||||
|
||||
if(_index & 0b1100 >= 0b1100) draw_surface_part(_tex0, 0, t, _sw, _sh - t, 0, t);
|
||||
if(_index & 0b1010 >= 0b1010) draw_surface_part(_tex0, l, 0, _sw - l, _sh, l, 0);
|
||||
if(_index & 0b0101 >= 0b0101) draw_surface_part(_tex0, 0, 0, _sw - r, _sh, 0, 0);
|
||||
if(_index & 0b0011 >= 0b0011) draw_surface_part(_tex0, 0, 0, _sw, _sh - b, 0, 0);
|
||||
|
||||
var _et = _edge[0][index_18_et[i]];
|
||||
var _eb = _edge[1][index_18_eb[i]];
|
||||
var _el = _edge[2][index_18_el[i]];
|
||||
var _er = _edge[3][index_18_er[i]];
|
||||
|
||||
if(_el != noone) { #region
|
||||
shader_set(sh_mk_tile18_edge_l);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
shader_set_i("fullEdge", bool(_edgFull & 0b0100));
|
||||
|
||||
draw_surface_ext(_el, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_er != noone) { #region
|
||||
shader_set(sh_mk_tile18_edge_r);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
shader_set_i("fullEdge", bool(_edgFull & 0b1000));
|
||||
|
||||
draw_surface_ext(_er, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_et != noone) { #region
|
||||
shader_set(sh_mk_tile18_edge_t);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
shader_set_i("fullEdge", bool(_edgFull & 0b0001));
|
||||
|
||||
draw_surface_ext(_et, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_eb != noone) { #region
|
||||
shader_set(sh_mk_tile18_edge_b);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
shader_set_i("fullEdge", bool(_edgFull & 0b0010));
|
||||
|
||||
draw_surface_ext(_eb, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
BLEND_NORMAL
|
||||
surface_reset_target();
|
||||
|
||||
_sprs[i] = _s;
|
||||
}
|
||||
|
||||
return _sprs;
|
||||
} #endregion
|
||||
|
||||
static generate55 = function(_data, _tex0, _tex1, _edge, _crop) { #region
|
||||
var _sprs = array_create(55);
|
||||
static generateFull = function(_data, _tex0, _tex1, _edge, _crop, indMain, indEdge_et, indEdge_eb, indEdge_el, indEdge_er) { #region
|
||||
var _len = array_length(indMain);
|
||||
var _sprs = array_create(_len);
|
||||
var _use1 = is_surface(_tex1);
|
||||
var _sw = surface_get_width_safe(_tex0);
|
||||
var _sh = surface_get_height_safe(_tex0);
|
||||
|
@ -231,8 +165,8 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
|
||||
var _edgFull = _data[11];
|
||||
|
||||
for( var i = 0; i < 55; i++ ) {
|
||||
var _index = index_55[i];
|
||||
for( var i = 0; i < _len; i++ ) {
|
||||
var _index = indMain[i];
|
||||
if(_index < 0) {
|
||||
_sprs[i] = noone;
|
||||
continue;
|
||||
|
@ -264,10 +198,10 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
if(_index & 0b0000_1011 >= 0b0000_1011) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0);
|
||||
if(_index & 0b0001_0110 >= 0b0001_0110) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0);
|
||||
|
||||
var _et = _edge[0][index_55_et[i]];
|
||||
var _eb = _edge[1][index_55_eb[i]];
|
||||
var _el = _edge[2][index_55_el[i]];
|
||||
var _er = _edge[3][index_55_er[i]];
|
||||
var _et = _edge[0][indEdge_et[i]];
|
||||
var _eb = _edge[1][indEdge_eb[i]];
|
||||
var _el = _edge[2][indEdge_el[i]];
|
||||
var _er = _edge[3][indEdge_er[i]];
|
||||
|
||||
if(_el != noone) { #region
|
||||
shader_set(sh_mk_tile55_edge_l);
|
||||
|
@ -322,6 +256,118 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
return _sprs;
|
||||
} #endregion
|
||||
|
||||
static generateSimple = function(_data, _tex0, _tex1, _edge, _crop, indMain, indEdge_et, indEdge_eb, indEdge_el, indEdge_er) { #region
|
||||
var _sprs = array_create(18);
|
||||
var _use1 = is_surface(_tex1);
|
||||
var _sw = surface_get_width_safe(_tex0);
|
||||
var _sh = surface_get_height_safe(_tex0);
|
||||
|
||||
var r = _crop[0];
|
||||
var t = _crop[1];
|
||||
var l = _crop[2];
|
||||
var b = _crop[3];
|
||||
|
||||
var _edgeShf = _data[10];
|
||||
var _edgFull = _data[11];
|
||||
|
||||
for( var i = 0; i < 18; i++ ) {
|
||||
var _index = indMain[i];
|
||||
if(_index < 0) {
|
||||
_sprs[i] = noone;
|
||||
continue;
|
||||
}
|
||||
var _s = surface_verify(temp_surface[i], _sw, _sh);
|
||||
|
||||
surface_set_target(_s);
|
||||
DRAW_CLEAR
|
||||
BLEND_ALPHA_MULP
|
||||
|
||||
if(_index == 15) draw_surface(_tex0, 0, 0);
|
||||
else if(_use1) draw_surface(_tex1, 0, 0);
|
||||
|
||||
if(_index & 0b0001) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0);
|
||||
if(_index & 0b0010) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0);
|
||||
if(_index & 0b0100) draw_surface_part(_tex0, 0, t, _sw - r, _sh - t, 0, t);
|
||||
if(_index & 0b1000) draw_surface_part(_tex0, l, t, _sw - l, _sh - t, l, t);
|
||||
|
||||
if(_index & 0b1100 >= 0b1100) draw_surface_part(_tex0, 0, t, _sw, _sh - t, 0, t);
|
||||
if(_index & 0b1010 >= 0b1010) draw_surface_part(_tex0, l, 0, _sw - l, _sh, l, 0);
|
||||
if(_index & 0b0101 >= 0b0101) draw_surface_part(_tex0, 0, 0, _sw - r, _sh, 0, 0);
|
||||
if(_index & 0b0011 >= 0b0011) draw_surface_part(_tex0, 0, 0, _sw, _sh - b, 0, 0);
|
||||
|
||||
var _et = _edge[0][indEdge_et[i]];
|
||||
var _eb = _edge[1][indEdge_eb[i]];
|
||||
var _el = _edge[2][indEdge_el[i]];
|
||||
var _er = _edge[3][indEdge_er[i]];
|
||||
|
||||
if(_el != noone) { #region
|
||||
shader_set(sh_mk_tile18_edge_l);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
shader_set_i("fullEdge", bool(_edgFull & 0b0100));
|
||||
|
||||
draw_surface_ext(_el, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_er != noone) { #region
|
||||
shader_set(sh_mk_tile18_edge_r);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
shader_set_i("fullEdge", bool(_edgFull & 0b1000));
|
||||
|
||||
draw_surface_ext(_er, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_et != noone) { #region
|
||||
shader_set(sh_mk_tile18_edge_t);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
shader_set_i("fullEdge", bool(_edgFull & 0b0001));
|
||||
|
||||
draw_surface_ext(_et, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_eb != noone) { #region
|
||||
shader_set(sh_mk_tile18_edge_b);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
shader_set_i("fullEdge", bool(_edgFull & 0b0010));
|
||||
|
||||
draw_surface_ext(_eb, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
BLEND_NORMAL
|
||||
surface_reset_target();
|
||||
|
||||
_sprs[i] = _s;
|
||||
}
|
||||
|
||||
return _sprs;
|
||||
} #endregion
|
||||
|
||||
static generate18 = function(_data, _tex0, _tex1, _edge, _crop) {
|
||||
INLINE
|
||||
return generateSimple(_data, _tex0, _tex1, _edge, _crop, index_18, index_18_et, index_18_eb, index_18_el, index_18_er);
|
||||
}
|
||||
|
||||
static generate55 = function(_data, _tex0, _tex1, _edge, _crop) {
|
||||
INLINE
|
||||
return generateFull(_data, _tex0, _tex1, _edge, _crop, index_55, index_55_et, index_55_eb, index_55_el, index_55_er);
|
||||
}
|
||||
|
||||
static generate48 = function(_data, _tex0, _tex1, _edge, _crop) {
|
||||
INLINE
|
||||
return generateFull(_data, _tex0, _tex1, _edge, _crop, index_48, index_48_et, index_48_eb, index_48_el, index_48_er);
|
||||
}
|
||||
|
||||
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
||||
var _tex0 = _data[0];
|
||||
var _tex1 = _data[1];
|
||||
|
@ -374,7 +420,7 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
_edges = __edge_uniform;
|
||||
} #endregion
|
||||
|
||||
for( var i = 0; i < 4; i++ ) {
|
||||
for( var i = 0; i < 4; i++ ) { #region edges
|
||||
var _ed = _edges[i];
|
||||
var _edShf = _edgeShf[_shi[i]];
|
||||
|
||||
|
@ -502,20 +548,40 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
|
||||
edge_surface[i][j] = __edge_surface[_sIndx];
|
||||
}
|
||||
}
|
||||
} #endregion
|
||||
|
||||
_edge = edge_surface;
|
||||
|
||||
if(!is_surface(_tex0)) return _outSurf;
|
||||
|
||||
var _surfs = _type == 0? generate18(_data, _tex0, _tex1, _edge, _crop) : generate55(_data, _tex0, _tex1, _edge, _crop);
|
||||
var _surfs = [];
|
||||
var _col = 1;
|
||||
var _row = 1;
|
||||
|
||||
switch(_type) {
|
||||
case 0 :
|
||||
_surfs = generate18(_data, _tex0, _tex1, _edge, _crop);
|
||||
_col = 6;
|
||||
_row = 3;
|
||||
break;
|
||||
|
||||
case 1 :
|
||||
_surfs = generate55(_data, _tex0, _tex1, _edge, _crop);
|
||||
_col = 11;
|
||||
_row = 5;
|
||||
break;
|
||||
|
||||
case 2 :
|
||||
_surfs = generate48(_data, _tex0, _tex1, _edge, _crop);
|
||||
_col = 12;
|
||||
_row = 4;
|
||||
break;
|
||||
}
|
||||
|
||||
if(_outp == 1) return _surfs;
|
||||
|
||||
var _sw = surface_get_width_safe(_tex0);
|
||||
var _sh = surface_get_height_safe(_tex0);
|
||||
var _col = _type == 0? 6 : 11;
|
||||
var _row = _type == 0? 3 : 5;
|
||||
|
||||
var _w = _sw * _col;
|
||||
var _h = _sh * _row;
|
||||
|
|
|
@ -562,6 +562,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
|||
|
||||
if(!array_empty(anchors)) {
|
||||
draw_set_color(isUsingTool(0)? c_white : COLORS._main_accent);
|
||||
|
||||
for( var i = 0, n = array_length(segments); i < n; i++ ) { #region draw path
|
||||
var _seg = segments[i];
|
||||
var _ox = 0, _oy = 0, _nx = 0, _ny = 0, p = 0;
|
||||
|
@ -570,6 +571,9 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
|||
_nx = _x + _seg[j][0] * _s;
|
||||
_ny = _y + _seg[j][1] * _s;
|
||||
|
||||
minx = min(minx, _nx); maxx = max(maxx, _nx);
|
||||
miny = min(miny, _ny); maxy = max(maxy, _ny);
|
||||
|
||||
if(j) {
|
||||
if((key_mod_press(CTRL) || isUsingTool(1)) && distance_to_line(_mx, _my, _ox, _oy, _nx, _ny) < 4)
|
||||
_line_hover = i;
|
||||
|
@ -808,7 +812,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
|||
var l = 0, _ox = 0, _oy = 0, _nx = 0, _ny = 0, p = 0;
|
||||
var sg = array_create(sample);
|
||||
|
||||
for(var j = 0; j < sample; j++) {
|
||||
for(var j = 0; j <= sample; j++) {
|
||||
p = eval_bezier(j / sample, _a0[0], _a0[1], _a1[0], _a1[1],
|
||||
_a0[0] + _a0[4], _a0[1] + _a0[5],
|
||||
_a1[0] + _a1[2], _a1[1] + _a1[3]);
|
||||
|
|
|
@ -22,6 +22,7 @@ function Node_Path_Transform(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
|||
cached_pos = ds_map_create();
|
||||
|
||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
||||
var pth = getInputData(0);
|
||||
var pos = getInputData(4);
|
||||
var px = _x + pos[0] * _s;
|
||||
var py = _y + pos[1] * _s;
|
||||
|
|
|
@ -187,7 +187,7 @@ function value_color(i) { #region
|
|||
#4da6ff, //flipfluid
|
||||
];
|
||||
|
||||
if(i == 99) return $5dde8f;
|
||||
if(i == 99) return #8fde5d;
|
||||
return JUNCTION_COLORS[safe_mod(max(0, i), array_length(JUNCTION_COLORS))];
|
||||
} #endregion
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "_others",
|
||||
"path": "folders/panels/_others.yy",
|
||||
"name": "animation",
|
||||
"path": "folders/panels/animation.yy",
|
||||
},
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "_others",
|
||||
"path": "folders/panels/_others.yy",
|
||||
"name": "collection",
|
||||
"path": "folders/panels/collection.yy",
|
||||
},
|
||||
}
|
|
@ -1069,48 +1069,51 @@ function Panel_Preview() : PanelContent() constructor {
|
|||
if(mouse_wheel_down()) preview_x_to = clamp(preview_x_to - prev_size * SCROLL_SPEED, - preview_x_max, 0);
|
||||
if(mouse_wheel_up()) preview_x_to = clamp(preview_x_to + prev_size * SCROLL_SPEED, - preview_x_max, 0);
|
||||
}
|
||||
|
||||
preview_x_max = 0;
|
||||
var _xx = tool_side_drawing * ui(40);
|
||||
var xx = _xx + preview_x + ui(8);
|
||||
var yy = h - toolbar_height - prev_size - ui(8);
|
||||
if(my > yy - 8) mouse_on_preview = 0;
|
||||
var hoverable = pHOVER && point_in_rectangle(mx, my, _xx, ui(32), w, h - toolbar_height);
|
||||
|
||||
for(var i = 0; i < array_length(pseq); i++) {
|
||||
var prev = pseq[i];
|
||||
if(is_instanceof(prev, __d3dMaterial))
|
||||
prev = prev.surface;
|
||||
if(!is_surface(prev)) continue;
|
||||
#region surface array
|
||||
preview_x_max = 0;
|
||||
var _xx = tool_side_drawing * ui(40);
|
||||
var xx = _xx + preview_x + ui(8);
|
||||
var yy = h - toolbar_height - prev_size - ui(8);
|
||||
if(my > yy - 8) mouse_on_preview = 0;
|
||||
var hoverable = pHOVER && point_in_rectangle(mx, my, _xx, ui(32), w, h - toolbar_height);
|
||||
|
||||
for(var i = 0; i < array_length(pseq); i++) {
|
||||
var prev = pseq[i];
|
||||
if(is_instanceof(prev, __d3dMaterial))
|
||||
prev = prev.surface;
|
||||
if(!is_surface(prev)) continue;
|
||||
|
||||
var prev_w = surface_get_width_safe(prev);
|
||||
var prev_h = surface_get_height_safe(prev);
|
||||
var ss = prev_size / max(prev_w, prev_h);
|
||||
var prev_sw = prev_w * ss;
|
||||
var prev_w = surface_get_width_safe(prev);
|
||||
var prev_h = surface_get_height_safe(prev);
|
||||
var ss = prev_size / max(prev_w, prev_h);
|
||||
var prev_sw = prev_w * ss;
|
||||
|
||||
draw_set_color(COLORS.panel_preview_surface_outline);
|
||||
draw_rectangle(xx, yy, xx + prev_w * ss, yy + prev_h * ss, true);
|
||||
draw_set_color(COLORS.panel_preview_surface_outline);
|
||||
draw_rectangle(xx, yy, xx + prev_w * ss, yy + prev_h * ss, true);
|
||||
|
||||
if(hoverable && point_in_rectangle(mx, my, xx, yy, xx + prev_sw, yy + prev_h * ss)) {
|
||||
if(mouse_press(mb_left, pFOCUS)) {
|
||||
_node.preview_index = i;
|
||||
_node.onValueUpdate(0);
|
||||
if(resetViewOnDoubleClick)
|
||||
do_fullView = true;
|
||||
if(hoverable && point_in_rectangle(mx, my, xx, yy, xx + prev_sw, yy + prev_h * ss)) {
|
||||
if(mouse_press(mb_left, pFOCUS)) {
|
||||
_node.preview_index = i;
|
||||
_node.onValueUpdate(0);
|
||||
if(resetViewOnDoubleClick)
|
||||
do_fullView = true;
|
||||
}
|
||||
draw_surface_ext_safe(prev, xx, yy, ss, ss, 0, c_white, 1);
|
||||
} else {
|
||||
draw_surface_ext_safe(prev, xx, yy, ss, ss, 0, c_white, 0.5);
|
||||
}
|
||||
draw_surface_ext_safe(prev, xx, yy, ss, ss, 0, c_white, 1);
|
||||
} else {
|
||||
draw_surface_ext_safe(prev, xx, yy, ss, ss, 0, c_white, 0.5);
|
||||
}
|
||||
|
||||
if(i == _node.preview_index) {
|
||||
draw_set_color(COLORS._main_accent);
|
||||
draw_rectangle(xx, yy, xx + prev_sw, yy + prev_h * ss, true);
|
||||
}
|
||||
if(i == _node.preview_index) {
|
||||
draw_set_color(COLORS._main_accent);
|
||||
draw_rectangle(xx, yy, xx + prev_sw, yy + prev_h * ss, true);
|
||||
}
|
||||
|
||||
xx += prev_sw + ui(8);
|
||||
preview_x_max += prev_sw + ui(8);
|
||||
}
|
||||
xx += prev_sw + ui(8);
|
||||
preview_x_max += prev_sw + ui(8);
|
||||
}
|
||||
#endregion
|
||||
|
||||
preview_x_max = max(preview_x_max - ui(100), 0);
|
||||
|
||||
#region ++++ sequence control ++++
|
||||
|
|
|
@ -417,7 +417,7 @@ function textArea(_input, _onModify) : textInput(_input, _onModify) constructor
|
|||
if(cursor_select != -1) {
|
||||
var minc = min(cursor, cursor_select);
|
||||
var maxc = max(cursor, cursor_select);
|
||||
clipboard_set_text(string_copy(_input_text, minc, maxc - minc));
|
||||
clipboard_set_text(string_copy(_input_text, minc + 1, maxc - minc));
|
||||
}
|
||||
} else {
|
||||
if(key_mod_press(CTRL) && keyboard_check_pressed(ord("V")))
|
||||
|
|
|
@ -177,7 +177,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
|
|||
if(cursor_select != -1) {
|
||||
var minc = min(cursor, cursor_select);
|
||||
var maxc = max(cursor, cursor_select);
|
||||
clipboard_set_text(string_copy(_input_text, minc, maxc - minc));
|
||||
clipboard_set_text(string_copy(_input_text, minc + 1, maxc - minc));
|
||||
}
|
||||
} else {
|
||||
if(key_mod_press(CTRL) && keyboard_check_pressed(ord("V"))) {
|
||||
|
|