mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-23 19:38:05 +01:00
- [Preview Panel] Fix view range not apply to sdf shape.
This commit is contained in:
parent
25b1a9954b
commit
63efb6be3c
6 changed files with 14 additions and 11 deletions
|
@ -787,7 +787,7 @@ event_inherited();
|
|||
|
||||
if(match == -9999) continue;
|
||||
|
||||
ds_priority_add(pr_list, [_node, param], match);
|
||||
ds_priority_add(pr_list, [ _node, param ], match);
|
||||
search_map[? _node] = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -695,9 +695,9 @@ function __initNodes() {
|
|||
addNodeObject(d3d, "Point Affector", s_node_3d_point_affector, "Node_3D_Point_Affector", [1, Node_3D_Point_Affector],, "Generate array of 3D points interpolating between two values based on the distance.").setVersion(11570);
|
||||
|
||||
ds_list_add(d3d, "Ray Marching");
|
||||
addNodeObject(d3d, "RM Primitive", s_node_rm_primitive, "Node_RM_Primitive", [1, Node_RM_Primitive], ["ray marching"]).setVersion(11720);
|
||||
addNodeObject(d3d, "RM Primitive", s_node_rm_primitive, "Node_RM_Primitive", [1, Node_RM_Primitive], ["ray marching", "rm object"]).setVersion(11720);
|
||||
addNodeObject(d3d, "RM Terrain", s_node_rm_terrain, "Node_RM_Terrain", [1, Node_RM_Terrain], ["ray marching"]).setVersion(11720);
|
||||
addNodeObject(d3d, "RM Combine", s_node_rm_combine, "Node_RM_Combine", [1, Node_RM_Combine], ["ray marching"]).setVersion(11740);
|
||||
addNodeObject(d3d, "RM Combine", s_node_rm_combine, "Node_RM_Combine", [1, Node_RM_Combine], ["ray marching", "rm boolean"]).setVersion(11740);
|
||||
addNodeObject(d3d, "RM Render", s_node_rm_render, "Node_RM_Render", [1, Node_RM_Render], ["ray marching"]).setVersion(11740);
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"$GMScript":"",
|
||||
"%Name":"node_registry",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
|
|
|
@ -1211,6 +1211,7 @@ function Panel_Preview() : PanelContent() constructor {
|
|||
shader_set_f("gridStep", _step);
|
||||
shader_set_f("gridScale", zm / 2);
|
||||
shader_set_f("axisBlend", 1.);
|
||||
shader_set_f("viewRange", [ d3_view_camera.view_near, d3_view_camera.view_far ]);
|
||||
|
||||
draw_sprite_stretched(s_fx_pixel, 0, 0, 0, w, h);
|
||||
shader_reset();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"$GMScript":"",
|
||||
"%Name":"panel_preview",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
|
|
|
@ -7,21 +7,23 @@ function string_to_array(str) { #region
|
|||
} #endregion
|
||||
|
||||
function string_partial_match(str, key) { #region
|
||||
var amo = string_length(str);
|
||||
var run = 1;
|
||||
var consec = 0;
|
||||
var conMax = 0;
|
||||
var amo = string_length(str);
|
||||
var run = 1;
|
||||
var consec = 0;
|
||||
var conMax = 0;
|
||||
var misMatch = 0;
|
||||
var kchr = string_char_at(key, run);
|
||||
var kchr = string_char_at(key, run);
|
||||
var ch;
|
||||
|
||||
for( var i = 1; i <= amo; i++ ) {
|
||||
var ch = string_char_at(str, i);
|
||||
ch = string_char_at(str, i);
|
||||
if(ch == kchr) {
|
||||
consec++;
|
||||
conMax = max(conMax, consec);
|
||||
run++;
|
||||
if(run > string_length(key)) return conMax - (misMatch + (amo - i));
|
||||
kchr = string_char_at(key, run);
|
||||
|
||||
} else {
|
||||
consec = 0;
|
||||
misMatch += amo - i;
|
||||
|
|
Loading…
Reference in a new issue