mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-03 14:14:49 +01:00
Addons API, audio nodes
This commit is contained in:
parent
1e320bd24b
commit
d3be891899
67 changed files with 1365 additions and 111 deletions
|
@ -20,6 +20,7 @@
|
|||
{"name":"font","order":7,"path":"folders/font.yy",},
|
||||
{"name":"functions","order":6,"path":"folders/functions.yy",},
|
||||
{"name":"animation","order":19,"path":"folders/functions/animation.yy",},
|
||||
{"name":"audio","order":35,"path":"folders/functions/audio.yy",},
|
||||
{"name":"bones","order":18,"path":"folders/functions/bones.yy",},
|
||||
{"name":"compat","order":13,"path":"folders/functions/compat.yy",},
|
||||
{"name":"control","order":22,"path":"folders/functions/control.yy",},
|
||||
|
@ -149,7 +150,6 @@
|
|||
{"name":"sprites","order":12,"path":"folders/sprites.yy",},
|
||||
{"name":"gameframe","order":2,"path":"folders/sprites/gameframe.yy",},
|
||||
{"name":"widgets","order":5,"path":"folders/widgets.yy",},
|
||||
{"name":"Audio","order":21,"path":"folders/nodes/data/Audio.yy",},
|
||||
],
|
||||
"ResourceOrderSettings": [
|
||||
{"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",},
|
||||
|
@ -224,6 +224,7 @@
|
|||
{"name":"s_node_sepearte_shape","order":35,"path":"sprites/s_node_sepearte_shape/s_node_sepearte_shape.yy",},
|
||||
{"name":"s_node_text_join","order":5,"path":"sprites/s_node_text_join/s_node_text_join.yy",},
|
||||
{"name":"s_node_polar","order":5,"path":"sprites/s_node_polar/s_node_polar.yy",},
|
||||
{"name":"complex_function","order":15,"path":"scripts/complex_function/complex_function.yy",},
|
||||
{"name":"draw_set_blend_mode_ext","order":2,"path":"scripts/draw_set_blend_mode_ext/draw_set_blend_mode_ext.yy",},
|
||||
{"name":"s_node_noise_simplex","order":20,"path":"sprites/s_node_noise_simplex/s_node_noise_simplex.yy",},
|
||||
{"name":"o_dialog_notifications","order":6,"path":"objects/o_dialog_notifications/o_dialog_notifications.yy",},
|
||||
|
@ -250,7 +251,7 @@
|
|||
{"name":"s_node_color_out","order":6,"path":"sprites/s_node_color_out/s_node_color_out.yy",},
|
||||
{"name":"bbmod_lerp_delta_time","order":1,"path":"scripts/bbmod_lerp_delta_time/bbmod_lerp_delta_time.yy",},
|
||||
{"name":"_3D","order":6,"path":"scripts/_3D/_3D.yy",},
|
||||
{"name":"node_vector_cross2D","order":29,"path":"scripts/node_vector_cross2D/node_vector_cross2D.yy",},
|
||||
{"name":"node_vector_cross2D","order":11,"path":"scripts/node_vector_cross2D/node_vector_cross2D.yy",},
|
||||
{"name":"sh_corner_erode","order":48,"path":"shaders/sh_corner_erode/sh_corner_erode.yy",},
|
||||
{"name":"node_outline","order":11,"path":"scripts/node_outline/node_outline.yy",},
|
||||
{"name":"sh_mesh_generation","order":4,"path":"shaders/sh_mesh_generation/sh_mesh_generation.yy",},
|
||||
|
@ -258,11 +259,11 @@
|
|||
{"name":"__point","order":4,"path":"scripts/__point/__point.yy",},
|
||||
{"name":"scrollBox","order":13,"path":"scripts/scrollBox/scrollBox.yy",},
|
||||
{"name":"o_dialog_exit","order":2,"path":"objects/o_dialog_exit/o_dialog_exit.yy",},
|
||||
{"name":"node_polygonal_shape","order":27,"path":"scripts/node_polygonal_shape/node_polygonal_shape.yy",},
|
||||
{"name":"node_polygonal_shape","order":25,"path":"scripts/node_polygonal_shape/node_polygonal_shape.yy",},
|
||||
{"name":"fd_rectangle_get_collision_mask_sprite","order":4,"path":"scripts/fd_rectangle_get_collision_mask_sprite/fd_rectangle_get_collision_mask_sprite.yy",},
|
||||
{"name":"node_flip","order":13,"path":"scripts/node_flip/node_flip.yy",},
|
||||
{"name":"sh_FXAA","order":52,"path":"shaders/sh_FXAA/sh_FXAA.yy",},
|
||||
{"name":"node_gradient_points","order":20,"path":"scripts/node_gradient_points/node_gradient_points.yy",},
|
||||
{"name":"node_gradient_points","order":18,"path":"scripts/node_gradient_points/node_gradient_points.yy",},
|
||||
{"name":"_f_code","order":9,"path":"fonts/_f_code/_f_code.yy",},
|
||||
{"name":"sh_combine_rgb","order":40,"path":"shaders/sh_combine_rgb/sh_combine_rgb.yy",},
|
||||
{"name":"s_node_strandSim","order":3,"path":"sprites/s_node_strandSim/s_node_strandSim.yy",},
|
||||
|
@ -276,11 +277,12 @@
|
|||
{"name":"o_dialog_group_input_order","order":3,"path":"objects/o_dialog_group_input_order/o_dialog_group_input_order.yy",},
|
||||
{"name":"node_string_get_char","order":19,"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":"node_array_copy","order":26,"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",},
|
||||
{"name":"sh_simplex","order":22,"path":"shaders/sh_simplex/sh_simplex.yy",},
|
||||
{"name":"node_noise_grid_tri","order":25,"path":"scripts/node_noise_grid_tri/node_noise_grid_tri.yy",},
|
||||
{"name":"node_noise_grid_tri","order":23,"path":"scripts/node_noise_grid_tri/node_noise_grid_tri.yy",},
|
||||
{"name":"node_threshold","order":9,"path":"scripts/node_threshold/node_threshold.yy",},
|
||||
{"name":"sh_cell_noise_edge","order":5,"path":"shaders/sh_cell_noise_edge/sh_cell_noise_edge.yy",},
|
||||
{"name":"node_stripe","order":11,"path":"scripts/node_stripe/node_stripe.yy",},
|
||||
|
@ -339,7 +341,7 @@
|
|||
{"name":"node_palette_sort","order":9,"path":"scripts/node_palette_sort/node_palette_sort.yy",},
|
||||
{"name":"node_path_wave","order":7,"path":"scripts/node_path_wave/node_path_wave.yy",},
|
||||
{"name":"s_node_HSV","order":46,"path":"sprites/s_node_HSV/s_node_HSV.yy",},
|
||||
{"name":"node_point_move","order":26,"path":"scripts/node_point_move/node_point_move.yy",},
|
||||
{"name":"node_point_move","order":8,"path":"scripts/node_point_move/node_point_move.yy",},
|
||||
{"name":"s_node_3d_cone","order":9,"path":"sprites/s_node_3d_cone/s_node_3d_cone.yy",},
|
||||
{"name":"s_node_compose","order":1,"path":"sprites/s_node_compose/s_node_compose.yy",},
|
||||
{"name":"s_node_switch","order":20,"path":"sprites/s_node_switch/s_node_switch.yy",},
|
||||
|
@ -393,7 +395,7 @@
|
|||
{"name":"s_node_curve_edit","order":1,"path":"sprites/s_node_curve_edit/s_node_curve_edit.yy",},
|
||||
{"name":"textBox","order":17,"path":"scripts/textBox/textBox.yy",},
|
||||
{"name":"pathArrayBox","order":27,"path":"scripts/pathArrayBox/pathArrayBox.yy",},
|
||||
{"name":"node_statistic","order":7,"path":"scripts/node_statistic/node_statistic.yy",},
|
||||
{"name":"node_statistic","order":3,"path":"scripts/node_statistic/node_statistic.yy",},
|
||||
{"name":"sh_draw_surface_part_tiled","order":1,"path":"shaders/sh_draw_surface_part_tiled/sh_draw_surface_part_tiled.yy",},
|
||||
{"name":"o_dialog_add_node","order":1,"path":"objects/o_dialog_add_node/o_dialog_add_node.yy",},
|
||||
{"name":"s_node_path_reverse","order":8,"path":"sprites/s_node_path_reverse/s_node_path_reverse.yy",},
|
||||
|
@ -421,7 +423,7 @@
|
|||
{"name":"s_node_strandSim_create","order":2,"path":"sprites/s_node_strandSim_create/s_node_strandSim_create.yy",},
|
||||
{"name":"node_gradient_shift","order":10,"path":"scripts/node_gradient_shift/node_gradient_shift.yy",},
|
||||
{"name":"sh_vertex_normal_pass","order":5,"path":"shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.yy",},
|
||||
{"name":"node_vector_cross3D","order":28,"path":"scripts/node_vector_cross3D/node_vector_cross3D.yy",},
|
||||
{"name":"node_vector_cross3D","order":10,"path":"scripts/node_vector_cross3D/node_vector_cross3D.yy",},
|
||||
{"name":"s_node_pack_sprite","order":5,"path":"sprites/s_node_pack_sprite/s_node_pack_sprite.yy",},
|
||||
{"name":"surface_valid","order":6,"path":"scripts/surface_valid/surface_valid.yy",},
|
||||
{"name":"sh_blur_zoom","order":5,"path":"shaders/sh_blur_zoom/sh_blur_zoom.yy",},
|
||||
|
@ -452,14 +454,14 @@
|
|||
{"name":"sh_fd_vortex","order":20,"path":"shaders/sh_fd_vortex/sh_fd_vortex.yy",},
|
||||
{"name":"s_node_loop","order":5,"path":"sprites/s_node_loop/s_node_loop.yy",},
|
||||
{"name":"node_zigzag","order":12,"path":"scripts/node_zigzag/node_zigzag.yy",},
|
||||
{"name":"node_equation","order":18,"path":"scripts/node_equation/node_equation.yy",},
|
||||
{"name":"node_equation","order":4,"path":"scripts/node_equation/node_equation.yy",},
|
||||
{"name":"fd_rectangle_get_visualization_shader","order":27,"path":"scripts/fd_rectangle_get_visualization_shader/fd_rectangle_get_visualization_shader.yy",},
|
||||
{"name":"preset_data","order":8,"path":"scripts/preset_data/preset_data.yy",},
|
||||
{"name":"_f_h5","order":2,"path":"fonts/_f_h5/_f_h5.yy",},
|
||||
{"name":"node_string_split","order":14,"path":"scripts/node_string_split/node_string_split.yy",},
|
||||
{"name":"meta_data","order":12,"path":"scripts/meta_data/meta_data.yy",},
|
||||
{"name":"node_find_pixel","order":1,"path":"scripts/node_find_pixel/node_find_pixel.yy",},
|
||||
{"name":"node_scatter_points","order":24,"path":"scripts/node_scatter_points/node_scatter_points.yy",},
|
||||
{"name":"node_scatter_points","order":6,"path":"scripts/node_scatter_points/node_scatter_points.yy",},
|
||||
{"name":"pack_bottom_left","order":2,"path":"scripts/pack_bottom_left/pack_bottom_left.yy",},
|
||||
{"name":"o_dialog_lua_reference","order":5,"path":"objects/o_dialog_lua_reference/o_dialog_lua_reference.yy",},
|
||||
{"name":"node_surface_data","order":4,"path":"scripts/node_surface_data/node_surface_data.yy",},
|
||||
|
@ -485,7 +487,7 @@
|
|||
{"name":"o_dialog_palette","order":2,"path":"objects/o_dialog_palette/o_dialog_palette.yy",},
|
||||
{"name":"sh_blend_hue","order":17,"path":"shaders/sh_blend_hue/sh_blend_hue.yy",},
|
||||
{"name":"s_node_threshold","order":47,"path":"sprites/s_node_threshold/s_node_threshold.yy",},
|
||||
{"name":"sh_draw_normal","order":12,"path":"shaders/sh_draw_normal/sh_draw_normal.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_registry","order":5,"path":"scripts/node_registry/node_registry.yy",},
|
||||
{"name":"sh_checkerboard","order":12,"path":"shaders/sh_checkerboard/sh_checkerboard.yy",},
|
||||
|
@ -556,6 +558,7 @@
|
|||
{"name":"node_noise","order":17,"path":"scripts/node_noise/node_noise.yy",},
|
||||
{"name":"mtl_reader","order":6,"path":"scripts/mtl_reader/mtl_reader.yy",},
|
||||
{"name":"s_node_3d_array","order":7,"path":"sprites/s_node_3d_array/s_node_3d_array.yy",},
|
||||
{"name":"node_plot_linear","order":29,"path":"scripts/node_plot_linear/node_plot_linear.yy",},
|
||||
{"name":"addon_lua_constant","order":5,"path":"scripts/addon_lua_constant/addon_lua_constant.yy",},
|
||||
{"name":"sh_fd_velocity_combine","order":21,"path":"shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.yy",},
|
||||
{"name":"sh_scale2x","order":27,"path":"shaders/sh_scale2x/sh_scale2x.yy",},
|
||||
|
@ -566,7 +569,7 @@
|
|||
{"name":"node_color_from_hsv","order":8,"path":"scripts/node_color_from_hsv/node_color_from_hsv.yy",},
|
||||
{"name":"s_node_image_copy","order":6,"path":"sprites/s_node_image_copy/s_node_image_copy.yy",},
|
||||
{"name":"node_boolean","order":17,"path":"scripts/node_boolean/node_boolean.yy",},
|
||||
{"name":"node_grid_tri","order":21,"path":"scripts/node_grid_tri/node_grid_tri.yy",},
|
||||
{"name":"node_grid_tri","order":19,"path":"scripts/node_grid_tri/node_grid_tri.yy",},
|
||||
{"name":"node_average","order":5,"path":"scripts/node_average/node_average.yy",},
|
||||
{"name":"node_mesh_transform","order":2,"path":"scripts/node_mesh_transform/node_mesh_transform.yy",},
|
||||
{"name":"node_fluid_turbulence","order":10,"path":"scripts/node_fluid_turbulence/node_fluid_turbulence.yy",},
|
||||
|
@ -610,7 +613,7 @@
|
|||
{"name":"fd_rectangle_shift_content","order":19,"path":"scripts/fd_rectangle_shift_content/fd_rectangle_shift_content.yy",},
|
||||
{"name":"sh_texture_remap","order":24,"path":"shaders/sh_texture_remap/sh_texture_remap.yy",},
|
||||
{"name":"obj_fd_rectangle","order":1,"path":"objects/obj_fd_rectangle/obj_fd_rectangle.yy",},
|
||||
{"name":"node_noise_simplex","order":23,"path":"scripts/node_noise_simplex/node_noise_simplex.yy",},
|
||||
{"name":"node_noise_simplex","order":21,"path":"scripts/node_noise_simplex/node_noise_simplex.yy",},
|
||||
{"name":"sh_fd_visualize_velocity_divergence_glsl","order":18,"path":"shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.yy",},
|
||||
{"name":"ds_list","order":1,"path":"scripts/ds_list/ds_list.yy",},
|
||||
{"name":"node_path_builder","order":9,"path":"scripts/node_path_builder/node_path_builder.yy",},
|
||||
|
@ -619,7 +622,7 @@
|
|||
{"name":"sh_blend_subtract","order":5,"path":"shaders/sh_blend_subtract/sh_blend_subtract.yy",},
|
||||
{"name":"BBMOD_Vec4","order":6,"path":"scripts/BBMOD_Vec4/BBMOD_Vec4.yy",},
|
||||
{"name":"panel_animation","order":1,"path":"scripts/panel_animation/panel_animation.yy",},
|
||||
{"name":"node_surface_replace","order":29,"path":"scripts/node_surface_replace/node_surface_replace.yy",},
|
||||
{"name":"node_surface_replace","order":27,"path":"scripts/node_surface_replace/node_surface_replace.yy",},
|
||||
{"name":"node_strand_create","order":1,"path":"scripts/node_strand_create/node_strand_create.yy",},
|
||||
{"name":"sh_gradient","order":17,"path":"shaders/sh_gradient/sh_gradient.yy",},
|
||||
{"name":"node_json_file_read","order":8,"path":"scripts/node_json_file_read/node_json_file_read.yy",},
|
||||
|
@ -643,7 +646,7 @@
|
|||
{"name":"node_fluid_add_collider","order":6,"path":"scripts/node_fluid_add_collider/node_fluid_add_collider.yy",},
|
||||
{"name":"node_atlas_get","order":1,"path":"scripts/node_atlas_get/node_atlas_get.yy",},
|
||||
{"name":"fontScrollBox","order":26,"path":"scripts/fontScrollBox/fontScrollBox.yy",},
|
||||
{"name":"node_grid_hex","order":22,"path":"scripts/node_grid_hex/node_grid_hex.yy",},
|
||||
{"name":"node_grid_hex","order":20,"path":"scripts/node_grid_hex/node_grid_hex.yy",},
|
||||
{"name":"s_node_text_display","order":4,"path":"sprites/s_node_text_display/s_node_text_display.yy",},
|
||||
{"name":"node_strand_render_texture","order":7,"path":"scripts/node_strand_render_texture/node_strand_render_texture.yy",},
|
||||
{"name":"luaRenderer","order":2,"path":"scripts/luaRenderer/luaRenderer.yy",},
|
||||
|
@ -664,7 +667,7 @@
|
|||
{"name":"areaBox","order":1,"path":"scripts/areaBox/areaBox.yy",},
|
||||
{"name":"__global_object_depths","order":7,"path":"scripts/__global_object_depths/__global_object_depths.yy",},
|
||||
{"name":"s_node_filter_array","order":28,"path":"sprites/s_node_filter_array/s_node_filter_array.yy",},
|
||||
{"name":"node_noise_grid_hex","order":24,"path":"scripts/node_noise_grid_hex/node_noise_grid_hex.yy",},
|
||||
{"name":"node_noise_grid_hex","order":22,"path":"scripts/node_noise_grid_hex/node_noise_grid_hex.yy",},
|
||||
{"name":"_3d_rotation","order":2,"path":"scripts/_3d_rotation/_3d_rotation.yy",},
|
||||
{"name":"node_lua_global","order":1,"path":"scripts/node_lua_global/node_lua_global.yy",},
|
||||
{"name":"o_dialog_preset","order":1,"path":"objects/o_dialog_preset/o_dialog_preset.yy",},
|
||||
|
@ -763,7 +766,7 @@
|
|||
{"name":"fd_rectangle_set_repeat","order":12,"path":"scripts/fd_rectangle_set_repeat/fd_rectangle_set_repeat.yy",},
|
||||
{"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":"node_simple_shape","order":4,"path":"scripts/node_simple_shape/node_simple_shape.yy",},
|
||||
{"name":"node_random","order":20,"path":"scripts/node_random/node_random.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",},
|
||||
{"name":"s_node_feedback","order":3,"path":"sprites/s_node_feedback/s_node_feedback.yy",},
|
||||
|
@ -772,7 +775,7 @@
|
|||
{"name":"sh_blend_min","order":9,"path":"shaders/sh_blend_min/sh_blend_min.yy",},
|
||||
{"name":"node_polar","order":4,"path":"scripts/node_polar/node_polar.yy",},
|
||||
{"name":"s_node_twirl","order":41,"path":"sprites/s_node_twirl/s_node_twirl.yy",},
|
||||
{"name":"sh_2d_light","order":49,"path":"shaders/sh_2d_light/sh_2d_light.yy",},
|
||||
{"name":"sh_2d_light","order":28,"path":"shaders/sh_2d_light/sh_2d_light.yy",},
|
||||
{"name":"node_image_animated","order":2,"path":"scripts/node_image_animated/node_image_animated.yy",},
|
||||
{"name":"node_palette_extract","order":7,"path":"scripts/node_palette_extract/node_palette_extract.yy",},
|
||||
{"name":"s_node_solid","order":15,"path":"sprites/s_node_solid/s_node_solid.yy",},
|
||||
|
@ -886,6 +889,7 @@
|
|||
{"name":"o_dialog_preview_window","order":1,"path":"objects/o_dialog_preview_window/o_dialog_preview_window.yy",},
|
||||
{"name":"s_node_sampler","order":11,"path":"sprites/s_node_sampler/s_node_sampler.yy",},
|
||||
{"name":"__background_get_element","order":1,"path":"scripts/__background_get_element/__background_get_element.yy",},
|
||||
{"name":"node_FFT","order":12,"path":"scripts/node_FFT/node_FFT.yy",},
|
||||
{"name":"window_functions","order":2,"path":"scripts/window_functions/window_functions.yy",},
|
||||
{"name":"node_mesh_create_path","order":1,"path":"scripts/node_mesh_create_path/node_mesh_create_path.yy",},
|
||||
{"name":"sh_fd_calculate_pressure_srj_glsl","order":9,"path":"shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.yy",},
|
||||
|
@ -1003,13 +1007,13 @@
|
|||
{"name":"sh_color_picker_hue","order":7,"path":"shaders/sh_color_picker_hue/sh_color_picker_hue.yy",},
|
||||
{"name":"node_path_eval","order":4,"path":"scripts/node_path_eval/node_path_eval.yy",},
|
||||
{"name":"node_3d_displace","order":18,"path":"scripts/node_3d_displace/node_3d_displace.yy",},
|
||||
{"name":"node_vector_dot","order":27,"path":"scripts/node_vector_dot/node_vector_dot.yy",},
|
||||
{"name":"node_vector_dot","order":9,"path":"scripts/node_vector_dot/node_vector_dot.yy",},
|
||||
{"name":"node_path_map_area","order":1,"path":"scripts/node_path_map_area/node_path_map_area.yy",},
|
||||
{"name":"s_node_timeline_preview","order":2,"path":"sprites/s_node_timeline_preview/s_node_timeline_preview.yy",},
|
||||
{"name":"node_csv_file_read","order":9,"path":"scripts/node_csv_file_read/node_csv_file_read.yy",},
|
||||
{"name":"scrollPane","order":14,"path":"scripts/scrollPane/scrollPane.yy",},
|
||||
{"name":"node_gradient_extract","order":13,"path":"scripts/node_gradient_extract/node_gradient_extract.yy",},
|
||||
{"name":"node_base_convert","order":25,"path":"scripts/node_base_convert/node_base_convert.yy",},
|
||||
{"name":"node_base_convert","order":7,"path":"scripts/node_base_convert/node_base_convert.yy",},
|
||||
{"name":"s_node_normal_light","order":31,"path":"sprites/s_node_normal_light/s_node_normal_light.yy",},
|
||||
{"name":"node_transform_single","order":1,"path":"scripts/node_transform_single/node_transform_single.yy",},
|
||||
{"name":"node_string_length","order":22,"path":"scripts/node_string_length/node_string_length.yy",},
|
||||
|
@ -1061,11 +1065,13 @@
|
|||
{"name":"s_node_array_add","order":1,"path":"sprites/s_node_array_add/s_node_array_add.yy",},
|
||||
{"name":"s_node_image_sequence_to_anim","order":9,"path":"sprites/s_node_image_sequence_to_anim/s_node_image_sequence_to_anim.yy",},
|
||||
{"name":"_node_VFX_spawner","order":13,"path":"scripts/_node_VFX_spawner/_node_VFX_spawner.yy",},
|
||||
{"name":"s_node_bar_graph","order":27,"path":"sprites/s_node_bar_graph/s_node_bar_graph.yy",},
|
||||
{"name":"sh_channel_B_grey","order":9,"path":"shaders/sh_channel_B_grey/sh_channel_B_grey.yy",},
|
||||
{"name":"draw_UI_scale","order":8,"path":"scripts/draw_UI_scale/draw_UI_scale.yy",},
|
||||
{"name":"s_node_strandSim_update","order":1,"path":"sprites/s_node_strandSim_update/s_node_strandSim_update.yy",},
|
||||
{"name":"s_node_RGB_combine","order":45,"path":"sprites/s_node_RGB_combine/s_node_RGB_combine.yy",},
|
||||
{"name":"s_node_shadow_cast","order":49,"path":"sprites/s_node_shadow_cast/s_node_shadow_cast.yy",},
|
||||
{"name":"fft_functions","order":1,"path":"scripts/fft_functions/fft_functions.yy",},
|
||||
{"name":"path_function","order":4,"path":"scripts/path_function/path_function.yy",},
|
||||
{"name":"fd_rectangle_set_velocity_dissipation_value","order":14,"path":"scripts/fd_rectangle_set_velocity_dissipation_value/fd_rectangle_set_velocity_dissipation_value.yy",},
|
||||
{"name":"panel_history","order":7,"path":"scripts/panel_history/panel_history.yy",},
|
||||
|
@ -1119,6 +1125,7 @@
|
|||
{"name":"node_3d_combine","order":10,"path":"scripts/node_3d_combine/node_3d_combine.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":16,"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",},
|
||||
|
@ -1134,7 +1141,8 @@
|
|||
{"name":"sh_channel_S","order":5,"path":"shaders/sh_channel_S/sh_channel_S.yy",},
|
||||
{"name":"string_scale","order":4,"path":"scripts/string_scale/string_scale.yy",},
|
||||
{"name":"s_node_cache","order":27,"path":"sprites/s_node_cache/s_node_cache.yy",},
|
||||
{"name":"node_repeat","order":26,"path":"scripts/node_repeat/node_repeat.yy",},
|
||||
{"name":"node_repeat","order":24,"path":"scripts/node_repeat/node_repeat.yy",},
|
||||
{"name":"draw_arc","order":22,"path":"scripts/draw_arc/draw_arc.yy",},
|
||||
{"name":"sh_fd_advect_velocity_1_glsl","order":7,"path":"shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.yy",},
|
||||
{"name":"mac_window_step","order":1,"path":"scripts/mac_window_step/mac_window_step.yy",},
|
||||
{"name":"s_node_image","order":4,"path":"sprites/s_node_image/s_node_image.yy",},
|
||||
|
@ -1155,7 +1163,7 @@
|
|||
{"name":"fd_rectangle_get_material_height","order":10,"path":"scripts/fd_rectangle_get_material_height/fd_rectangle_get_material_height.yy",},
|
||||
{"name":"rangeBox","order":10,"path":"scripts/rangeBox/rangeBox.yy",},
|
||||
{"name":"node_VFX_effect_accelerate","order":7,"path":"scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.yy",},
|
||||
{"name":"node_flood_fill","order":28,"path":"scripts/node_flood_fill/node_flood_fill.yy",},
|
||||
{"name":"node_flood_fill","order":26,"path":"scripts/node_flood_fill/node_flood_fill.yy",},
|
||||
{"name":"node_frame","order":1,"path":"scripts/node_frame/node_frame.yy",},
|
||||
{"name":"s_node_scale_algo","order":7,"path":"sprites/s_node_scale_algo/s_node_scale_algo.yy",},
|
||||
{"name":"sh_sdf_dist","order":4,"path":"shaders/sh_sdf_dist/sh_sdf_dist.yy",},
|
||||
|
@ -1183,7 +1191,7 @@
|
|||
{"name":"draw_surface_functions","order":4,"path":"scripts/draw_surface_functions/draw_surface_functions.yy",},
|
||||
{"name":"node_rigid_variable","order":8,"path":"scripts/node_rigid_variable/node_rigid_variable.yy",},
|
||||
{"name":"s_node_zoom","order":54,"path":"sprites/s_node_zoom/s_node_zoom.yy",},
|
||||
{"name":"node_noise_fbm","order":30,"path":"scripts/node_noise_fbm/node_noise_fbm.yy",},
|
||||
{"name":"node_noise_fbm","order":28,"path":"scripts/node_noise_fbm/node_noise_fbm.yy",},
|
||||
{"name":"sh_channel_V","order":6,"path":"shaders/sh_channel_V/sh_channel_V.yy",},
|
||||
{"name":"__shapes","order":3,"path":"scripts/__shapes/__shapes.yy",},
|
||||
{"name":"node_alpha_to_grey","order":3,"path":"scripts/node_alpha_to_grey/node_alpha_to_grey.yy",},
|
||||
|
@ -1208,8 +1216,9 @@
|
|||
{"name":"node_shadow_cast","order":15,"path":"scripts/node_shadow_cast/node_shadow_cast.yy",},
|
||||
{"name":"node_strand_render","order":5,"path":"scripts/node_strand_render/node_strand_render.yy",},
|
||||
{"name":"s_node_3d_obj_combine","order":5,"path":"sprites/s_node_3d_obj_combine/s_node_3d_obj_combine.yy",},
|
||||
{"name":"s_node_wav_file_read","order":19,"path":"sprites/s_node_wav_file_read/s_node_wav_file_read.yy",},
|
||||
{"name":"o_dialog_assetbox","order":3,"path":"objects/o_dialog_assetbox/o_dialog_assetbox.yy",},
|
||||
{"name":"node_lerp","order":6,"path":"scripts/node_lerp/node_lerp.yy",},
|
||||
{"name":"node_lerp","order":2,"path":"scripts/node_lerp/node_lerp.yy",},
|
||||
{"name":"s_node_pixel_sort","order":42,"path":"sprites/s_node_pixel_sort/s_node_pixel_sort.yy",},
|
||||
{"name":"node_texture_remap","order":2,"path":"scripts/node_texture_remap/node_texture_remap.yy",},
|
||||
{"name":"sh_fd_visualize_pixel_art_fiery_smoke_glsl","order":14,"path":"shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.yy",},
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"functions","folderPath":"folders/functions.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"3d","folderPath":"folders/functions/3d.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/functions/animation.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"audio","folderPath":"folders/functions/audio.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"bones","folderPath":"folders/functions/bones.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"compat","folderPath":"folders/functions/compat.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"control","folderPath":"folders/functions/control.yy",},
|
||||
|
@ -185,7 +186,6 @@
|
|||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"Steamworks","folderPath":"folders/Steamworks.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"UGC","folderPath":"folders/Steamworks/UGC.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"Audio","folderPath":"folders/nodes/data/Audio.yy",},
|
||||
],
|
||||
"IncludedFiles": [
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",},
|
||||
|
@ -936,6 +936,7 @@
|
|||
{"id":{"name":"s_node_sepearte_shape","path":"sprites/s_node_sepearte_shape/s_node_sepearte_shape.yy",},},
|
||||
{"id":{"name":"s_node_text_join","path":"sprites/s_node_text_join/s_node_text_join.yy",},},
|
||||
{"id":{"name":"s_node_polar","path":"sprites/s_node_polar/s_node_polar.yy",},},
|
||||
{"id":{"name":"complex_function","path":"scripts/complex_function/complex_function.yy",},},
|
||||
{"id":{"name":"draw_set_blend_mode_ext","path":"scripts/draw_set_blend_mode_ext/draw_set_blend_mode_ext.yy",},},
|
||||
{"id":{"name":"s_node_noise_simplex","path":"sprites/s_node_noise_simplex/s_node_noise_simplex.yy",},},
|
||||
{"id":{"name":"o_dialog_notifications","path":"objects/o_dialog_notifications/o_dialog_notifications.yy",},},
|
||||
|
@ -1000,6 +1001,7 @@
|
|||
{"id":{"name":"o_dialog_group_input_order","path":"objects/o_dialog_group_input_order/o_dialog_group_input_order.yy",},},
|
||||
{"id":{"name":"node_string_get_char","path":"scripts/node_string_get_char/node_string_get_char.yy",},},
|
||||
{"id":{"name":"_p_dialog_undo_block","path":"objects/_p_dialog_undo_block/_p_dialog_undo_block.yy",},},
|
||||
{"id":{"name":"node_array_copy","path":"scripts/node_array_copy/node_array_copy.yy",},},
|
||||
{"id":{"name":"draw_line_elbow","path":"scripts/draw_line_elbow/draw_line_elbow.yy",},},
|
||||
{"id":{"name":"node_path_reverse","path":"scripts/node_path_reverse/node_path_reverse.yy",},},
|
||||
{"id":{"name":"fd_rectangle_get_acceleration_y","path":"scripts/fd_rectangle_get_acceleration_y/fd_rectangle_get_acceleration_y.yy",},},
|
||||
|
@ -1071,6 +1073,7 @@
|
|||
{"id":{"name":"node_noise_grid","path":"scripts/node_noise_grid/node_noise_grid.yy",},},
|
||||
{"id":{"name":"node_palette_sort","path":"scripts/node_palette_sort/node_palette_sort.yy",},},
|
||||
{"id":{"name":"node_path_wave","path":"scripts/node_path_wave/node_path_wave.yy",},},
|
||||
{"id":{"name":"wav_file_read","path":"scripts/wav_file_read/wav_file_read.yy",},},
|
||||
{"id":{"name":"s_node_HSV","path":"sprites/s_node_HSV/s_node_HSV.yy",},},
|
||||
{"id":{"name":"node_point_move","path":"scripts/node_point_move/node_point_move.yy",},},
|
||||
{"id":{"name":"s_node_3d_cone","path":"sprites/s_node_3d_cone/s_node_3d_cone.yy",},},
|
||||
|
@ -1315,6 +1318,7 @@
|
|||
{"id":{"name":"node_noise","path":"scripts/node_noise/node_noise.yy",},},
|
||||
{"id":{"name":"mtl_reader","path":"scripts/mtl_reader/mtl_reader.yy",},},
|
||||
{"id":{"name":"s_node_3d_array","path":"sprites/s_node_3d_array/s_node_3d_array.yy",},},
|
||||
{"id":{"name":"node_plot_linear","path":"scripts/node_plot_linear/node_plot_linear.yy",},},
|
||||
{"id":{"name":"addon_lua_constant","path":"scripts/addon_lua_constant/addon_lua_constant.yy",},},
|
||||
{"id":{"name":"sh_fd_velocity_combine","path":"shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.yy",},},
|
||||
{"id":{"name":"sh_scale2x","path":"shaders/sh_scale2x/sh_scale2x.yy",},},
|
||||
|
@ -1686,6 +1690,7 @@
|
|||
{"id":{"name":"s_node_sampler","path":"sprites/s_node_sampler/s_node_sampler.yy",},},
|
||||
{"id":{"name":"__background_get_element","path":"scripts/__background_get_element/__background_get_element.yy",},},
|
||||
{"id":{"name":"node_animate_curve","path":"scripts/node_animate_curve/node_animate_curve.yy",},},
|
||||
{"id":{"name":"node_FFT","path":"scripts/node_FFT/node_FFT.yy",},},
|
||||
{"id":{"name":"window_functions","path":"scripts/window_functions/window_functions.yy",},},
|
||||
{"id":{"name":"node_mesh_create_path","path":"scripts/node_mesh_create_path/node_mesh_create_path.yy",},},
|
||||
{"id":{"name":"sh_fd_calculate_pressure_srj_glsl","path":"shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.yy",},},
|
||||
|
@ -1892,11 +1897,13 @@
|
|||
{"id":{"name":"s_node_counter","path":"sprites/s_node_counter/s_node_counter.yy",},},
|
||||
{"id":{"name":"s_node_image_sequence_to_anim","path":"sprites/s_node_image_sequence_to_anim/s_node_image_sequence_to_anim.yy",},},
|
||||
{"id":{"name":"_node_VFX_spawner","path":"scripts/_node_VFX_spawner/_node_VFX_spawner.yy",},},
|
||||
{"id":{"name":"s_node_bar_graph","path":"sprites/s_node_bar_graph/s_node_bar_graph.yy",},},
|
||||
{"id":{"name":"sh_channel_B_grey","path":"shaders/sh_channel_B_grey/sh_channel_B_grey.yy",},},
|
||||
{"id":{"name":"draw_UI_scale","path":"scripts/draw_UI_scale/draw_UI_scale.yy",},},
|
||||
{"id":{"name":"s_node_strandSim_update","path":"sprites/s_node_strandSim_update/s_node_strandSim_update.yy",},},
|
||||
{"id":{"name":"s_node_RGB_combine","path":"sprites/s_node_RGB_combine/s_node_RGB_combine.yy",},},
|
||||
{"id":{"name":"s_node_shadow_cast","path":"sprites/s_node_shadow_cast/s_node_shadow_cast.yy",},},
|
||||
{"id":{"name":"fft_functions","path":"scripts/fft_functions/fft_functions.yy",},},
|
||||
{"id":{"name":"path_function","path":"scripts/path_function/path_function.yy",},},
|
||||
{"id":{"name":"fd_rectangle_set_velocity_dissipation_value","path":"scripts/fd_rectangle_set_velocity_dissipation_value/fd_rectangle_set_velocity_dissipation_value.yy",},},
|
||||
{"id":{"name":"panel_history","path":"scripts/panel_history/panel_history.yy",},},
|
||||
|
@ -1957,6 +1964,7 @@
|
|||
{"id":{"name":"node_3d_combine","path":"scripts/node_3d_combine/node_3d_combine.yy",},},
|
||||
{"id":{"name":"fd_rectangle_add_material","path":"scripts/fd_rectangle_add_material/fd_rectangle_add_material.yy",},},
|
||||
{"id":{"name":"fd_rectangle_set_target","path":"scripts/fd_rectangle_set_target/fd_rectangle_set_target.yy",},},
|
||||
{"id":{"name":"node_wav_file_read","path":"scripts/node_wav_file_read/node_wav_file_read.yy",},},
|
||||
{"id":{"name":"draw_line_dashed","path":"scripts/draw_line_dashed/draw_line_dashed.yy",},},
|
||||
{"id":{"name":"pseudo_regex","path":"scripts/pseudo_regex/pseudo_regex.yy",},},
|
||||
{"id":{"name":"node_invert","path":"scripts/node_invert/node_invert.yy",},},
|
||||
|
@ -1975,6 +1983,7 @@
|
|||
{"id":{"name":"s_node_cache","path":"sprites/s_node_cache/s_node_cache.yy",},},
|
||||
{"id":{"name":"node_logic_operate","path":"scripts/node_logic_operate/node_logic_operate.yy",},},
|
||||
{"id":{"name":"node_repeat","path":"scripts/node_repeat/node_repeat.yy",},},
|
||||
{"id":{"name":"draw_arc","path":"scripts/draw_arc/draw_arc.yy",},},
|
||||
{"id":{"name":"sh_fd_advect_velocity_1_glsl","path":"shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.yy",},},
|
||||
{"id":{"name":"mac_window_step","path":"scripts/mac_window_step/mac_window_step.yy",},},
|
||||
{"id":{"name":"s_node_image","path":"sprites/s_node_image/s_node_image.yy",},},
|
||||
|
@ -2062,6 +2071,7 @@
|
|||
{"id":{"name":"node_strand_render","path":"scripts/node_strand_render/node_strand_render.yy",},},
|
||||
{"id":{"name":"s_node_3d_obj_combine","path":"sprites/s_node_3d_obj_combine/s_node_3d_obj_combine.yy",},},
|
||||
{"id":{"name":"gameframe","path":"scripts/gameframe/gameframe.yy",},},
|
||||
{"id":{"name":"s_node_wav_file_read","path":"sprites/s_node_wav_file_read/s_node_wav_file_read.yy",},},
|
||||
{"id":{"name":"o_dialog_assetbox","path":"objects/o_dialog_assetbox/o_dialog_assetbox.yy",},},
|
||||
{"id":{"name":"node_lerp","path":"scripts/node_lerp/node_lerp.yy",},},
|
||||
{"id":{"name":"s_node_pixel_sort","path":"sprites/s_node_pixel_sort/s_node_pixel_sort.yy",},},
|
||||
|
|
Binary file not shown.
|
@ -193,6 +193,9 @@
|
|||
case ".obj" :
|
||||
node = Node_create_3D_Obj_path(PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y, p);
|
||||
break;
|
||||
case ".wav" :
|
||||
node = Node_create_WAV_File_Read_path(PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y, p);
|
||||
break;
|
||||
case ".pxc" :
|
||||
LOAD_PATH(p);
|
||||
break;
|
||||
|
|
|
@ -142,7 +142,8 @@ enum CAMERA_PROJ {
|
|||
}
|
||||
|
||||
static __submit = function() {
|
||||
if(renderTexture == noone) return;
|
||||
if(renderTexture == noone) return;
|
||||
if(buffer == noone) return;
|
||||
|
||||
vertex_submit(buffer, pr_trianglelist, renderTexture);
|
||||
}
|
||||
|
|
|
@ -17,8 +17,13 @@ function addonContextGenerator(_addon, _function) constructor {
|
|||
} else if(struct_has(_item, "content")) {
|
||||
var _subArr = []
|
||||
for( var j = 0; j < array_length(_item.content); j++ ) {
|
||||
var _addonItem = new addonContextItem(_addon, _item.content[j].name, _item.content[j].callback);
|
||||
array_push(_subArr, _addonItem.menu_item);
|
||||
var _it = _item.content[j];
|
||||
if(_it == -1)
|
||||
array_push(_subArr, -1);
|
||||
else if(struct_has(_it, "callback")) {
|
||||
var _addonItem = new addonContextItem(_addon, _it.name, _it.callback);
|
||||
array_push(_subArr, _addonItem.menu_item);
|
||||
}
|
||||
}
|
||||
|
||||
var _addonItem = new addonContextSubMenu(_item.name, _subArr);
|
||||
|
@ -38,7 +43,7 @@ function addonContextItem(_addon, _name, _function) constructor {
|
|||
|
||||
menu_item = menuItem(_name, function(_data) {
|
||||
lua_call(_addon.thread, self._function, lua_byref(_data.context, true));
|
||||
}).setColor(COLORS._main_accent);
|
||||
})//.setColor(COLORS._main_accent);
|
||||
}
|
||||
|
||||
function addonContextSubMenu(_name, _content) constructor {
|
||||
|
@ -47,7 +52,7 @@ function addonContextSubMenu(_name, _content) constructor {
|
|||
|
||||
menu_item = menuItem(name, function(_dat) {
|
||||
return submenuCall(_dat, content);
|
||||
}).setColor(COLORS._main_accent)
|
||||
})//.setColor(COLORS._main_accent)
|
||||
.setIsShelf();
|
||||
}
|
||||
|
||||
|
|
|
@ -784,7 +784,17 @@
|
|||
[ "noti_error", noti_error ],
|
||||
[ "noti_warning", noti_warning ],
|
||||
|
||||
//animation
|
||||
[ "animation_playing", function() { return ANIMATOR.is_playing? lua_true : lua_false; }],
|
||||
[ "animation_play", function() { ANIMATOR.resume(); }],
|
||||
[ "animation_pause", function() { ANIMATOR.pause(); }],
|
||||
[ "animation_stop", function() { ANIMATOR.stop(); }],
|
||||
[ "animation_set_frame", function(frame) { ANIMATOR.setFrame(frame); }],
|
||||
[ "animation_render", function() { ANIMATOR.render(); }],
|
||||
|
||||
//panel
|
||||
[ "set_tooltip", function(txt) { TOOLTIP = txt; }],
|
||||
|
||||
[ "panel_get", function(type) {
|
||||
switch(type) {
|
||||
case "animation" : return PANEL_ANIMATION;
|
||||
|
|
|
@ -46,6 +46,28 @@
|
|||
_key = ds_map_find_next(NODE_MAP, _key);
|
||||
}
|
||||
}
|
||||
|
||||
static render = function() {
|
||||
setFrame(-1);
|
||||
is_playing = true;
|
||||
rendering = true;
|
||||
frame_progress = true;
|
||||
}
|
||||
|
||||
static pause = function() {
|
||||
ANIMATOR.is_playing = false;
|
||||
ANIMATOR.frame_progress = true;
|
||||
}
|
||||
|
||||
static resume = function() {
|
||||
ANIMATOR.is_playing = true;
|
||||
ANIMATOR.frame_progress = true;
|
||||
}
|
||||
|
||||
static stop = function() {
|
||||
is_playing = false;
|
||||
setFrame(0);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
4
scripts/complex_function/complex_function.gml
Normal file
4
scripts/complex_function/complex_function.gml
Normal file
|
@ -0,0 +1,4 @@
|
|||
function Complex(_real = 0, _imaginary = 0) constructor {
|
||||
re = _real;
|
||||
im = _imaginary;
|
||||
}
|
11
scripts/complex_function/complex_function.yy
Normal file
11
scripts/complex_function/complex_function.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "complex_function",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "value",
|
||||
"path": "folders/functions/value.yy",
|
||||
},
|
||||
}
|
19
scripts/draw_arc/draw_arc.gml
Normal file
19
scripts/draw_arc/draw_arc.gml
Normal file
|
@ -0,0 +1,19 @@
|
|||
function draw_arc(_x, _y, _r, _as, _at, _th = 1, _pr = 32) {
|
||||
var ox, oy, nx, ny;
|
||||
var ast = 360 / _pr;
|
||||
var sgn = sign(_at - _as);
|
||||
var ar = abs(_at - _as) / 360 * _pr;
|
||||
|
||||
for( var i = 0; i < ar; i++ ) {
|
||||
var a = _as + ast * i * sgn;
|
||||
|
||||
nx = _x + lengthdir_x(_r, a);
|
||||
ny = _y + lengthdir_y(_r, a);
|
||||
|
||||
if(i)
|
||||
draw_line_round(ox, oy, nx, ny, _th);
|
||||
|
||||
ox = nx;
|
||||
oy = ny;
|
||||
}
|
||||
}
|
11
scripts/draw_arc/draw_arc.yy
Normal file
11
scripts/draw_arc/draw_arc.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "draw_arc",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "draw",
|
||||
"path": "folders/functions/draw.yy",
|
||||
},
|
||||
}
|
65
scripts/fft_functions/fft_functions.gml
Normal file
65
scripts/fft_functions/fft_functions.gml
Normal file
|
@ -0,0 +1,65 @@
|
|||
function FFT(array_in) {
|
||||
var amo = array_length(array_in);
|
||||
if(amo == 0) return [];
|
||||
|
||||
if(log2(amo) != 0) {
|
||||
var lft = power(2, ceil(log2(amo))) - amo;
|
||||
repeat(lft) array_push(array_in, new Complex());
|
||||
}
|
||||
|
||||
var fq = _FFT(array_in);
|
||||
array_resize(fq, array_length(fq) / 2);
|
||||
fq = array_reverse(fq)
|
||||
return fq;
|
||||
}
|
||||
|
||||
function _FFT(array_in) {
|
||||
var n = array_length(array_in);
|
||||
var nh = n div 2;
|
||||
var theta = (2 * pi) / n;
|
||||
|
||||
if (n == 1)
|
||||
return array_in;
|
||||
|
||||
var even = array_create(nh, 0);
|
||||
var odd = array_create(nh, 0);
|
||||
|
||||
for (var i = 0; i < nh; i++) {
|
||||
even[i] = array_in[i * 2];
|
||||
odd[i] = array_in[(i * 2) + 1];
|
||||
}
|
||||
|
||||
var evenFFT = _FFT(even);
|
||||
var oddFFT = _FFT(odd);
|
||||
|
||||
//print($"> {evenFFT}, {oddFFT}");
|
||||
|
||||
var array_out = array_create(n);
|
||||
|
||||
for (var i = 0; i < nh; i++) {
|
||||
var t = new Complex(
|
||||
cos(-theta * i),
|
||||
sin(-theta * i)
|
||||
);
|
||||
|
||||
var oddK = new Complex(
|
||||
oddFFT[i].re * t.re - oddFFT[i].im * t.im,
|
||||
oddFFT[i].re * t.im + oddFFT[i].im * t.re,
|
||||
);
|
||||
|
||||
array_out[i] = new Complex(
|
||||
evenFFT[i].re + oddK.re,
|
||||
evenFFT[i].im + oddK.im,
|
||||
);
|
||||
|
||||
array_out[i + nh] = new Complex(
|
||||
evenFFT[i].re - oddK.re,
|
||||
evenFFT[i].im - oddK.im,
|
||||
);
|
||||
}
|
||||
|
||||
//show_debug_message($" | {array_out}");
|
||||
//show_debug_message("=====")
|
||||
|
||||
return array_out;
|
||||
};
|
11
scripts/fft_functions/fft_functions.yy
Normal file
11
scripts/fft_functions/fft_functions.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "fft_functions",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "audio",
|
||||
"path": "folders/functions/audio.yy",
|
||||
},
|
||||
}
|
|
@ -32,10 +32,10 @@
|
|||
|
||||
globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING, BUILD_NUMBER;
|
||||
|
||||
VERSION = 1143;
|
||||
SAVEFILE_VERSION = 1420;
|
||||
VERSION_STRING = "1.14.3.2";
|
||||
BUILD_NUMBER = 114301;
|
||||
VERSION = 1144;
|
||||
SAVEFILE_VERSION = 1440;
|
||||
VERSION_STRING = "1.14.4";
|
||||
BUILD_NUMBER = 114400;
|
||||
|
||||
globalvar NODES, NODE_MAP, APPEND_MAP, NODE_NAME_MAP;
|
||||
globalvar HOTKEYS, HOTKEY_CONTEXT, NODE_INSTANCES;
|
||||
|
|
|
@ -59,9 +59,8 @@ function __LOAD_PATH(path, readonly = false, safe_mode = false) {
|
|||
var file = file_text_open_read(temp_path);
|
||||
var load_str = "";
|
||||
|
||||
while(!file_text_eof(file)) {
|
||||
while(!file_text_eof(file))
|
||||
load_str += file_text_readln(file);
|
||||
}
|
||||
file_text_close(file);
|
||||
|
||||
var _map = json_decode(load_str);
|
||||
|
@ -117,6 +116,21 @@ function __LOAD_PATH(path, readonly = false, safe_mode = false) {
|
|||
log_warning("LOAD, global", exception_print(e));
|
||||
}
|
||||
|
||||
try {
|
||||
if(ds_map_exists(_map, "addon")) {
|
||||
var _addon = _map[? "addon"];
|
||||
|
||||
with(addon) {
|
||||
if(!ds_map_exists(_addon, name)) continue;
|
||||
var _mp = json_parse(_addon[? name]);
|
||||
|
||||
lua_call(thread, "deserialize", _mp);
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
log_warning("LOAD, addon", exception_print(e));
|
||||
}
|
||||
|
||||
ds_queue_clear(CONNECTION_CONFLICT);
|
||||
|
||||
try {
|
||||
|
|
|
@ -7,7 +7,7 @@ function drawWidgetInit() {
|
|||
lineBreak = true;
|
||||
}
|
||||
|
||||
function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _focus = false, _scrollPane = noone, rx = 0, ry = 0) {
|
||||
function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _focus = false, _scrollPane = noone, rx = 0, ry = 0) {
|
||||
var con_w = ww - ui(4);
|
||||
var xc = xx + ww / 2;
|
||||
|
||||
|
@ -175,7 +175,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
|||
jun.expUse = !jun.expUse;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
var _hsy = yy + lb_h;
|
||||
var padd = ui(8);
|
||||
|
||||
|
@ -207,7 +207,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
|||
} else {
|
||||
jun.editWidget.setInteract(false);
|
||||
}
|
||||
|
||||
|
||||
switch(jun.display_type) {
|
||||
case VALUE_DISPLAY.button :
|
||||
jun.editWidget.draw(editBoxX, editBoxY, editBoxW, editBoxH, _m);
|
||||
|
|
|
@ -80,6 +80,11 @@ function Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
|
||||
vertexObjects = [];
|
||||
|
||||
mesh_generating = false;
|
||||
mesh_genetated = false;
|
||||
mesh_generate_index = 0;
|
||||
mesh_generate_amount = 0;
|
||||
|
||||
static onValueFromUpdate = function(index) {
|
||||
if(index == 0 || index == 14)
|
||||
generateMesh();
|
||||
|
@ -105,12 +110,10 @@ function Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
}
|
||||
vertexObjects = [];
|
||||
|
||||
for( var i = 0; i < array_length(_ins); i++ )
|
||||
vertexObjects[i] = generateMeshIndex(i);
|
||||
|
||||
UPDATE |= RENDER_TYPE.full;
|
||||
|
||||
outputs[| 3].setValue(vertexObjects);
|
||||
mesh_generating = true;
|
||||
mesh_genetated = false;
|
||||
mesh_generate_index = 0;
|
||||
mesh_generate_amount = array_length(_ins);
|
||||
}
|
||||
|
||||
static generateMeshIndex = function(index) {
|
||||
|
@ -236,6 +239,21 @@ function Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
return v;
|
||||
}
|
||||
|
||||
static step = function() {
|
||||
if(!mesh_generating) return;
|
||||
|
||||
vertexObjects[mesh_generate_index] = generateMeshIndex(mesh_generate_index);
|
||||
|
||||
mesh_generate_index++;
|
||||
if(mesh_generate_index >= mesh_generate_amount) {
|
||||
mesh_generating = false;
|
||||
mesh_genetated = true;
|
||||
|
||||
UPDATE |= RENDER_TYPE.full;
|
||||
outputs[| 3].setValue(vertexObjects);
|
||||
}
|
||||
}
|
||||
|
||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||
}
|
||||
|
@ -249,12 +267,15 @@ function Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
var _lrot = getSingleValue(3, index);
|
||||
var _lsca = getSingleValue(4, index);
|
||||
|
||||
_3d_local_transform(_lpos, _lrot, _lsca);
|
||||
vertexObjects[index].submit(_ins);
|
||||
_3d_clear_local_transform();
|
||||
if(is_struct(vertexObjects[index])) {
|
||||
_3d_local_transform(_lpos, _lrot, _lsca);
|
||||
vertexObjects[index].submit(_ins);
|
||||
_3d_clear_local_transform();
|
||||
}
|
||||
}
|
||||
|
||||
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||
if(mesh_generating) return;
|
||||
if(_output_index == 3) return vertexObjects;
|
||||
|
||||
var _ins = _data[ 0];
|
||||
|
@ -302,6 +323,17 @@ function Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
return _outSurf;
|
||||
}
|
||||
|
||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||
if(mesh_generating) {
|
||||
var cx = xx + w * _s / 2;
|
||||
var cy = yy + h * _s / 2;
|
||||
var rr = min(w - 64, h - 64) * _s / 2;
|
||||
|
||||
draw_set_color(COLORS._main_icon);
|
||||
draw_arc(cx, cy, rr, 90, 90 - 360 * mesh_generate_index / mesh_generate_amount, 4 * _s, max(mesh_generate_amount, 32));
|
||||
}
|
||||
}
|
||||
|
||||
static postConnect = function() {
|
||||
generateMesh();
|
||||
}
|
||||
|
|
36
scripts/node_FFT/node_FFT.gml
Normal file
36
scripts/node_FFT/node_FFT.gml
Normal file
|
@ -0,0 +1,36 @@
|
|||
function Node_FFT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||
name = "FFT";
|
||||
previewable = false;
|
||||
|
||||
w = 96;
|
||||
h = 32 + 24;
|
||||
min_h = h;
|
||||
|
||||
inputs[| 0] = nodeValue("Data", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
|
||||
.setArrayDepth(1)
|
||||
.setVisible(true, true);
|
||||
|
||||
outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [])
|
||||
.setArrayDepth(1);
|
||||
|
||||
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||
var _dat = _data[0];
|
||||
var _cmp = [];
|
||||
|
||||
for( var i = 0; i < array_length(_dat); i++ )
|
||||
_cmp[i] = new Complex(_dat[i]);
|
||||
|
||||
var _res = FFT(_cmp);
|
||||
var _r = [];
|
||||
|
||||
for( var i = 0; i < array_length(_res); i++ )
|
||||
_r[i] = _res[i].re;
|
||||
|
||||
return _r;
|
||||
}
|
||||
|
||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||
var bbox = drawGetBbox(xx, yy, _s);
|
||||
draw_sprite_fit(s_node_array_reverse, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
|
||||
}
|
||||
}
|
11
scripts/node_FFT/node_FFT.yy
Normal file
11
scripts/node_FFT/node_FFT.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_FFT",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "number",
|
||||
"path": "folders/nodes/data/value/number.yy",
|
||||
},
|
||||
}
|
12
scripts/node_FFT/node_counter.yy
Normal file
12
scripts/node_FFT/node_counter.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "variable",
|
||||
"path": "folders/nodes/data/variable.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_counter",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
52
scripts/node_array_copy/node_array_copy.gml
Normal file
52
scripts/node_array_copy/node_array_copy.gml
Normal file
|
@ -0,0 +1,52 @@
|
|||
function Node_Array_Copy(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||
name = "Array Copy";
|
||||
previewable = false;
|
||||
|
||||
w = 96;
|
||||
h = 32 + 24;
|
||||
min_h = h;
|
||||
|
||||
inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
|
||||
.setArrayDepth(1)
|
||||
.setVisible(true, true);
|
||||
|
||||
inputs[| 1] = nodeValue("Starting Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
|
||||
|
||||
inputs[| 2] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
|
||||
|
||||
outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0)
|
||||
.setArrayDepth(1);
|
||||
|
||||
static step = function() {
|
||||
var _typ = VALUE_TYPE.any;
|
||||
if(inputs[| 0].value_from != noone) _typ = inputs[| 0].value_from.type;
|
||||
|
||||
inputs[| 0].type = _typ;
|
||||
outputs[| 0].type = _typ;
|
||||
}
|
||||
|
||||
static update = function(frame = ANIMATOR.current_frame) {
|
||||
var _arr = inputs[| 0].getValue();
|
||||
var _ind = inputs[| 1].getValue();
|
||||
var _siz = inputs[| 2].getValue();
|
||||
|
||||
var _a = _arr, _res = [];
|
||||
for( var i = 0; i < array_length(_a); i++ ) {
|
||||
var _aa = _a[i];
|
||||
|
||||
_res = _aa[_ind]
|
||||
}
|
||||
|
||||
if(!is_array(_arr)) return;
|
||||
var res = [];
|
||||
|
||||
for( var i = 0; i < _siz; i++ )
|
||||
res[i] = array_safe_get(_arr, _ind + i);
|
||||
|
||||
outputs[| 0].setValue(res);
|
||||
}
|
||||
|
||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||
|
||||
}
|
||||
}
|
11
scripts/node_array_copy/node_array_copy.yy
Normal file
11
scripts/node_array_copy/node_array_copy.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_array_copy",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "array",
|
||||
"path": "folders/nodes/data/value/array.yy",
|
||||
},
|
||||
}
|
12
scripts/node_array_copy/node_counter.yy
Normal file
12
scripts/node_array_copy/node_counter.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "variable",
|
||||
"path": "folders/nodes/data/variable.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_counter",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
|
@ -295,7 +295,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
}
|
||||
}
|
||||
|
||||
static update = function(frame = ANIMATOR.current_frame) {
|
||||
static update = function(frame = ANIMATOR.current_frame) {
|
||||
var path = inputs[| 0].getValue();
|
||||
var current_tag = inputs[| 2].getValue();
|
||||
if(path_current != path) updatePaths(path);
|
||||
|
@ -319,7 +319,8 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
var vis = attributes[? "layer_visible"];
|
||||
var ww = content[? "Width"];
|
||||
var hh = content[? "Height"];
|
||||
var surf = outputs[| 0].getValue;
|
||||
|
||||
var surf = outputs[| 0].getValue();
|
||||
surf = surface_verify(surf, ww, hh);
|
||||
outputs[| 0].setValue(surf);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
|||
}
|
||||
}
|
||||
|
||||
static update = function(frame = ANIMATOR.current_frame) {
|
||||
static update = function(frame = ANIMATOR.current_frame) {
|
||||
var data = inputs[| 0].getValue();
|
||||
if(data == noone) return;
|
||||
|
||||
|
@ -52,7 +52,7 @@ function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
|||
var cw = cel? cel.data[? "Width"] : 1;
|
||||
var ch = cel? cel.data[? "Height"] : 1;
|
||||
|
||||
var surf = outputs[| 0].getValue;
|
||||
var surf = outputs[| 0].getValue();
|
||||
if(celDim) surf = surface_verify(surf, cw, ch);
|
||||
else surf = surface_verify(surf, ww, hh);
|
||||
outputs[| 0].setValue(surf);
|
||||
|
|
|
@ -16,10 +16,46 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01])
|
||||
.setVisible(true, true);
|
||||
|
||||
inputs[| 3] = nodeValue("Normalized", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, 1);
|
||||
|
||||
outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white);
|
||||
|
||||
input_display_list = [ 3, 0, 1, 2 ];
|
||||
|
||||
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||
return make_color_hsv(_data[0] * 255, _data[1] * 255, _data[2] * 255);
|
||||
var nor = _data[3];
|
||||
|
||||
return make_color_hsv(
|
||||
nor? _data[0] * 255 : _data[0] / 360 * 255,
|
||||
nor? _data[1] * 255 : _data[1],
|
||||
nor? _data[2] * 255 : _data[2]
|
||||
);
|
||||
}
|
||||
|
||||
static onValueUpdate = function(index = 0) {
|
||||
if(index == 3) {
|
||||
var _nor = inputs[| 3].getValue();
|
||||
|
||||
if(_nor) {
|
||||
inputs[| 0].type = VALUE_TYPE.integer;
|
||||
inputs[| 0].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||
|
||||
inputs[| 1].type = VALUE_TYPE.integer;
|
||||
inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||
|
||||
inputs[| 2].type = VALUE_TYPE.integer;
|
||||
inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||
} else {
|
||||
inputs[| 0].type = VALUE_TYPE.integer;
|
||||
inputs[| 0].setDisplay(VALUE_DISPLAY.slider, [0, 360, 1]);
|
||||
|
||||
inputs[| 1].type = VALUE_TYPE.integer;
|
||||
inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [0, 255, 1]);
|
||||
|
||||
inputs[| 2].type = VALUE_TYPE.integer;
|
||||
inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [0, 255, 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||
|
@ -36,4 +72,8 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
draw_set_color(col);
|
||||
draw_rectangle(bbox.x0, bbox.y0, bbox.x1, bbox.y1, 0);
|
||||
}
|
||||
|
||||
static doApplyDeserialize = function() {
|
||||
onValueUpdate(3);
|
||||
}
|
||||
}
|
|
@ -16,10 +16,46 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01])
|
||||
.setVisible(true, true);
|
||||
|
||||
inputs[| 3] = nodeValue("Normalized", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, 1);
|
||||
|
||||
outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white);
|
||||
|
||||
input_display_list = [ 3, 0, 1, 2 ];
|
||||
|
||||
static onValueUpdate = function(index = 0) {
|
||||
if(index == 3) {
|
||||
var _nor = inputs[| 3].getValue();
|
||||
|
||||
if(_nor) {
|
||||
inputs[| 0].type = VALUE_TYPE.integer;
|
||||
inputs[| 0].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||
|
||||
inputs[| 1].type = VALUE_TYPE.integer;
|
||||
inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||
|
||||
inputs[| 2].type = VALUE_TYPE.integer;
|
||||
inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||
} else {
|
||||
inputs[| 0].type = VALUE_TYPE.integer;
|
||||
inputs[| 0].setDisplay(VALUE_DISPLAY.slider, [0, 255, 1]);
|
||||
|
||||
inputs[| 1].type = VALUE_TYPE.integer;
|
||||
inputs[| 1].setDisplay(VALUE_DISPLAY.slider, [0, 255, 1]);
|
||||
|
||||
inputs[| 2].type = VALUE_TYPE.integer;
|
||||
inputs[| 2].setDisplay(VALUE_DISPLAY.slider, [0, 255, 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||
return make_color_rgb(_data[0] * 255, _data[1] * 255, _data[2] * 255);
|
||||
var nor = _data[3];
|
||||
|
||||
return make_color_rgb(
|
||||
nor? _data[0] * 255 : _data[0],
|
||||
nor? _data[1] * 255 : _data[1],
|
||||
nor? _data[2] * 255 : _data[2]
|
||||
);
|
||||
}
|
||||
|
||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||
|
@ -36,4 +72,8 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
draw_set_color(col);
|
||||
draw_rectangle(bbox.x0, bbox.y0, bbox.x1, bbox.y1, 0);
|
||||
}
|
||||
|
||||
static doApplyDeserialize = function() {
|
||||
onValueUpdate(3);
|
||||
}
|
||||
}
|
|
@ -19,15 +19,16 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
|||
recordAction(ACTION_TYPE.node_added, self);
|
||||
NODE_MAP[? node_id] = self;
|
||||
MODIFIED = true;
|
||||
} else {
|
||||
run_in(1, function() {
|
||||
internalName = string_replace_all(name, " ", "_") + string(irandom_range(10000, 99999));
|
||||
NODE_NAME_MAP[? internalName] = self;
|
||||
});
|
||||
}
|
||||
|
||||
name = "";
|
||||
display_name = "";
|
||||
internalName = "";
|
||||
run_in(1, function() {
|
||||
internalName = string_replace_all(name, " ", "_") + string(irandom_range(10000, 99999));
|
||||
NODE_NAME_MAP[? internalName] = self;
|
||||
});
|
||||
|
||||
tooltip = "";
|
||||
x = _x;
|
||||
|
@ -715,6 +716,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
|||
cx *= aa;
|
||||
cy *= aa;
|
||||
corner *= aa;
|
||||
th = max(1, th);
|
||||
|
||||
switch(PREF_MAP[? "curve_connection_line"]) {
|
||||
case 0 :
|
||||
|
@ -1213,6 +1215,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
|||
_map[? "id"] = node_id;
|
||||
_map[? "render"] = renderActive;
|
||||
_map[? "name"] = display_name;
|
||||
_map[? "iname"] = internalName;
|
||||
_map[? "x"] = x;
|
||||
_map[? "y"] = y;
|
||||
_map[? "type"] = instanceof(self);
|
||||
|
@ -1266,6 +1269,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
|||
|
||||
if(ds_map_exists(load_map, "name"))
|
||||
setDisplayName(ds_map_try_get(load_map, "name", ""));
|
||||
|
||||
internalName = ds_map_try_get(load_map, "iname", internalName);
|
||||
_group = ds_map_try_get(load_map, "group", noone);
|
||||
if(_group == -1) _group = noone;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||
|
||||
inputs[| 1] = nodeValue("Algorithm", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Sobel", "Prewitt", "Laplacian"] );
|
||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Sobel", "Prewitt", "Laplacian", "Neighbor max diff"] );
|
||||
|
||||
inputs[| 2] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.")
|
||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]);
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
function Node_create_Export(_x, _y, _group = noone) {
|
||||
var path = "";
|
||||
if(!LOADING && !APPENDING && !CLONING) {
|
||||
path = get_save_filename(".png", "export");
|
||||
path = get_save_filename(@"Portable Network Graphics (.png)|*.png|
|
||||
Joint Photographic Experts Group (.jpg)|*.jpg|
|
||||
Graphics Interchange Format (.gif)|*.gif|
|
||||
Animated WebP (.webp)|*.webp",
|
||||
"export");
|
||||
|
||||
key_release();
|
||||
}
|
||||
|
||||
var node = new Node_Export(_x, _y, _group);
|
||||
node.inputs[| 1].setValue(path);
|
||||
node.extensionCheck();
|
||||
|
||||
//ds_list_add(PANEL_GRAPH.nodes_list, node);
|
||||
return node;
|
||||
|
@ -25,10 +31,13 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
playing = false;
|
||||
played = 0;
|
||||
|
||||
_format_still = ["Portable Network Graphics (.png)|*.png|Joint Photographic Experts Group (.jpg)|*.jpg", ""];
|
||||
_format_anim = ["Graphics Interchange Format (.gif)|*.gif|Animated WebP (.webp)|*.webp", ""];
|
||||
|
||||
inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||
|
||||
inputs[| 1] = nodeValue("Paths", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
||||
.setDisplay(VALUE_DISPLAY.path_save, ["*.png", ""])
|
||||
.setDisplay(VALUE_DISPLAY.path_save, _format_still)
|
||||
.setVisible(true);
|
||||
|
||||
inputs[| 2] = nodeValue("Template", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "%d%n")
|
||||
|
@ -97,11 +106,60 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
static onValueUpdate = function(_index) {
|
||||
var form = inputs[| 3].getValue();
|
||||
|
||||
if(_index == 3)
|
||||
if(_index == 3) {
|
||||
inputs[| 9].setValue(0);
|
||||
|
||||
switch(form) {
|
||||
case 0 :
|
||||
case 1 :
|
||||
inputs[| 1].display_data = _format_still;
|
||||
break;
|
||||
case 2 :
|
||||
inputs[| 1].display_data = _format_anim;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(_index == 3 && form == 1)
|
||||
inputs[| 2].setValue("%d%n%3f%i");
|
||||
|
||||
if(_index == 1) {
|
||||
var _path = inputs[| 1].getValue();
|
||||
var _ext = filename_ext(_path);
|
||||
|
||||
switch(_ext) {
|
||||
case ".png" : inputs[| 9].setValue(0); break;
|
||||
case ".jpg" : inputs[| 9].setValue(1); break;
|
||||
|
||||
case ".gif" : inputs[| 9].setValue(0); break;
|
||||
case ".webp" : inputs[| 9].setValue(1); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static extensionCheck = function() {
|
||||
var _path = inputs[| 1].getValue();
|
||||
var _ext = filename_ext(_path);
|
||||
|
||||
switch(_ext) {
|
||||
case ".png" :
|
||||
inputs[| 3].setValue(0);
|
||||
inputs[| 9].setValue(0);
|
||||
break;
|
||||
case ".jpg" :
|
||||
inputs[| 3].setValue(0);
|
||||
inputs[| 9].setValue(1);
|
||||
break;
|
||||
|
||||
case ".gif" :
|
||||
inputs[| 3].setValue(2);
|
||||
inputs[| 9].setValue(0);
|
||||
break;
|
||||
case ".webp" :
|
||||
inputs[| 3].setValue(2);
|
||||
inputs[| 9].setValue(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static renderWebp = function(temp_path, target_path) {
|
||||
|
@ -120,6 +178,8 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
}
|
||||
|
||||
var rate = inputs[| 8].getValue();
|
||||
if(rate == 0) rate = 1;
|
||||
|
||||
var framerate = round(1 / rate * 1000);
|
||||
|
||||
var cmd = "";
|
||||
|
@ -144,6 +204,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
var opti = inputs[| 6].getValue();
|
||||
var fuzz = inputs[| 7].getValue();
|
||||
var rate = inputs[| 8].getValue();
|
||||
if(rate == 0) rate = 1;
|
||||
|
||||
var framerate = 100 / rate;
|
||||
var loop_str = loop? 0 : 1;
|
||||
|
@ -484,4 +545,8 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
|
||||
//directory_destroy(directory);
|
||||
}
|
||||
|
||||
static doApplyDeserialize = function() {
|
||||
onValueUpdate(3);
|
||||
}
|
||||
}
|
|
@ -46,7 +46,7 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
|||
.setDisplay(VALUE_DISPLAY.padding)
|
||||
.rejectArray();
|
||||
|
||||
inputs[| 2] = nodeValue("Stretch frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false)
|
||||
inputs[| 2] = nodeValue("Stretch frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Stretch animation speed to match project length.")
|
||||
.rejectArray();
|
||||
|
||||
inputs[| 3] = nodeValue("Frame duration", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
|
||||
|
|
|
@ -227,8 +227,10 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
|
|||
return processValue(_val);
|
||||
}
|
||||
|
||||
static processValue = function(_val) {
|
||||
if(is_array(_val)) return _val;
|
||||
static processValue = function(_val) {
|
||||
if(is_array(_val)) return _val;
|
||||
if(is_struct(_val)) return _val;
|
||||
if(is_undefined(_val)) return 0;
|
||||
|
||||
if(prop.type == VALUE_TYPE.integer && prop.unit.mode == VALUE_UNIT.constant)
|
||||
return round(toNumber(_val));
|
||||
|
|
12
scripts/node_plot_linear/node_color_adjustment.yy
Normal file
12
scripts/node_plot_linear/node_color_adjustment.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "process",
|
||||
"path": "folders/nodes/data/process.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_color_adjustment",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
12
scripts/node_plot_linear/node_color_replacement.yy
Normal file
12
scripts/node_plot_linear/node_color_replacement.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "process",
|
||||
"path": "folders/nodes/data/process.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_color_replacement",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
12
scripts/node_plot_linear/node_glow.yy
Normal file
12
scripts/node_plot_linear/node_glow.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "process",
|
||||
"path": "folders/nodes/data/process.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_glow",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
12
scripts/node_plot_linear/node_outline.yy
Normal file
12
scripts/node_plot_linear/node_outline.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "process",
|
||||
"path": "folders/nodes/data/process.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_outline",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
198
scripts/node_plot_linear/node_plot_linear.gml
Normal file
198
scripts/node_plot_linear/node_plot_linear.gml
Normal file
|
@ -0,0 +1,198 @@
|
|||
function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||
name = "Bar / Graph";
|
||||
|
||||
inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2 )
|
||||
.setDisplay(VALUE_DISPLAY.vector);
|
||||
|
||||
inputs[| 1] = nodeValue("Data", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
|
||||
.setArrayDepth(1)
|
||||
.setVisible(true, true);
|
||||
|
||||
inputs[| 2] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ])
|
||||
.setDisplay(VALUE_DISPLAY.slider_range, [0, 1, 0.01]);
|
||||
|
||||
inputs[| 3] = nodeValue("Sample frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 8);
|
||||
|
||||
inputs[| 4] = nodeValue("Origin", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, def_surf_size / 2 ])
|
||||
.setDisplay(VALUE_DISPLAY.vector);
|
||||
|
||||
inputs[| 5] = nodeValue("Amplitude", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, def_surf_size / 2);
|
||||
|
||||
inputs[| 6] = nodeValue("Base Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
|
||||
|
||||
inputs[| 7] = nodeValue("Graph Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1);
|
||||
|
||||
inputs[| 8] = nodeValue("Use Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||
|
||||
inputs[| 9] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black);
|
||||
|
||||
inputs[| 10] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.rotation);
|
||||
|
||||
inputs[| 11] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Bar chart", "Graph" ]);
|
||||
|
||||
inputs[| 12] = nodeValue("Value Offset", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
|
||||
|
||||
inputs[| 13] = nodeValue("Color Over Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, new gradientObject(c_white))
|
||||
.setDisplay(VALUE_DISPLAY.gradient);
|
||||
|
||||
inputs[| 14] = nodeValue("Trim mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Range", "Window" ]);
|
||||
|
||||
inputs[| 15] = nodeValue("Window Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8)
|
||||
|
||||
inputs[| 16] = nodeValue("Window Offset", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
|
||||
inputs[| 17] = nodeValue("Data Point Spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
|
||||
|
||||
inputs[| 18] = nodeValue("Bar Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4)
|
||||
|
||||
inputs[| 19] = nodeValue("Rounded Bar", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false)
|
||||
|
||||
inputs[| 20] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
|
||||
.setVisible(true, true);
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 0,
|
||||
["Data", true], 1, 12, 14, 2, 3, 15, 16,
|
||||
["Chart", false], 11, 4, 10, 20, 5, 17,
|
||||
["Render", false], 6, 13, 7, 18, 19, 18, 19, 8, 9,
|
||||
];
|
||||
|
||||
attribute_surface_depth();
|
||||
|
||||
static step = function() {
|
||||
var _ubg = getSingleValue(8);
|
||||
var _typ = getSingleValue(11);
|
||||
var _trim_mode = getSingleValue(14);
|
||||
|
||||
var _use_path = getSingleValue(20) != noone;
|
||||
|
||||
inputs[| 2].setVisible(_trim_mode == 0);
|
||||
inputs[| 15].setVisible(_trim_mode == 1);
|
||||
inputs[| 16].setVisible(_trim_mode == 1);
|
||||
inputs[| 17].setVisible(_trim_mode == 1);
|
||||
|
||||
inputs[| 9].setVisible(_ubg);
|
||||
inputs[| 7].setVisible(_typ == 1);
|
||||
inputs[| 18].setVisible(_typ == 0);
|
||||
inputs[| 19].setVisible(_typ == 0);
|
||||
|
||||
inputs[| 4].setVisible(!_use_path);
|
||||
inputs[| 10].setVisible(!_use_path);
|
||||
}
|
||||
|
||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||
inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||
}
|
||||
|
||||
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||
var _dim = _data[0];
|
||||
var _dat = _data[1];
|
||||
var _ran = _data[2];
|
||||
var _sam = _data[3];
|
||||
var _ori = _data[4];
|
||||
var _amp = _data[5];
|
||||
var _lcl = _data[6];
|
||||
var _lth = _data[7];
|
||||
var _ubg = _data[8];
|
||||
var _bgc = _data[9];
|
||||
var _ang = _data[10];
|
||||
var _typ = _data[11];
|
||||
var _off = _data[12];
|
||||
var _grd = _data[13];
|
||||
|
||||
var _trim_mode = _data[14];
|
||||
var _win_size = _data[15];
|
||||
var _win_offs = _data[16];
|
||||
|
||||
var _pnt_spac = _data[17];
|
||||
|
||||
var _bar_wid = _data[18];
|
||||
var _bar_rnd = _data[19];
|
||||
|
||||
var _path = _data[20];
|
||||
|
||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
||||
|
||||
surface_set_target(_outSurf);
|
||||
if(_ubg) draw_clear(_bgc);
|
||||
else DRAW_CLEAR
|
||||
|
||||
var _len = array_length(_dat);
|
||||
var _st = clamp(_ran[0], 0, 1) * _len;
|
||||
var _ed = clamp(_ran[1], 0, 1) * _len;
|
||||
var ox, oy, nx, ny;
|
||||
|
||||
if(_typ == 1)
|
||||
draw_set_circle_precision(4);
|
||||
|
||||
var _dat_amo = array_length(_dat);
|
||||
var _smp_data = [];
|
||||
var _ind = 0;
|
||||
|
||||
if(_trim_mode == 0) {
|
||||
for( var i = _st; i < _ed; i += _sam )
|
||||
_smp_data[_ind++] = _dat[i];
|
||||
} else if(_trim_mode == 1) {
|
||||
for( var i = 0; i < _win_size; i++ ) {
|
||||
_ind = _win_offs + i * _sam;
|
||||
|
||||
if(_ind >= _dat_amo) break;
|
||||
if(frac(_ind) != 0 && floor(_ind) + 1 < _dat_amo)
|
||||
_smp_data[i] = lerp(_dat[floor(_ind)], _dat[floor(_ind) + 1], frac(_ind));
|
||||
else
|
||||
_smp_data[i] = _dat[_ind];
|
||||
}
|
||||
}
|
||||
|
||||
var amo = array_length(_smp_data);
|
||||
var _px, _py, _ang_nor, _val, _grd_col;
|
||||
var _pnt, _ppnt = undefined;
|
||||
|
||||
for( var i = 0; i < amo; i++ ) {
|
||||
if(_path == noone) {
|
||||
_px = _ori[0] + lengthdir_x(i * _pnt_spac, _ang);
|
||||
_py = _ori[1] + lengthdir_y(i * _pnt_spac, _ang);
|
||||
_ang_nor = _ang + 90;
|
||||
} else {
|
||||
_pnt = _path.getPointRatio(i / amo);
|
||||
if(_ppnt == undefined)
|
||||
_ppnt = _path.getPointRatio(i / amo - 0.001);
|
||||
|
||||
_px = _pnt.x;
|
||||
_py = _pnt.y;
|
||||
_ang_nor = point_direction(_ppnt.x, _ppnt.y, _pnt.x, _pnt.y) + 90;
|
||||
|
||||
_ppnt = _pnt;
|
||||
}
|
||||
|
||||
_val = _smp_data[i] + _off;
|
||||
|
||||
_grd_col = _grd.eval(i / amo);
|
||||
draw_set_color(colorMultiply(_lcl, _grd_col));
|
||||
|
||||
nx = _px + lengthdir_x(_amp * _val, _ang_nor);
|
||||
ny = _py + lengthdir_y(_amp * _val, _ang_nor);
|
||||
|
||||
switch(_typ) {
|
||||
case 0 :
|
||||
if(_bar_rnd) draw_line_round(_px, _py, nx, ny, _bar_wid);
|
||||
else draw_line_width(_px, _py, nx, ny, _bar_wid);
|
||||
break;
|
||||
case 1 :
|
||||
if(i > _st) draw_line_round(ox, oy, nx, ny, _lth);
|
||||
break;
|
||||
}
|
||||
|
||||
ox = nx;
|
||||
oy = ny;
|
||||
}
|
||||
|
||||
draw_set_circle_precision(64);
|
||||
surface_reset_target();
|
||||
return _outSurf;
|
||||
}
|
||||
}
|
11
scripts/node_plot_linear/node_plot_linear.yy
Normal file
11
scripts/node_plot_linear/node_plot_linear.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_plot_linear",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "generator",
|
||||
"path": "folders/nodes/data/generator.yy",
|
||||
},
|
||||
}
|
|
@ -229,6 +229,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
|
|||
addNodeObject(input, "JSON File Out", s_node_json_file_write, "Node_Json_File_Write", [1, Node_Json_File_Write],, "Save data to .json file.").setVersion(1090);
|
||||
addNodeObject(input, "ASE File In", s_node_ase_file, "Node_ASE_File_Read", [0, Node_create_ASE_File_Read],, "Load Aseprite file with support for layers, tags.").setVersion(1100);
|
||||
addNodeObject(input, "ASE Layer", s_node_ase_layer, "Node_ASE_layer", [1, Node_ASE_layer]).setVersion(1100);
|
||||
addNodeObject(input, "WAV File In", s_node_wav_file_read, "Node_WAV_File_Read", [0, Node_create_WAV_File_Read],, "Load wav audio file.").setVersion(1144);
|
||||
|
||||
var transform = ds_list_create();
|
||||
addNodeCatagory("Transform", transform);
|
||||
|
@ -393,6 +394,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
|
|||
ds_list_add(generator, "Others");
|
||||
addNodeObject(generator, "Separate Shape", s_node_sepearte_shape, "Node_Seperate_Shape", [1, Node_Seperate_Shape],, "Separate disconnected pixel each into an image in an image array.");
|
||||
addNodeObject(generator, "Flood Fill", s_node_flood_fill, "Node_Flood_Fill", [1, Node_Flood_Fill],, "Filled connected pixel given position and color.").setVersion(1133);
|
||||
addNodeObject(generator, "Bar / Graph", s_node_bar_graph, "Node_Plot_Linear", [1, Node_Plot_Linear], ["graph", "waveform", "bar chart"]).setVersion(1144);
|
||||
|
||||
var compose = ds_list_create();
|
||||
addNodeCatagory("Compose", compose);
|
||||
|
@ -434,6 +436,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
|
|||
addNodeObject(values, "Dot product", s_node_dot_product, "Node_Vector_Dot", [1, Node_Vector_Dot]).setVersion(1141);
|
||||
addNodeObject(values, "Cross product 3D", s_node_cross_product_2d, "Node_Vector_Cross_3D", [1, Node_Vector_Cross_3D]).setVersion(1141);
|
||||
addNodeObject(values, "Cross product 2D", s_node_cross_product_3d, "Node_Vector_Cross_2D", [1, Node_Vector_Cross_2D]).setVersion(1141);
|
||||
/**/ addNodeObject(values, "FFT", s_node_cross_product_3d, "Node_FFT", [1, Node_FFT]).setVersion(1144);
|
||||
|
||||
ds_list_add(values, "Texts");
|
||||
addNodeObject(values, "Text", s_node_text, "Node_String", [1, Node_String]);
|
||||
|
@ -461,6 +464,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
|
|||
addNodeObject(values, "Array Reverse", s_node_array_reverse, "Node_Array_Reverse", [1, Node_Array_Reverse], ["reverse array"]).setVersion(1120);
|
||||
addNodeObject(values, "Array Shift", s_node_array_shift, "Node_Array_Shift", [1, Node_Array_Shift]).setVersion(1137);
|
||||
addNodeObject(values, "Array Zip", s_node_array_zip, "Node_Array_Zip", [1, Node_Array_Zip]).setVersion(1138);
|
||||
/**/ addNodeObject(values, "Array Copy", s_node_array_zip, "Node_Array_Copy", [1, Node_Array_Copy]).setVersion(1444);
|
||||
addNodeObject(values, "Sort Number", s_node_array_sort, "Node_Array_Sort", [1, Node_Array_Sort], ["array sort"]).setVersion(1120);
|
||||
addNodeObject(values, "Shuffle Array", s_node_array_shuffle, "Node_Array_Shuffle", [1, Node_Array_Shuffle], ["array shuffle"]).setVersion(1120);
|
||||
addNodeObject(values, "Loop Array", s_node_loop_array, "Node_Iterate_Each", [1, Node_Iterate_Each], ["iterate each", "for each", "array loop"], "Create group that iterate to each member in an array.");
|
||||
|
|
|
@ -246,12 +246,8 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
|||
|
||||
if(grup == SPRITE_ANIM_GROUP.animation) {
|
||||
refreshSurface = false;
|
||||
if(!LOADING && !APPENDING) {
|
||||
ANIMATOR.setFrame(-1);
|
||||
ANIMATOR.is_playing = true;
|
||||
ANIMATOR.rendering = true;
|
||||
ANIMATOR.frame_progress = true;
|
||||
}
|
||||
if(!LOADING && !APPENDING)
|
||||
ANIMATOR.render();
|
||||
|
||||
outputs[| 1].setValue([]);
|
||||
return;
|
||||
|
|
|
@ -247,8 +247,11 @@ enum VALUE_UNIT {
|
|||
}
|
||||
|
||||
function isGraphable(prop) {
|
||||
if(prop.type == VALUE_TYPE.integer || prop.type == VALUE_TYPE.float)
|
||||
if(prop.type == VALUE_TYPE.integer || prop.type == VALUE_TYPE.float) {
|
||||
if(prop.display_type == VALUE_DISPLAY.puppet_control)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
if(prop.type == VALUE_TYPE.color && prop.display_type == VALUE_DISPLAY._default)
|
||||
return true;
|
||||
|
||||
|
@ -408,7 +411,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
extract_node = "";
|
||||
|
||||
is_changed = true;
|
||||
cache_value = [ false, undefined ];
|
||||
cache_value = [ false, false, undefined ];
|
||||
cache_array = [ false, false ];
|
||||
|
||||
expUse = false;
|
||||
|
@ -433,6 +436,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
return self;
|
||||
}
|
||||
|
||||
static resetValue = function() { setValue(def_val); }
|
||||
|
||||
static setUnitRef = function(ref, mode = VALUE_UNIT.constant) {
|
||||
unit.reference = ref;
|
||||
unit.mode = mode;
|
||||
|
@ -984,19 +989,23 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
return value;
|
||||
}
|
||||
|
||||
static getValue = function(_time = ANIMATOR.current_frame, applyUnit = true, arrIndex = 0) {
|
||||
//var cache_hit = cache_value[0];
|
||||
//cache_hit &= cache_value[1] == _time;
|
||||
//cache_hit &= cache_value[2] != undefined;
|
||||
//cache_hit &= connect_type == JUNCTION_CONNECT.input;
|
||||
//cache_hit &= unit.reference != VALUE_UNIT.reference;
|
||||
//if(cache_hit) return cache_value[2];
|
||||
static getValue = function(_time = ANIMATOR.current_frame, applyUnit = true, arrIndex = 0, useCache = true) {
|
||||
if(useCache) {
|
||||
var cache_hit = cache_value[0];
|
||||
cache_hit &= cache_value[1] == _time;
|
||||
cache_hit &= cache_value[2] != undefined;
|
||||
cache_hit &= connect_type == JUNCTION_CONNECT.input;
|
||||
cache_hit &= unit.reference == VALUE_UNIT.constant;
|
||||
if(cache_hit) return cache_value[2];
|
||||
}
|
||||
|
||||
var val = _getValue(_time, applyUnit, arrIndex);
|
||||
|
||||
//is_changed = !isEqual(cache_value[1], val);
|
||||
//cache_value[0] = true;
|
||||
//cache_value[1] = val;
|
||||
if(useCache) {
|
||||
is_changed = !isEqual(cache_value[1], val);
|
||||
cache_value[0] = true;
|
||||
cache_value[1] = val;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
@ -1106,7 +1115,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
var val = getValue(, false);
|
||||
if(isArray()) {
|
||||
if(array_length(val) == 0) return 0;
|
||||
return val[safe_mod(node.preview_index, array_length(val))];
|
||||
var v = val[safe_mod(node.preview_index, array_length(val))];
|
||||
if(array_length(v) >= 100) return $"[{array_length(v)}]";
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
@ -1630,6 +1640,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
if(ds_map_exists(_map, "data"))
|
||||
ds_list_copy(extra_data, _map[? "data"]);
|
||||
|
||||
if(APPENDING) def_val = getValue(0);
|
||||
|
||||
onValidate();
|
||||
}
|
||||
|
||||
|
|
114
scripts/node_wav_file_read/node_wav_file_read.gml
Normal file
114
scripts/node_wav_file_read/node_wav_file_read.gml
Normal file
|
@ -0,0 +1,114 @@
|
|||
function Node_create_WAV_File_Read(_x, _y, _group = noone) {
|
||||
var path = "";
|
||||
if(!LOADING && !APPENDING && !CLONING) {
|
||||
path = get_open_filename(".wav", "");
|
||||
key_release();
|
||||
if(path == "") return noone;
|
||||
}
|
||||
|
||||
var node = new Node_WAV_File_Read(_x, _y, _group);
|
||||
node.inputs[| 0].setValue(path);
|
||||
node.doUpdate();
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
function Node_create_WAV_File_Read_path(_x, _y, path) {
|
||||
if(!file_exists(path)) return noone;
|
||||
|
||||
var node = new Node_WAV_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext());
|
||||
node.inputs[| 0].setValue(path);
|
||||
node.doUpdate();
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||
name = "WAV File In";
|
||||
color = COLORS.node_blend_input;
|
||||
previewable = false;
|
||||
|
||||
w = 128;
|
||||
|
||||
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
||||
.setDisplay(VALUE_DISPLAY.path_load, ["*.wav", ""])
|
||||
.rejectArray();
|
||||
|
||||
outputs[| 0] = nodeValue("Data", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [])
|
||||
.setArrayDepth(1);
|
||||
|
||||
outputs[| 1] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "");
|
||||
|
||||
outputs[| 2] = nodeValue("Sample rate", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 44100)
|
||||
.setVisible(false);
|
||||
|
||||
outputs[| 3] = nodeValue("Channels", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 2)
|
||||
.setVisible(false);
|
||||
|
||||
outputs[| 4] = nodeValue("Duration (s)", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0)
|
||||
.setVisible(false);
|
||||
|
||||
content = {};
|
||||
path_current = "";
|
||||
|
||||
first_update = false;
|
||||
|
||||
output_display_list = [ 0, 2, 3, 4, 1 ];
|
||||
|
||||
on_dragdrop_file = function(path) {
|
||||
if(updatePaths(path)) {
|
||||
doUpdate();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function updatePaths(path) {
|
||||
path = try_get_path(path);
|
||||
if(path == -1) return false;
|
||||
|
||||
var ext = string_lower(filename_ext(path));
|
||||
var _name = string_replace(filename_name(path), filename_ext(path), "");
|
||||
|
||||
if(ext != ".wav") return false;
|
||||
|
||||
outputs[| 1].setValue(path);
|
||||
|
||||
content = file_read_wav(path);
|
||||
outputs[| 0].setValue(content.sound);
|
||||
outputs[| 2].setValue(content.sample);
|
||||
outputs[| 3].setValue(content.channels);
|
||||
outputs[| 4].setValue(content.duration);
|
||||
|
||||
if(path_current == "")
|
||||
first_update = true;
|
||||
path_current = path;
|
||||
return true;
|
||||
}
|
||||
|
||||
insp1UpdateTooltip = get_text("panel_inspector_refresh", "Refresh");
|
||||
insp1UpdateIcon = [ THEME.refresh, 1, COLORS._main_value_positive ];
|
||||
|
||||
static onInspector1Update = function() {
|
||||
var path = inputs[| 0].getValue();
|
||||
if(path == "") return;
|
||||
updatePaths(path);
|
||||
update();
|
||||
}
|
||||
|
||||
static update = function(frame = ANIMATOR.current_frame) {
|
||||
var path = inputs[| 0].getValue();
|
||||
if(path == "") return;
|
||||
if(path_current != path) updatePaths(path);
|
||||
}
|
||||
|
||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||
var bbox = drawGetBbox(xx, yy, _s);
|
||||
|
||||
var str = filename_name(path_current);
|
||||
draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text);
|
||||
var ss = string_scale(str, bbox.w, bbox.h);
|
||||
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||
}
|
||||
}
|
11
scripts/node_wav_file_read/node_wav_file_read.yy
Normal file
11
scripts/node_wav_file_read/node_wav_file_read.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_wav_file_read",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "IO",
|
||||
"path": "folders/nodes/data/IO.yy",
|
||||
},
|
||||
}
|
|
@ -452,8 +452,14 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
|
||||
surface_set_shader(_outSurf);
|
||||
shader_set_interpolation(_outSurf);
|
||||
for(var i = 0; i < array_length(data.tris); i++)
|
||||
data.tris[i].drawSurface(_inSurf);
|
||||
|
||||
if(array_length(data.tris) == 0) {
|
||||
draw_surface_safe(_inSurf);
|
||||
} else {
|
||||
for(var i = 0; i < array_length(data.tris); i++)
|
||||
data.tris[i].drawSurface(_inSurf);
|
||||
}
|
||||
|
||||
surface_reset_shader();
|
||||
|
||||
return _outSurf;
|
||||
|
|
|
@ -81,8 +81,8 @@ function Panel_Addon() : PanelContent() constructor {
|
|||
|
||||
var chx0 = ui(6);
|
||||
var chy0 = by + ui(6);
|
||||
var chx1 = chx0 + ui(20);
|
||||
var chy1 = chy0 + ui(20);
|
||||
var chx1 = chx0 + ui(28);
|
||||
var chy1 = chy0 + ui(28);
|
||||
var _onStart = array_exists(ADDONS_ON_START, _addon.name);
|
||||
|
||||
if(pHOVER && point_in_rectangle(_m[0], _m[1], chx0, chy0, chx1, chy1)) {
|
||||
|
|
|
@ -86,16 +86,13 @@ function Panel_Animation() : PanelContent() constructor {
|
|||
[ function() { return get_text("stop", "Stop"); },
|
||||
function() { return 4; },
|
||||
function() { return ANIMATOR.is_playing? COLORS._main_accent : COLORS._main_icon; },
|
||||
function() {
|
||||
ANIMATOR.is_playing = false;
|
||||
ANIMATOR.setFrame(0);
|
||||
} ],
|
||||
function() { ANIMATOR.stop(); } ],
|
||||
[ function() { return ANIMATOR.is_playing? get_text("pause", "Pause") : get_text("play", "Play"); },
|
||||
function() { return !ANIMATOR.is_playing; },
|
||||
function() { return ANIMATOR.is_playing? COLORS._main_accent : COLORS._main_icon; },
|
||||
function() {
|
||||
ANIMATOR.is_playing = !ANIMATOR.is_playing;
|
||||
ANIMATOR.frame_progress = true;
|
||||
function() {
|
||||
if(ANIMATOR.is_playing) ANIMATOR.pause();
|
||||
else ANIMATOR.resume();
|
||||
} ],
|
||||
[ function() { return get_text("panel_animation_go_to_first_frame", "Go to first frame"); },
|
||||
function() { return 3; },
|
||||
|
|
|
@ -464,7 +464,7 @@ function Panel_Inspector() : PanelContent() constructor {
|
|||
if(i < amoIn) {
|
||||
array_push(_menuItem,
|
||||
menuItem(get_text("panel_inspector_reset", "Reset value"), function() {
|
||||
__dialog_junction.setValue(__dialog_junction.def_val);
|
||||
__dialog_junction.resetValue();
|
||||
}),
|
||||
menuItem(jun.is_anim? get_text("panel_inspector_remove", "Remove animation") : get_text("panel_inspector_add", "Add animation"), function() {
|
||||
__dialog_junction.setAnim(!__dialog_junction.is_anim);
|
||||
|
|
|
@ -469,6 +469,7 @@ function Panel_Menu() : PanelContent() constructor {
|
|||
var ww = hori? string_width(name) + ui(40) : w - ui(16);
|
||||
|
||||
if(pHOVER && point_in_rectangle(mx, my, nx0, ny0 - wh / 2, nx0 + ww, ny0 + wh / 2)) {
|
||||
TOOLTIP = get_text("addons", "Addons");
|
||||
draw_sprite_stretched(THEME.menu_button, 1, nx0, ny0 - wh / 2, ww, wh);
|
||||
if(mouse_press(mb_left, pFOCUS))
|
||||
dialogPanelCall(new Panel_Addon());
|
||||
|
|
|
@ -52,6 +52,13 @@ function save_serialize() {
|
|||
if(!is_surface(prev)) _map[? "preview"] = "";
|
||||
else _map[? "preview"] = surface_encode(surface_size_lim(prev, 128, 128));
|
||||
|
||||
var _addon = ds_map_create();
|
||||
with(_addon_custom) {
|
||||
var _ser = lua_call(thread, "serialize");
|
||||
_addon[? name] = PREF_MAP[? "save_file_minify"]? json_stringify_minify(_ser) : json_stringify(_ser);
|
||||
}
|
||||
ds_map_add_map(_map, "addon", _addon);
|
||||
|
||||
var val = PREF_MAP[? "save_file_minify"]? json_encode_minify(_map) : json_encode(_map, true);
|
||||
ds_map_destroy(_map);
|
||||
return val;
|
||||
|
|
81
scripts/wav_file_read/wav_file_read.gml
Normal file
81
scripts/wav_file_read/wav_file_read.gml
Normal file
|
@ -0,0 +1,81 @@
|
|||
function file_read_ASCII(file, amo = 1) {
|
||||
var b = "";
|
||||
repeat(amo)
|
||||
b += chr(file_bin_read_byte(file));
|
||||
return b;
|
||||
}
|
||||
|
||||
function file_read_bytes(file, amo = 1, signed = false, little_endian = true) {
|
||||
var b = 0;
|
||||
var m = little_endian? 1 : 1 << ((amo - 1) * 8);
|
||||
repeat(amo) {
|
||||
b += file_bin_read_byte(file) * m;
|
||||
m = little_endian? m * 256 : m / 256;
|
||||
}
|
||||
|
||||
if(signed) {
|
||||
var mv = 1 << (amo * 8 - 1) - 1;
|
||||
if(b > mv)
|
||||
b -= (1 << (amo * 8));
|
||||
}
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
global.DEBUG_FLAG.wav_import = true;
|
||||
|
||||
function file_read_wav(path) {
|
||||
var f = file_bin_open(path, 0);
|
||||
|
||||
//RIFF
|
||||
printIf(global.DEBUG_FLAG.wav_import, "-- RIFF --")
|
||||
var b = file_read_ASCII(f, 4); printIf(global.DEBUG_FLAG.wav_import, b);
|
||||
var l = file_read_bytes(f, 4); printIf(global.DEBUG_FLAG.wav_import, $"Packages: {l}");
|
||||
var w = file_read_ASCII(f, 4); printIf(global.DEBUG_FLAG.wav_import, w);
|
||||
|
||||
//FORMAT
|
||||
printIf(global.DEBUG_FLAG.wav_import, "-- FORMAT --")
|
||||
var b = file_read_ASCII(f, 4); printIf(global.DEBUG_FLAG.wav_import, b);
|
||||
var l = file_read_bytes(f, 4); printIf(global.DEBUG_FLAG.wav_import, $"Length: {l}");
|
||||
var l = file_read_bytes(f, 2); printIf(global.DEBUG_FLAG.wav_import, $"0x01: {l}");
|
||||
var ch = file_read_bytes(f, 2); printIf(global.DEBUG_FLAG.wav_import, $"Channels: {ch}");
|
||||
var sm = file_read_bytes(f, 4); printIf(global.DEBUG_FLAG.wav_import, $"Sample: {sm}");
|
||||
var l = file_read_bytes(f, 4); printIf(global.DEBUG_FLAG.wav_import, $"BPS: {l}");
|
||||
var br = file_read_bytes(f, 2); printIf(global.DEBUG_FLAG.wav_import, $"Bitrate: {br}");
|
||||
var l = file_read_bytes(f, 2); printIf(global.DEBUG_FLAG.wav_import, $"Bit/Sam: {l}");
|
||||
|
||||
//DATA
|
||||
printIf(global.DEBUG_FLAG.wav_import, "-- DATA --")
|
||||
var b = file_read_ASCII(f, 4); printIf(global.DEBUG_FLAG.wav_import, b);
|
||||
var l = file_read_bytes(f, 4); printIf(global.DEBUG_FLAG.wav_import, $"Length: {l}");
|
||||
|
||||
var bpc = br / ch;
|
||||
var bits = l / br;
|
||||
var data = array_create(ch);
|
||||
var lim = 1 << (8 * bpc - 2);
|
||||
|
||||
printIf(global.DEBUG_FLAG.wav_import, "-- READ --")
|
||||
printIf(global.DEBUG_FLAG.wav_import, $"Channels: {ch}");
|
||||
printIf(global.DEBUG_FLAG.wav_import, $"BPC: {bpc * 8}");
|
||||
printIf(global.DEBUG_FLAG.wav_import, $"bits: {bits}");
|
||||
printIf(global.DEBUG_FLAG.wav_import, $"lim: {lim}");
|
||||
printIf(global.DEBUG_FLAG.wav_import, $"duration: {bits / sm}");
|
||||
|
||||
var _mn = 0, _mx = 0;
|
||||
for( var i = 0; i < bits; i++ )
|
||||
for( var j = 0; j < ch; j++ ) {
|
||||
data[j][i] = file_read_bytes(f, bpc, true) / lim;
|
||||
_mn = min(_mn, data[j][i]);
|
||||
_mx = max(_mx, data[j][i]);
|
||||
}
|
||||
|
||||
file_bin_close(f);
|
||||
|
||||
return {
|
||||
sound: data,
|
||||
sample: sm,
|
||||
channels: ch,
|
||||
bit_depth: bpc * 8,
|
||||
duration: bits / sm,
|
||||
};
|
||||
}
|
11
scripts/wav_file_read/wav_file_read.yy
Normal file
11
scripts/wav_file_read/wav_file_read.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "wav_file_read",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "audio",
|
||||
"path": "folders/functions/audio.yy",
|
||||
},
|
||||
}
|
|
@ -3,8 +3,8 @@
|
|||
"resourceVersion": "1.0",
|
||||
"name": "sh_2d_light",
|
||||
"parent": {
|
||||
"name": "blend",
|
||||
"path": "folders/shader/blend.yy",
|
||||
"name": "generator",
|
||||
"path": "folders/shader/generator.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
|
@ -34,7 +34,10 @@ void main() {
|
|||
|
||||
float lum = dot(_col1.rgb, vec3(0.2126, 0.7152, 0.0722));
|
||||
vec4 blend = lum > 0.5? (vec4(1.) - (vec4(1.) - _col0) * (vec4(1.) - _col1) * 2.) : (_col0 * _col1 * 2.);
|
||||
vec4 res = mix(_col0, blend, opacity);
|
||||
|
||||
float po = preserveAlpha == 1? _col1.a : opacity;
|
||||
vec4 res = mix(_col0, blend, po);
|
||||
|
||||
if(preserveAlpha == 1) res.a = _col0.a;
|
||||
|
||||
gl_FragColor = res;
|
||||
|
|
|
@ -32,7 +32,11 @@ void main() {
|
|||
vec4 _col1 = texture2D( fore, fore_tex );
|
||||
_col1.a *= opacity * sampleMask();
|
||||
|
||||
vec4 res = (_col0 * (1. - opacity)) + (_col0 * _col1 * opacity);
|
||||
vec4 blend = (_col0 * (1. - opacity)) + (_col0 * _col1 * opacity);
|
||||
|
||||
float po = preserveAlpha == 1? _col1.a : opacity;
|
||||
vec4 res = mix(_col0, blend, po);
|
||||
|
||||
if(preserveAlpha == 1) res.a = _col0.a;
|
||||
|
||||
gl_FragColor = res;
|
||||
|
|
|
@ -34,7 +34,10 @@ void main() {
|
|||
|
||||
float lum = dot(_col1.rgb, vec3(0.2126, 0.7152, 0.0722));
|
||||
vec4 blend = lum > 0.5? (1. - (1. - 2. * (_col1 - 0.5)) * (1. - _col0)) : ((2. * _col1) * _col0);
|
||||
vec4 res = mix(_col0, blend, opacity);
|
||||
|
||||
float po = preserveAlpha == 1? _col1.a : opacity;
|
||||
vec4 res = mix(_col0, blend, po);
|
||||
|
||||
if(preserveAlpha == 1) res.a = _col0.a;
|
||||
|
||||
gl_FragColor = res;
|
||||
|
|
|
@ -36,7 +36,11 @@ void main() {
|
|||
_col1.a *= o;
|
||||
_col1.rgb *= _col1.a;
|
||||
|
||||
vec4 res = vec4(1.) - (vec4(1.) - _col0) * (vec4(1.) - _col1);
|
||||
vec4 blend = vec4(1.) - (vec4(1.) - _col0) * (vec4(1.) - _col1);
|
||||
|
||||
float po = preserveAlpha == 1? _col1.a : opacity;
|
||||
vec4 res = mix(_col0, blend, po);
|
||||
|
||||
if(preserveAlpha == 1) res.a = _col0.a;
|
||||
|
||||
gl_FragColor = res;
|
||||
|
|
|
@ -34,7 +34,11 @@ void main() {
|
|||
_col1.a *= opacity * sampleMask();
|
||||
_col1.rgb *= _col1.a;
|
||||
|
||||
vec4 res = _col0 - _col1;
|
||||
vec4 blend = _col0 - _col1;
|
||||
|
||||
float po = preserveAlpha == 1? _col1.a : opacity;
|
||||
vec4 res = mix(_col0, blend, po);
|
||||
|
||||
if(preserveAlpha == 1) res.a = _col0.a;
|
||||
|
||||
gl_FragColor = res;
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
"resourceVersion": "1.0",
|
||||
"name": "sh_draw_normal",
|
||||
"parent": {
|
||||
"name": "blend",
|
||||
"path": "folders/shader/blend.yy",
|
||||
"name": "draw",
|
||||
"path": "folders/shader/draw.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
|
@ -33,6 +33,38 @@ const mat3 prewit = mat3( -1., -1., -1.,
|
|||
const mat3 laplac = mat3( 1., 1., 1.,
|
||||
1., -8., 1.,
|
||||
1., 1., 1);
|
||||
|
||||
const mat3 laplac_r0 = mat3( 0., 1., 0.,
|
||||
0., -1., 0.,
|
||||
0., 0., 0);
|
||||
|
||||
const mat3 laplac_r1 = mat3( 0., 0., 0.,
|
||||
0., -1., 1.,
|
||||
0., 0., 0);
|
||||
|
||||
const mat3 laplac_r2 = mat3( 0., 0., 0.,
|
||||
0., -1., 0.,
|
||||
0., 1., 0);
|
||||
|
||||
const mat3 laplac_r3 = mat3( 0., 0., 0.,
|
||||
1., -1., 0.,
|
||||
0., 0., 0);
|
||||
|
||||
const mat3 laplac_r4 = mat3( 1., 0., 0.,
|
||||
0., -1., 0.,
|
||||
0., 0., 0);
|
||||
|
||||
const mat3 laplac_r5 = mat3( 0., 0., 1.,
|
||||
0., -1., 0.,
|
||||
0., 0., 0);
|
||||
|
||||
const mat3 laplac_r6 = mat3( 0., 0., 0.,
|
||||
0., -1., 0.,
|
||||
0., 0., 1);
|
||||
|
||||
const mat3 laplac_r7 = mat3( 0., 0., 0.,
|
||||
0., -1., 0.,
|
||||
1., 0., 0);
|
||||
|
||||
#define TAU 6.283185307179586
|
||||
|
||||
|
@ -46,7 +78,48 @@ void main() {
|
|||
vec4 hColor = vec4(0.);
|
||||
vec4 vColor = vec4(0.);
|
||||
|
||||
for(float i = -1.; i <= 1.; i++) {
|
||||
if(filter == 3) {
|
||||
vec4 hColor0 = vec4(0.);
|
||||
vec4 hColor1 = vec4(0.);
|
||||
vec4 hColor2 = vec4(0.);
|
||||
vec4 hColor3 = vec4(0.);
|
||||
vec4 hColor4 = vec4(0.);
|
||||
vec4 hColor5 = vec4(0.);
|
||||
vec4 hColor6 = vec4(0.);
|
||||
vec4 hColor7 = vec4(0.);
|
||||
|
||||
for(float i = -1.; i <= 1.; i++)
|
||||
for(float j = -1.; j <= 1.; j++) {
|
||||
vec2 pxs = v_vTexcoord + vec2(texel.x * i, texel.y * j);
|
||||
pxs = clamp(pxs, vec2(0.), vec2(1.));
|
||||
|
||||
int ii = int(1. + i);
|
||||
int jj = int(1. + j);
|
||||
vec4 sam = sampleTexture( pxs );
|
||||
|
||||
hColor0 += sam * laplac_r0[jj][ii];
|
||||
//hColor1 += sam * laplac_r1[jj][ii];
|
||||
//hColor2 += sam * laplac_r2[jj][ii];
|
||||
hColor3 += sam * laplac_r3[jj][ii];
|
||||
hColor4 += sam * laplac_r4[jj][ii];
|
||||
//hColor5 += sam * laplac_r5[jj][ii];
|
||||
//hColor6 += sam * laplac_r6[jj][ii];
|
||||
//hColor7 += sam * laplac_r7[jj][ii];
|
||||
}
|
||||
|
||||
hColor0 = abs(hColor0);
|
||||
hColor1 = abs(hColor1);
|
||||
hColor2 = abs(hColor2);
|
||||
hColor3 = abs(hColor3);
|
||||
hColor4 = abs(hColor4);
|
||||
hColor5 = abs(hColor5);
|
||||
hColor6 = abs(hColor6);
|
||||
hColor7 = abs(hColor7);
|
||||
|
||||
hColor = max(max(max(hColor0, hColor1), max(hColor2, hColor3)),
|
||||
max(max(hColor4, hColor5), max(hColor6, hColor7)));
|
||||
} else {
|
||||
for(float i = -1.; i <= 1.; i++)
|
||||
for(float j = -1.; j <= 1.; j++) {
|
||||
vec2 pxs = v_vTexcoord + vec2(texel.x * i, texel.y * j);
|
||||
pxs = clamp(pxs, vec2(0.), vec2(1.));
|
||||
|
@ -66,8 +139,12 @@ void main() {
|
|||
}
|
||||
}
|
||||
|
||||
if(filter == 2)
|
||||
gl_FragColor = vec4(vec3(hColor), point.a);
|
||||
else
|
||||
gl_FragColor = vec4(vec3(distance(hColor, vColor)), point.a);
|
||||
if(filter == 0)
|
||||
gl_FragColor = vec4(vec3(distance(hColor / 4., vColor / 4.)), point.a);
|
||||
else if(filter == 1)
|
||||
gl_FragColor = vec4(vec3(distance(hColor / 3., vColor / 3.)), point.a);
|
||||
else if(filter == 2)
|
||||
gl_FragColor = vec4(hColor.rgb / 2., point.a);
|
||||
else if(filter == 3)
|
||||
gl_FragColor = vec4(abs(hColor.rgb), point.a);
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
74
sprites/s_node_bar_graph/s_node_bar_graph.yy
Normal file
74
sprites/s_node_bar_graph/s_node_bar_graph.yy
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"resourceType": "GMSprite",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "s_node_bar_graph",
|
||||
"bbox_bottom": 61,
|
||||
"bbox_left": 2,
|
||||
"bbox_right": 61,
|
||||
"bbox_top": 2,
|
||||
"bboxMode": 0,
|
||||
"collisionKind": 1,
|
||||
"collisionTolerance": 0,
|
||||
"DynamicTexturePage": false,
|
||||
"edgeFiltering": false,
|
||||
"For3D": false,
|
||||
"frames": [
|
||||
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"8d4ff1e4-2b3e-4941-9f87-09e35ceed7f6",},
|
||||
],
|
||||
"gridX": 0,
|
||||
"gridY": 0,
|
||||
"height": 64,
|
||||
"HTile": false,
|
||||
"layers": [
|
||||
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"a3681f87-66f0-4432-8aae-43e9607a30ee","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||
],
|
||||
"nineSlice": null,
|
||||
"origin": 4,
|
||||
"parent": {
|
||||
"name": "generator",
|
||||
"path": "folders/nodes/icons/generator.yy",
|
||||
},
|
||||
"preMultiplyAlpha": false,
|
||||
"sequence": {
|
||||
"resourceType": "GMSequence",
|
||||
"resourceVersion": "1.4",
|
||||
"name": "s_node_bar_graph",
|
||||
"autoRecord": true,
|
||||
"backdropHeight": 768,
|
||||
"backdropImageOpacity": 0.5,
|
||||
"backdropImagePath": "",
|
||||
"backdropWidth": 1366,
|
||||
"backdropXOffset": 0.0,
|
||||
"backdropYOffset": 0.0,
|
||||
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"eventStubScript": null,
|
||||
"eventToFunction": {},
|
||||
"length": 1.0,
|
||||
"lockOrigin": false,
|
||||
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"playback": 1,
|
||||
"playbackSpeed": 30.0,
|
||||
"playbackSpeedType": 0,
|
||||
"showBackdrop": true,
|
||||
"showBackdropImage": false,
|
||||
"timeUnits": 1,
|
||||
"tracks": [
|
||||
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
|
||||
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"8d4ff1e4-2b3e-4941-9f87-09e35ceed7f6","path":"sprites/s_node_bar_graph/s_node_bar_graph.yy",},},},"Disabled":false,"id":"0710ab5f-30d8-4b14-bf95-d97bd8a35d92","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
|
||||
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange": null,
|
||||
"volume": 1.0,
|
||||
"xorigin": 32,
|
||||
"yorigin": 32,
|
||||
},
|
||||
"swatchColours": null,
|
||||
"swfPrecision": 2.525,
|
||||
"textureGroupId": {
|
||||
"name": "Default",
|
||||
"path": "texturegroups/Default",
|
||||
},
|
||||
"type": 0,
|
||||
"VTile": false,
|
||||
"width": 64,
|
||||
}
|
|
@ -57,7 +57,7 @@
|
|||
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"f9d466c6-71fe-41c4-ab65-565b2296855b","path":"sprites/s_node_image_animation/s_node_image_animation.yy",},},},"Disabled":false,"id":"a4a431d9-2d90-4de5-b413-a9897dbdeeaa","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
|
||||
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange": {"x":0.0,"y":0.0,},
|
||||
"visibleRange": null,
|
||||
"volume": 1.0,
|
||||
"xorigin": 32,
|
||||
"yorigin": 32,
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
74
sprites/s_node_wav_file_read/s_node_wav_file_read.yy
Normal file
74
sprites/s_node_wav_file_read/s_node_wav_file_read.yy
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"resourceType": "GMSprite",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "s_node_wav_file_read",
|
||||
"bbox_bottom": 62,
|
||||
"bbox_left": 0,
|
||||
"bbox_right": 62,
|
||||
"bbox_top": 0,
|
||||
"bboxMode": 0,
|
||||
"collisionKind": 1,
|
||||
"collisionTolerance": 0,
|
||||
"DynamicTexturePage": false,
|
||||
"edgeFiltering": false,
|
||||
"For3D": false,
|
||||
"frames": [
|
||||
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"ed7117f7-7897-476a-acf0-d7b1d10f562f",},
|
||||
],
|
||||
"gridX": 0,
|
||||
"gridY": 0,
|
||||
"height": 64,
|
||||
"HTile": false,
|
||||
"layers": [
|
||||
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"d0ffea8e-e51f-4415-b383-c42802705804","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||
],
|
||||
"nineSlice": null,
|
||||
"origin": 4,
|
||||
"parent": {
|
||||
"name": "input",
|
||||
"path": "folders/nodes/icons/input.yy",
|
||||
},
|
||||
"preMultiplyAlpha": false,
|
||||
"sequence": {
|
||||
"resourceType": "GMSequence",
|
||||
"resourceVersion": "1.4",
|
||||
"name": "s_node_wav_file_read",
|
||||
"autoRecord": true,
|
||||
"backdropHeight": 768,
|
||||
"backdropImageOpacity": 0.5,
|
||||
"backdropImagePath": "",
|
||||
"backdropWidth": 1366,
|
||||
"backdropXOffset": 0.0,
|
||||
"backdropYOffset": 0.0,
|
||||
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"eventStubScript": null,
|
||||
"eventToFunction": {},
|
||||
"length": 1.0,
|
||||
"lockOrigin": false,
|
||||
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"playback": 1,
|
||||
"playbackSpeed": 30.0,
|
||||
"playbackSpeedType": 0,
|
||||
"showBackdrop": true,
|
||||
"showBackdropImage": false,
|
||||
"timeUnits": 1,
|
||||
"tracks": [
|
||||
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
|
||||
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"ed7117f7-7897-476a-acf0-d7b1d10f562f","path":"sprites/s_node_wav_file_read/s_node_wav_file_read.yy",},},},"Disabled":false,"id":"97d549db-4e6f-4505-b6dd-aacd000eaa4c","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
|
||||
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange": null,
|
||||
"volume": 1.0,
|
||||
"xorigin": 32,
|
||||
"yorigin": 32,
|
||||
},
|
||||
"swatchColours": null,
|
||||
"swfPrecision": 2.525,
|
||||
"textureGroupId": {
|
||||
"name": "Default",
|
||||
"path": "texturegroups/Default",
|
||||
},
|
||||
"type": 0,
|
||||
"VTile": false,
|
||||
"width": 64,
|
||||
}
|
Loading…
Add table
Reference in a new issue