Partial rendering

This commit is contained in:
MakhamDev 2023-10-02 19:41:44 +07:00
parent abffaecb0d
commit 337f98b6b9
31 changed files with 227 additions and 142 deletions

View file

@ -88,7 +88,6 @@
{"name":"d3d light","order":14,"path":"folders/nodes/data/3D/d3d light.yy",},
{"name":"d3d mesh","order":12,"path":"folders/nodes/data/3D/d3d mesh.yy",},
{"name":"animation","order":6,"path":"folders/nodes/data/animation.yy",},
{"name":"audio","order":19,"path":"folders/nodes/data/audio.yy",},
{"name":"compose","order":14,"path":"folders/nodes/data/compose.yy",},
{"name":"armature","order":5,"path":"folders/nodes/data/compose/armature.yy",},
{"name":"dynasurf","order":21,"path":"folders/nodes/data/dynasurf.yy",},
@ -128,12 +127,18 @@
{"name":"VFX","order":3,"path":"folders/nodes/data/simulation/VFX.yy",},
{"name":"transform","order":9,"path":"folders/nodes/data/transform.yy",},
{"name":"value","order":4,"path":"folders/nodes/data/value.yy",},
{"name":"atlas","order":9,"path":"folders/nodes/data/value/atlas.yy",},
{"name":"buffer","order":11,"path":"folders/nodes/data/value/buffer.yy",},
{"name":"mesh","order":7,"path":"folders/nodes/data/value/mesh.yy",},
{"name":"struct","order":6,"path":"folders/nodes/data/value/struct.yy",},
{"name":"surface","order":10,"path":"folders/nodes/data/value/surface.yy",},
{"name":"trigger","order":8,"path":"folders/nodes/data/value/trigger.yy",},
{"name":"array","order":1,"path":"folders/nodes/data/value/array.yy",},
{"name":"atlas","order":10,"path":"folders/nodes/data/value/atlas.yy",},
{"name":"bool","order":2,"path":"folders/nodes/data/value/bool.yy",},
{"name":"buffer","order":12,"path":"folders/nodes/data/value/buffer.yy",},
{"name":"color","order":3,"path":"folders/nodes/data/value/color.yy",},
{"name":"mesh","order":8,"path":"folders/nodes/data/value/mesh.yy",},
{"name":"number","order":4,"path":"folders/nodes/data/value/number.yy",},
{"name":"path","order":5,"path":"folders/nodes/data/value/path.yy",},
{"name":"struct","order":7,"path":"folders/nodes/data/value/struct.yy",},
{"name":"surface","order":11,"path":"folders/nodes/data/value/surface.yy",},
{"name":"texts","order":6,"path":"folders/nodes/data/value/texts.yy",},
{"name":"trigger","order":9,"path":"folders/nodes/data/value/trigger.yy",},
{"name":"3D","order":133,"path":"folders/nodes/icons/3D.yy",},
{"name":"animation","order":135,"path":"folders/nodes/icons/animation.yy",},
{"name":"filter","order":141,"path":"folders/nodes/icons/filter.yy",},
@ -272,10 +277,11 @@
{"name":"textInput","order":24,"path":"scripts/textInput/textInput.yy",},
{"name":"node_dither","order":7,"path":"scripts/node_dither/node_dither.yy",},
{"name":"sh_perlin_smear","order":5,"path":"shaders/sh_perlin_smear/sh_perlin_smear.yy",},
{"name":"node_array_remove","order":4,"path":"scripts/node_array_remove/node_array_remove.yy",},
{"name":"node_path_blend","order":2,"path":"scripts/node_path_blend/node_path_blend.yy",},
{"name":"node_switch","order":5,"path":"scripts/node_switch/node_switch.yy",},
{"name":"sh_corner","order":20,"path":"shaders/sh_corner/sh_corner.yy",},
{"name":"node_array","order":8,"path":"scripts/node_array/node_array.yy",},
{"name":"node_array","order":5,"path":"scripts/node_array/node_array.yy",},
{"name":"discordBridge","order":10,"path":"extensions/discordBridge/discordBridge.yy",},
{"name":"pack_corner","order":3,"path":"scripts/pack_corner/pack_corner.yy",},
{"name":"s_node_websocket","order":18,"path":"sprites/s_node_websocket/s_node_websocket.yy",},
@ -292,6 +298,7 @@
{"name":"fd_rectangle_add_material_surface","order":25,"path":"scripts/fd_rectangle_add_material_surface/fd_rectangle_add_material_surface.yy",},
{"name":"perlin_noise","order":5,"path":"scripts/perlin_noise/perlin_noise.yy",},
{"name":"fd_rectangle_replace_material","order":14,"path":"scripts/fd_rectangle_replace_material/fd_rectangle_replace_material.yy",},
{"name":"node_array_set","order":3,"path":"scripts/node_array_set/node_array_set.yy",},
{"name":"node_functions","order":2,"path":"scripts/node_functions/node_functions.yy",},
{"name":"node_math","order":1,"path":"scripts/node_math/node_math.yy",},
{"name":"fd_rectangle_replace_material_advanced","order":15,"path":"scripts/fd_rectangle_replace_material_advanced/fd_rectangle_replace_material_advanced.yy",},
@ -324,6 +331,7 @@
{"name":"s_node_alpha_grey","order":4,"path":"sprites/s_node_alpha_grey/s_node_alpha_grey.yy",},
{"name":"fd_rectangle_set_pressure_iteration_type","order":10,"path":"scripts/fd_rectangle_set_pressure_iteration_type/fd_rectangle_set_pressure_iteration_type.yy",},
{"name":"s_node_sort_array","order":29,"path":"sprites/s_node_sort_array/s_node_sort_array.yy",},
{"name":"node_array_reverse","order":2,"path":"scripts/node_array_reverse/node_array_reverse.yy",},
{"name":"_f_h1","order":11,"path":"fonts/_f_h1/_f_h1.yy",},
{"name":"_f_h2","order":12,"path":"fonts/_f_h2/_f_h2.yy",},
{"name":"s_node_level","order":28,"path":"sprites/s_node_level/s_node_level.yy",},
@ -375,7 +383,7 @@
{"name":"node_string_get_char","order":5,"path":"scripts/node_string_get_char/node_string_get_char.yy",},
{"name":"_p_dialog_undo_block","order":1,"path":"objects/_p_dialog_undo_block/_p_dialog_undo_block.yy",},
{"name":"sh_palette_shift","order":19,"path":"shaders/sh_palette_shift/sh_palette_shift.yy",},
{"name":"node_array_copy","order":26,"path":"scripts/node_array_copy/node_array_copy.yy",},
{"name":"node_array_copy","order":14,"path":"scripts/node_array_copy/node_array_copy.yy",},
{"name":"draw_line_elbow","order":17,"path":"scripts/draw_line_elbow/draw_line_elbow.yy",},
{"name":"node_path_reverse","order":8,"path":"scripts/node_path_reverse/node_path_reverse.yy",},
{"name":"fd_rectangle_get_acceleration_y","order":3,"path":"scripts/fd_rectangle_get_acceleration_y/fd_rectangle_get_acceleration_y.yy",},
@ -505,7 +513,7 @@
{"name":"node_pb_fx_substract","order":4,"path":"scripts/node_pb_fx_substract/node_pb_fx_substract.yy",},
{"name":"node_pb_fx_radial","order":9,"path":"scripts/node_pb_fx_radial/node_pb_fx_radial.yy",},
{"name":"node_VFX_variable","order":15,"path":"scripts/node_VFX_variable/node_VFX_variable.yy",},
{"name":"node_array_sort","order":23,"path":"scripts/node_array_sort/node_array_sort.yy",},
{"name":"node_array_sort","order":11,"path":"scripts/node_array_sort/node_array_sort.yy",},
{"name":"sh_pb_outline","order":2,"path":"shaders/sh_pb_outline/sh_pb_outline.yy",},
{"name":"fd_draw_surface_to_collision_mask_surface","order":2,"path":"scripts/fd_draw_surface_to_collision_mask_surface/fd_draw_surface_to_collision_mask_surface.yy",},
{"name":"sh_blur_box_contrast","order":3,"path":"shaders/sh_blur_box_contrast/sh_blur_box_contrast.yy",},
@ -574,7 +582,7 @@
{"name":"sh_color_picker_side_hue","order":2,"path":"shaders/sh_color_picker_side_hue/sh_color_picker_side_hue.yy",},
{"name":"draw_text_delimiter","order":14,"path":"scripts/draw_text_delimiter/draw_text_delimiter.yy",},
{"name":"s_node_path_anchor","order":13,"path":"sprites/s_node_path_anchor/s_node_path_anchor.yy",},
{"name":"node_array_get","order":10,"path":"scripts/node_array_get/node_array_get.yy",},
{"name":"node_array_get","order":7,"path":"scripts/node_array_get/node_array_get.yy",},
{"name":"node_widget_test","order":16,"path":"scripts/node_widget_test/node_widget_test.yy",},
{"name":"node_pb_fx_highlight","order":1,"path":"scripts/node_pb_fx_highlight/node_pb_fx_highlight.yy",},
{"name":"Apollo","order":5,"path":"extensions/Apollo/Apollo.yy",},
@ -639,6 +647,7 @@
{"name":"s_node_threshold","order":47,"path":"sprites/s_node_threshold/s_node_threshold.yy",},
{"name":"sh_draw_normal","order":5,"path":"shaders/sh_draw_normal/sh_draw_normal.yy",},
{"name":"preview_overlay_rotation","order":1,"path":"scripts/preview_overlay_rotation/preview_overlay_rotation.yy",},
{"name":"node_array_find","order":1,"path":"scripts/node_array_find/node_array_find.yy",},
{"name":"node_registry","order":11,"path":"scripts/node_registry/node_registry.yy",},
{"name":"sh_checkerboard","order":12,"path":"shaders/sh_checkerboard/sh_checkerboard.yy",},
{"name":"node_unicode","order":1,"path":"scripts/node_unicode/node_unicode.yy",},
@ -650,7 +659,7 @@
{"name":"color_function","order":9,"path":"scripts/color_function/color_function.yy",},
{"name":"fd_rectangle_set_pressure_size","order":11,"path":"scripts/fd_rectangle_set_pressure_size/fd_rectangle_set_pressure_size.yy",},
{"name":"node_color_data","order":6,"path":"scripts/node_color_data/node_color_data.yy",},
{"name":"node_array_shift","order":24,"path":"scripts/node_array_shift/node_array_shift.yy",},
{"name":"node_array_shift","order":12,"path":"scripts/node_array_shift/node_array_shift.yy",},
{"name":"node_noise_ani","order":1,"path":"scripts/node_noise_ani/node_noise_ani.yy",},
{"name":"s_node_transform","order":8,"path":"sprites/s_node_transform/s_node_transform.yy",},
{"name":"s_node_pb_draw_line","order":27,"path":"sprites/s_node_pb_draw_line/s_node_pb_draw_line.yy",},
@ -672,7 +681,7 @@
{"name":"node_cache","order":9,"path":"scripts/node_cache/node_cache.yy",},
{"name":"sh_bw","order":3,"path":"shaders/sh_bw/sh_bw.yy",},
{"name":"var_comparison","order":1,"path":"scripts/var_comparison/var_comparison.yy",},
{"name":"node_array_zip","order":25,"path":"scripts/node_array_zip/node_array_zip.yy",},
{"name":"node_array_zip","order":13,"path":"scripts/node_array_zip/node_array_zip.yy",},
{"name":"fd_rectangle_get_collision_mask_sprite_image","order":5,"path":"scripts/fd_rectangle_get_collision_mask_sprite_image/fd_rectangle_get_collision_mask_sprite_image.yy",},
{"name":"s_node_stripe","order":16,"path":"sprites/s_node_stripe/s_node_stripe.yy",},
{"name":"s_node_lua_global","order":19,"path":"sprites/s_node_lua_global/s_node_lua_global.yy",},
@ -710,7 +719,7 @@
{"name":"__d3d_gizmo","order":2,"path":"scripts/__d3d_gizmo/__d3d_gizmo.yy",},
{"name":"sh_draw_single_channel","order":3,"path":"shaders/sh_draw_single_channel/sh_draw_single_channel.yy",},
{"name":"draw_sprite_ext_override","order":9,"path":"scripts/draw_sprite_ext_override/draw_sprite_ext_override.yy",},
{"name":"node_array_add","order":9,"path":"scripts/node_array_add/node_array_add.yy",},
{"name":"node_array_add","order":6,"path":"scripts/node_array_add/node_array_add.yy",},
{"name":"o_dialog_textbox_function_guide","order":7,"path":"objects/o_dialog_textbox_function_guide/o_dialog_textbox_function_guide.yy",},
{"name":"node_3d_material","order":16,"path":"scripts/node_3d_material/node_3d_material.yy",},
{"name":"pcx_server","order":2,"path":"scripts/pcx_server/pcx_server.yy",},
@ -809,6 +818,7 @@
{"name":"BBMOD_Vec4","order":6,"path":"scripts/BBMOD_Vec4/BBMOD_Vec4.yy",},
{"name":"s_biterator_color_slot","order":17,"path":"sprites/s_biterator_color_slot/s_biterator_color_slot.yy",},
{"name":"s_node_pb_layer","order":18,"path":"sprites/s_node_pb_layer/s_node_pb_layer.yy",},
{"name":"node_audio_window","order":16,"path":"scripts/node_audio_window/node_audio_window.yy",},
{"name":"node_surface_from_color","order":1,"path":"scripts/node_surface_from_color/node_surface_from_color.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",},
@ -882,7 +892,7 @@
{"name":"node_pb_box_contract","order":8,"path":"scripts/node_pb_box_contract/node_pb_box_contract.yy",},
{"name":"histogram_drawer","order":2,"path":"scripts/histogram_drawer/histogram_drawer.yy",},
{"name":"sh_color_picker_side_value","order":3,"path":"shaders/sh_color_picker_side_value/sh_color_picker_side_value.yy",},
{"name":"node_array_range","order":12,"path":"scripts/node_array_range/node_array_range.yy",},
{"name":"node_array_range","order":9,"path":"scripts/node_array_range/node_array_range.yy",},
{"name":"node_animation_control","order":11,"path":"scripts/node_animation_control/node_animation_control.yy",},
{"name":"s_node_tunnel_in","order":21,"path":"sprites/s_node_tunnel_in/s_node_tunnel_in.yy",},
{"name":"s_node_pb_draw_trapezoid","order":10,"path":"sprites/s_node_pb_draw_trapezoid/s_node_pb_draw_trapezoid.yy",},
@ -1000,7 +1010,7 @@
{"name":"sh_fd_calculate_velocity_divergence_glsl","order":10,"path":"shaders/sh_fd_calculate_velocity_divergence_glsl/sh_fd_calculate_velocity_divergence_glsl.yy",},
{"name":"s_node_pb_fx_add","order":9,"path":"sprites/s_node_pb_fx_add/s_node_pb_fx_add.yy",},
{"name":"node_simple_shape","order":2,"path":"scripts/node_simple_shape/node_simple_shape.yy",},
{"name":"node_wav_file_write","order":3,"path":"scripts/node_wav_file_write/node_wav_file_write.yy",},
{"name":"node_wav_file_write","order":18,"path":"scripts/node_wav_file_write/node_wav_file_write.yy",},
{"name":"node_random","order":5,"path":"scripts/node_random/node_random.yy",},
{"name":"node_atlas","order":2,"path":"scripts/node_atlas/node_atlas.yy",},
{"name":"sh_blend_sat","order":18,"path":"shaders/sh_blend_sat/sh_blend_sat.yy",},
@ -1205,7 +1215,7 @@
{"name":"s_node_vfx_repel","order":6,"path":"sprites/s_node_vfx_repel/s_node_vfx_repel.yy",},
{"name":"sh_pb_mask_inset","order":10,"path":"shaders/sh_pb_mask_inset/sh_pb_mask_inset.yy",},
{"name":"fd_rectangle_set_collision_mask_surface","order":2,"path":"scripts/fd_rectangle_set_collision_mask_surface/fd_rectangle_set_collision_mask_surface.yy",},
{"name":"node_array_length","order":11,"path":"scripts/node_array_length/node_array_length.yy",},
{"name":"node_array_length","order":8,"path":"scripts/node_array_length/node_array_length.yy",},
{"name":"node_erode","order":9,"path":"scripts/node_erode/node_erode.yy",},
{"name":"sh_colours_replace","order":54,"path":"shaders/sh_colours_replace/sh_colours_replace.yy",},
{"name":"sh_channel_R2G","order":11,"path":"shaders/sh_channel_R2G/sh_channel_R2G.yy",},
@ -1460,13 +1470,13 @@
{"name":"sh_surface_replace_fast_find","order":2,"path":"shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.yy",},
{"name":"fd_rectangle_add_material","order":4,"path":"scripts/fd_rectangle_add_material/fd_rectangle_add_material.yy",},
{"name":"fd_rectangle_set_target","order":18,"path":"scripts/fd_rectangle_set_target/fd_rectangle_set_target.yy",},
{"name":"node_wav_file_read","order":2,"path":"scripts/node_wav_file_read/node_wav_file_read.yy",},
{"name":"node_wav_file_read","order":17,"path":"scripts/node_wav_file_read/node_wav_file_read.yy",},
{"name":"draw_line_dashed","order":7,"path":"scripts/draw_line_dashed/draw_line_dashed.yy",},
{"name":"pseudo_regex","order":7,"path":"scripts/pseudo_regex/pseudo_regex.yy",},
{"name":"node_invert","order":6,"path":"scripts/node_invert/node_invert.yy",},
{"name":"draw_background_stretched","order":5,"path":"scripts/draw_background_stretched/draw_background_stretched.yy",},
{"name":"s_biterator_canvas","order":15,"path":"sprites/s_biterator_canvas/s_biterator_canvas.yy",},
{"name":"node_array_csv_parse","order":27,"path":"scripts/node_array_csv_parse/node_array_csv_parse.yy",},
{"name":"node_array_csv_parse","order":15,"path":"scripts/node_array_csv_parse/node_array_csv_parse.yy",},
{"name":"node_tunnel_out","order":7,"path":"scripts/node_tunnel_out/node_tunnel_out.yy",},
{"name":"s_node_array_shuffle","order":10,"path":"sprites/s_node_array_shuffle/s_node_array_shuffle.yy",},
{"name":"node_level","order":7,"path":"scripts/node_level/node_level.yy",},
@ -1586,7 +1596,7 @@
{"name":"s_node_noise_aniso","order":9,"path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",},
{"name":"s_node_armature_path","order":17,"path":"sprites/s_node_armature_path/s_node_armature_path.yy",},
{"name":"s_node_gradient_palette","order":16,"path":"sprites/s_node_gradient_palette/s_node_gradient_palette.yy",},
{"name":"node_array_shuffle","order":22,"path":"scripts/node_array_shuffle/node_array_shuffle.yy",},
{"name":"node_array_shuffle","order":10,"path":"scripts/node_array_shuffle/node_array_shuffle.yy",},
{"name":"panel_node_data_gen","order":9,"path":"scripts/panel_node_data_gen/panel_node_data_gen.yy",},
{"name":"node_dynamic_surface_out","order":1,"path":"scripts/node_dynamic_surface_out/node_dynamic_surface_out.yy",},
{"name":"fd_rectangle_update_material","order":21,"path":"scripts/fd_rectangle_update_material/fd_rectangle_update_material.yy",},

View file

@ -112,7 +112,6 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"d3d light","folderPath":"folders/nodes/data/3D/d3d light.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"d3d mesh","folderPath":"folders/nodes/data/3D/d3d mesh.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/nodes/data/animation.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"audio","folderPath":"folders/nodes/data/audio.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"compose","folderPath":"folders/nodes/data/compose.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"armature","folderPath":"folders/nodes/data/compose/armature.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"dynasurf","folderPath":"folders/nodes/data/dynasurf.yy",},

View file

@ -51,10 +51,10 @@ function Node_Iterator(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
var _ren = iterationStatus();
if(_ren == ITERATION_STATUS.loop) { //Go back to the beginning of the loop, reset render status for leaf node inside?
//LOG_IF(global.FLAG.render, "Loop restart: iteration " + string(group.iterated));
LOG_IF(global.FLAG.render, $"Loop restart: iteration {iterated}");
_nodes = array_append(_nodes, __nodeLeafList(getNodeList()));
} else if(_ren == ITERATION_STATUS.complete) { //Go out of loop
//LOG_IF(global.FLAG.render, "Loop completed get next node external");
LOG_IF(global.FLAG.render, "Loop completed get next node external");
setRenderStatus(true);
_nodes = getNextNodesExternal();
}

View file

@ -3,7 +3,7 @@ function Node_VFX_Renderer(_x, _y, _group = noone) : Node(_x, _y, _group) constr
color = COLORS.node_blend_vfx;
icon = THEME.vfx;
use_cache = true;
use_cache = CACHE_USE.auto;
inputs[| 0] = nodeValue("Output dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF)
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -5,7 +5,7 @@
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "audio",
"path": "folders/nodes/data/audio.yy",
"name": "array",
"path": "folders/nodes/data/value/array.yy",
},
}

View file

@ -1,6 +1,6 @@
function Node_Cache(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Cache";
use_cache = true;
use_cache = CACHE_USE.auto;
clearCacheOnChange = false;
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);

View file

@ -1,6 +1,6 @@
function Node_Cache_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Cache Array";
use_cache = true;
use_cache = CACHE_USE.manual;
clearCacheOnChange = false;
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);

View file

@ -264,7 +264,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
} #endregion
static stepBegin = function() { #region
use_cache = false;
use_cache = CACHE_USE.none;
array_safe_set(cache_result, PROJECT.animator.current_frame, true);
@ -274,7 +274,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
_node.stepBegin();
if(!_node.use_cache) continue;
use_cache = true;
use_cache = CACHE_USE.manual;
if(!array_safe_get(_node.cache_result, PROJECT.animator.current_frame))
array_safe_set(cache_result, PROJECT.animator.current_frame, false);
}

View file

@ -1,5 +1,11 @@
global.loop_nodes = [ "Node_Iterate", "Node_Iterate_Each" ];
enum CACHE_USE {
none,
manual,
auto
}
function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x, _y) constructor {
#region ---- main & active ----
active = true;
@ -109,6 +115,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
data_length = 1;
inputs_data = [];
input_hash = "";
input_hash_raw = "";
anim_last_step = false;
#endregion
@ -149,10 +156,11 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
rendered = false;
update_on_frame = false;
render_time = 0;
render_cached = false;
auto_render_time = true;
updated = false;
use_cache = false;
use_cache = CACHE_USE.none;
clearCacheOnChange = true;
cached_output = [];
cache_result = [];
@ -348,17 +356,6 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
static stepBegin = function() { #region
if(use_cache) cacheArrayCheck();
var willUpdate = false;
if(PROJECT.animator.frame_progress) {
if(update_on_frame) willUpdate = true;
if(isAnimated()) willUpdate = true;
if(willUpdate) {
setRenderStatus(false);
UPDATE |= RENDER_TYPE.partial;
}
}
if(auto_height)
setHeight();
@ -415,40 +412,53 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
} #endregion
static getInputs = function() { #region
input_hash_raw = "";
inputs_data = array_create(ds_list_size(inputs), undefined);
for(var i = 0; i < ds_list_size(inputs); i++)
for(var i = 0; i < ds_list_size(inputs); i++) {
inputs_data[i] = inputs[| i].getValue(,,, true);
input_hash_raw += string_copy(string(inputs_data[i]), 1, 256);
}
} #endregion
static forceUpdate = function() { #region
input_hash = "";
doUpdate();
} #endregion
static doUpdate = function() { #region
if(SAFE_MODE) return;
if(NODE_EXTRACT) return;
var sBase = surface_get_target();
LOG_BLOCK_START();
LOG_IF(global.FLAG.render, $">>>>>>>>>> DoUpdate called from {internalName} <<<<<<<<<<");
var render_timer = get_timer();
var t = get_timer();
var _hash = input_hash;
getInputs();
input_hash = md5_string_unicode(string(inputs_data));
anim_last_step = isAnimated() || _hash != input_hash;
if(use_cache == CACHE_USE.auto && recoverCache()) {
render_cached = true;
} else {
render_cached = false;
var sBase = surface_get_target();
var _hash = input_hash;
getInputs();
input_hash = md5_string_unicode(input_hash_raw);
anim_last_step = isAnimated() || _hash != input_hash || !rendered;
try {
if(!is_instanceof(self, Node_Collection))
setRenderStatus(true);
LOG_BLOCK_START();
LOG_IF(global.FLAG.render, $">>>>>>>>>> DoUpdate called from {internalName} [{anim_last_step}] <<<<<<<<<<");
if(anim_last_step) update(); ///Update only if input hash differs from previous.
} catch(exception) {
var sCurr = surface_get_target();
while(surface_get_target() != sBase)
surface_reset_target();
try {
if(anim_last_step) update(); ///Update only if input hash differs from previous.
} catch(exception) {
var sCurr = surface_get_target();
while(surface_get_target() != sBase)
surface_reset_target();
log_warning("RENDER", exception_print(exception), self);
log_warning("RENDER", exception_print(exception), self);
}
}
if(!is_instanceof(self, Node_Collection))
render_time = get_timer() - t;
if(!is_instanceof(self, Node_Collection)) {
setRenderStatus(true);
render_time = get_timer() - render_timer;
}
if(!use_cache && PROJECT.onion_skin) {
for( var i = 0; i < ds_list_size(outputs); i++ ) {
@ -554,7 +564,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
}
}
LOG_IF(global.FLAG.render, $"→→ Push {nodeNames} to stack.");
LOG_IF(global.FLAG.render, $"→→ Push {nodeNames} to queue.");
LOG_BLOCK_END();
LOG_BLOCK_END();
@ -939,8 +949,12 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
draw_set_font(f_p3);
if(display_parameter.show_compute) {
var rt, unit;
if(render_time < 1000) {
var rt = 0, unit = "";
if(render_time == 0) {
draw_set_color(COLORS._main_text_sub);
unit = "us";
} else if(render_time < 1000) {
rt = round(render_time / 10) * 10;
unit = "us";
draw_set_color(COLORS.speed[2]);
@ -953,6 +967,9 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
unit = "s";
draw_set_color(COLORS.speed[0]);
}
if(render_cached) draw_set_color(COLORS._main_text_sub);
draw_text(round(tx), round(ty), string(rt) + " " + unit);
}
} #endregion

View file

@ -2,7 +2,7 @@ function Node_Fluid_Render(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group)
name = "Render Domain";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
use_cache = true;
use_cache = CACHE_USE.auto;
inputs[| 0] = nodeValue("Fluid Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone)
.setVisible(true, true);

View file

@ -212,7 +212,7 @@
var _str_var = PROJECT_VARIABLES[$ strs[0]];
if(!struct_has(_str_var, strs[1])) return 0;
var val = _str_var[$ strs[1]];
var val = _str_var[$ strs[1]][0];
if(is_callable(val))
return val();
return val;
@ -245,6 +245,49 @@
return 0;
}
function nodeGetDataAnim(str) {
str = string_trim(str);
var strs = string_splice(str, ".");
if(array_length(strs) == 0) return [ 0, true ];
if(array_length(strs) == 1) {
return [ EXPRESS_TREE_ANIM.none, true ];
} else if(struct_has(PROJECT_VARIABLES, strs[0])) {
var _str_var = PROJECT_VARIABLES[$ strs[0]];
if(!struct_has(_str_var, strs[1])) return [ EXPRESS_TREE_ANIM.none, true ];
var val = _str_var[$ strs[1]][1];
return [ val, true ];
} else if(array_length(strs) > 2) {
var key = strs[0];
if(!ds_map_exists(PROJECT.nodeNameMap, key)) return [ EXPRESS_TREE_ANIM.none, true ];
var node = PROJECT.nodeNameMap[? key];
var map = noone;
switch(string_lower(strs[1])) {
case "inputs" :
case "input" :
map = node.inputMap;
break;
case "outputs" :
case "output" :
map = node.outputMap;
break;
default : return [ EXPRESS_TREE_ANIM.none, true ];
}
var _junc_key = string_lower(strs[2]);
var _junc = ds_map_try_get(map, _junc_key, noone);
if(_junc == noone) return [ EXPRESS_TREE_ANIM.none, true ];
return [ _junc.is_anim * 2, false ];
}
return [ EXPRESS_TREE_ANIM.none, true ];
}
function create_preview_window(node) {
if(node == noone) return;
var win = new Panel_Preview_Window();

View file

@ -184,7 +184,7 @@ function Node_Global(_x = 0, _y = 0) : __Node_Base(_x, _y) constructor {
display_name = "";
group = noone;
use_cache = false;
use_cache = CACHE_USE.none;
value = ds_map_create();
input_display_list = -1;
anim_priority = -999;

View file

@ -72,7 +72,7 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
//printIf(global.FLAG.render, "Group output ready " + string(_to.node.isRenderable()));
array_push(nodes, _to.node);
LOG_IF(global.FLAG.render, $"Check complete, push {_to.node.internalName} to stack.");
LOG_IF(global.FLAG.render, $"Check complete, push {_to.node.internalName} to queue.");
}
LOG_BLOCK_END();

View file

@ -54,9 +54,6 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y
}
static update = function(frame = PROJECT.animator.current_frame) {
if(!variable_struct_exists(group, "iterated"))
return;
if(inputs[| 0].value_from == noone) {
group.iterationUpdate();
return;

View file

@ -1,6 +1,6 @@
function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Onion Skin";
use_cache = true;
use_cache = CACHE_USE.manual;
clearCacheOnChange = false;
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);

View file

@ -1,6 +1,6 @@
function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _group) constructor {
name = "Particle";
use_cache = true;
use_cache = CACHE_USE.auto;
onSurfaceSize = function() { return getInputData(input_len, DEF_SURF); };
inputs[| 3].setDisplay(VALUE_DISPLAY.area, { onSurfaceSize });

View file

@ -1,6 +1,6 @@
function Node_Rate_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Rate Remap";
use_cache = true;
use_cache = CACHE_USE.manual;
inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);

View file

@ -2,7 +2,7 @@ function Node_Rigid_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constr
name = "Render";
color = COLORS.node_blend_simulation;
icon = THEME.rigidSim;
use_cache = true;
use_cache = CACHE_USE.auto;
inputs[| 0] = nodeValue("Render dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_SURF)
.setDisplay(VALUE_DISPLAY.vector)

View file

@ -2,7 +2,7 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const
name = "Strand Render";
color = COLORS.node_blend_strand;
icon = THEME.strandSim;
use_cache = true;
use_cache = CACHE_USE.auto;
inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF)
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -2,7 +2,7 @@ function Node_Strand_Render_Texture(_x, _y, _group = noone) : Node(_x, _y, _grou
name = "Strand Render Texture";
color = COLORS.node_blend_strand;
icon = THEME.strandSim;
use_cache = true;
use_cache = CACHE_USE.auto;
inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF)
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -1,6 +1,6 @@
function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Time Remap";
use_cache = true;
use_cache = CACHE_USE.manual;
shader = sh_time_remap;
uniform_map = shader_get_sampler_index(shader, "map");

View file

@ -1,6 +1,6 @@
function Node_Timeline_Preview(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Timeline";
use_cache = true;
use_cache = CACHE_USE.auto;
color = COLORS.node_blend_number;
w = 96;

View file

@ -1,6 +1,6 @@
function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Trail";
use_cache = true;
use_cache = CACHE_USE.manual;
clearCacheOnChange = false;
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);

View file

@ -139,7 +139,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
k = ds_map_find_next(TUNNELS_OUT, k);
}
LOG_IF(global.FLAG.render, $"→→ Push {nodeNames} to stack.");
LOG_IF(global.FLAG.render, $"→→ Push {nodeNames} to queue.");
LOG_BLOCK_END();
LOG_BLOCK_END();

View file

@ -1292,7 +1292,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
if(cache_hit) {
global.cache_hit++;
return array_clone(cache_value[2]);
return cache_value[2];
}
}
@ -1449,6 +1449,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
if(expUse) {
if(!is_struct(expTree)) return false;
var res = expTree.isAnimated();
switch(res) {
case EXPRESS_TREE_ANIM.none : return false;
case EXPRESS_TREE_ANIM.base_value : return is_anim;
@ -1810,7 +1811,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
return preview_overlay_vector(value_from == noone, active, _x, _y, _s, _mx, _my, _snx, _sny, _spr);
case VALUE_DISPLAY.area :
return preview_overlay_area(value_from == noone, active, _x, _y, _s, _mx, _my, _snx, _sny, struct_try_get(nodeFrom.display_data, "onSurfaceSize"));
return preview_overlay_area(value_from == noone, active, _x, _y, _s, _mx, _my, _snx, _sny, struct_try_get(display_data, "onSurfaceSize"));
case VALUE_DISPLAY.puppet_control :
return preview_overlay_puppet(value_from == noone, active, _x, _y, _s, _mx, _my, _snx, _sny);

View file

@ -208,6 +208,11 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
readSoundComplete();
checkPreview(true);
if(content != noone) {
var frm = max(1, ceil(content.duration * PROJECT.animator.framerate));
inputs[| 1].editWidget.text = $"Sync ({frm} frames)";
}
RENDER_ALL
}

View file

@ -5,7 +5,7 @@
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "audio",
"path": "folders/nodes/data/audio.yy",
"name": "IO",
"path": "folders/nodes/data/IO.yy",
},
}

View file

@ -5,7 +5,7 @@
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "audio",
"path": "folders/nodes/data/audio.yy",
"name": "IO",
"path": "folders/nodes/data/IO.yy",
},
}

View file

@ -34,7 +34,7 @@
global.FUNCTIONS[? "lerp"] = [ ["x", "y", "amount"], function(val) { return lerp(array_safe_get(val, 0), array_safe_get(val, 1), array_safe_get(val, 2)); } ];
global.FUNCTIONS[? "wiggle"] = [ ["time", "frequency", "octave = 1", "seed = 0"], function(val) {
return wiggle(0, 1, PROJECT.animator.frameTotal / array_safe_get(val, 1),
return wiggle(0, 1, PROJECT.animator.frames_total / array_safe_get(val, 1),
array_safe_get(val, 0),
array_safe_get(val, 3, 0),
array_safe_get(val, 2, 1));
@ -89,24 +89,24 @@
PROJECT_VARIABLES = {};
PROJECT_VARIABLES.Project = {};
PROJECT_VARIABLES.Project.frame = function() /*=>*/ {return PROJECT.animator.current_frame};
PROJECT_VARIABLES.Project.progress = function() /*=>*/ {return PROJECT.animator.current_frame / (PROJECT.animator.frames_total - 1)};
PROJECT_VARIABLES.Project.frameTotal = function() /*=>*/ {return PROJECT.animator.frames_total};
PROJECT_VARIABLES.Project.fps = function() /*=>*/ {return PROJECT.animator.framerate};
PROJECT_VARIABLES.Project.time = function() /*=>*/ {return PROJECT.animator.current_frame / PROJECT.animator.framerate};
PROJECT_VARIABLES.Project.name = function() /*=>*/ {return filename_name_only(PROJECT.path)};
PROJECT_VARIABLES.Project.frame = [ function() { return PROJECT.animator.current_frame }, EXPRESS_TREE_ANIM.animated ];
PROJECT_VARIABLES.Project.progress = [ function() { return PROJECT.animator.current_frame / (PROJECT.animator.frames_total - 1) }, EXPRESS_TREE_ANIM.animated ];
PROJECT_VARIABLES.Project.frameTotal = [ function() { return PROJECT.animator.frames_total }, EXPRESS_TREE_ANIM.none ];
PROJECT_VARIABLES.Project.fps = [ function() { return PROJECT.animator.framerate }, EXPRESS_TREE_ANIM.none ];
PROJECT_VARIABLES.Project.time = [ function() { return PROJECT.animator.current_frame / PROJECT.animator.framerate }, EXPRESS_TREE_ANIM.animated ];
PROJECT_VARIABLES.Project.name = [ function() { return filename_name_only(PROJECT.path) }, EXPRESS_TREE_ANIM.none ];
PROJECT_VARIABLES.Program = {};
PROJECT_VARIABLES.Program.time = function() /*=>*/ {return current_time / 1000};
PROJECT_VARIABLES.Program.time = [ function() { return current_time / 1000 }, EXPRESS_TREE_ANIM.animated ];
PROJECT_VARIABLES.Device = {};
PROJECT_VARIABLES.Device.timeSecond = function() /*=>*/ {return current_second};
PROJECT_VARIABLES.Device.timeMinute = function() /*=>*/ {return current_minute};
PROJECT_VARIABLES.Device.timeHour = function() /*=>*/ {return current_hour};
PROJECT_VARIABLES.Device.timeDay = function() /*=>*/ {return current_day};
PROJECT_VARIABLES.Device.timeDayInWeek = function() /*=>*/ {return current_weekday};
PROJECT_VARIABLES.Device.timeMonth = function() /*=>*/ {return current_month};
PROJECT_VARIABLES.Device.timeYear = function() /*=>*/ {return current_year};
PROJECT_VARIABLES.Device.timeSecond = [ function() { return current_second }, EXPRESS_TREE_ANIM.animated ];
PROJECT_VARIABLES.Device.timeMinute = [ function() { return current_minute }, EXPRESS_TREE_ANIM.animated ];
PROJECT_VARIABLES.Device.timeHour = [ function() { return current_hour }, EXPRESS_TREE_ANIM.animated ];
PROJECT_VARIABLES.Device.timeDay = [ function() { return current_day }, EXPRESS_TREE_ANIM.animated ];
PROJECT_VARIABLES.Device.timeDayInWeek = [ function() { return current_weekday }, EXPRESS_TREE_ANIM.animated ];
PROJECT_VARIABLES.Device.timeMonth = [ function() { return current_month }, EXPRESS_TREE_ANIM.animated ];
PROJECT_VARIABLES.Device.timeYear = [ function() { return current_year }, EXPRESS_TREE_ANIM.animated ];
#endregion
#region evaluator
@ -132,11 +132,10 @@
}
static isAnimated = function() {
var anim = EXPRESS_TREE_ANIM.none;
for( var i = 0, n = array_length(funcTrees); i < n; i++ )
if(!funcTrees[i].isAnimated())
return false;
return true;
anim = max(anim, funcTrees[i].isAnimated());
return anim;
}
static eval = function(params = {}) {
@ -163,10 +162,13 @@
}
static isAnimated = function() {
if(condition != noone && !condition.isAnimated()) return false;
if(if_true != noone && !if_true.isAnimated()) return false;
if(if_false != noone && !if_false.isAnimated()) return false;
return true;
var anim = EXPRESS_TREE_ANIM.none;
if(condition != noone) anim = max(anim, condition.isAnimated());
if(if_true != noone) anim = max(anim, if_true.isAnimated());
if(if_false != noone) anim = max(anim, if_false.isAnimated());
return anim;
}
static eval = function(params = {}) {
@ -207,16 +209,18 @@
}
static isAnimated = function() {
var anim = EXPRESS_TREE_ANIM.none;
if(itr_array) {
if(cond_arr == noone || !cond_arr.isAnimated()) return false;
if(cond_arr == noone) anim = max(anim, cond_arr.isAnimated())
} else {
if(cond_init == noone || !cond_init.isAnimated()) return false;
if(cond_term == noone || !cond_term.isAnimated()) return false;
if(cond_init == noone) anim = max(anim, cond_init.isAnimated())
if(cond_term == noone) anim = max(anim, cond_term.isAnimated())
}
if(action != noone && !action.isAnimated()) return false;
if(action != noone) anim = max(anim, action.isAnimated())
return true;
return anim;
}
static eval = function(params = {}) {
@ -249,6 +253,8 @@
self.l = l;
self.r = r;
dependency = [];
anim_stat = undefined;
anim_cache = true;
static _string = function(str) { #region
return string_char_at(str, 1) == "\"" && string_char_at(str, string_length(str)) == "\"";
@ -318,24 +324,29 @@
static _isAnimated = function(val) { #region
if(is_real(val)) return EXPRESS_TREE_ANIM.none;
if(is_struct(val)) return val._isAnimated();
if(val == "value") return EXPRESS_TREE_ANIM.base_value;
if(PROJECT.globalNode.inputExist(val)) {
var _inp = PROJECT.globalNode.getInput(val);
if(_inp.is_anim) return EXPRESS_TREE_ANIM.animated;
if(is_struct(val)) return val.isAnimated();
if(is_array(val)) {
var anim = EXPRESS_TREE_ANIM.none;
for( var i = 0, n = array_length(val); i < n; i++ )
anim = max(anim, _isAnimated(val[i]));
return anim;
}
return EXPRESS_TREE_ANIM.none;
if(val == "value") return EXPRESS_TREE_ANIM.base_value;
var anim = nodeGetDataAnim(val);
anim_cache &= anim[1];
return anim[0];
} #endregion
static isAnimated = function() { #region
var anim = EXPRESS_TREE_ANIM.none;
anim = max(anim, _isAnimated(l));
if(symbol != "@")
anim = max(anim, _isAnimated(r));
if(anim_cache && anim_stat != undefined) return anim_stat;
return anim;
anim_stat = EXPRESS_TREE_ANIM.none;
anim_stat = max(anim_stat, _isAnimated(l));
if(symbol != "@") anim_stat = max(anim_stat, _isAnimated(r));
return anim_stat;
} #endregion
static eval = function(params = {}, isLeft = false) { #region
@ -352,8 +363,10 @@
for( var i = 0, n = array_length(l); i < n; i++ )
_l[i] = getVal(l[i], params);
printIf(global.LOG_EXPRESSION, $"Function {symbol}{_l}");
var res = _ev(_l);
printIf(global.LOG_EXPRESSION, $"Function {symbol}{_l} = {res}");
printIf(global.LOG_EXPRESSION, $" = {res}");
printIf(global.LOG_EXPRESSION, "====================");
return res;

View file

@ -8,7 +8,7 @@ enum RENDER_TYPE {
globalvar UPDATE, RENDER_QUEUE, RENDER_ORDER, UPDATE_RENDER_ORDER;
UPDATE_RENDER_ORDER = false;
global.FLAG.render = true;
global.FLAG.render = false;
global.group_inputs = [ "Node_Group_Input", "Node_Feedback_Input", "Node_Iterator_Input", "Node_Iterator_Each_Input" ];
#macro RENDER_ALL_REORDER UPDATE_RENDER_ORDER = true; UPDATE |= RENDER_TYPE.full;
@ -32,7 +32,7 @@ function __nodeLeafList(_list) { #region
}
}
LOG_LINE_IF(global.FLAG.render, $"Push node {nodeNames} to stack");
LOG_LINE_IF(global.FLAG.render, $"Push node {nodeNames} to queue");
return nodes;
} #endregion
@ -57,6 +57,7 @@ function __nodeInLoop(_node) { #region
} #endregion
function ResetAllNodesRender() { #region
LOG_IF(global.FLAG.render, $"XXXXXXXXXXXXXXXXXXXX RESETTING ALL NODES [frame {PROJECT.animator.current_frame}] XXXXXXXXXXXXXXXXXXXX");
var _key = ds_map_find_first(PROJECT.nodeMap);
var amo = ds_map_size(PROJECT.nodeMap);
@ -70,7 +71,7 @@ function ResetAllNodesRender() { #region
function Render(partial = false, runAction = false) { #region
var t = get_timer();
LOG_BLOCK_START();
LOG_IF(global.FLAG.render, $"============================== RENDER START [frame {PROJECT.animator.current_frame}] ==============================");
LOG_IF(global.FLAG.render, $"============================== RENDER START [{partial? "PARTIAL" : "FULL"}] [frame {PROJECT.animator.current_frame}] ==============================");
try {
var rendering = noone;
@ -100,9 +101,11 @@ function Render(partial = false, runAction = false) { #region
if(!is_struct(_node)) continue;
if(array_exists(global.group_inputs, instanceof(_node))) continue;
_node.render_time = 0;
if(!_node.active) continue;
if(!_node.isRenderActive()) continue;
if(_node.rendered) {
if(_node.rendered && !_node.isAnimated()) {
LOG_IF(global.FLAG.render, $"Skip rendered {_node.internalName}");
continue;
}
@ -257,7 +260,7 @@ function RenderListAction(list, context = PANEL_GRAPH.getCurrentContext()) { #re
if(_node.isRenderable()) {
RENDER_QUEUE.enqueue(_node);
printIf(global.FLAG.render, $" > Push {_node.internalName} node to stack");
printIf(global.FLAG.render, $" > Push {_node.internalName} node to queue");
}
}

View file

@ -154,16 +154,14 @@ function is_surface(s) {
if(!s) return false;
if(!surface_exists(s)) return false;
//if(surface_get_width_safe(s) <= 0) return false;
//if(surface_get_height_safe(s) <= 0) return false;
return true;
}
function surface_verify(surf, w, h, format = surface_rgba8unorm) {
gml_pragma("forceinline");
w = round(w);
h = round(h);
w = max(1, round(w));
h = max(1, round(h));
var s = is_surface(surf);
if(!s) return surface_create_valid(w, h, format);
@ -302,7 +300,6 @@ function surface_size_to(surface, width, height, format = noone, skipCheck = fal
var hh = surface_get_height_safe(surface);
if(ww == width && hh == height) return surface;
//print($"Reset surface {ww}, {width} | {hh}, {height}");
surface_resize(surface, width, height);
surface_clear(surface);