diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index 17e8981cc..1b3129e2a 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -150,6 +150,7 @@ {"name":"blend","order":18,"path":"folders/shader/blend.yy",}, {"name":"blur","order":38,"path":"folders/shader/blur.yy",}, {"name":"channels","order":42,"path":"folders/shader/channels.yy",}, + {"name":"color picker","order":56,"path":"folders/shader/color picker.yy",}, {"name":"color selector","order":51,"path":"folders/shader/color selector.yy",}, {"name":"draw","order":39,"path":"folders/shader/draw.yy",}, {"name":"filter","order":30,"path":"folders/shader/filter.yy",}, @@ -179,7 +180,6 @@ {"name":"biterator","order":2,"path":"folders/VCT/biterator.yy",}, {"name":"widget","order":3,"path":"folders/VCT/widget.yy",}, {"name":"widgets","order":5,"path":"folders/widgets.yy",}, - {"name":"color picker","order":56,"path":"folders/shader/color picker.yy",}, ], "ResourceOrderSettings": [ {"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",}, @@ -217,6 +217,7 @@ {"name":"s_node_frame","order":1,"path":"sprites/s_node_frame/s_node_frame.yy",}, {"name":"s_node_fluidSim_turbulence","order":10,"path":"sprites/s_node_fluidSim_turbulence/s_node_fluidSim_turbulence.yy",}, {"name":"node_pb_fx_hash","order":7,"path":"scripts/node_pb_fx_hash/node_pb_fx_hash.yy",}, + {"name":"sh_pb_draw_mask","order":8,"path":"shaders/sh_pb_draw_mask/sh_pb_draw_mask.yy",}, {"name":"node_blur_radial","order":7,"path":"scripts/node_blur_radial/node_blur_radial.yy",}, {"name":"node_2d_light","order":1,"path":"scripts/node_2d_light/node_2d_light.yy",}, {"name":"node_rigid_activation","order":7,"path":"scripts/node_rigid_activation/node_rigid_activation.yy",}, @@ -337,6 +338,7 @@ {"name":"node_noise_grid_tri","order":6,"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":2,"path":"shaders/sh_cell_noise_edge/sh_cell_noise_edge.yy",}, + {"name":"node_pb_fx_strip","order":11,"path":"scripts/node_pb_fx_strip/node_pb_fx_strip.yy",}, {"name":"node_stripe","order":4,"path":"scripts/node_stripe/node_stripe.yy",}, {"name":"sh_texture_atlas","order":39,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",}, {"name":"s_node_fluidSim_domain","order":6,"path":"sprites/s_node_fluidSim_domain/s_node_fluidSim_domain.yy",}, @@ -351,6 +353,7 @@ {"name":"fd_rectangle_create_view","order":3,"path":"scripts/fd_rectangle_create_view/fd_rectangle_create_view.yy",}, {"name":"node_fluid_vortex","order":8,"path":"scripts/node_fluid_vortex/node_fluid_vortex.yy",}, {"name":"node_pb_draw_angle","order":7,"path":"scripts/node_pb_draw_angle/node_pb_draw_angle.yy",}, + {"name":"s_node_replace_palette","order":59,"path":"sprites/s_node_replace_palette/s_node_replace_palette.yy",}, {"name":"sh_cell_noise_round","order":4,"path":"shaders/sh_cell_noise_round/sh_cell_noise_round.yy",}, {"name":"s_node_cross_product_2d","order":12,"path":"sprites/s_node_cross_product_2d/s_node_cross_product_2d.yy",}, {"name":"s_node_path_plot","order":12,"path":"sprites/s_node_path_plot/s_node_path_plot.yy",}, @@ -385,10 +388,12 @@ {"name":"s_node_noise_perlin","order":11,"path":"sprites/s_node_noise_perlin/s_node_noise_perlin.yy",}, {"name":"s_node_dithering","order":21,"path":"sprites/s_node_dithering/s_node_dithering.yy",}, {"name":"s_workshop_badge","order":1,"path":"sprites/s_workshop_badge/s_workshop_badge.yy",}, + {"name":"node_pb_fx_brick","order":12,"path":"scripts/node_pb_fx_brick/node_pb_fx_brick.yy",}, {"name":"node_compare","order":16,"path":"scripts/node_compare/node_compare.yy",}, {"name":"node_iterator_each_size","order":3,"path":"scripts/node_iterator_each_size/node_iterator_each_size.yy",}, {"name":"panel_console","order":8,"path":"scripts/panel_console/panel_console.yy",}, {"name":"s_node_HSV_combine","order":44,"path":"sprites/s_node_HSV_combine/s_node_HSV_combine.yy",}, + {"name":"s_node_pb_box_contract","order":25,"path":"sprites/s_node_pb_box_contract/s_node_pb_box_contract.yy",}, {"name":"o_dialog_release_note","order":8,"path":"objects/o_dialog_release_note/o_dialog_release_note.yy",}, {"name":"sh_fd_advect_material_rgba_16_glsl","order":4,"path":"shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.yy",}, {"name":"node_padding","order":9,"path":"scripts/node_padding/node_padding.yy",}, @@ -419,11 +424,14 @@ {"name":"s_node_vfx_variable","order":10,"path":"sprites/s_node_vfx_variable/s_node_vfx_variable.yy",}, {"name":"node_displacement","order":1,"path":"scripts/node_displacement/node_displacement.yy",}, {"name":"mask_function","order":1,"path":"scripts/mask_function/mask_function.yy",}, + {"name":"sh_pb_strip","order":6,"path":"shaders/sh_pb_strip/sh_pb_strip.yy",}, {"name":"s_node_pb_draw_ellipse","order":15,"path":"sprites/s_node_pb_draw_ellipse/s_node_pb_draw_ellipse.yy",}, {"name":"text_file","order":5,"path":"scripts/text_file/text_file.yy",}, {"name":"node_armature_pose","order":3,"path":"scripts/node_armature_pose/node_armature_pose.yy",}, + {"name":"s_node_pb_draw_diamond","order":29,"path":"sprites/s_node_pb_draw_diamond/s_node_pb_draw_diamond.yy",}, {"name":"sh_trail_filler_pass1","order":49,"path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.yy",}, {"name":"s_node_vfx_wind","order":3,"path":"sprites/s_node_vfx_wind/s_node_vfx_wind.yy",}, + {"name":"s_node_pb_fx_strip","order":26,"path":"sprites/s_node_pb_fx_strip/s_node_pb_fx_strip.yy",}, {"name":"s_node_rigidSim_global","order":4,"path":"sprites/s_node_rigidSim_global/s_node_rigidSim_global.yy",}, {"name":"sh_channel_G_grey","order":8,"path":"shaders/sh_channel_G_grey/sh_channel_G_grey.yy",}, {"name":"node_3d_depth","order":16,"path":"scripts/node_3d_depth/node_3d_depth.yy",}, @@ -489,6 +497,7 @@ {"name":"textArea","order":20,"path":"scripts/textArea/textArea.yy",}, {"name":"s_node_gradient_4points","order":2,"path":"sprites/s_node_gradient_4points/s_node_gradient_4points.yy",}, {"name":"s_node_gradient_out","order":9,"path":"sprites/s_node_gradient_out/s_node_gradient_out.yy",}, + {"name":"s_node_pb_box_split","order":20,"path":"sprites/s_node_pb_box_split/s_node_pb_box_split.yy",}, {"name":"s_node_vec3","order":8,"path":"sprites/s_node_vec3/s_node_vec3.yy",}, {"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",}, @@ -527,7 +536,6 @@ {"name":"s_node_loop","order":5,"path":"sprites/s_node_loop/s_node_loop.yy",}, {"name":"node_zigzag","order":5,"path":"scripts/node_zigzag/node_zigzag.yy",}, {"name":"node_equation","order":4,"path":"scripts/node_equation/node_equation.yy",}, - {"name":"s_node_pb_box_divide_grid","order":23,"path":"sprites/s_node_pb_box_divide_grid/s_node_pb_box_divide_grid.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",}, @@ -569,7 +577,6 @@ {"name":"node_unicode","order":1,"path":"scripts/node_unicode/node_unicode.yy",}, {"name":"draw_set_text","order":1,"path":"scripts/draw_set_text/draw_set_text.yy",}, {"name":"node_pb_draw","order":1,"path":"scripts/node_pb_draw/node_pb_draw.yy",}, - {"name":"s_node_pb_box_divide","order":24,"path":"sprites/s_node_pb_box_divide/s_node_pb_box_divide.yy",}, {"name":"s_node_warp","order":9,"path":"sprites/s_node_warp/s_node_warp.yy",}, {"name":"s_node_surface_from_buffer","order":1,"path":"sprites/s_node_surface_from_buffer/s_node_surface_from_buffer.yy",}, {"name":"node_iterator_filter_output","order":2,"path":"scripts/node_iterator_filter_output/node_iterator_filter_output.yy",}, @@ -579,6 +586,7 @@ {"name":"node_array_shift","order":24,"path":"scripts/node_array_shift/node_array_shift.yy",}, {"name":"node_noise_ani","order":1,"path":"scripts/node_noise_ani/node_noise_ani.yy",}, {"name":"s_node_transform","order":8,"path":"sprites/s_node_transform/s_node_transform.yy",}, + {"name":"s_node_pb_draw_line","order":27,"path":"sprites/s_node_pb_draw_line/s_node_pb_draw_line.yy",}, {"name":"node_canvas","order":5,"path":"scripts/node_canvas/node_canvas.yy",}, {"name":"s_node_path_array","order":11,"path":"sprites/s_node_path_array/s_node_path_array.yy",}, {"name":"node_display_image","order":4,"path":"scripts/node_display_image/node_display_image.yy",}, @@ -601,6 +609,7 @@ {"name":"fd_rectangle_get_collision_mask_sprite_image","order":5,"path":"scripts/fd_rectangle_get_collision_mask_sprite_image/fd_rectangle_get_collision_mask_sprite_image.yy",}, {"name":"s_node_stripe","order":16,"path":"sprites/s_node_stripe/s_node_stripe.yy",}, {"name":"s_node_lua_global","order":19,"path":"sprites/s_node_lua_global/s_node_lua_global.yy",}, + {"name":"node_pb_draw_diamond","order":10,"path":"scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy",}, {"name":"transformBox","order":29,"path":"scripts/transformBox/transformBox.yy",}, {"name":"sh_grey_alpha","order":12,"path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",}, {"name":"sh_normal","order":1,"path":"shaders/sh_normal/sh_normal.yy",}, @@ -610,6 +619,7 @@ {"name":"fd_rectangle_get_material_maccormack_weight","order":11,"path":"scripts/fd_rectangle_get_material_maccormack_weight/fd_rectangle_get_material_maccormack_weight.yy",}, {"name":"s_node_lua_compute","order":17,"path":"sprites/s_node_lua_compute/s_node_lua_compute.yy",}, {"name":"buttonPalette","order":6,"path":"scripts/buttonPalette/buttonPalette.yy",}, + {"name":"draw_line_width_vertex","order":23,"path":"scripts/draw_line_width_vertex/draw_line_width_vertex.yy",}, {"name":"fd_rectangle_draw_stretched","order":11,"path":"scripts/fd_rectangle_draw_stretched/fd_rectangle_draw_stretched.yy",}, {"name":"s_node_wiggler","order":2,"path":"sprites/s_node_wiggler/s_node_wiggler.yy",}, {"name":"__pbBox","order":6,"path":"scripts/__pbBox/__pbBox.yy",}, @@ -726,6 +736,7 @@ {"name":"node_surface_from_color","order":1,"path":"scripts/node_surface_from_color/node_surface_from_color.yy",}, {"name":"s_node_pb_draw_rectangle","order":13,"path":"sprites/s_node_pb_draw_rectangle/s_node_pb_draw_rectangle.yy",}, {"name":"panel_animation","order":1,"path":"scripts/panel_animation/panel_animation.yy",}, + {"name":"sh_pb_to_mask","order":7,"path":"shaders/sh_pb_to_mask/sh_pb_to_mask.yy",}, {"name":"node_surface_replace","order":12,"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",}, @@ -753,7 +764,6 @@ {"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":"s_node_pb_box_mirror","order":21,"path":"sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy",}, {"name":"node_grid_hex","order":2,"path":"scripts/node_grid_hex/node_grid_hex.yy",}, {"name":"node_pb_draw_blob","order":5,"path":"scripts/node_pb_draw_blob/node_pb_draw_blob.yy",}, {"name":"s_node_text_display","order":4,"path":"sprites/s_node_text_display/s_node_text_display.yy",}, @@ -836,6 +846,7 @@ {"name":"s_node_vfx_output","order":11,"path":"sprites/s_node_vfx_output/s_node_vfx_output.yy",}, {"name":"sh_greyscale","order":13,"path":"shaders/sh_greyscale/sh_greyscale.yy",}, {"name":"gameframe_native","order":2,"path":"extensions/gameframe_native/gameframe_native.yy",}, + {"name":"s_node_pb_box_mirror","order":21,"path":"sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy",}, {"name":"node_global","order":3,"path":"scripts/node_global/node_global.yy",}, {"name":"spr_gameframe_buttons","order":1,"path":"sprites/spr_gameframe_buttons/spr_gameframe_buttons.yy",}, {"name":"s_node_draw_stack","order":4,"path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",}, @@ -881,6 +892,7 @@ {"name":"s_node_fluidSim_domain_queue","order":9,"path":"sprites/s_node_fluidSim_domain_queue/s_node_fluidSim_domain_queue.yy",}, {"name":"s_node_vfx_spawn","order":2,"path":"sprites/s_node_vfx_spawn/s_node_vfx_spawn.yy",}, {"name":"texture_set_repeat","order":1,"path":"scripts/texture_set_repeat/texture_set_repeat.yy",}, + {"name":"o_dialog_color_quick_pick","order":5,"path":"objects/o_dialog_color_quick_pick/o_dialog_color_quick_pick.yy",}, {"name":"fd_rectangle_update_velocity","order":22,"path":"scripts/fd_rectangle_update_velocity/fd_rectangle_update_velocity.yy",}, {"name":"sh_3d_extrude_filler_depth","order":10,"path":"shaders/sh_3d_extrude_filler_depth/sh_3d_extrude_filler_depth.yy",}, {"name":"sh_draw_mapping","order":4,"path":"shaders/sh_draw_mapping/sh_draw_mapping.yy",}, @@ -897,14 +909,15 @@ {"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",}, {"name":"getGradientData","order":1,"path":"scripts/getGradientData/getGradientData.yy",}, + {"name":"s_node_pb_box_inset","order":22,"path":"sprites/s_node_pb_box_inset/s_node_pb_box_inset.yy",}, {"name":"node_glow","order":10,"path":"scripts/node_glow/node_glow.yy",}, {"name":"sh_blend_min","order":9,"path":"shaders/sh_blend_min/sh_blend_min.yy",}, + {"name":"sh_pb_shade_half","order":5,"path":"shaders/sh_pb_shade_half/sh_pb_shade_half.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":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":"s_node_transform_array","order":17,"path":"sprites/s_node_transform_array/s_node_transform_array.yy",}, - {"name":"s_node_pb_box_contract","order":25,"path":"sprites/s_node_pb_box_contract/s_node_pb_box_contract.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",}, {"name":"s_node_fluidSim_vortex","order":8,"path":"sprites/s_node_fluidSim_vortex/s_node_fluidSim_vortex.yy",}, @@ -939,6 +952,7 @@ {"name":"s_node_feedback_input","order":10,"path":"sprites/s_node_feedback_input/s_node_feedback_input.yy",}, {"name":"s_node_path_builder","order":9,"path":"sprites/s_node_path_builder/s_node_path_builder.yy",}, {"name":"s_node_noise","order":8,"path":"sprites/s_node_noise/s_node_noise.yy",}, + {"name":"s_node_pb_box_transform","order":19,"path":"sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy",}, {"name":"node_string_path_separate_folder","order":12,"path":"scripts/node_string_path_separate_folder/node_string_path_separate_folder.yy",}, {"name":"sh_erode","order":17,"path":"shaders/sh_erode/sh_erode.yy",}, {"name":"fd_rectangle_get_velocity_dissipation_value","order":21,"path":"scripts/fd_rectangle_get_velocity_dissipation_value/fd_rectangle_get_velocity_dissipation_value.yy",}, @@ -950,6 +964,7 @@ {"name":"s_transparent","order":1,"path":"sprites/s_transparent/s_transparent.yy",}, {"name":"o_dialog_animation","order":1,"path":"objects/o_dialog_animation/o_dialog_animation.yy",}, {"name":"s_gizmo","order":4,"path":"sprites/s_gizmo/s_gizmo.yy",}, + {"name":"node_pb_draw_line","order":9,"path":"scripts/node_pb_draw_line/node_pb_draw_line.yy",}, {"name":"s_node_3d_plane","order":6,"path":"sprites/s_node_3d_plane/s_node_3d_plane.yy",}, {"name":"Regex","order":7,"path":"extensions/Regex/Regex.yy",}, {"name":"s_node_path_shift","order":4,"path":"sprites/s_node_path_shift/s_node_path_shift.yy",}, @@ -965,6 +980,7 @@ {"name":"s_node_fluidSim_update_paused","order":7,"path":"sprites/s_node_fluidSim_update_paused/s_node_fluidSim_update_paused.yy",}, {"name":"s_node_decorner","order":17,"path":"sprites/s_node_decorner/s_node_decorner.yy",}, {"name":"s_node_text_combine","order":3,"path":"sprites/s_node_text_combine/s_node_text_combine.yy",}, + {"name":"_line_drawer","order":24,"path":"scripts/_line_drawer/_line_drawer.yy",}, {"name":"sh_noise_fbm","order":1,"path":"shaders/sh_noise_fbm/sh_noise_fbm.yy",}, {"name":"s_node_gradient","order":1,"path":"sprites/s_node_gradient/s_node_gradient.yy",}, {"name":"fd_rectangle_get_acceleration_x","order":2,"path":"scripts/fd_rectangle_get_acceleration_x/fd_rectangle_get_acceleration_x.yy",}, @@ -1006,6 +1022,7 @@ {"name":"fd_rectangle_set_velocity_maccormack_weight","order":15,"path":"scripts/fd_rectangle_set_velocity_maccormack_weight/fd_rectangle_set_velocity_maccormack_weight.yy",}, {"name":"sh_pb_blob","order":1,"path":"shaders/sh_pb_blob/sh_pb_blob.yy",}, {"name":"s_node_array_sort","order":11,"path":"sprites/s_node_array_sort/s_node_array_sort.yy",}, + {"name":"s_node_pb_fx_brick","order":28,"path":"sprites/s_node_pb_fx_brick/s_node_pb_fx_brick.yy",}, {"name":"s_node_pb_draw_roundrectangle","order":12,"path":"sprites/s_node_pb_draw_roundrectangle/s_node_pb_draw_roundrectangle.yy",}, {"name":"node_trail","order":16,"path":"scripts/node_trail/node_trail.yy",}, {"name":"json_prettify","order":7,"path":"scripts/json_prettify/json_prettify.yy",}, @@ -1067,15 +1084,16 @@ {"name":"node_fluid_add","order":4,"path":"scripts/node_fluid_add/node_fluid_add.yy",}, {"name":"BBMOD_Quaternion","order":3,"path":"scripts/BBMOD_Quaternion/BBMOD_Quaternion.yy",}, {"name":"o_dialog_output_visibility","order":2,"path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",}, - {"name":"s_node_pb_box_transform","order":19,"path":"sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy",}, {"name":"node_normal","order":1,"path":"scripts/node_normal/node_normal.yy",}, {"name":"s_node_glow","order":24,"path":"sprites/s_node_glow/s_node_glow.yy",}, {"name":"s_node_websocket_receive","order":19,"path":"sprites/s_node_websocket_receive/s_node_websocket_receive.yy",}, {"name":"node_gradient_replace","order":12,"path":"scripts/node_gradient_replace/node_gradient_replace.yy",}, {"name":"s_node_vfx_repel","order":6,"path":"sprites/s_node_vfx_repel/s_node_vfx_repel.yy",}, + {"name":"sh_pb_mask_inset","order":10,"path":"shaders/sh_pb_mask_inset/sh_pb_mask_inset.yy",}, {"name":"fd_rectangle_set_collision_mask_surface","order":2,"path":"scripts/fd_rectangle_set_collision_mask_surface/fd_rectangle_set_collision_mask_surface.yy",}, {"name":"node_array_length","order":11,"path":"scripts/node_array_length/node_array_length.yy",}, {"name":"node_erode","order":9,"path":"scripts/node_erode/node_erode.yy",}, + {"name":"sh_colours_replace","order":54,"path":"shaders/sh_colours_replace/sh_colours_replace.yy",}, {"name":"node_wrap_mesh","order":6,"path":"scripts/node_wrap_mesh/node_wrap_mesh.yy",}, {"name":"sh_alpha_hash","order":2,"path":"shaders/sh_alpha_hash/sh_alpha_hash.yy",}, {"name":"vct_slider","order":1,"path":"scripts/vct_slider/vct_slider.yy",}, @@ -1191,7 +1209,6 @@ {"name":"__view_get","order":1,"path":"scripts/__view_get/__view_get.yy",}, {"name":"s_node_texture_map","order":38,"path":"sprites/s_node_texture_map/s_node_texture_map.yy",}, {"name":"fd_rectangle_create","order":7,"path":"scripts/fd_rectangle_create/fd_rectangle_create.yy",}, - {"name":"s_node_pb_box_split","order":20,"path":"sprites/s_node_pb_box_split/s_node_pb_box_split.yy",}, {"name":"s_node_level_selector","order":29,"path":"sprites/s_node_level_selector/s_node_level_selector.yy",}, {"name":"random_function","order":3,"path":"scripts/random_function/random_function.yy",}, {"name":"s_node_input","order":6,"path":"sprites/s_node_input/s_node_input.yy",}, @@ -1248,6 +1265,7 @@ {"name":"sh_channel_H","order":3,"path":"shaders/sh_channel_H/sh_channel_H.yy",}, {"name":"s_node_RGB","order":34,"path":"sprites/s_node_RGB/s_node_RGB.yy",}, {"name":"fd_rectangle_draw","order":9,"path":"scripts/fd_rectangle_draw/fd_rectangle_draw.yy",}, + {"name":"node_color_palette_replacement","order":14,"path":"scripts/node_color_palette_replacement/node_color_palette_replacement.yy",}, {"name":"sh_BGR","order":2,"path":"shaders/sh_BGR/sh_BGR.yy",}, {"name":"oRigidbody","order":2,"path":"objects/oRigidbody/oRigidbody.yy",}, {"name":"node_grey_to_alpha","order":4,"path":"scripts/node_grey_to_alpha/node_grey_to_alpha.yy",}, @@ -1279,6 +1297,7 @@ {"name":"node_path_shift","order":5,"path":"scripts/node_path_shift/node_path_shift.yy",}, {"name":"s_node_wav_file_write","order":17,"path":"sprites/s_node_wav_file_write/s_node_wav_file_write.yy",}, {"name":"s_node_3d_cylinder","order":1,"path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",}, + {"name":"sh_pb_brick","order":9,"path":"shaders/sh_pb_brick/sh_pb_brick.yy",}, {"name":"node_strand_break","order":9,"path":"scripts/node_strand_break/node_strand_break.yy",}, {"name":"s_biterator_b_grey_long","order":7,"path":"sprites/s_biterator_b_grey_long/s_biterator_b_grey_long.yy",}, {"name":"sh_region_fill_color","order":1,"path":"shaders/sh_region_fill_color/sh_region_fill_color.yy",}, @@ -1296,6 +1315,7 @@ {"name":"s_node_image_animation","order":2,"path":"sprites/s_node_image_animation/s_node_image_animation.yy",}, {"name":"node_string_merge","order":6,"path":"scripts/node_string_merge/node_string_merge.yy",}, {"name":"s_node_palette_replace","order":1,"path":"sprites/s_node_palette_replace/s_node_palette_replace.yy",}, + {"name":"s_node_pb_box_divide","order":24,"path":"sprites/s_node_pb_box_divide/s_node_pb_box_divide.yy",}, {"name":"bin_function","order":11,"path":"scripts/bin_function/bin_function.yy",}, {"name":"s_node_feedback_output","order":9,"path":"sprites/s_node_feedback_output/s_node_feedback_output.yy",}, {"name":"sh_surface_replace_fast_find","order":2,"path":"shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.yy",}, @@ -1359,6 +1379,7 @@ {"name":"o_dialog_graph_connection","order":5,"path":"objects/o_dialog_graph_connection/o_dialog_graph_connection.yy",}, {"name":"node_palette_shift","order":13,"path":"scripts/node_palette_shift/node_palette_shift.yy",}, {"name":"sh_fd_advect_velocity_0_glsl","order":6,"path":"shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.yy",}, + {"name":"s_node_pb_box_divide_grid","order":23,"path":"sprites/s_node_pb_box_divide_grid/s_node_pb_box_divide_grid.yy",}, {"name":"sh_flood_fill_replace","order":2,"path":"shaders/sh_flood_fill_replace/sh_flood_fill_replace.yy",}, {"name":"sprite_loader","order":11,"path":"scripts/sprite_loader/sprite_loader.yy",}, {"name":"fd_rectangle_get_material_surface","order":12,"path":"scripts/fd_rectangle_get_material_surface/fd_rectangle_get_material_surface.yy",}, @@ -1410,7 +1431,6 @@ {"name":"o_dialog_assetbox","order":3,"path":"objects/o_dialog_assetbox/o_dialog_assetbox.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":"s_node_pb_box_inset","order":22,"path":"sprites/s_node_pb_box_inset/s_node_pb_box_inset.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",}, {"name":"node_ase_layer","order":15,"path":"scripts/node_ase_layer/node_ase_layer.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 493f77f8a..cecdae5a5 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -184,6 +184,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"blend","folderPath":"folders/shader/blend.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"blur","folderPath":"folders/shader/blur.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"channels","folderPath":"folders/shader/channels.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"color picker","folderPath":"folders/shader/color picker.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"color selector","folderPath":"folders/shader/color selector.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"draw","folderPath":"folders/shader/draw.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"filter","folderPath":"folders/shader/filter.yy",}, @@ -216,7 +217,6 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"biterator","folderPath":"folders/VCT/biterator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widget","folderPath":"folders/VCT/widget.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"color picker","folderPath":"folders/shader/color picker.yy",}, ], "IncludedFiles": [ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",}, @@ -413,6 +413,7 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_area_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_corner.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_direction.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_draw_line.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_obj_angle.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_obj_halign.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_obj_hemicircle.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, @@ -721,6 +722,7 @@ {"id":{"name":"s_node_frame","path":"sprites/s_node_frame/s_node_frame.yy",},}, {"id":{"name":"s_node_fluidSim_turbulence","path":"sprites/s_node_fluidSim_turbulence/s_node_fluidSim_turbulence.yy",},}, {"id":{"name":"node_pb_fx_hash","path":"scripts/node_pb_fx_hash/node_pb_fx_hash.yy",},}, + {"id":{"name":"sh_pb_draw_mask","path":"shaders/sh_pb_draw_mask/sh_pb_draw_mask.yy",},}, {"id":{"name":"node_blur_radial","path":"scripts/node_blur_radial/node_blur_radial.yy",},}, {"id":{"name":"node_2d_light","path":"scripts/node_2d_light/node_2d_light.yy",},}, {"id":{"name":"node_rigid_activation","path":"scripts/node_rigid_activation/node_rigid_activation.yy",},}, @@ -861,6 +863,7 @@ {"id":{"name":"blurSurface","path":"scripts/blurSurface/blurSurface.yy",},}, {"id":{"name":"node_threshold","path":"scripts/node_threshold/node_threshold.yy",},}, {"id":{"name":"sh_cell_noise_edge","path":"shaders/sh_cell_noise_edge/sh_cell_noise_edge.yy",},}, + {"id":{"name":"node_pb_fx_strip","path":"scripts/node_pb_fx_strip/node_pb_fx_strip.yy",},}, {"id":{"name":"node_stripe","path":"scripts/node_stripe/node_stripe.yy",},}, {"id":{"name":"sh_texture_atlas","path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",},}, {"id":{"name":"s_node_fluidSim_domain","path":"sprites/s_node_fluidSim_domain/s_node_fluidSim_domain.yy",},}, @@ -876,6 +879,7 @@ {"id":{"name":"fd_rectangle_create_view","path":"scripts/fd_rectangle_create_view/fd_rectangle_create_view.yy",},}, {"id":{"name":"node_fluid_vortex","path":"scripts/node_fluid_vortex/node_fluid_vortex.yy",},}, {"id":{"name":"node_pb_draw_angle","path":"scripts/node_pb_draw_angle/node_pb_draw_angle.yy",},}, + {"id":{"name":"s_node_replace_palette","path":"sprites/s_node_replace_palette/s_node_replace_palette.yy",},}, {"id":{"name":"sh_cell_noise_round","path":"shaders/sh_cell_noise_round/sh_cell_noise_round.yy",},}, {"id":{"name":"s_node_cross_product_2d","path":"sprites/s_node_cross_product_2d/s_node_cross_product_2d.yy",},}, {"id":{"name":"s_node_path_plot","path":"sprites/s_node_path_plot/s_node_path_plot.yy",},}, @@ -914,6 +918,7 @@ {"id":{"name":"s_node_dithering","path":"sprites/s_node_dithering/s_node_dithering.yy",},}, {"id":{"name":"s_node_boolean","path":"sprites/s_node_boolean/s_node_boolean.yy",},}, {"id":{"name":"s_workshop_badge","path":"sprites/s_workshop_badge/s_workshop_badge.yy",},}, + {"id":{"name":"node_pb_fx_brick","path":"scripts/node_pb_fx_brick/node_pb_fx_brick.yy",},}, {"id":{"name":"node_compare","path":"scripts/node_compare/node_compare.yy",},}, {"id":{"name":"node_iterator_each_size","path":"scripts/node_iterator_each_size/node_iterator_each_size.yy",},}, {"id":{"name":"sh_trans_node_prev_drop","path":"shaders/sh_trans_node_prev_drop/sh_trans_node_prev_drop.yy",},}, @@ -921,6 +926,7 @@ {"id":{"name":"panel_console","path":"scripts/panel_console/panel_console.yy",},}, {"id":{"name":"spr_gameframe_border","path":"sprites/spr_gameframe_border/spr_gameframe_border.yy",},}, {"id":{"name":"s_node_HSV_combine","path":"sprites/s_node_HSV_combine/s_node_HSV_combine.yy",},}, + {"id":{"name":"s_node_pb_box_contract","path":"sprites/s_node_pb_box_contract/s_node_pb_box_contract.yy",},}, {"id":{"name":"node_normal_light","path":"scripts/node_normal_light/node_normal_light.yy",},}, {"id":{"name":"o_dialog_release_note","path":"objects/o_dialog_release_note/o_dialog_release_note.yy",},}, {"id":{"name":"sh_fd_advect_material_rgba_16_glsl","path":"shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.yy",},}, @@ -956,12 +962,15 @@ {"id":{"name":"node_struct","path":"scripts/node_struct/node_struct.yy",},}, {"id":{"name":"node_displacement","path":"scripts/node_displacement/node_displacement.yy",},}, {"id":{"name":"mask_function","path":"scripts/mask_function/mask_function.yy",},}, + {"id":{"name":"sh_pb_strip","path":"shaders/sh_pb_strip/sh_pb_strip.yy",},}, {"id":{"name":"panel_palette","path":"scripts/panel_palette/panel_palette.yy",},}, {"id":{"name":"s_node_pb_draw_ellipse","path":"sprites/s_node_pb_draw_ellipse/s_node_pb_draw_ellipse.yy",},}, {"id":{"name":"text_file","path":"scripts/text_file/text_file.yy",},}, {"id":{"name":"node_armature_pose","path":"scripts/node_armature_pose/node_armature_pose.yy",},}, + {"id":{"name":"s_node_pb_draw_diamond","path":"sprites/s_node_pb_draw_diamond/s_node_pb_draw_diamond.yy",},}, {"id":{"name":"sh_trail_filler_pass1","path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.yy",},}, {"id":{"name":"s_node_vfx_wind","path":"sprites/s_node_vfx_wind/s_node_vfx_wind.yy",},}, + {"id":{"name":"s_node_pb_fx_strip","path":"sprites/s_node_pb_fx_strip/s_node_pb_fx_strip.yy",},}, {"id":{"name":"s_node_rigidSim_global","path":"sprites/s_node_rigidSim_global/s_node_rigidSim_global.yy",},}, {"id":{"name":"sh_channel_G_grey","path":"shaders/sh_channel_G_grey/sh_channel_G_grey.yy",},}, {"id":{"name":"node_3d_depth","path":"scripts/node_3d_depth/node_3d_depth.yy",},}, @@ -1035,6 +1044,7 @@ {"id":{"name":"textArea","path":"scripts/textArea/textArea.yy",},}, {"id":{"name":"s_node_gradient_4points","path":"sprites/s_node_gradient_4points/s_node_gradient_4points.yy",},}, {"id":{"name":"s_node_gradient_out","path":"sprites/s_node_gradient_out/s_node_gradient_out.yy",},}, + {"id":{"name":"s_node_pb_box_split","path":"sprites/s_node_pb_box_split/s_node_pb_box_split.yy",},}, {"id":{"name":"s_node_vec3","path":"sprites/s_node_vec3/s_node_vec3.yy",},}, {"id":{"name":"s_node_strandSim_create","path":"sprites/s_node_strandSim_create/s_node_strandSim_create.yy",},}, {"id":{"name":"node_gradient_shift","path":"scripts/node_gradient_shift/node_gradient_shift.yy",},}, @@ -1078,7 +1088,6 @@ {"id":{"name":"s_node_loop","path":"sprites/s_node_loop/s_node_loop.yy",},}, {"id":{"name":"node_zigzag","path":"scripts/node_zigzag/node_zigzag.yy",},}, {"id":{"name":"node_equation","path":"scripts/node_equation/node_equation.yy",},}, - {"id":{"name":"s_node_pb_box_divide_grid","path":"sprites/s_node_pb_box_divide_grid/s_node_pb_box_divide_grid.yy",},}, {"id":{"name":"node_string_join","path":"scripts/node_string_join/node_string_join.yy",},}, {"id":{"name":"fd_rectangle_get_visualization_shader","path":"scripts/fd_rectangle_get_visualization_shader/fd_rectangle_get_visualization_shader.yy",},}, {"id":{"name":"preset_data","path":"scripts/preset_data/preset_data.yy",},}, @@ -1132,7 +1141,6 @@ {"id":{"name":"draw_set_text","path":"scripts/draw_set_text/draw_set_text.yy",},}, {"id":{"name":"node_pb_draw","path":"scripts/node_pb_draw/node_pb_draw.yy",},}, {"id":{"name":"s_node_array","path":"sprites/s_node_array/s_node_array.yy",},}, - {"id":{"name":"s_node_pb_box_divide","path":"sprites/s_node_pb_box_divide/s_node_pb_box_divide.yy",},}, {"id":{"name":"s_node_warp","path":"sprites/s_node_warp/s_node_warp.yy",},}, {"id":{"name":"s_node_surface_from_buffer","path":"sprites/s_node_surface_from_buffer/s_node_surface_from_buffer.yy",},}, {"id":{"name":"node_iterator_filter_output","path":"scripts/node_iterator_filter_output/node_iterator_filter_output.yy",},}, @@ -1142,6 +1150,7 @@ {"id":{"name":"node_array_shift","path":"scripts/node_array_shift/node_array_shift.yy",},}, {"id":{"name":"node_noise_ani","path":"scripts/node_noise_ani/node_noise_ani.yy",},}, {"id":{"name":"s_node_transform","path":"sprites/s_node_transform/s_node_transform.yy",},}, + {"id":{"name":"s_node_pb_draw_line","path":"sprites/s_node_pb_draw_line/s_node_pb_draw_line.yy",},}, {"id":{"name":"node_canvas","path":"scripts/node_canvas/node_canvas.yy",},}, {"id":{"name":"s_node_path_array","path":"sprites/s_node_path_array/s_node_path_array.yy",},}, {"id":{"name":"node_display_image","path":"scripts/node_display_image/node_display_image.yy",},}, @@ -1167,6 +1176,7 @@ {"id":{"name":"fd_rectangle_get_collision_mask_sprite_image","path":"scripts/fd_rectangle_get_collision_mask_sprite_image/fd_rectangle_get_collision_mask_sprite_image.yy",},}, {"id":{"name":"s_node_stripe","path":"sprites/s_node_stripe/s_node_stripe.yy",},}, {"id":{"name":"s_node_lua_global","path":"sprites/s_node_lua_global/s_node_lua_global.yy",},}, + {"id":{"name":"node_pb_draw_diamond","path":"scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy",},}, {"id":{"name":"transformBox","path":"scripts/transformBox/transformBox.yy",},}, {"id":{"name":"s_node_fluidSim_group","path":"sprites/s_node_fluidSim_group/s_node_fluidSim_group.yy",},}, {"id":{"name":"sh_grey_alpha","path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},}, @@ -1177,6 +1187,7 @@ {"id":{"name":"fd_rectangle_get_material_maccormack_weight","path":"scripts/fd_rectangle_get_material_maccormack_weight/fd_rectangle_get_material_maccormack_weight.yy",},}, {"id":{"name":"s_node_lua_compute","path":"sprites/s_node_lua_compute/s_node_lua_compute.yy",},}, {"id":{"name":"buttonPalette","path":"scripts/buttonPalette/buttonPalette.yy",},}, + {"id":{"name":"draw_line_width_vertex","path":"scripts/draw_line_width_vertex/draw_line_width_vertex.yy",},}, {"id":{"name":"fd_rectangle_draw_stretched","path":"scripts/fd_rectangle_draw_stretched/fd_rectangle_draw_stretched.yy",},}, {"id":{"name":"s_node_wiggler","path":"sprites/s_node_wiggler/s_node_wiggler.yy",},}, {"id":{"name":"sh_region_fill_coordinate","path":"shaders/sh_region_fill_coordinate/sh_region_fill_coordinate.yy",},}, @@ -1312,6 +1323,7 @@ {"id":{"name":"node_surface_from_color","path":"scripts/node_surface_from_color/node_surface_from_color.yy",},}, {"id":{"name":"s_node_pb_draw_rectangle","path":"sprites/s_node_pb_draw_rectangle/s_node_pb_draw_rectangle.yy",},}, {"id":{"name":"panel_animation","path":"scripts/panel_animation/panel_animation.yy",},}, + {"id":{"name":"sh_pb_to_mask","path":"shaders/sh_pb_to_mask/sh_pb_to_mask.yy",},}, {"id":{"name":"node_surface_replace","path":"scripts/node_surface_replace/node_surface_replace.yy",},}, {"id":{"name":"node_strand_create","path":"scripts/node_strand_create/node_strand_create.yy",},}, {"id":{"name":"sh_gradient","path":"shaders/sh_gradient/sh_gradient.yy",},}, @@ -1341,7 +1353,6 @@ {"id":{"name":"node_fluid_add_collider","path":"scripts/node_fluid_add_collider/node_fluid_add_collider.yy",},}, {"id":{"name":"node_atlas_get","path":"scripts/node_atlas_get/node_atlas_get.yy",},}, {"id":{"name":"fontScrollBox","path":"scripts/fontScrollBox/fontScrollBox.yy",},}, - {"id":{"name":"s_node_pb_box_mirror","path":"sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy",},}, {"id":{"name":"node_grid_hex","path":"scripts/node_grid_hex/node_grid_hex.yy",},}, {"id":{"name":"node_pb_draw_blob","path":"scripts/node_pb_draw_blob/node_pb_draw_blob.yy",},}, {"id":{"name":"draw_overlay","path":"scripts/draw_overlay/draw_overlay.yy",},}, @@ -1431,6 +1442,7 @@ {"id":{"name":"s_node_vfx_output","path":"sprites/s_node_vfx_output/s_node_vfx_output.yy",},}, {"id":{"name":"sh_greyscale","path":"shaders/sh_greyscale/sh_greyscale.yy",},}, {"id":{"name":"gameframe_native","path":"extensions/gameframe_native/gameframe_native.yy",},}, + {"id":{"name":"s_node_pb_box_mirror","path":"sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy",},}, {"id":{"name":"node_global","path":"scripts/node_global/node_global.yy",},}, {"id":{"name":"spr_gameframe_buttons","path":"sprites/spr_gameframe_buttons/spr_gameframe_buttons.yy",},}, {"id":{"name":"s_node_draw_stack","path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",},}, @@ -1479,6 +1491,7 @@ {"id":{"name":"sh_camera","path":"shaders/sh_camera/sh_camera.yy",},}, {"id":{"name":"s_node_vfx_spawn","path":"sprites/s_node_vfx_spawn/s_node_vfx_spawn.yy",},}, {"id":{"name":"texture_set_repeat","path":"scripts/texture_set_repeat/texture_set_repeat.yy",},}, + {"id":{"name":"o_dialog_color_quick_pick","path":"objects/o_dialog_color_quick_pick/o_dialog_color_quick_pick.yy",},}, {"id":{"name":"fd_rectangle_update_velocity","path":"scripts/fd_rectangle_update_velocity/fd_rectangle_update_velocity.yy",},}, {"id":{"name":"sh_3d_extrude_filler_depth","path":"shaders/sh_3d_extrude_filler_depth/sh_3d_extrude_filler_depth.yy",},}, {"id":{"name":"sh_draw_mapping","path":"shaders/sh_draw_mapping/sh_draw_mapping.yy",},}, @@ -1499,14 +1512,15 @@ {"id":{"name":"s_node_feedback","path":"sprites/s_node_feedback/s_node_feedback.yy",},}, {"id":{"name":"getGradientData","path":"scripts/getGradientData/getGradientData.yy",},}, {"id":{"name":"s_node_character","path":"sprites/s_node_character/s_node_character.yy",},}, + {"id":{"name":"s_node_pb_box_inset","path":"sprites/s_node_pb_box_inset/s_node_pb_box_inset.yy",},}, {"id":{"name":"node_glow","path":"scripts/node_glow/node_glow.yy",},}, {"id":{"name":"sh_blend_min","path":"shaders/sh_blend_min/sh_blend_min.yy",},}, + {"id":{"name":"sh_pb_shade_half","path":"shaders/sh_pb_shade_half/sh_pb_shade_half.yy",},}, {"id":{"name":"node_polar","path":"scripts/node_polar/node_polar.yy",},}, {"id":{"name":"s_node_twirl","path":"sprites/s_node_twirl/s_node_twirl.yy",},}, {"id":{"name":"sh_2d_light","path":"shaders/sh_2d_light/sh_2d_light.yy",},}, {"id":{"name":"node_image_animated","path":"scripts/node_image_animated/node_image_animated.yy",},}, {"id":{"name":"s_node_transform_array","path":"sprites/s_node_transform_array/s_node_transform_array.yy",},}, - {"id":{"name":"s_node_pb_box_contract","path":"sprites/s_node_pb_box_contract/s_node_pb_box_contract.yy",},}, {"id":{"name":"node_palette_extract","path":"scripts/node_palette_extract/node_palette_extract.yy",},}, {"id":{"name":"s_node_solid","path":"sprites/s_node_solid/s_node_solid.yy",},}, {"id":{"name":"s_node_fluidSim_vortex","path":"sprites/s_node_fluidSim_vortex/s_node_fluidSim_vortex.yy",},}, @@ -1543,6 +1557,7 @@ {"id":{"name":"s_node_feedback_input","path":"sprites/s_node_feedback_input/s_node_feedback_input.yy",},}, {"id":{"name":"s_node_path_builder","path":"sprites/s_node_path_builder/s_node_path_builder.yy",},}, {"id":{"name":"s_node_noise","path":"sprites/s_node_noise/s_node_noise.yy",},}, + {"id":{"name":"s_node_pb_box_transform","path":"sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy",},}, {"id":{"name":"node_string_path_separate_folder","path":"scripts/node_string_path_separate_folder/node_string_path_separate_folder.yy",},}, {"id":{"name":"sh_erode","path":"shaders/sh_erode/sh_erode.yy",},}, {"id":{"name":"mac_window_init","path":"scripts/mac_window_init/mac_window_init.yy",},}, @@ -1555,6 +1570,7 @@ {"id":{"name":"s_transparent","path":"sprites/s_transparent/s_transparent.yy",},}, {"id":{"name":"o_dialog_animation","path":"objects/o_dialog_animation/o_dialog_animation.yy",},}, {"id":{"name":"s_gizmo","path":"sprites/s_gizmo/s_gizmo.yy",},}, + {"id":{"name":"node_pb_draw_line","path":"scripts/node_pb_draw_line/node_pb_draw_line.yy",},}, {"id":{"name":"s_node_3d_plane","path":"sprites/s_node_3d_plane/s_node_3d_plane.yy",},}, {"id":{"name":"Regex","path":"extensions/Regex/Regex.yy",},}, {"id":{"name":"s_node_path_shift","path":"sprites/s_node_path_shift/s_node_path_shift.yy",},}, @@ -1572,6 +1588,7 @@ {"id":{"name":"s_node_fluidSim_update_paused","path":"sprites/s_node_fluidSim_update_paused/s_node_fluidSim_update_paused.yy",},}, {"id":{"name":"s_node_decorner","path":"sprites/s_node_decorner/s_node_decorner.yy",},}, {"id":{"name":"s_node_text_combine","path":"sprites/s_node_text_combine/s_node_text_combine.yy",},}, + {"id":{"name":"_line_drawer","path":"scripts/_line_drawer/_line_drawer.yy",},}, {"id":{"name":"sh_noise_fbm","path":"shaders/sh_noise_fbm/sh_noise_fbm.yy",},}, {"id":{"name":"s_node_gradient","path":"sprites/s_node_gradient/s_node_gradient.yy",},}, {"id":{"name":"fd_rectangle_get_acceleration_x","path":"scripts/fd_rectangle_get_acceleration_x/fd_rectangle_get_acceleration_x.yy",},}, @@ -1616,6 +1633,7 @@ {"id":{"name":"fd_rectangle_set_velocity_maccormack_weight","path":"scripts/fd_rectangle_set_velocity_maccormack_weight/fd_rectangle_set_velocity_maccormack_weight.yy",},}, {"id":{"name":"sh_pb_blob","path":"shaders/sh_pb_blob/sh_pb_blob.yy",},}, {"id":{"name":"s_node_array_sort","path":"sprites/s_node_array_sort/s_node_array_sort.yy",},}, + {"id":{"name":"s_node_pb_fx_brick","path":"sprites/s_node_pb_fx_brick/s_node_pb_fx_brick.yy",},}, {"id":{"name":"s_node_pb_draw_roundrectangle","path":"sprites/s_node_pb_draw_roundrectangle/s_node_pb_draw_roundrectangle.yy",},}, {"id":{"name":"node_trail","path":"scripts/node_trail/node_trail.yy",},}, {"id":{"name":"byte_reader","path":"scripts/byte_reader/byte_reader.yy",},}, @@ -1688,17 +1706,18 @@ {"id":{"name":"node_fluid_add","path":"scripts/node_fluid_add/node_fluid_add.yy",},}, {"id":{"name":"BBMOD_Quaternion","path":"scripts/BBMOD_Quaternion/BBMOD_Quaternion.yy",},}, {"id":{"name":"o_dialog_output_visibility","path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",},}, - {"id":{"name":"s_node_pb_box_transform","path":"sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy",},}, {"id":{"name":"node_normal","path":"scripts/node_normal/node_normal.yy",},}, {"id":{"name":"s_node_glow","path":"sprites/s_node_glow/s_node_glow.yy",},}, {"id":{"name":"s_node_websocket_receive","path":"sprites/s_node_websocket_receive/s_node_websocket_receive.yy",},}, {"id":{"name":"node_gradient_replace","path":"scripts/node_gradient_replace/node_gradient_replace.yy",},}, {"id":{"name":"s_node_condition","path":"sprites/s_node_condition/s_node_condition.yy",},}, {"id":{"name":"s_node_vfx_repel","path":"sprites/s_node_vfx_repel/s_node_vfx_repel.yy",},}, + {"id":{"name":"sh_pb_mask_inset","path":"shaders/sh_pb_mask_inset/sh_pb_mask_inset.yy",},}, {"id":{"name":"fd_rectangle_set_collision_mask_surface","path":"scripts/fd_rectangle_set_collision_mask_surface/fd_rectangle_set_collision_mask_surface.yy",},}, {"id":{"name":"node_armature","path":"scripts/node_armature/node_armature.yy",},}, {"id":{"name":"node_array_length","path":"scripts/node_array_length/node_array_length.yy",},}, {"id":{"name":"node_erode","path":"scripts/node_erode/node_erode.yy",},}, + {"id":{"name":"sh_colours_replace","path":"shaders/sh_colours_replace/sh_colours_replace.yy",},}, {"id":{"name":"node_wrap_mesh","path":"scripts/node_wrap_mesh/node_wrap_mesh.yy",},}, {"id":{"name":"node_surface_to_buffer","path":"scripts/node_surface_to_buffer/node_surface_to_buffer.yy",},}, {"id":{"name":"node_curve","path":"scripts/node_curve/node_curve.yy",},}, @@ -1841,7 +1860,6 @@ {"id":{"name":"sh_sample","path":"shaders/sh_sample/sh_sample.yy",},}, {"id":{"name":"s_node_texture_map","path":"sprites/s_node_texture_map/s_node_texture_map.yy",},}, {"id":{"name":"fd_rectangle_create","path":"scripts/fd_rectangle_create/fd_rectangle_create.yy",},}, - {"id":{"name":"s_node_pb_box_split","path":"sprites/s_node_pb_box_split/s_node_pb_box_split.yy",},}, {"id":{"name":"s_node_level_selector","path":"sprites/s_node_level_selector/s_node_level_selector.yy",},}, {"id":{"name":"random_function","path":"scripts/random_function/random_function.yy",},}, {"id":{"name":"s_node_input","path":"sprites/s_node_input/s_node_input.yy",},}, @@ -1907,6 +1925,7 @@ {"id":{"name":"fd_rectangle_draw","path":"scripts/fd_rectangle_draw/fd_rectangle_draw.yy",},}, {"id":{"name":"s_node_export","path":"sprites/s_node_export/s_node_export.yy",},}, {"id":{"name":"texture_set_interpolation","path":"scripts/texture_set_interpolation/texture_set_interpolation.yy",},}, + {"id":{"name":"node_color_palette_replacement","path":"scripts/node_color_palette_replacement/node_color_palette_replacement.yy",},}, {"id":{"name":"sh_BGR","path":"shaders/sh_BGR/sh_BGR.yy",},}, {"id":{"name":"oRigidbody","path":"objects/oRigidbody/oRigidbody.yy",},}, {"id":{"name":"node_grey_to_alpha","path":"scripts/node_grey_to_alpha/node_grey_to_alpha.yy",},}, @@ -1940,6 +1959,7 @@ {"id":{"name":"node_path_shift","path":"scripts/node_path_shift/node_path_shift.yy",},}, {"id":{"name":"s_node_wav_file_write","path":"sprites/s_node_wav_file_write/s_node_wav_file_write.yy",},}, {"id":{"name":"s_node_3d_cylinder","path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",},}, + {"id":{"name":"sh_pb_brick","path":"shaders/sh_pb_brick/sh_pb_brick.yy",},}, {"id":{"name":"node_strand_break","path":"scripts/node_strand_break/node_strand_break.yy",},}, {"id":{"name":"s_biterator_b_grey_long","path":"sprites/s_biterator_b_grey_long/s_biterator_b_grey_long.yy",},}, {"id":{"name":"sh_region_fill_color","path":"shaders/sh_region_fill_color/sh_region_fill_color.yy",},}, @@ -1959,6 +1979,7 @@ {"id":{"name":"s_node_image_animation","path":"sprites/s_node_image_animation/s_node_image_animation.yy",},}, {"id":{"name":"node_string_merge","path":"scripts/node_string_merge/node_string_merge.yy",},}, {"id":{"name":"s_node_palette_replace","path":"sprites/s_node_palette_replace/s_node_palette_replace.yy",},}, + {"id":{"name":"s_node_pb_box_divide","path":"sprites/s_node_pb_box_divide/s_node_pb_box_divide.yy",},}, {"id":{"name":"bin_function","path":"scripts/bin_function/bin_function.yy",},}, {"id":{"name":"s_node_feedback_output","path":"sprites/s_node_feedback_output/s_node_feedback_output.yy",},}, {"id":{"name":"sh_fd_repulse","path":"shaders/sh_fd_repulse/sh_fd_repulse.yy",},}, @@ -2031,6 +2052,7 @@ {"id":{"name":"o_dialog_graph_connection","path":"objects/o_dialog_graph_connection/o_dialog_graph_connection.yy",},}, {"id":{"name":"node_palette_shift","path":"scripts/node_palette_shift/node_palette_shift.yy",},}, {"id":{"name":"sh_fd_advect_velocity_0_glsl","path":"shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.yy",},}, + {"id":{"name":"s_node_pb_box_divide_grid","path":"sprites/s_node_pb_box_divide_grid/s_node_pb_box_divide_grid.yy",},}, {"id":{"name":"sh_flood_fill_replace","path":"shaders/sh_flood_fill_replace/sh_flood_fill_replace.yy",},}, {"id":{"name":"sprite_loader","path":"scripts/sprite_loader/sprite_loader.yy",},}, {"id":{"name":"fd_rectangle_get_material_surface","path":"scripts/fd_rectangle_get_material_surface/fd_rectangle_get_material_surface.yy",},}, @@ -2093,7 +2115,6 @@ {"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",},}, - {"id":{"name":"s_node_pb_box_inset","path":"sprites/s_node_pb_box_inset/s_node_pb_box_inset.yy",},}, {"id":{"name":"node_texture_remap","path":"scripts/node_texture_remap/node_texture_remap.yy",},}, {"id":{"name":"sh_fd_visualize_pixel_art_fiery_smoke_glsl","path":"shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.yy",},}, {"id":{"name":"node_ase_layer","path":"scripts/node_ase_layer/node_ase_layer.yy",},}, diff --git a/datafiles/data/themes/default.zip b/datafiles/data/themes/default.zip index 59f7fbaaa..eb96a1f54 100644 Binary files a/datafiles/data/themes/default.zip and b/datafiles/data/themes/default.zip differ diff --git a/objects/o_dialog_color_quick_pick/Create_0.gml b/objects/o_dialog_color_quick_pick/Create_0.gml new file mode 100644 index 000000000..e0e2b66ca --- /dev/null +++ b/objects/o_dialog_color_quick_pick/Create_0.gml @@ -0,0 +1,4 @@ +/// @description +depth = -999; +selecting = noone; +onApply = noone; \ No newline at end of file diff --git a/objects/o_dialog_color_quick_pick/Draw_64.gml b/objects/o_dialog_color_quick_pick/Draw_64.gml new file mode 100644 index 000000000..d9a2dd879 --- /dev/null +++ b/objects/o_dialog_color_quick_pick/Draw_64.gml @@ -0,0 +1,42 @@ +/// @description +#region base + var pal = DEF_PALETTE; + var col = min(array_length(pal), 8); + var row = ceil(array_length(pal) / col); + + var ss = ui(24); + var ww = ui(16) + ss * col; + var hh = ui(16) + ss * row; + + var x0 = min(x, WIN_W - ww); + var y0 = min(y, WIN_H - hh); + + var x1 = x0 + ww; + var y1 = y0 + hh; + + draw_sprite_stretched(THEME.dialog_bg, 0, x0, y0, ww, hh); + + for( var i = 0; i < array_length(pal); i++ ) { + var r = floor(i / col); + var c = i % col; + + var _x = x0 + ui(8) + c * ss; + var _y = y0 + ui(8) + r * ss; + + draw_set_color(pal[i]); + draw_rectangle(_x + 2, _y + 2, _x + ss - 2, _y + ss - 2, false); + + if(point_in_rectangle(mouse_mx, mouse_my, _x, _y, _x + ss - 1, _y + ss - 1)) { + draw_set_color(c_white); + draw_rectangle_border(_x + 2, _y + 2, _x + ss - 2, _y + ss - 2, 2); + + if(selecting != i) { + if(onApply) onApply(pal[i]); + } + selecting = i; + } + } + + if(mouse_release(mb_left)) + instance_destroy(); +#endregion \ No newline at end of file diff --git a/objects/o_dialog_color_quick_pick/o_dialog_color_quick_pick.yy b/objects/o_dialog_color_quick_pick/o_dialog_color_quick_pick.yy new file mode 100644 index 000000000..b87efba35 --- /dev/null +++ b/objects/o_dialog_color_quick_pick/o_dialog_color_quick_pick.yy @@ -0,0 +1,34 @@ +{ + "resourceType": "GMObject", + "resourceVersion": "1.0", + "name": "o_dialog_color_quick_pick", + "eventList": [ + {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,}, + {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,}, + ], + "managed": true, + "overriddenProperties": [], + "parent": { + "name": "color selector", + "path": "folders/dialog/color selector.yy", + }, + "parentObjectId": null, + "persistent": false, + "physicsAngularDamping": 0.1, + "physicsDensity": 0.5, + "physicsFriction": 0.2, + "physicsGroup": 1, + "physicsKinematic": false, + "physicsLinearDamping": 0.1, + "physicsObject": false, + "physicsRestitution": 0.1, + "physicsSensor": false, + "physicsShape": 1, + "physicsShapePoints": [], + "physicsStartAwake": true, + "properties": [], + "solid": false, + "spriteId": null, + "spriteMaskId": null, + "visible": true, +} \ No newline at end of file diff --git a/objects/o_dialog_color_selector/Draw_64.gml b/objects/o_dialog_color_selector/Draw_64.gml index 54917a080..bfe7ee5f7 100644 --- a/objects/o_dialog_color_selector/Draw_64.gml +++ b/objects/o_dialog_color_selector/Draw_64.gml @@ -50,8 +50,8 @@ if !ready exit; } bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txt("Show on Selector"), THEME.display_palette, selector.palette_display, c_white) == 2) - selector.palette_display = !selector.palette_display; + if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txt("Show on Selector"), THEME.display_palette, NODE_COLOR_SHOW_PALETTE, c_white) == 2) + NODE_COLOR_SHOW_PALETTE = !NODE_COLOR_SHOW_PALETTE; bx -= ui(32); #endregion diff --git a/objects/o_dialog_gradient/Draw_64.gml b/objects/o_dialog_gradient/Draw_64.gml index 81130f6a2..3da951ce8 100644 --- a/objects/o_dialog_gradient/Draw_64.gml +++ b/objects/o_dialog_gradient/Draw_64.gml @@ -89,8 +89,8 @@ if !ready exit; var bx = palette_x + palette_w - ui(44); var by = dialog_y + ui(12); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txt("Show on Selector"), THEME.display_palette, selector.palette_display, c_white) == 2) - selector.palette_display = !selector.palette_display; + if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txt("Show on Selector"), THEME.display_palette, NODE_COLOR_SHOW_PALETTE, c_white) == 2) + NODE_COLOR_SHOW_PALETTE = !NODE_COLOR_SHOW_PALETTE; bx -= ui(32); #endregion diff --git a/objects/o_dialog_palette/Create_0.gml b/objects/o_dialog_palette/Create_0.gml index a71bc2e5e..b2fe5b3e8 100644 --- a/objects/o_dialog_palette/Create_0.gml +++ b/objects/o_dialog_palette/Create_0.gml @@ -25,6 +25,7 @@ event_inherited(); onApply = noone; selector = new colorSelector(setColor); selector.dropper_close = false; + selector.discretize_pal = false; previous_palette = c_black; diff --git a/objects/o_main/Create_0.gml b/objects/o_main/Create_0.gml index c218ac19b..8d2ae5515 100644 --- a/objects/o_main/Create_0.gml +++ b/objects/o_main/Create_0.gml @@ -291,8 +291,9 @@ physics_world_update_iterations(100); #endregion -#region dropper - globalvar NODE_DROPPER_TARGET, NODE_DROPPER_TARGET_CAN; - NODE_DROPPER_TARGET = noone; +#region color selector + globalvar NODE_DROPPER_TARGET, NODE_DROPPER_TARGET_CAN, NODE_COLOR_SHOW_PALETTE; + NODE_DROPPER_TARGET = noone; NODE_DROPPER_TARGET_CAN = false; + NODE_COLOR_SHOW_PALETTE = false; #endregion \ No newline at end of file diff --git a/objects/o_main/Step_1.gml b/objects/o_main/Step_1.gml index 493584712..abf88e77c 100644 --- a/objects/o_main/Step_1.gml +++ b/objects/o_main/Step_1.gml @@ -195,4 +195,4 @@ _HOVERING_ELEMENT = noone; MOUSE_WRAP = false; #endregion -//print($"CACHE called: {global.cache_call} | hit: {global.cache_hit} ({global.cache_hit / global.cache_call}%)"); \ No newline at end of file +//if(global.cache_call) print($"CACHE called: {global.cache_call} | hit: {global.cache_hit} ({global.cache_hit / global.cache_call}%)"); \ No newline at end of file diff --git a/scripts/__pbBox/__pbBox.gml b/scripts/__pbBox/__pbBox.gml index 3bf66798a..f7013f2a1 100644 --- a/scripts/__pbBox/__pbBox.gml +++ b/scripts/__pbBox/__pbBox.gml @@ -9,13 +9,46 @@ function __pbBox() constructor { layer_w = 32; layer_h = 32; - mask = noone; + mask = noone; + content = noone; mirror_h = false; mirror_v = false; rotation = 0; + static drawOverlay = function(_x, _y, _s, color = COLORS._main_accent) { + var _x0 = _x + x * _s; + var _y0 = _y + y * _s; + + var _x1 = _x0 + w * _s; + var _y1 = _y0 + h * _s; + + var _msk = is_surface(mask); + + draw_set_alpha(0.5 + 0.5 * !_msk); + draw_set_color(color); + draw_rectangle(_x0, _y0, _x1, _y1, true); + draw_set_alpha(1); + + if(_msk) { + var _sr = surface_get_target(); + var _ms = surface_create_size(_sr); + + surface_set_target(_ms); + DRAW_CLEAR + draw_surface_ext(mask, _x0, _y0, _s, _s, 0, color, 1); + surface_reset_target(); + + shader_set(sh_pb_draw_mask); + shader_set_dim(, _ms); + draw_surface_ext(_ms, 0, 0, 1, 1, 0, color, 1); + shader_reset(); + + surface_free(_ms); + } + } + static clone = function() { var _pbbox = new __pbBox(); @@ -33,6 +66,14 @@ function __pbBox() constructor { _pbbox.rotation = rotation; + _pbbox.mask = surface_clone(mask); + _pbbox.content = surface_clone(content); + return _pbbox; } + + static free = function() { + surface_free_safe(mask); + surface_free_safe(content); + } } \ No newline at end of file diff --git a/scripts/_line_drawer/_line_drawer.gml b/scripts/_line_drawer/_line_drawer.gml new file mode 100644 index 000000000..40d140fdc --- /dev/null +++ b/scripts/_line_drawer/_line_drawer.gml @@ -0,0 +1,49 @@ +function LineDrawer(thick) constructor { + ox = undefined; + oy = undefined; + oc = undefined; + + th = thick; + + x2 = undefined; y2 = undefined; + x3 = undefined; y3 = undefined; + + draw_primitive_begin(pr_trianglestrip); + + static add = function(_x, _y, _c = oc) { + if(ox != undefined) { + var dx = _x - ox; + var dy = _y - oy; + var line_length = point_distance(_x, _y, ox, oy); + var px = -dy / line_length * th / 2; + var py = dx / line_length * th / 2; + + // Calculate vertices of the rectangle + var _x0 = x2 ?? ox + px; + var _y0 = y2 ?? oy + py; + var _x1 = x3 ?? ox + px; + var _y1 = y3 ?? oy + py; + var _x2 = _x + px; + var _y2 = _y + py; + var _x3 = _x - px; + var _y3 = _y - py; + + // Draw vertices + draw_vertex_color(_x0, _y0, _c, 1); + draw_vertex_color(_x1, _y1, _c, 1); + draw_vertex_color(_x2, _y2, oc, 1); + draw_vertex_color(_x3, _y3, oc, 1); + + x2 = _x2; y2 = _y2; + x3 = _x3; y3 = _y3; + } + + ox = _x; + oy = _y; + oc = _c; + } + + static finish = function() { + draw_primitive_end(); + } +} \ No newline at end of file diff --git a/scripts/_line_drawer/_line_drawer.yy b/scripts/_line_drawer/_line_drawer.yy new file mode 100644 index 000000000..bb223533c --- /dev/null +++ b/scripts/_line_drawer/_line_drawer.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "_line_drawer", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "draw", + "path": "folders/functions/draw.yy", + }, +} \ No newline at end of file diff --git a/scripts/button/button.gml b/scripts/button/button.gml index 17573a16e..bc9de0e06 100644 --- a/scripts/button/button.gml +++ b/scripts/button/button.gml @@ -13,6 +13,9 @@ function buttonClass(_onClick, _icon = noone) : widget() constructor { onClick = _onClick; triggered = false; + + activate_on_press = false; + clicked = false; static setLua = function(_lua_thread, _lua_key, _lua_func) { lua_thread = _lua_thread; @@ -21,6 +24,8 @@ function buttonClass(_onClick, _icon = noone) : widget() constructor { } static trigger = function() { + clicked = true; + if(!is_callable(onClick)) return noone; triggered = true; @@ -56,15 +61,17 @@ function buttonClass(_onClick, _icon = noone) : widget() constructor { w = _w; h = _h; + clicked = false; + var b = colorMultiply(self.blend, blend); - var click = false; if(hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h)) { draw_sprite_stretched_ext(spr, 1, _x, _y, _w, _h, b, 1); - if(mouse_release(mb_left, active)) { + if(!activate_on_press && mouse_release(mb_left, active)) trigger(); - click = true; - } + if(activate_on_press && mouse_press(mb_left, active)) + trigger(); + if(mouse_click(mb_left, active)) { draw_sprite_stretched_ext(spr, 2, _x, _y, _w, _h, b, 1); draw_sprite_stretched_ext(spr, 3, _x, _y, _w, _h, COLORS._main_accent, 1); @@ -89,7 +96,7 @@ function buttonClass(_onClick, _icon = noone) : widget() constructor { resetFocus(); - return click; + return _h; } } diff --git a/scripts/buttonColor/buttonColor.gml b/scripts/buttonColor/buttonColor.gml index f6e6adcfa..9c71025c5 100644 --- a/scripts/buttonColor/buttonColor.gml +++ b/scripts/buttonColor/buttonColor.gml @@ -20,6 +20,13 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor { b_picker = button(onColorPick); b_picker.icon = THEME.color_picker_dropper; + b_quick_pick = button(function() { + var pick = instance_create(mouse_mx, mouse_my, o_dialog_color_quick_pick); + pick.onApply = onApply; + }); + b_quick_pick.activate_on_press = true; + b_quick_pick.icon = THEME.color_wheel; + function apply(value) { if(!interactable) return; current_value = value; @@ -52,9 +59,14 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor { h = _h; current_color = toNumber(_color); + var _cw = _w; + if(interactable) { - b_picker.setFocusHover(active, hover); - b_picker.draw(_x + _w - ui(32), _y + _h / 2 - ui(16), ui(32), ui(32), _m, THEME.button_hide); + var bx = _x + _cw - ui(32); + _cw -= ui(32); + + b_picker.setFocusHover(active && !instance_exists(o_dialog_color_quick_pick), hover); + b_picker.draw(bx, _y + _h / 2 - ui(16), ui(32), ui(32), _m, THEME.button_hide); b_picker.icon_blend = c_white; b_picker.icon_index = 0; if(instance_exists(o_dialog_color_selector) && o_dialog_color_selector.selector.dropper_active && o_dialog_color_selector.drop_target != noone) { @@ -64,9 +76,18 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor { } else b_picker.icon_blend = COLORS._main_icon; } + + if(_cw > ui(64)) { + bx -= ui(32 + 4) + _cw -= ui(32 + 4); + + b_quick_pick.setFocusHover(active, hover); + b_quick_pick.draw(bx, _y + _h / 2 - ui(16), ui(32), ui(32), _m, THEME.button_hide); + } + + _cw -= ui(8); } - var _cw = _w - ui(40); var hoverRect = point_in_rectangle(_m[0], _m[1], _x, _y, _x + _cw, _y + _h); var click = false; @@ -86,8 +107,6 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor { } draw_sprite_stretched_ext(THEME.button_color_overlay, 0, _x + ui(4), _y + ui(4), _cw - ui(8), _h - ui(8), current_color, 1); - //draw_set_color(c_white); - //draw_rectangle( _x + ui(4), _y + ui(4), _x + _cw - ui(4), _y + _h - ui(4), 1); if(WIDGET_CURRENT == self) draw_sprite_stretched_ext(THEME.widget_selecting, 0, _x - ui(3), _y - ui(3), _w + ui(6), _h + ui(6), COLORS._main_accent, 1); diff --git a/scripts/buttonGroup/buttonGroup.gml b/scripts/buttonGroup/buttonGroup.gml index bebb7ac5d..06129714c 100644 --- a/scripts/buttonGroup/buttonGroup.gml +++ b/scripts/buttonGroup/buttonGroup.gml @@ -68,9 +68,11 @@ function buttonGroupClass(_data, _onClick) : widget() constructor { if(_selecting == i) { draw_sprite_stretched(spr, 2, bx, _y, ww, _h); draw_sprite_stretched_ext(spr, 3, bx, _y, ww, _h, COLORS._main_accent, 1); - } else if(buttons[i].draw(bx, _y, ww, _h, _m, spr)) - onClick(i); - + } else { + buttons[i].draw(bx, _y, ww, _h, _m, spr); + if(buttons[i].clicked) onClick(i); + } + if(is_string(data[i])) { draw_set_text(font, fa_center, fa_center, fColor); draw_text(bx + ww / 2, _y + _h / 2, data[i]); diff --git a/scripts/color_selector/color_selector.gml b/scripts/color_selector/color_selector.gml index 46a5aae93..d6d69afe1 100644 --- a/scripts/color_selector/color_selector.gml +++ b/scripts/color_selector/color_selector.gml @@ -17,8 +17,8 @@ function colorSelector(onApply = noone) constructor { disp_mode = 0; - palette_display = false; palette = []; + discretize_pal = true; color_surface = surface_create_valid(ui(256), ui(256)); @@ -142,12 +142,12 @@ function colorSelector(onApply = noone) constructor { if(disp_mode == 0) { shader_set(sh_color_picker_hue); shader_set_f("hue", hue / 256); - shader_set_i("usePalette", palette_display); + shader_set_i("usePalette", NODE_COLOR_SHOW_PALETTE && discretize_pal); shader_set_palette(palette); } else if(disp_mode == 1) { shader_set(sh_color_picker_value); shader_set_f("value", val / 256); - shader_set_i("usePalette", palette_display); + shader_set_i("usePalette", NODE_COLOR_SHOW_PALETTE && discretize_pal); shader_set_palette(palette); } @@ -165,7 +165,7 @@ function colorSelector(onApply = noone) constructor { if(disp_mode == 0) { shader_set(sh_color_picker_side_hue); - shader_set_i("usePalette", palette_display); + shader_set_i("usePalette", NODE_COLOR_SHOW_PALETTE && discretize_pal); shader_set_palette(palette); shader_set_f("sat", sat / 256); shader_set_f("value", val / 256); @@ -174,7 +174,7 @@ function colorSelector(onApply = noone) constructor { shader_reset(); } else if(disp_mode == 1) { shader_set(sh_color_picker_side_value); - shader_set_i("usePalette", palette_display); + shader_set_i("usePalette", NODE_COLOR_SHOW_PALETTE && discretize_pal); shader_set_palette(palette); shader_set_f("hue", hue / 256); shader_set_f("sat", sat / 256); @@ -185,7 +185,7 @@ function colorSelector(onApply = noone) constructor { var _sy = disp_mode == 0? hue_y + ui(hue) : hue_y + ui(256 - val); - if(palette_display) { + if(NODE_COLOR_SHOW_PALETTE) { draw_sprite_stretched_ext(s_ui_base_white, 0, hue_x - ui(3), _sy - ui(6), ui(24), ui(10), current_color, 1); if(disp_mode == 0) @@ -218,9 +218,9 @@ function colorSelector(onApply = noone) constructor { setHSV(); - if(palette_display) { + if(NODE_COLOR_SHOW_PALETTE) { current_color = disp_mode == 0? surface_getpixel(color_surface, sat, 256 - val) : - surface_getpixel(color_surface, hue, sat); + surface_getpixel(color_surface, hue, 256 - sat); if(onApply != noone) onApply(current_color); } @@ -236,12 +236,12 @@ function colorSelector(onApply = noone) constructor { hue = clamp((mouse_mx - col_x) / UI_SCALE, 0, 256); sat = 256 - clamp((mouse_my - col_y) / UI_SCALE, 0, 256); } - + setHSV(); - if(palette_display) { + if(NODE_COLOR_SHOW_PALETTE) { current_color = disp_mode == 0? surface_getpixel(color_surface, sat, 256 - val) : - surface_getpixel(color_surface, hue, sat); + surface_getpixel(color_surface, hue, 256 - sat); if(onApply != noone) onApply(current_color); } diff --git a/scripts/draw_corner/draw_corner.gml b/scripts/draw_corner/draw_corner.gml index 2a1987b7f..83b6e08e7 100644 --- a/scripts/draw_corner/draw_corner.gml +++ b/scripts/draw_corner/draw_corner.gml @@ -32,7 +32,7 @@ function draw_corner(x1, y1, xc, yc, x3, y3, thick = 1, col = c_white, sample = nx = px + lengthdir_x(r, a); ny = py + lengthdir_y(r, a); - if(i > 0) draw_line_round(ox, oy, nx, ny, thick); + if(i > 0) draw_line_round(ox, oy, nx, ny, thick, i == st, i == 1, sample); ox = nx; oy = ny; diff --git a/scripts/draw_line_curve/draw_line_curve.gml b/scripts/draw_line_curve/draw_line_curve.gml index 1eb780284..d1702d4b9 100644 --- a/scripts/draw_line_curve/draw_line_curve.gml +++ b/scripts/draw_line_curve/draw_line_curve.gml @@ -51,6 +51,8 @@ function draw_line_curve_color(x0, y0, x1, y1, xc = noone, yc = noone, _s = 1, t var ox, oy, nx, ny, t, it, oc, nc; var dash_distance = 2; + var line = new LineDrawer(thick); + for( var i = 0; i <= sample; i++ ) { t = i / sample; it = 1 - t; @@ -72,7 +74,7 @@ function draw_line_curve_color(x0, y0, x1, y1, xc = noone, yc = noone, _s = 1, t if(i) { switch(type) { case LINE_STYLE.solid : - draw_line_round_color(ox, oy, nx, ny, thick, oc, nc); + draw_line_round_color(ox, oy, nx, ny, thick, oc, nc, i == 1, i == sample); break; case LINE_STYLE.dashed : if(floor(i / dash_distance) % 2) @@ -85,6 +87,8 @@ function draw_line_curve_color(x0, y0, x1, y1, xc = noone, yc = noone, _s = 1, t oy = ny; oc = nc; } + + line.finish(); } function draw_line_curve_corner(x0, y0, x1, y1, _s = 1, thick = 1, col1 = c_white, col2 = c_white) { @@ -115,8 +119,7 @@ function draw_line_curve_corner(x0, y0, x1, y1, _s = 1, thick = 1, col1 = c_whit nc = merge_color(col1, col2, t); - if(i) - draw_line_round_color(ox, oy, nx, ny, thick, oc, nc); + if(i) draw_line_round_color(ox, oy, nx, ny, thick, oc, nc, i == 1, i == sample); ox = nx; oy = ny; diff --git a/scripts/draw_line_dashed/draw_line_dashed.gml b/scripts/draw_line_dashed/draw_line_dashed.gml index 4cd283246..3763ca430 100644 --- a/scripts/draw_line_dashed/draw_line_dashed.gml +++ b/scripts/draw_line_dashed/draw_line_dashed.gml @@ -40,9 +40,7 @@ function draw_line_dashed_color(x0, y0, x1, y1, th, c0, c1, dash_distance = 8) { ny = y0 + dy * dd; nc = merge_color(c0, c1, i / part); - if(i && i % 2) { - draw_line_round_color(ox, oy, nx, ny, th, oc, nc); - } + if(i % 2) draw_line_width_color(ox, oy, nx, ny, th, oc, nc); oc = nc; ox = nx; diff --git a/scripts/draw_line_elbow/draw_line_elbow.gml b/scripts/draw_line_elbow/draw_line_elbow.gml index 860924c57..9437e8a31 100644 --- a/scripts/draw_line_elbow/draw_line_elbow.gml +++ b/scripts/draw_line_elbow/draw_line_elbow.gml @@ -29,9 +29,9 @@ function draw_line_elbow_color(x0, y0, x1, y1, cx = noone, cy = noone, _s = 1, t draw_set_color(col1); draw_line_width(x0, y0, xx0 - corns, y0, thick); draw_set_color(col2); draw_line_width(xx1 + corns, y1, x1, y1, thick); - draw_line_round_color(xx0, y0 + corns * iy0, xx0, cy - corner * iy0, thick, col1, cm); - draw_line_round_color(xx0 - corner * sign(xx0 - xx1), cy, xx1 + corner * sign(xx0 - xx1), cy, thick, cm, cm); - draw_line_round_color(xx1, cy + corner * iy1, xx1, y1 - corns * iy1, thick, cm, col2); + draw_line_width_color(xx0, y0 + corns * iy0, xx0, cy - corner * iy0, thick, col1, cm); + draw_line_width_color(xx0 - corner * sign(xx0 - xx1), cy, xx1 + corner * sign(xx0 - xx1), cy, thick, cm, cm); + draw_line_width_color(xx1, cy + corner * iy1, xx1, y1 - corns * iy1, thick, cm, col2); if(corns) { draw_corner(xx0 - corns, y0, xx0, y0, xx0, y0 + corns * iy0, thick, col1, sample); @@ -54,9 +54,9 @@ function draw_line_elbow_color(x0, y0, x1, y1, cx = noone, cy = noone, _s = 1, t if(type == LINE_STYLE.solid) { corner = min(corner, abs(y1 - y0) / 2, abs(x0 - cx), abs(x1 - cx), abs(x1 - x0) / 2); - draw_line_round_color(x0, y0, cx - corner * sign(cx - x0), y0, thick, col1, cm); - draw_line_round_color(cx, y0 + corner * iy, cx, y1 - corner * iy, thick, cm, cm); - draw_line_round_color(cx + corner * sign(x1 - cx), y1, x1, y1, thick, cm, col2); + draw_line_width_color(x0, y0, cx - corner * sign(cx - x0), y0, thick, col1, cm); + draw_line_width_color(cx, y0 + corner * iy, cx, y1 - corner * iy, thick, cm, cm); + draw_line_width_color(cx + corner * sign(x1 - cx), y1, x1, y1, thick, cm, col2); if(corner) { draw_corner(cx - corner * sign(cx - x0), y0, cx, y0, cx, y0 + corner * iy, thick, cm, sample); diff --git a/scripts/draw_line_elbow_diag/draw_line_elbow_diag.gml b/scripts/draw_line_elbow_diag/draw_line_elbow_diag.gml index 109503c7a..d928e1c19 100644 --- a/scripts/draw_line_elbow_diag/draw_line_elbow_diag.gml +++ b/scripts/draw_line_elbow_diag/draw_line_elbow_diag.gml @@ -44,8 +44,8 @@ function draw_line_elbow_diag_color(x0, y0, x1, y1, cx = noone, cy = noone, _s = var bot = abs(y1 - cy) < rrx / 2; if(top) { - draw_line_round_color(x0, y0, xx0, y0, thick, c1, c1); - draw_line_round_color(xx1 + cS, y1, x1, y1, thick, c2, c2); + draw_line_width_color(x0, y0, xx0, y0, thick, c1, c1); + draw_line_width_color(xx1 + cS, y1, x1, y1, thick, c2, c2); var cor = (cy - y0) * 2; var x1s = xx1 - cor * iy; @@ -56,17 +56,17 @@ function draw_line_elbow_diag_color(x0, y0, x1, y1, cx = noone, cy = noone, _s = var _xcr = xcr / sqrt(2); var _ycr = ycr / sqrt(2); - draw_line_round_color(xx0, y0, x1s - xcr, y0, thick, c1, cm); - draw_line_round_color(xx1, y1s + ycr * iy, xx1, y1 - cS * iy, thick, cm, c2); + draw_line_width_color(xx0, y0, x1s - xcr, y0, thick, c1, cm); + draw_line_width_color(xx1, y1s + ycr * iy, xx1, y1 - cS * iy, thick, cm, c2); - draw_line_round_color(x1s + _xcr, y0 + _xcr * iy, xx1 - _ycr, y1s - _ycr * iy, thick, cm, cm); + draw_line_width_color(x1s + _xcr, y0 + _xcr * iy, xx1 - _ycr, y1s - _ycr * iy, thick, cm, cm); if(cS) draw_corner(xx1, y1 - cS * iy, xx1, y1, xx1 + cS, y1, thick, c2, sample); if(xcr) draw_corner(x1s - xcr, y0, x1s, y0, x1s + _xcr, y0 + _xcr * iy, thick, cm, sample); if(ycr) draw_corner(xx1 - _ycr, y1s - _ycr * iy, xx1, y1s, xx1, y1s + ycr * iy, thick, cm, sample); } else if(bot) { - draw_line_round_color(x0, y0, xx0 - cS, y0, thick, c1, c1); - draw_line_round_color(xx1, y1, x1, y1, thick, c2, c2); + draw_line_width_color(x0, y0, xx0 - cS, y0, thick, c1, c1); + draw_line_width_color(xx1, y1, x1, y1, thick, c2, c2); var cor = (y1 - cy) * 2; var x1s = xx0 + cor * iy; @@ -77,17 +77,17 @@ function draw_line_elbow_diag_color(x0, y0, x1, y1, cx = noone, cy = noone, _s = var _xcr = xcr / sqrt(2); var _ycr = ycr / sqrt(2); - draw_line_round_color(xx0, y0 + cS * iy, xx0, y1s - ycr * iy, thick, c1, cm); - draw_line_round_color(x1s + xcr, y1, xx1, y1, thick, cm, c2); + draw_line_width_color(xx0, y0 + cS * iy, xx0, y1s - ycr * iy, thick, c1, cm); + draw_line_width_color(x1s + xcr, y1, xx1, y1, thick, cm, c2); - draw_line_round_color(xx0 + _ycr, y1s + _ycr * iy, x1s - _xcr, y1 - _xcr * iy, thick, cm, cm); + draw_line_width_color(xx0 + _ycr, y1s + _ycr * iy, x1s - _xcr, y1 - _xcr * iy, thick, cm, cm); if(cS) draw_corner(xx0 - cS, y0, xx0, y0, xx0, y0 + cS * iy, thick, c1, sample); if(xcr) draw_corner(x1s - _xcr, y1 - _xcr * iy, x1s, y1, x1s + xcr, y1, thick, cm, sample); if(ycr) draw_corner(xx0, y1s - ycr * iy, xx0, y1s, xx0 + _ycr, y1s + _ycr * iy, thick, cm, sample); } else { - draw_line_round_color(x0, y0, xx0 - cS0, y0, thick, c1, c1); - draw_line_round_color(xx1 + cS1, y1, x1, y1, thick, c2, c2); + draw_line_width_color(x0, y0, xx0 - cS0, y0, thick, c1, c1); + draw_line_width_color(xx1 + cS1, y1, x1, y1, thick, c2, c2); var cor = rrx / 2; var yC0 = cy - cor * iy0; @@ -99,10 +99,10 @@ function draw_line_elbow_diag_color(x0, y0, x1, y1, cx = noone, cy = noone, _s = var _corY0 = corY0 / sqrt(2); var _corY1 = corY1 / sqrt(2); - draw_line_round_color(xx0, y0 + cS0 * iy, xx0, yC0 - corY0 * iy, thick, c1, cm); - draw_line_round_color(xx1, yC1 + corY1 * iy, xx1, y1 - cS1 * iy, thick, cm, c2); + draw_line_width_color(xx0, y0 + cS0 * iy, xx0, yC0 - corY0 * iy, thick, c1, cm); + draw_line_width_color(xx1, yC1 + corY1 * iy, xx1, y1 - cS1 * iy, thick, cm, c2); - draw_line_round_color(xx0 + _corY0, yC0 + _corY0 * iy, xx1 - _corY1, yC1 - _corY1 * iy, thick, cm, cm); + draw_line_width_color(xx0 + _corY0, yC0 + _corY0 * iy, xx1 - _corY1, yC1 - _corY1 * iy, thick, cm, cm); if(cS0) draw_corner(xx0 - cS0, y0, xx0, y0, xx0, y0 + cS0 * iy0, thick, c1, sample); if(cS1) draw_corner(xx1, y1 - cS1 * iy1, xx1, y1, xx1 + cS1, y1, thick, c2, sample); @@ -132,8 +132,8 @@ function draw_line_elbow_diag_color(x0, y0, x1, y1, cx = noone, cy = noone, _s = var _crn0 = crn0 / sqrt(2); var _crn1 = crn1 / sqrt(2); - draw_line_round_color(x0, y0, xx0 - cR0, y0, thick, c1, c1); - draw_line_round_color(xx1 + cR1, y1, x1, y1, thick, c2, c2); + draw_line_width_color(x0, y0, xx0 - cR0, y0, thick, c1, c1); + draw_line_width_color(xx1 + cR1, y1, x1, y1, thick, c2, c2); if(cS) draw_corner(xx0 - cR0, y0, xx0, y0, xx0, y0 + cR0 * iy0, thick, c1); if(cS) draw_corner(xx1, y1 - cR1 * iy1, xx1, y1, xx1 + cR1, y1, thick, c2); @@ -142,21 +142,21 @@ function draw_line_elbow_diag_color(x0, y0, x1, y1, cx = noone, cy = noone, _s = var cR = min(cS, abs(xx1 - xx0) / 2); var _cR = cR / sqrt(2); - draw_line_round_color( crX0, y0 + cR0 * iy0, crX0, crY0 - cR * iy0, thick, c1, cm); - draw_line_round_color( crX3, y1 - cR1 * iy1, crX3, crY3 + cR * iy1, thick, c2, cm); - draw_line_round_color( crX0 - _cR, crY0 + _cR * iy0, crX3 + _cR, crY3 - _cR * iy1, thick, cm, cm); + draw_line_width_color( crX0, y0 + cR0 * iy0, crX0, crY0 - cR * iy0, thick, c1, cm); + draw_line_width_color( crX3, y1 - cR1 * iy1, crX3, crY3 + cR * iy1, thick, c2, cm); + draw_line_width_color( crX0 - _cR, crY0 + _cR * iy0, crX3 + _cR, crY3 - _cR * iy1, thick, cm, cm); if(cR) { draw_corner( crX0, crY0 - cR * iy0, crX0, crY0, crX0 - _cR, crY0 + _cR * iy0, thick, cm, sample); draw_corner(crX3 + _cR, crY3 - _cR * iy1, crX3, crY3, crX3, crY3 + cR * iy1, thick, cm, sample); } } else { - draw_line_round_color( crX0, y0 + cR0 * iy0, crX0, crY0 - crn0 * iy0, thick, c1, cm); - draw_line_round_color(crX1 - crn0 * ix, crY1, crX2 + crn1 * ix, crY2, thick, cm, cm); - draw_line_round_color( crX3, crY3 + crn1 * iy1, crX3, y1 - cR1 * iy1, thick, cm, c2); + draw_line_width_color( crX0, y0 + cR0 * iy0, crX0, crY0 - crn0 * iy0, thick, c1, cm); + draw_line_width_color(crX1 - crn0 * ix, crY1, crX2 + crn1 * ix, crY2, thick, cm, cm); + draw_line_width_color( crX3, crY3 + crn1 * iy1, crX3, y1 - cR1 * iy1, thick, cm, c2); - draw_line_round_color(crX0 - _crn0 * ix, crY0 + _crn0 * iy0, crX1 + _crn0 * ix, crY1 - _crn0 * iy0, thick, cm, cm); - draw_line_round_color(crX2 - _crn1 * ix, crY2 + _crn1 * iy1, crX3 + _crn1 * ix, crY3 - _crn1 * iy1, thick, cm, cm); + draw_line_width_color(crX0 - _crn0 * ix, crY0 + _crn0 * iy0, crX1 + _crn0 * ix, crY1 - _crn0 * iy0, thick, cm, cm); + draw_line_width_color(crX2 - _crn1 * ix, crY2 + _crn1 * iy1, crX3 + _crn1 * ix, crY3 - _crn1 * iy1, thick, cm, cm); if(crn0) { draw_corner( crX0, crY0 - crn0 * iy0, crX0, crY0, crX0 - _crn0 * ix, crY0 + _crn0 * iy0, thick, cm, sample); @@ -185,9 +185,9 @@ function draw_line_elbow_diag_color(x0, y0, x1, y1, cx = noone, cy = noone, _s = var corn = min(corner, abs(x0 - _xc0), abs(x1 - _xc1), abs(y1 - y0) / 2); var cor2 = corn / sqrt(2); - draw_line_round_color( x0, y0, _xc0 - corn, y0, thick, c1, cm); - draw_line_round_color(_xc0 + cor2, y0 + cor2 * iy, _xc1 - cor2, y1 - cor2 * iy, thick, cm, cm); - draw_line_round_color(_xc1 + corn, y1, x1, y1, thick, cm, c2); + draw_line_width_color( x0, y0, _xc0 - corn, y0, thick, c1, cm); + draw_line_width_color(_xc0 + cor2, y0 + cor2 * iy, _xc1 - cor2, y1 - cor2 * iy, thick, cm, cm); + draw_line_width_color(_xc1 + corn, y1, x1, y1, thick, cm, c2); if(corn) { draw_corner(_xc0 - corn, y0, _xc0, y0, _xc0 + cor2, y0 + cor2 * iy, thick, cm, sample); @@ -214,9 +214,9 @@ function draw_line_elbow_diag_corner(x0, y0, x1, y1, _s = 1, thick = 1, col1 = c corner = min(corner, abs(x0 - x1 - diag), abs(y0 - y1 - diag)); var cor2 = corner / sqrt(2); - draw_line_round_color( x0, y0, x1 - (diag + corner) * sx, y0, thick, col1, colc); - draw_line_round_color(x1 - (diag - cor2) * sx, y0 + cor2 * sy, x1 - cor2 * sx, y0 + (diag - cor2) * sy, thick, colc, colc); - draw_line_round_color( x1, y0 + (diag + corner) * sy, x1, y1, thick, colc, col2); + draw_line_width_color( x0, y0, x1 - (diag + corner) * sx, y0, thick, col1, colc); + draw_line_width_color(x1 - (diag - cor2) * sx, y0 + cor2 * sy, x1 - cor2 * sx, y0 + (diag - cor2) * sy, thick, colc, colc); + draw_line_width_color( x1, y0 + (diag + corner) * sy, x1, y1, thick, colc, col2); draw_corner(x1 - (diag + corner) * sx, y0, x1 - diag * sx, y0, x1 - (diag - cor2) * sx, y0 + cor2 * sy, thick, colc, sample); draw_corner(x1 - cor2 * sx, y0 + (diag - cor2) * sy, x1, y0 + diag * sy, x1, y0 + (diag + corner) * sy, thick, colc, sample); diff --git a/scripts/draw_line_round/draw_line_round.gml b/scripts/draw_line_round/draw_line_round.gml index 86229488c..54b86766c 100644 --- a/scripts/draw_line_round/draw_line_round.gml +++ b/scripts/draw_line_round/draw_line_round.gml @@ -1,26 +1,35 @@ -function draw_line_round(x1, y1, x2, y2, w) { +function draw_line_round(x1, y1, x2, y2, w, stCap = true, edCap = true, sample = 8) { draw_line_width(x1, y1, x2, y2, w); - //draw_set_circle_precision(8); - //draw_circle(x1, y1, w/2, false); - //draw_circle(x2, y2, w/2, false); + draw_set_circle_precision(8); var dir = point_direction(x1, y1, x2, y2) + 90; - draw_circle_angle(x1 + 1, y1 + 1, w / 2, dir, dir + 90); - draw_circle_angle(x1 + 1, y1 + 1, w / 2, dir + 90, dir + 180); - draw_circle_angle(x2 + 1, y2 + 1, w / 2, dir, dir - 90); - draw_circle_angle(x2 + 1, y2 + 1, w / 2, dir - 90, dir - 180); + if(stCap) { + draw_circle(x1, y1, w/2, false); + //draw_circle_angle(x1 + 1, y1 + 1, w / 2, dir, dir + 90, sample / 2); + //draw_circle_angle(x1 + 1, y1 + 1, w / 2, dir + 90, dir + 180, sample / 2); + } + + if(edCap) { + draw_circle(x2, y2, w/2, false); + //draw_circle_angle(x2 + 1, y2 + 1, w / 2, dir, dir - 90, sample / 2); + //draw_circle_angle(x2 + 1, y2 + 1, w / 2, dir - 90, dir - 180, 4, sample / 2); + } } -function draw_line_round_color(x1, y1, x2, y2, w, c1, c2) { +function draw_line_round_color(x1, y1, x2, y2, w, c1, c2, stCap = true, edCap = true) { draw_line_width_color(x1, y1, x2, y2, w, c1, c2); draw_set_circle_precision(8); - draw_set_color(c1); - draw_circle(x1, y1, w/2, false); + if(stCap) { + draw_set_color(c1); + draw_circle(x1, y1, w/2, false); + } - draw_set_color(c2); - draw_circle(x2, y2, w/2, false); + if(edCap) { + draw_set_color(c2); + draw_circle(x2, y2, w/2, false); + } } function draw_line_round_arrow(x1, y1, x2, y2, w, as = 4) { diff --git a/scripts/draw_line_width_vertex/draw_line_width_vertex.gml b/scripts/draw_line_width_vertex/draw_line_width_vertex.gml new file mode 100644 index 000000000..facf3591b --- /dev/null +++ b/scripts/draw_line_width_vertex/draw_line_width_vertex.gml @@ -0,0 +1,28 @@ +function draw_line_width_vertex(xs, ys, xe, ye, thick, c0, c1) { + draw_primitive_begin(pr_trianglestrip); + + // Calculate the direction and perpendicular vector of the line + var dx = xe - xs; + var dy = ye - ys; + var line_length = point_distance(xs, ys, xe, ye); + var px = -dy / line_length * thick / 2; + var py = dx / line_length * thick / 2; + + // Calculate vertices of the rectangle + var x0 = xs + px; + var y0 = ys + py; + var x1 = xs - px; + var y1 = ys - py; + var x2 = xe + px; + var y2 = ye + py; + var x3 = xe - px; + var y3 = ye - py; + + // Draw vertices + draw_vertex_color(x0, y0, c0, 1); + draw_vertex_color(x1, y1, c0, 1); + draw_vertex_color(x2, y2, c1, 1); + draw_vertex_color(x3, y3, c1, 1); + + draw_primitive_end(); +} diff --git a/scripts/draw_line_width_vertex/draw_line_width_vertex.yy b/scripts/draw_line_width_vertex/draw_line_width_vertex.yy new file mode 100644 index 000000000..a0b09f73b --- /dev/null +++ b/scripts/draw_line_width_vertex/draw_line_width_vertex.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "draw_line_width_vertex", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "draw", + "path": "folders/functions/draw.yy", + }, +} \ No newline at end of file diff --git a/scripts/load_function/load_function.gml b/scripts/load_function/load_function.gml index 361affd1d..53b3771a1 100644 --- a/scripts/load_function/load_function.gml +++ b/scripts/load_function/load_function.gml @@ -13,10 +13,18 @@ function LOAD() { function TEST_PATH(path) { TESTING = true; TEST_ERROR = true; + + PROJECT.cleanup(); + PROJECT = new Project(); + PANEL_GRAPH.setProject(PROJECT); + __LOAD_PATH(path, false, false); } function LOAD_PATH(path, readonly = false, safe_mode = false) { + for( var i = 0; i < array_length(PROJECTS); i++ ) + if(PROJECTS[i].path == path) return; + var _PROJECT = PROJECT; PROJECT = new Project(); if(PANEL_GRAPH.project.path == "" && !PANEL_GRAPH.project.modified) { @@ -28,11 +36,13 @@ function LOAD_PATH(path, readonly = false, safe_mode = false) { } var res = __LOAD_PATH(path, readonly, safe_mode); - if(!res) return; + if(!res) return false; array_push(PROJECTS, PROJECT); PANEL_ANIMATION.updatePropertyList(); setFocus(PANEL_GRAPH.panel); + + return PROJECT; } function __LOAD_PATH(path, readonly = false, safe_mode = false, override = false) { diff --git a/scripts/node_cache_array/node_cache_array.gml b/scripts/node_cache_array/node_cache_array.gml index 9705fc1c6..dfb6a01a3 100644 --- a/scripts/node_cache_array/node_cache_array.gml +++ b/scripts/node_cache_array/node_cache_array.gml @@ -28,7 +28,9 @@ function Node_Cache_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constru static step = function() { if(cache_loading) { - cached_output[cache_loading_progress] = __surface_array_deserialize(cache_content[cache_loading_progress]); + var _content = cache_content[cache_loading_progress]; + + cached_output[cache_loading_progress] = __surface_array_deserialize(_content); cache_result[cache_loading_progress] = true; cache_loading_progress++; diff --git a/scripts/node_color_palette_replacement/node_color_palette_replacement.gml b/scripts/node_color_palette_replacement/node_color_palette_replacement.gml new file mode 100644 index 000000000..a56681813 --- /dev/null +++ b/scripts/node_color_palette_replacement/node_color_palette_replacement.gml @@ -0,0 +1,104 @@ +function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { + name = "Replace Palette"; + + shader = sh_palette_replace; + uniform_from = shader_get_uniform(shader, "colorFrom"); + uniform_from_count = shader_get_uniform(shader, "colorFrom_amo"); + + uniform_to = shader_get_uniform(shader, "colorTo"); + uniform_to_count = shader_get_uniform(shader, "colorTo_amo"); + + uniform_ter = shader_get_uniform(shader, "treshold"); + uniform_alp = shader_get_uniform(shader, "alphacmp"); + uniform_inv = shader_get_uniform(shader, "inverted"); + uniform_hrd = shader_get_uniform(shader, "hardReplace"); + + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + inputs[| 1] = nodeValue("Palette from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE, "Color to be replaced.") + .setDisplay(VALUE_DISPLAY.palette); + + inputs[| 2] = nodeValue("Palette to", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE, "Palette to be replaced to.") + .setDisplay(VALUE_DISPLAY.palette); + + inputs[| 3] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) + .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + + inputs[| 4] = nodeValue("Set others to black", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Set pixel that doesn't match any color in 'palette from' to black."); + + inputs[| 5] = nodeValue("Multiply alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); + + inputs[| 6] = nodeValue("Hard replace", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Completely override pixel with new color instead of blending between it."); + + inputs[| 7] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + + inputs[| 8] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) + .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + + inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); + active_index = 9; + + input_display_list = [ 9, + ["Output", true], 0, 7, 8, + ["Palette", false], 1, 2, + ["Comparison", false], 3, 5, + ["Render", false], 4, 6 + ]; + + outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); + + attribute_surface_depth(); + + static process_data = function(_outSurf, _data, _output_index, _array_index) { + var fr = _data[1]; + var to = _data[2]; + var tr = _data[3]; + var in = _data[4]; + var alp = _data[5]; + var hrd = _data[6]; + var msk = _data[7]; + + var _colorFrom = array_create(array_length(fr) * 4); + for(var i = 0; i < array_length(fr); i++) { + _colorFrom[i * 4 + 0] = color_get_red(fr[i]) / 255; + _colorFrom[i * 4 + 1] = color_get_green(fr[i]) / 255; + _colorFrom[i * 4 + 2] = color_get_blue(fr[i]) / 255; + _colorFrom[i * 4 + 3] = 1; + } + + var _colorTo = array_create(array_length(to) * 4); + for(var i = 0; i < array_length(to); i++) { + _colorTo[i * 4 + 0] = color_get_red(to[i]) / 255; + _colorTo[i * 4 + 1] = color_get_green(to[i]) / 255; + _colorTo[i * 4 + 2] = color_get_blue(to[i]) / 255; + _colorTo[i * 4 + 3] = 1; + } + + surface_set_target(_outSurf); + DRAW_CLEAR + BLEND_OVERRIDE; + + shader_set(shader); + shader_set_uniform_f_array_safe(uniform_from, _colorFrom); + shader_set_uniform_i(uniform_from_count, array_length(fr)); + shader_set_uniform_i(uniform_alp, alp); + shader_set_uniform_i(uniform_hrd, hrd); + + shader_set_uniform_f_array_safe(uniform_to, _colorTo); + shader_set_uniform_i(uniform_to_count, array_length(to)); + shader_set_uniform_f(uniform_ter, tr); + shader_set_uniform_i(uniform_inv, in); + + shader_set_i("useMask", is_surface(msk)); + shader_set_surface("mask", msk); + + draw_surface_safe(_data[0], 0, 0); + shader_reset(); + + BLEND_NORMAL + surface_reset_target(); + + if(!in) _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]); + + return _outSurf; + } +} \ No newline at end of file diff --git a/scripts/node_color_palette_replacement/node_color_palette_replacement.yy b/scripts/node_color_palette_replacement/node_color_palette_replacement.yy new file mode 100644 index 000000000..62223c2e9 --- /dev/null +++ b/scripts/node_color_palette_replacement/node_color_palette_replacement.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_color_palette_replacement", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "colors", + "path": "folders/nodes/data/filter/colors.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_color_palette_replacement/node_outline.yy b/scripts/node_color_palette_replacement/node_outline.yy new file mode 100644 index 000000000..86468bc09 --- /dev/null +++ b/scripts/node_color_palette_replacement/node_outline.yy @@ -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", +} \ No newline at end of file diff --git a/scripts/node_color_replacement/node_color_replacement.gml b/scripts/node_color_replacement/node_color_replacement.gml index 6e6a6b798..2f84827cc 100644 --- a/scripts/node_color_replacement/node_color_replacement.gml +++ b/scripts/node_color_replacement/node_color_replacement.gml @@ -1,103 +1,188 @@ -function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { - name = "Replace Color"; - - shader = sh_palette_replace; - uniform_from = shader_get_uniform(shader, "colorFrom"); - uniform_from_count = shader_get_uniform(shader, "colorFrom_amo"); - - uniform_to = shader_get_uniform(shader, "colorTo"); - uniform_to_count = shader_get_uniform(shader, "colorTo_amo"); - - uniform_ter = shader_get_uniform(shader, "treshold"); - uniform_alp = shader_get_uniform(shader, "alphacmp"); - uniform_inv = shader_get_uniform(shader, "inverted"); - uniform_hrd = shader_get_uniform(shader, "hardReplace"); +function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { + name = "Replace Colors"; inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = nodeValue("Palette from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE, "Color to be replaced.") + inputs[| 1] = nodeValue("Palette from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); - inputs[| 2] = nodeValue("Palette to", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE, "Palette to be replaced to.") + inputs[| 2] = nodeValue("Palette to", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); inputs[| 3] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); - inputs[| 4] = nodeValue("Set others to black", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Set pixel that doesn't match any color in 'palette from' to black."); + inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 5] = nodeValue("Multiply alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - - inputs[| 6] = nodeValue("Hard replace", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Completely override pixel with new color instead of blending between it."); - - inputs[| 7] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - - inputs[| 8] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) + inputs[| 5] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); - inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); - active_index = 9; + inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); + active_index = 6; + + selecting_index = 0; - input_display_list = [ 9, - ["Output", true], 0, 7, 8, - ["Palette", false], 1, 2, - ["Comparison", false], 3, 5, - ["Render", false], 4, 6 + function setColor(colr) { + var _to = inputs[| 2].getValue(); + _to[selecting_index] = colr; + + inputs[| 2].setValue(_to); + } + + render_palette = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { + var bx = _x; + var by = _y; + + var bs = ui(24); + if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover,, THEME.refresh_s) == 2) + refreshPalette(); + + bx += bs + ui(4); + var jun = inputs[| 2]; + var index = jun.value_from == noone? jun.is_anim : 2; + if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover,, THEME.animate_clock, index, index == 2? COLORS._main_accent : COLORS._main_icon) == 2) + jun.setAnim(!jun.is_anim); + + bx += bs + ui(4); + index = jun.visible; + if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover,, THEME.junc_visible, index) == 2) + jun.visible = !jun.visible; + + var _from = inputs[| 1].getValue(); + var _to = inputs[| 2].getValue(); + + var ss = TEXTBOX_HEIGHT; + var amo = array_length(_from); + var top = bs + ui(8); + var hh = top + (amo * (ss + ui(8)) + ui(8)); + var _yy = _y + top; + + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _yy, _w, hh - top, COLORS.node_composite_bg_blend, 1); + + for( var i = 0; i < amo; i++ ) { + var fr = array_safe_get(_from, i); + var to = array_safe_get(_to, i); + + var _x0 = _x + ui(8); + var _y0 = _yy + ui(8) + i * (ss + ui(8)); + + draw_sprite_stretched_ext(THEME.color_picker_box, 0, _x0, _y0, ss, ss, COLORS._main_icon, 0.5); + draw_sprite_stretched_ext(THEME.color_picker_box, 1, _x0, _y0, ss, ss, fr, 1); + + var _x1 = _x0 + ss + ui(32); + var _x2 = _x + _w - ui(8); + + bx = _x2 - ui(32); + _x2 -= ui(32 + 4); + by = _y0 + ss / 2 - ui(32) / 2; + if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), _m, _focus, _hover,, THEME.color_picker_dropper,, c_white) == 2) { + var dialog = dialogCall(o_dialog_color_selector, WIN_W / 2, WIN_H / 2); + dialog.selector.dropper_active = true; + dialog.selector.dropper_close = true; + + dialog.selector.onApply = setColor; + dialog.onApply = setColor; + } + + bx = _x2 - ui(32); + _x2 -= ui(32 + 4); + if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), _m, _focus, _hover,, THEME.color_wheel,, c_white) == 2) { + var pick = instance_create(mouse_mx, mouse_my, o_dialog_color_quick_pick); + pick.onApply = setColor; + selecting_index = i; + } + + _x2 -= ui(4); + + var _xw = _x2 - _x1; + + draw_sprite_ext(THEME.arrow, 0, (_x0 + ss + _x1) / 2, _y0 + ss / 2, 1, 1, 0, c_white, 0.5); + + draw_sprite_stretched_ext(THEME.color_picker_box, 1, _x1, _y0, _xw, ss, to, 1); + + if(_hover && point_in_rectangle(_m[0], _m[1], _x1, _y0, _x1 + _xw, _y0 + ss)) { + draw_sprite_stretched_ext(THEME.color_picker_box, 0, _x1, _y0, _xw, ss, COLORS._main_icon, 1); + + if(mouse_press(mb_left, _focus)) { + var dialog = dialogCall(o_dialog_color_selector, WIN_W / 2, WIN_H / 2); + dialog.setDefault(to); + dialog.selector.onApply = setColor; + dialog.onApply = setColor; + selecting_index = i; + } + } else + draw_sprite_stretched_ext(THEME.color_picker_box, 0, _x1, _y0, _xw, ss, COLORS._main_icon, 0.5); + } + + return hh; + }); + + input_display_list = [ 6, + ["Output", true], 0, 4, 5, + ["Replace", false], render_palette, + ["Comparison", false], 3, ]; outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); attribute_surface_depth(); + static refreshPalette = function() { + var _surf = array_safe_get(current_data, 0); + + inputs[| 1].setValue([]); + inputs[| 2].setValue([]); + + if(!is_array(_surf)) + _surf = [ _surf ]; + + var _pall = ds_map_create(); + + for( var i = 0; i < array_length(_surf); i++ ) { + var ww = surface_get_width(_surf[i]); + var hh = surface_get_height(_surf[i]); + + var c_buffer = buffer_create(ww * hh * 4, buffer_fixed, 2); + + buffer_get_surface(c_buffer, _surf[i], 0); + buffer_seek(c_buffer, buffer_seek_start, 0); + + for( var i = 0; i < ww * hh; i++ ) { + var b = buffer_read(c_buffer, buffer_u32); + var c = b & ~(0b11111111 << 24); + var a = b & (0b11111111 << 24); + if(a == 0) continue; + c = make_color_rgb(color_get_red(c), color_get_green(c), color_get_blue(c)); + _pall[? c] = 1; + } + + buffer_delete(c_buffer); + } + + var palette = ds_map_keys_to_array(_pall); + ds_map_destroy(_pall); + + inputs[| 1].setValue(palette); + inputs[| 2].setValue(palette); + } + static process_data = function(_outSurf, _data, _output_index, _array_index) { var fr = _data[1]; var to = _data[2]; var tr = _data[3]; - var in = _data[4]; - var alp = _data[5]; - var hrd = _data[6]; - var msk = _data[7]; + var msk = _data[4]; - var _colorFrom = array_create(array_length(fr) * 4); - for(var i = 0; i < array_length(fr); i++) { - _colorFrom[i * 4 + 0] = color_get_red(fr[i]) / 255; - _colorFrom[i * 4 + 1] = color_get_green(fr[i]) / 255; - _colorFrom[i * 4 + 2] = color_get_blue(fr[i]) / 255; - _colorFrom[i * 4 + 3] = 1; - } - - var _colorTo = array_create(array_length(to) * 4); - for(var i = 0; i < array_length(to); i++) { - _colorTo[i * 4 + 0] = color_get_red(to[i]) / 255; - _colorTo[i * 4 + 1] = color_get_green(to[i]) / 255; - _colorTo[i * 4 + 2] = color_get_blue(to[i]) / 255; - _colorTo[i * 4 + 3] = 1; - } - - surface_set_target(_outSurf); - DRAW_CLEAR - BLEND_OVERRIDE; - - shader_set(shader); - shader_set_uniform_f_array_safe(uniform_from, _colorFrom); - shader_set_uniform_i(uniform_from_count, array_length(fr)); - shader_set_uniform_i(uniform_alp, alp); - shader_set_uniform_i(uniform_hrd, hrd); - - shader_set_uniform_f_array_safe(uniform_to, _colorTo); - shader_set_uniform_i(uniform_to_count, array_length(to)); - shader_set_uniform_f(uniform_ter, tr); - shader_set_uniform_i(uniform_inv, in); + surface_set_shader(_outSurf, sh_colours_replace); + shader_set_palette(fr, "colorFrom", "colorFromAmount"); + shader_set_palette(to, "colorTo", "colorToAmount"); shader_set_i("useMask", is_surface(msk)); shader_set_surface("mask", msk); draw_surface_safe(_data[0], 0, 0); - shader_reset(); - BLEND_NORMAL - surface_reset_target(); + surface_reset_shader(); - if(!in) _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]); + _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); return _outSurf; } diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index ea0ee6b8d..b03f66826 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -35,7 +35,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x run_in(1, function() { if(display_name != "") return; resetInternalName(); - display_name = __txt_node_name(instanceof(self), name); + display_name = name; //__txt_node_name(instanceof(self), name); }); } @@ -769,7 +769,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x var th = max(1, PREF_MAP[? "connection_line_width"] * _s); jun.draw_line_shift_hover = false; - var drawCorner = jun.type == VALUE_TYPE.action || jun.value_from.type == VALUE_TYPE.action; + var downDirection = jun.type == VALUE_TYPE.action || jun.value_from.type == VALUE_TYPE.action; if(PANEL_GRAPH.pHOVER) switch(PREF_MAP[? "curve_connection_line"]) { @@ -777,7 +777,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x hover = distance_to_line(mx, my, jx, jy, frx, fry) < max(th * 2, 6); break; case 1 : - if(drawCorner) + if(downDirection) hover = distance_to_curve_corner(mx, my, jx, jy, frx, fry, _s) < max(th * 2, 6); else hover = distance_to_curve(mx, my, jx, jy, frx, fry, cx, cy, _s) < max(th * 2, 6); @@ -786,7 +786,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x jun.draw_line_shift_hover = hover; break; case 2 : - if(drawCorner) + if(downDirection) hover = distance_to_elbow_corner(mx, my, frx, fry, jx, jy) < max(th * 2, 6); else hover = distance_to_elbow(mx, my, frx, fry, jx, jy, cx, cy, _s, jun.value_from.drawLineIndex, jun.drawLineIndex) < max(th * 2, 6); @@ -795,7 +795,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x jun.draw_line_shift_hover = hover; break; case 3 : - if(drawCorner) + if(downDirection) hover = distance_to_elbow_diag_corner(mx, my, frx, fry, jx, jy) < max(th * 2, 6); else hover = distance_to_elbow_diag(mx, my, frx, fry, jx, jy, cx, cy, _s, jun.value_from.drawLineIndex, jun.drawLineIndex) < max(th * 2, 6); @@ -831,30 +831,35 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x corner *= aa; th = max(1, round(th)); + draw_set_color(c0); + + var fromIndex = jun.value_from.drawLineIndex; + var toIndex = jun.drawLineIndex; + switch(PREF_MAP[? "curve_connection_line"]) { case 0 : if(ty == LINE_STYLE.solid) - draw_line_width_color(jx, jy, frx, fry, th, c1, c0); - else + draw_line_width_vertex(jx, jy, frx, fry, th, c1, c0); + else draw_line_dashed_color(jx, jy, frx, fry, th, c1, c0, 12 * ss); break; case 1 : - if(drawCorner) + if(downDirection) draw_line_curve_corner(jx, jy, frx, fry, ss, th, c0, c1); - else + else draw_line_curve_color(jx, jy, frx, fry, cx, cy, ss, th, c0, c1, ty); break; case 2 : - if(drawCorner) - draw_line_elbow_corner(frx, fry, jx, jy, ss, th, c0, c1, corner, jun.value_from.drawLineIndex, jun.drawLineIndex, ty); - else - draw_line_elbow_color(frx, fry, jx, jy, cx, cy, ss, th, c0, c1, corner, jun.value_from.drawLineIndex, jun.drawLineIndex, ty); + if(downDirection) + draw_line_elbow_corner(frx, fry, jx, jy, ss, th, c0, c1, corner, fromIndex, toIndex, ty); + else + draw_line_elbow_color(frx, fry, jx, jy, cx, cy, ss, th, c0, c1, corner, fromIndex, toIndex, ty); break; case 3 : - if(drawCorner) - draw_line_elbow_diag_corner(frx, fry, jx, jy, ss, th, c0, c1, corner, jun.value_from.drawLineIndex, jun.drawLineIndex, ty); - else - draw_line_elbow_diag_color(frx, fry, jx, jy, cx, cy, ss, th, c0, c1, corner, jun.value_from.drawLineIndex, jun.drawLineIndex, ty); + if(downDirection) + draw_line_elbow_diag_corner(frx, fry, jx, jy, ss, th, c0, c1, corner, fromIndex, toIndex, ty); + else + draw_line_elbow_diag_color(frx, fry, jx, jy, cx, cy, ss, th, c0, c1, corner, fromIndex, toIndex, ty); break; } } @@ -961,16 +966,18 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x if(!active) return; if(_s * w < 64) return; - draw_set_text(_s >= 1? f_p1 : f_p2, fa_center, fa_top, COLORS.panel_graph_node_dimension); + draw_set_text(f_p2, fa_center, fa_top, COLORS.panel_graph_node_dimension); var tx = xx + w * _s / 2; - var ty = yy + (h + 4) * _s; + var ty = yy + (h + 4) * _s - 2; if(PANEL_GRAPH.show_dimension) { var txt = string(getNodeDimension(_s > 0.65)); draw_text(round(tx), round(ty), txt); - ty += string_height(txt) - 4; + ty += string_height(txt) - 2; } + draw_set_font(f_p3); + if(PANEL_GRAPH.show_compute) { var rt, unit; if(render_time < 1000) { diff --git a/scripts/node_pb/node_pb.gml b/scripts/node_pb/node_pb.gml index 06f7b796d..53a4b5636 100644 --- a/scripts/node_pb/node_pb.gml +++ b/scripts/node_pb/node_pb.gml @@ -9,6 +9,25 @@ function Node_PB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr static getNextNodesRaw = getNextNodes; + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + if(drawOverlayPB != noone) + drawOverlayPB(active, _x, _y, _s, _mx, _my, _snx, _sny); + + for( var i = 0; i < ds_list_size(outputs); i++ ) { + if(outputs[| i].type != VALUE_TYPE.pbBox) continue; + + var _box = outputs[| i].getValue(); + if(!is_array(_box)) _box = [ _box ]; + + for( var j = 0; j < array_length(_box); j++ ) { + if(!is_instanceof(_box[j], __pbBox)) continue; + _box[j].drawOverlay(_x, _y, _s, c_red); + } + } + } + + static drawOverlayPB = noone; + static getNextNodes = function() { if(!struct_has(group, "checkComplete")) return []; diff --git a/scripts/node_pb_box_contract/node_pb_box_contract.gml b/scripts/node_pb_box_contract/node_pb_box_contract.gml index f9c2be419..e5f2d9105 100644 --- a/scripts/node_pb_box_contract/node_pb_box_contract.gml +++ b/scripts/node_pb_box_contract/node_pb_box_contract.gml @@ -34,29 +34,6 @@ function Node_PB_Box_Contract(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gro else inputs[| 4].name = "Fix Height"; } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _b0 = outputs[| 0].getValue(); - var _b1 = outputs[| 1].getValue(); - - for( var i = 0; i < array_length(_b1); i++ ) { - var _b1x0 = _x + _b1[i].x * _s; - var _b1y0 = _y + _b1[i].y * _s; - var _b1x1 = _b1x0 + _b1[i].w * _s; - var _b1y1 = _b1y0 + _b1[i].h * _s; - - draw_set_color(c_red); - draw_rectangle(_b1x0, _b1y0, _b1x1, _b1y1, true); - } - - var _b0x0 = _x + _b0.x * _s; - var _b0y0 = _y + _b0.y * _s; - var _b0x1 = _b0x0 + _b0.w * _s; - var _b0y1 = _b0y0 + _b0.h * _s; - - draw_set_color(c_blue); - draw_rectangle(_b0x0, _b0y0, _b0x1, _b0y1, true); - } - static process_data = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; @@ -76,13 +53,19 @@ function Node_PB_Box_Contract(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gro } if(_output_index == 0) { - _pbox = _pbox.clone(); - _pbox.layer += _layr; + var _nbox = _pbox.clone(); + _nbox.layer += _layr; - _pbox.x += (_pbox.w - _w) / 2; - _pbox.w = _w; + _nbox.x += (_nbox.w - _w) / 2; + _nbox.w = _w; + + _nbox.content = surface_stretch(_nbox.content, _nbox.w, _nbox.h); } else if(_output_index == 1) { _pbox = [ _pbox.clone(), _pbox.clone() ]; + + _pbox[0].content = noone; + _pbox[1].content = noone; + _pbox[0].layer += _layr; _pbox[1].layer += _layr; @@ -102,13 +85,19 @@ function Node_PB_Box_Contract(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gro } if(_output_index == 0) { - _pbox = _pbox.clone(); - _pbox.layer += _layr; + var _nbox = _pbox.clone(); + _nbox.layer += _layr; - _pbox.y += (_pbox.h - _h) / 2; - _pbox.h = _h; + _nbox.y += (_nbox.h - _h) / 2; + _nbox.h = _h; + + _nbox.content = surface_stretch(_nbox.content, _nbox.w, _nbox.h); } else if(_output_index == 1) { _pbox = [ _pbox.clone(), _pbox.clone() ]; + + _pbox[0].content = noone; + _pbox[1].content = noone; + _pbox[0].layer += _layr; _pbox[1].layer += _layr; diff --git a/scripts/node_pb_box_divide/node_pb_box_divide.gml b/scripts/node_pb_box_divide/node_pb_box_divide.gml index 6524f417c..021262160 100644 --- a/scripts/node_pb_box_divide/node_pb_box_divide.gml +++ b/scripts/node_pb_box_divide/node_pb_box_divide.gml @@ -24,24 +24,6 @@ function Node_PB_Box_Divide(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group ["Divide", false], 4, 2, 3, 6, 5, ] - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _bs = outputs[| 0].getValue(); - if(_bs == noone) return; - if(!is_array(_bs)) return; - - for( var i = 0; i < array_length(_bs); i++ ) { - var _b = _bs[i]; - if(_b == noone) continue; - var _bx0 = _x + _b.x * _s; - var _by0 = _y + _b.y * _s; - var _bx1 = _bx0 + _b.w * _s; - var _by1 = _by0 + _b.h * _s; - - draw_set_color(c_red); - draw_rectangle(_bx0, _by0, _bx1, _by1, true); - } - } - static process_data = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; @@ -84,12 +66,20 @@ function Node_PB_Box_Divide(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group _res[i].x = _sx + i * (_ww + _spac); _res[i].w = _ww; - if(_mirr && i % 2) _res[i].mirror_h = !_res[i].mirror_h; + _res[i].mask = surface_stretch(_res[i].mask, _res[i].w, _res[i].h); + _res[i].content = surface_stretch(_res[i].content, _res[i].w, _res[i].h); + + if(_mirr && i % 2) { + _res[i].mirror_h = !_res[i].mirror_h; + _res[i].mask = surface_mirror(_res[i].mask, true, false); + _res[i].content = surface_mirror(_res[i].content, true, false); + } } if(_output_index == 1) for( var i = 0; i < _spAmo; i++ ) { _res[i] = _pbox.clone(); + _res[i].mask = noone; _res[i].layer += _layr; var _sx = 0; @@ -114,12 +104,20 @@ function Node_PB_Box_Divide(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group _res[i].y = _sy + i * (_hh + _spac); _res[i].h = _hh; - if(_mirr && i % 2) _res[i].mirror_v = !_res[i].mirror_v; + _res[i].mask = surface_stretch(_res[i].mask, _res[i].w, _res[i].h); + _res[i].content = surface_stretch(_res[i].content, _res[i].w, _res[i].h); + + if(_mirr && i % 2) { + _res[i].mirror_v = !_res[i].mirror_v; + _res[i].mask = surface_mirror(_res[i].mask, false, true); + _res[i].content = surface_mirror(_res[i].content, false, true); + } } if(_output_index == 1) for( var i = 0; i < _spAmo; i++ ) { _res[i] = _pbox.clone(); + _res[i].mask = noone; _res[i].layer += _layr; var _sy = 0; diff --git a/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml b/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml index 56f2e8541..c7096ecf3 100644 --- a/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml +++ b/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml @@ -17,24 +17,6 @@ function Node_PB_Box_Divide_Grid(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _ ["Divide", false], 2, 3, 4, ] - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _bs = outputs[| 0].getValue(); - if(_bs == noone) return; - if(!is_array(_bs)) return; - - for( var i = 0; i < array_length(_bs); i++ ) { - var _b = _bs[i]; - if(_b == noone) continue; - var _bx0 = _x + _b.x * _s; - var _by0 = _y + _b.y * _s; - var _bx1 = _bx0 + _b.w * _s; - var _by1 = _by0 + _b.h * _s; - - draw_set_color(c_red); - draw_rectangle(_bx0, _by0, _bx1, _by1, true); - } - } - static process_data = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; @@ -64,8 +46,19 @@ function Node_PB_Box_Divide_Grid(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _ _res[_ind].y = _pbox.y + i * (_hh + _spac); _res[_ind].h = _hh; - if(_mirr && j % 2) _res[_ind].mirror_h = !_res[_ind].mirror_h; - if(_mirr && i % 2) _res[_ind].mirror_v = !_res[_ind].mirror_v; + _res[_ind].mask = surface_stretch(_res[_ind].mask, _res[_ind].w, _res[_ind].h); + + if(_mirr && j % 2) { + _res[_ind].mirror_h = !_res[_ind].mirror_h; + _res[_ind].mask = surface_mirror(_res[_ind].mask, true, false); + _res[_ind].content = surface_mirror(_res[_ind].content, true, false); + } + + if(_mirr && i % 2) { + _res[_ind].mirror_v = !_res[_ind].mirror_v; + _res[_ind].mask = surface_mirror(_res[_ind].mask, false, true); + _res[_ind].content = surface_mirror(_res[_ind].content, false, true); + } } return _res; diff --git a/scripts/node_pb_box_inset/node_pb_box_inset.gml b/scripts/node_pb_box_inset/node_pb_box_inset.gml index 3fb672522..032f08da9 100644 --- a/scripts/node_pb_box_inset/node_pb_box_inset.gml +++ b/scripts/node_pb_box_inset/node_pb_box_inset.gml @@ -29,18 +29,6 @@ function Node_PB_Box_Inset(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) input_display_list = [ 0, 1, ["Inset", false], 3, 2, 4, 5, 6, 7, ] - - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _b0 = outputs[| 0].getValue(); - - var _b0x0 = _x + _b0.x * _s; - var _b0y0 = _y + _b0.y * _s; - var _b0x1 = _b0x0 + _b0.w * _s; - var _b0y1 = _b0y0 + _b0.h * _s; - - draw_set_color(c_red); - draw_rectangle(_b0x0, _b0y0, _b0x1, _b0y1, true); - } static step = function() { var _type = current_data[3]; @@ -64,52 +52,90 @@ function Node_PB_Box_Inset(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) if(_pbox == noone) return noone; - _pbox = _pbox.clone(); + var _nbox = _pbox.clone(); var x0, y0, w, h; if(_type == 0) { - if(_pbox.mirror_h) x0 = _pbox.x + _inst[0]; - else x0 = _pbox.x + _inst[2]; + if(_nbox.mirror_h) x0 = _nbox.x + _inst[0]; + else x0 = _nbox.x + _inst[2]; - if(_pbox.mirror_v) y0 = _pbox.y + _inst[3]; - else y0 = _pbox.y + _inst[1]; + if(_nbox.mirror_v) y0 = _nbox.y + _inst[3]; + else y0 = _nbox.y + _inst[1]; - w = _pbox.w - (_inst[0] + _inst[2]); - h = _pbox.h - (_inst[1] + _inst[3]); + w = _nbox.w - (_inst[0] + _inst[2]); + h = _nbox.h - (_inst[1] + _inst[3]); } else if(_type == 1) { - w = round(_pbox.w * _widt); - h = round(_pbox.h * _high); + w = round(_nbox.w * _widt); + h = round(_nbox.h * _high); - x0 = _pbox.x + (_pbox.w - w) * (_pbox.mirror_h? 1. - _hali : _hali); - y0 = _pbox.y + (_pbox.h - h) * (_pbox.mirror_v? 1. - _vali : _vali); + x0 = _nbox.x + (_nbox.w - w) * (_nbox.mirror_h? 1. - _hali : _hali); + y0 = _nbox.y + (_nbox.h - h) * (_nbox.mirror_v? 1. - _vali : _vali); } if(_output_index == 0) { - _pbox.layer += _layr; - _pbox.x = x0; - _pbox.y = y0; - _pbox.w = w; - _pbox.h = h; - } else if(_output_index == 1) { - _pbox.mask = surface_create_valid(_pbox.w, _pbox.h); + _nbox.layer += _layr; + _nbox.x = x0; + _nbox.y = y0; + _nbox.w = w; + _nbox.h = h; - var _x = x0 - _pbox.x; - var _y = y0 - _pbox.y; + if(is_surface(_pbox.mask)) { + if(_type == 0) { + _nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h); + surface_set_shader(_nbox.mask, sh_pb_mask_inset); + shader_set_dim(, _pbox.mask); + shader_set_f("inset", _inst); + + draw_surface(_pbox.mask, -_inst[2], -_inst[1]); + surface_reset_shader(); + } else if(_type == 1) + _nbox.mask = surface_stretch(_pbox.mask, _nbox.w, _nbox.h); + } + + if(is_surface(_pbox.content)) { + if(_type == 0) { + _nbox.content = surface_verify(_nbox.content, _nbox.w, _nbox.h); + surface_set_shader(_nbox.content, sh_pb_mask_inset); + shader_set_dim(, _pbox.content); + shader_set_f("inset", _inst); + + draw_surface(_pbox.content, -_inst[2], -_inst[1]); + surface_reset_shader(); + } else if(_type == 1) + _nbox.content = surface_stretch(_pbox.content, _nbox.w, _nbox.h); + } + } else if(_output_index == 1) { + _nbox.mask = surface_create_valid(_nbox.w, _nbox.h); + _nbox.content = surface_create_valid(_nbox.w, _nbox.h); + + var _x = x0 - _nbox.x; + var _y = y0 - _nbox.y; var _w = w; var _h = h; - surface_set_target(_pbox.mask); - draw_clear(c_white); + surface_set_target(_nbox.mask); + if(is_surface(_pbox.mask)) { + draw_clear_alpha(0, 0); + draw_surface(_pbox.mask, 0, 0); + } else + draw_clear(c_white); + + var _msk = outputs[| 0].getValue(); + if(is_array(_msk)) _msk = array_safe_get(_msk, _array_index); - draw_set_color(c_white); BLEND_SUBTRACT - draw_rectangle(_x, _y, _x + _w - 1, _y + _h - 1, false); + if(is_surface(_msk.mask)) + draw_surface(_msk.mask, _x, _y); + else { + draw_set_color(c_white); + draw_rectangle(_x, _y, _x + _w - 1, _y + _h - 1, false); + } BLEND_NORMAL surface_reset_target(); } - return _pbox; + return _nbox; } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_pb_box_mirror/node_pb_box_mirror.gml b/scripts/node_pb_box_mirror/node_pb_box_mirror.gml index 3e69693c6..471a85681 100644 --- a/scripts/node_pb_box_mirror/node_pb_box_mirror.gml +++ b/scripts/node_pb_box_mirror/node_pb_box_mirror.gml @@ -25,8 +25,17 @@ function Node_PB_Box_Mirror(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group _pbox = _pbox.clone(); _pbox.layer += _layr; - if(_hori) _pbox.mirror_h = !_pbox.mirror_h; - if(_vert) _pbox.mirror_v = !_pbox.mirror_v; + if(_hori) { + _pbox.mirror_h = !_pbox.mirror_h; + _pbox.mask = surface_mirror(_pbox.mask, true, false); + _pbox.content = surface_mirror(_pbox.content, true, false); + } + + if(_vert) { + _pbox.mirror_v = !_pbox.mirror_v; + _pbox.mask = surface_mirror(_pbox.mask, false, true); + _pbox.content = surface_mirror(_pbox.content, false, true); + } return _pbox; } diff --git a/scripts/node_pb_box_split/node_pb_box_split.gml b/scripts/node_pb_box_split/node_pb_box_split.gml index df1aa287e..93b674571 100644 --- a/scripts/node_pb_box_split/node_pb_box_split.gml +++ b/scripts/node_pb_box_split/node_pb_box_split.gml @@ -41,34 +41,6 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) } } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - var _b0 = outputs[| 0].getValue(); - var _b1 = outputs[| 1].getValue(); - - if(!is_array(_b0)) _b0 = [ _b0 ]; - if(!is_array(_b1)) _b1 = [ _b1 ]; - - for( var i = 0; i < array_length(_b0); i++ ) { - var _b0x0 = _x + _b0[i].x * _s; - var _b0y0 = _y + _b0[i].y * _s; - var _b0x1 = _b0x0 + _b0[i].w * _s; - var _b0y1 = _b0y0 + _b0[i].h * _s; - - draw_set_color(c_red); - draw_rectangle(_b0x0, _b0y0, _b0x1, _b0y1, true); - } - - for( var i = 0; i < array_length(_b1); i++ ) { - var _b1x0 = _x + _b1[i].x * _s; - var _b1y0 = _y + _b1[i].y * _s; - var _b1x1 = _b1x0 + _b1[i].w * _s; - var _b1y1 = _b1y0 + _b1[i].h * _s; - - draw_set_color(c_blue); - draw_rectangle(_b1x0, _b1y0, _b1x1, _b1y1, true); - } - } - static process_data = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; @@ -80,60 +52,138 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) if(_pbox == noone) return noone; - _pbox = _pbox.clone(); - _pbox.layer += _layr; + var _nbox = _pbox.clone(); + _nbox.layer += _layr; if(_axis == 0) { var _w; switch(_type) { - case 0 : _w = _pbox.w * _rati; break; + case 0 : _w = _nbox.w * _rati; break; case 1 : _w = _fixx; break; - case 2 : _w = _pbox.w - _fixx; break; + case 2 : _w = _nbox.w - _fixx; break; } - if(_pbox.mirror_h) { + if(_nbox.mirror_h) { _output_index = !_output_index; - _w = _pbox.w - _w; + _w = _nbox.w - _w; } if(_output_index == 0) { - _pbox.w = round(_w); + _nbox.w = round(_w); + + if(is_surface(_pbox.mask)) { + _nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h); + surface_set_target(_nbox.mask); + DRAW_CLEAR + draw_surface(_pbox.mask, 0, 0); + surface_reset_target(); + } + + if(is_surface(_pbox.content)) { + _nbox.content = surface_verify(_nbox.content, _nbox.w, _nbox.h); + surface_set_target(_nbox.content); + DRAW_CLEAR + draw_surface(_pbox.content, 0, 0); + surface_reset_target(); + } } else if(_output_index == 1) { - _w = _pbox.w - _w; + _w = _nbox.w - _w; - _pbox.x += _pbox.w - round(_w); - _pbox.w = round(_w); + var shf = _nbox.w - round(_w); + _nbox.x += shf; + _nbox.w = round(_w); - if(_mirr) _pbox.mirror_h = !_pbox.mirror_h; + if(_mirr) _nbox.mirror_h = !_nbox.mirror_h; + + if(is_surface(_pbox.mask)) { + _nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h); + surface_set_target(_nbox.mask); + DRAW_CLEAR + if(_mirr) + draw_surface_ext(_pbox.mask, _nbox.w + shf, 0, -1, 1, 0, c_white, 1); + else + draw_surface(_pbox.mask, -shf, 0); + surface_reset_target(); + } + + if(is_surface(_pbox.content)) { + _nbox.content = surface_verify(_nbox.content, _nbox.w, _nbox.h); + surface_set_target(_nbox.content); + DRAW_CLEAR + if(_mirr) + draw_surface_ext(_pbox.content, _nbox.w + shf, 0, -1, 1, 0, c_white, 1); + else + draw_surface(_pbox.content, -shf, 0); + surface_reset_target(); + } } } else { var _h; switch(_type) { - case 0 : _h = _pbox.h * _rati; break; + case 0 : _h = _nbox.h * _rati; break; case 1 : _h = _fixx; break; - case 2 : _h = _pbox.h - _fixx; break; + case 2 : _h = _nbox.h - _fixx; break; } - - if(_pbox.mirror_v) { + + if(_nbox.mirror_v) { _output_index = !_output_index; - _h = _pbox.h - _h; + _h = _nbox.h - _h; } if(_output_index == 0) { - _pbox.h = round(_h); - } else if(_output_index == 1) { - _h = _pbox.h - _h; - - _pbox.y += _pbox.h - round(_h); - _pbox.h = round(_h); + _nbox.h = round(_h); - if(_mirr) _pbox.mirror_v = !_pbox.mirror_v; + if(is_surface(_pbox.mask)) { + _nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h); + surface_set_target(_nbox.mask); + DRAW_CLEAR + draw_surface(_pbox.mask, 0, 0); + surface_reset_target(); + } + + if(is_surface(_pbox.content)) { + _nbox.content = surface_verify(_nbox.content, _nbox.w, _nbox.h); + surface_set_target(_nbox.content); + DRAW_CLEAR + draw_surface(_pbox.content, 0, 0); + surface_reset_target(); + } + } else if(_output_index == 1) { + _h = _nbox.h - _h; + + var shf = _nbox.h - round(_h); + _nbox.y += shf; + _nbox.h = round(_h); + + if(_mirr) _nbox.mirror_v = !_nbox.mirror_v; + + if(is_surface(_pbox.mask)) { + _nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h); + surface_set_target(_nbox.mask); + DRAW_CLEAR + if(_mirr) + draw_surface_ext(_pbox.mask, 0, _nbox.h + shf, 1, -1, 0, c_white, 1); + else + draw_surface(_pbox.mask, -shf, 0); + surface_reset_target(); + } + + if(is_surface(_pbox.content)) { + _nbox.content = surface_verify(_nbox.content, _nbox.w, _nbox.h); + surface_set_target(_nbox.content); + DRAW_CLEAR + if(_mirr) + draw_surface_ext(_pbox.content, 0, _nbox.h + shf, 1, -1, 0, c_white, 1); + else + draw_surface(_pbox.content, -shf, 0); + surface_reset_target(); + } } } - return _pbox; + return _nbox; } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_pb_box_transform/node_pb_box_transform.gml b/scripts/node_pb_box_transform/node_pb_box_transform.gml index 5903d741d..9925437f6 100644 --- a/scripts/node_pb_box_transform/node_pb_box_transform.gml +++ b/scripts/node_pb_box_transform/node_pb_box_transform.gml @@ -13,7 +13,7 @@ function Node_PB_Box_Transform(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gr ["Translate", false], 2, ] - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlayPB = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } diff --git a/scripts/node_pb_draw/node_pb_draw.gml b/scripts/node_pb_draw/node_pb_draw.gml index 2218df037..3f1baa175 100644 --- a/scripts/node_pb_draw/node_pb_draw.gml +++ b/scripts/node_pb_draw/node_pb_draw.gml @@ -8,7 +8,17 @@ function Node_PB_Draw(_x, _y, _group = noone) : Node_PB(_x, _y, _group) construc inputs[| 2] = nodeValue("Apply Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true ); - outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); - - outputs[| 1] = nodeValue("pBox", self, JUNCTION_CONNECT.output, VALUE_TYPE.pbBox, noone); -} \ No newline at end of file + outputs[| 0] = nodeValue("pBox", self, JUNCTION_CONNECT.output, VALUE_TYPE.pbBox, noone); +} + +#macro PB_DRAW_CREATE_MASK _nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h); \ + surface_set_shader(_nbox.mask, sh_pb_to_mask); \ + draw_surface(_nbox.content, -_pbox.x, -_pbox.y); \ + surface_reset_shader(); + +#macro PB_DRAW_APPLY_MASK if(_mask) { \ + BLEND_MULTIPLY \ + if(is_surface(_pbox.mask)) \ + draw_surface(_pbox.mask, 0, 0); \ + BLEND_NORMAL \ + } \ No newline at end of file diff --git a/scripts/node_pb_draw_angle/node_pb_draw_angle.gml b/scripts/node_pb_draw_angle/node_pb_draw_angle.gml index 01f050a26..e73414c47 100644 --- a/scripts/node_pb_draw_angle/node_pb_draw_angle.gml +++ b/scripts/node_pb_draw_angle/node_pb_draw_angle.gml @@ -18,10 +18,8 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _grou var _side = _data[3]; var _roun = _data[4]; - if(_output_index == 1) return _pbox; - if(_pbox == noone) return noone; - - _outSurf = surface_verify(_outSurf, _pbox.layer_w, _pbox.layer_h); + var _nbox = _pbox.clone(); + _nbox.content = surface_verify(_nbox.content, _pbox.w, _pbox.h); switch(_side) { case 0 : @@ -34,7 +32,7 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _grou if( _pbox.mirror_h && !_pbox.mirror_v) _side = 0; if(!_pbox.mirror_h && _pbox.mirror_v) _side = 2; break; - case 2 : + case 2 : if( _pbox.mirror_h && _pbox.mirror_v) _side = 0; if( _pbox.mirror_h && !_pbox.mirror_v) _side = 3; if(!_pbox.mirror_h && _pbox.mirror_v) _side = 1; @@ -46,7 +44,7 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _grou break; } - surface_set_target(_outSurf); + surface_set_target(_nbox.content); DRAW_CLEAR draw_set_color(_fcol); @@ -60,12 +58,12 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _grou as = 0; ae = -90; - rx = _pbox.x; - ry = _pbox.y; + rx = 0; + ry = 0; } else { - draw_vertex(_pbox.x, _pbox.y); - draw_vertex(_pbox.x + _pbox.w, _pbox.y); - draw_vertex(_pbox.x, _pbox.y + _pbox.h); + draw_vertex(0, 0); + draw_vertex(_pbox.w, 0); + draw_vertex(0, _pbox.h); } break; case 1 : @@ -73,12 +71,12 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _grou as = 180; ae = 270; - rx = _pbox.x + _pbox.w; - ry = _pbox.y; + rx = _pbox.w; + ry = 0; } else { - draw_vertex(_pbox.x, _pbox.y); - draw_vertex(_pbox.x + _pbox.w, _pbox.y); - draw_vertex(_pbox.x + _pbox.w, _pbox.y + _pbox.h); + draw_vertex(0, 0); + draw_vertex(_pbox.w, 0); + draw_vertex(_pbox.w, _pbox.h); } break; case 2 : @@ -86,12 +84,12 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _grou as = 90; ae = 180; - rx = _pbox.x + _pbox.w; - ry = _pbox.y + _pbox.h; + rx = _pbox.w; + ry = _pbox.h; } else { - draw_vertex(_pbox.x + _pbox.w, _pbox.y); - draw_vertex(_pbox.x + _pbox.w, _pbox.y + _pbox.h); - draw_vertex(_pbox.x, _pbox.y + _pbox.h); + draw_vertex(_pbox.w, 0); + draw_vertex(_pbox.w, _pbox.h); + draw_vertex(0, _pbox.h); } break; case 3 : @@ -99,12 +97,12 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _grou as = 0; ae = 90; - rx = _pbox.x; - ry = _pbox.y + _pbox.h; + rx = 0; + ry = _pbox.h; } else { - draw_vertex(_pbox.x, _pbox.y); - draw_vertex(_pbox.x + _pbox.w, _pbox.y + _pbox.h); - draw_vertex(_pbox.x, _pbox.y + _pbox.h); + draw_vertex(0, 0); + draw_vertex(_pbox.w, _pbox.h); + draw_vertex(0, _pbox.h); } break; } @@ -129,13 +127,11 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _grou } draw_primitive_end(); - if(_mask && is_surface(_pbox.mask)) { - BLEND_MULTIPLY - draw_surface(_pbox.mask, _pbox.x, _pbox.y); - BLEND_NORMAL - } + PB_DRAW_APPLY_MASK surface_reset_target(); - return _outSurf; + PB_DRAW_CREATE_MASK + + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_draw_blob/node_pb_draw_blob.gml b/scripts/node_pb_draw_blob/node_pb_draw_blob.gml index 54ccd0589..48002a7ff 100644 --- a/scripts/node_pb_draw_blob/node_pb_draw_blob.gml +++ b/scripts/node_pb_draw_blob/node_pb_draw_blob.gml @@ -12,7 +12,7 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group ["Shape", false], 3, 4, ]; - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlayPB = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { var _pbox = inputs[| 0].getValue(); if(_pbox == noone) return; @@ -41,21 +41,19 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group var _btop = _data[3]; var _bbot = _data[4]; - if(_output_index == 1) return _pbox; - if(_pbox == noone) return noone; - _btop *= _pbox.w / 2; _bbot *= _pbox.w / 2; - _outSurf = surface_verify(_outSurf, _pbox.layer_w, _pbox.layer_h); + var _nbox = _pbox.clone(); + _nbox.content = surface_verify(_nbox.content, _pbox.w, _pbox.h); - surface_set_target(_outSurf); + surface_set_target(_nbox.content); DRAW_CLEAR draw_set_color(_fcol); draw_primitive_begin(pr_trianglelist); - var xc = _pbox.x + _pbox.w / 2; + var xc = _pbox.w / 2; var _samp = 64; var _ox, _oy, _nx, _ny; @@ -67,14 +65,14 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group _ny = 3 * t * t - 2 * t * t * t; if(_pbox.mirror_v) _ny = 1 - _ny; - _ny = _pbox.y + _ny * _pbox.h; + _ny = _ny * _pbox.h; if(i) { - draw_vertex(xc, _pbox.y); + draw_vertex(xc, 0); draw_vertex(xc + _ox, _oy); draw_vertex(xc + _nx, _ny); - draw_vertex(xc, _pbox.y); + draw_vertex(xc, 0); draw_vertex(xc - _ox, _oy); draw_vertex(xc - _nx, _ny); } @@ -85,13 +83,11 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group draw_primitive_end(); - if(_mask && is_surface(_pbox.mask)) { - BLEND_MULTIPLY - draw_surface(_pbox.mask, _pbox.x, _pbox.y); - BLEND_NORMAL - } + PB_DRAW_APPLY_MASK surface_reset_target(); - - return _outSurf; + + PB_DRAW_CREATE_MASK + + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_draw_diamond/node_checkerboard.yy b/scripts/node_pb_draw_diamond/node_checkerboard.yy new file mode 100644 index 000000000..f65eb196c --- /dev/null +++ b/scripts/node_pb_draw_diamond/node_checkerboard.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, + "resourceVersion": "1.0", + "name": "node_checkerboard", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_pb_draw_diamond/node_pb_draw_diamond.gml b/scripts/node_pb_draw_diamond/node_pb_draw_diamond.gml new file mode 100644 index 000000000..ac4ed6470 --- /dev/null +++ b/scripts/node_pb_draw_diamond/node_pb_draw_diamond.gml @@ -0,0 +1,46 @@ +function Node_PB_Draw_Diamond(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { + name = "Diamond"; + + input_display_list = [ + ["Draw", false], 0, 1, 2, + ]; + + static process_data = function(_outSurf, _data, _output_index, _array_index) { + var _pbox = _data[0]; + var _fcol = _data[1]; + var _mask = _data[2]; + + var _nbox = _pbox.clone(); + _nbox.content = surface_verify(_nbox.content, _pbox.w, _pbox.h); + + var x0 = 0; + var y0 = 0; + + var x1 = _pbox.w; + var y1 = _pbox.h; + + var xc = _pbox.w / 2; + var yc = _pbox.h / 2; + + surface_set_target(_nbox.content); + DRAW_CLEAR + + draw_set_color(_fcol); + draw_primitive_begin(pr_trianglelist); + draw_vertex(xc, y0); + draw_vertex(x0, yc); + draw_vertex(x1, yc); + + draw_vertex(x0, yc); + draw_vertex(x1, yc); + draw_vertex(xc, y1); + draw_primitive_end(); + + PB_DRAW_APPLY_MASK + surface_reset_target(); + + PB_DRAW_CREATE_MASK + + return _nbox; + } +} \ No newline at end of file diff --git a/scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy b/scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy new file mode 100644 index 000000000..d0f82a8da --- /dev/null +++ b/scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_pb_draw_diamond", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "draw", + "path": "folders/nodes/data/pixel builder/draw.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_pb_draw_diamond/node_stripe.yy b/scripts/node_pb_draw_diamond/node_stripe.yy new file mode 100644 index 000000000..3c179d416 --- /dev/null +++ b/scripts/node_pb_draw_diamond/node_stripe.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, + "resourceVersion": "1.0", + "name": "node_stripe", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_pb_draw_ellipse/node_pb_draw_ellipse.gml b/scripts/node_pb_draw_ellipse/node_pb_draw_ellipse.gml index 07c154ed0..5a72d5b49 100644 --- a/scripts/node_pb_draw_ellipse/node_pb_draw_ellipse.gml +++ b/scripts/node_pb_draw_ellipse/node_pb_draw_ellipse.gml @@ -10,25 +10,21 @@ function Node_PB_Draw_Ellipse(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _gr var _fcol = _data[1]; var _mask = _data[2]; - if(_output_index == 1) return _pbox; - if(_pbox == noone) return noone; + var _nbox = _pbox.clone(); + _nbox.content = surface_verify(_nbox.content, _pbox.w, _pbox.h); - _outSurf = surface_verify(_outSurf, _pbox.layer_w, _pbox.layer_h); - - surface_set_target(_outSurf); + surface_set_target(_nbox.content); DRAW_CLEAR draw_set_circle_precision(64); draw_set_color(_fcol); - draw_ellipse(_pbox.x - 1, _pbox.y - 1, _pbox.x + _pbox.w - 1, _pbox.y + _pbox.h - 1, false); + draw_ellipse(-1, -1, _pbox.w - 1, _pbox.h - 1, false); - if(_mask && is_surface(_pbox.mask)) { - BLEND_MULTIPLY - draw_surface(_pbox.mask, _pbox.x, _pbox.y); - BLEND_NORMAL - } + PB_DRAW_APPLY_MASK surface_reset_target(); - return _outSurf; + PB_DRAW_CREATE_MASK + + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_draw_fill/node_pb_draw_fill.gml b/scripts/node_pb_draw_fill/node_pb_draw_fill.gml index e61a8b5db..72a386c5f 100644 --- a/scripts/node_pb_draw_fill/node_pb_draw_fill.gml +++ b/scripts/node_pb_draw_fill/node_pb_draw_fill.gml @@ -10,24 +10,20 @@ function Node_PB_Draw_Fill(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group var _fcol = _data[1]; var _mask = _data[2]; - if(_output_index == 1) return _pbox; - if(_pbox == noone) return noone; + var _nbox = _pbox.clone(); + _nbox.content = surface_verify(_nbox.content, _pbox.w, _pbox.h); - _outSurf = surface_verify(_outSurf, _pbox.layer_w, _pbox.layer_h); - - surface_set_target(_outSurf); + surface_set_target(_nbox.content); DRAW_CLEAR draw_set_color(_fcol); - draw_rectangle(_pbox.x, _pbox.y, _pbox.x + _pbox.w - 1, _pbox.y + _pbox.h - 1, false); + draw_rectangle(0, 0, _pbox.w - 1, _pbox.h - 1, false); - if(_mask && is_surface(_pbox.mask)) { - BLEND_MULTIPLY - draw_surface(_pbox.mask, _pbox.x, _pbox.y); - BLEND_NORMAL - } + PB_DRAW_APPLY_MASK surface_reset_target(); - return _outSurf; + PB_DRAW_CREATE_MASK + + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_draw_line/node_checkerboard.yy b/scripts/node_pb_draw_line/node_checkerboard.yy new file mode 100644 index 000000000..f65eb196c --- /dev/null +++ b/scripts/node_pb_draw_line/node_checkerboard.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, + "resourceVersion": "1.0", + "name": "node_checkerboard", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_pb_draw_line/node_pb_draw_line.gml b/scripts/node_pb_draw_line/node_pb_draw_line.gml new file mode 100644 index 000000000..33b7e3eb0 --- /dev/null +++ b/scripts/node_pb_draw_line/node_pb_draw_line.gml @@ -0,0 +1,77 @@ +function Node_PB_Draw_Line(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group) constructor { + name = "Line"; + + inputs[| 3] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) + .setDisplay(VALUE_DISPLAY.enum_button, [ THEME.obj_draw_line, THEME.obj_draw_line, THEME.obj_draw_line, THEME.obj_draw_line ] ); + + inputs[| 4] = nodeValue("Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2 ) + + input_display_list = [ + ["Draw", false], 0, 1, 2, + ["Shape", false], 3, 4, + ]; + + static process_data = function(_outSurf, _data, _output_index, _array_index) { + var _pbox = _data[0]; + var _fcol = _data[1]; + var _mask = _data[2]; + + var _dirr = _data[3]; + var _thck = _data[4]; + + var _nbox = _pbox.clone(); + _nbox.content = surface_verify(_nbox.content, _pbox.w, _pbox.h); + + surface_set_target(_nbox.content); + DRAW_CLEAR + + var x0 = 0, y0 = 0; + var x1 = 0, y1 = 0; + + if(_dirr == 2 && (_pbox.mirror_h ^^ _pbox.mirror_v)) _dirr = 3; + else if(_dirr == 3 && (_pbox.mirror_h ^^ _pbox.mirror_v)) _dirr = 2; + + switch(_dirr) { + case 0 : + x0 = _pbox.w / 2; + y0 = 0; + + x1 = _pbox.w / 2; + y1 = _pbox.h; + break; + case 1 : + x0 = 0; + y0 = _pbox.h / 2; + + x1 = _pbox.w; + y1 = _pbox.h / 2; + break; + case 2 : + x0 = _pbox.w; + y0 = 0; + + x1 = 0; + y1 = _pbox.h; + break; + case 3 : + x0 = 0; + y0 = 0; + + x1 = _pbox.w; + y1 = _pbox.h; + break; + + } + + draw_set_color(_fcol); + if(_thck == 1) draw_line(x0 - 1, y0 - 1, x1 - 1, y1 - 1); + else draw_line_width(x0 - 1, y0 - 1, x1 - 1, y1 - 1, _thck); + + PB_DRAW_APPLY_MASK + surface_reset_target(); + + PB_DRAW_CREATE_MASK + + return _nbox; + } +} \ No newline at end of file diff --git a/scripts/node_pb_draw_line/node_pb_draw_line.yy b/scripts/node_pb_draw_line/node_pb_draw_line.yy new file mode 100644 index 000000000..6cf4d0790 --- /dev/null +++ b/scripts/node_pb_draw_line/node_pb_draw_line.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_pb_draw_line", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "draw", + "path": "folders/nodes/data/pixel builder/draw.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_pb_draw_line/node_stripe.yy b/scripts/node_pb_draw_line/node_stripe.yy new file mode 100644 index 000000000..3c179d416 --- /dev/null +++ b/scripts/node_pb_draw_line/node_stripe.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, + "resourceVersion": "1.0", + "name": "node_stripe", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_pb_draw_rectangle/node_pb_draw_rectangle.gml b/scripts/node_pb_draw_rectangle/node_pb_draw_rectangle.gml index 0798e4372..a7d4ca1eb 100644 --- a/scripts/node_pb_draw_rectangle/node_pb_draw_rectangle.gml +++ b/scripts/node_pb_draw_rectangle/node_pb_draw_rectangle.gml @@ -10,24 +10,20 @@ function Node_PB_Draw_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ var _fcol = _data[1]; var _mask = _data[2]; - if(_output_index == 1) return _pbox; - if(_pbox == noone) return noone; + var _nbox = _pbox.clone(); + _nbox.content = surface_verify(_nbox.content, _pbox.w, _pbox.h); - _outSurf = surface_verify(_outSurf, _pbox.layer_w, _pbox.layer_h); - - surface_set_target(_outSurf); + surface_set_target(_nbox.content); DRAW_CLEAR draw_set_color(_fcol); - draw_rectangle(_pbox.x, _pbox.y, _pbox.x + _pbox.w - 1, _pbox.y + _pbox.h - 1, false); + draw_rectangle(0, 0, _pbox.w - 1, _pbox.h - 1, false); - if(_mask && is_surface(_pbox.mask)) { - BLEND_MULTIPLY - draw_surface(_pbox.mask, _pbox.x, _pbox.y); - BLEND_NORMAL - } + PB_DRAW_APPLY_MASK surface_reset_target(); - return _outSurf; + PB_DRAW_CREATE_MASK + + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml b/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml index c0549ae87..de143ca7e 100644 --- a/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml +++ b/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml @@ -67,17 +67,15 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, var _rela = _data[6]; var _cut = _data[7]; - if(_output_index == 1) return _pbox; - if(_pbox == noone) return noone; + var _nbox = _pbox.clone(); + _nbox.content = surface_verify(_nbox.content, _pbox.w, _pbox.h); - _outSurf = surface_verify(_outSurf, _pbox.layer_w, _pbox.layer_h); + var _x0 = 0; + var _y0 = 0; + var _x1 = _pbox.w - 1; + var _y1 = _pbox.h - 1; - var _x0 = _pbox.x; - var _y0 = _pbox.y; - var _x1 = _pbox.x + _pbox.w - 1; - var _y1 = _pbox.y + _pbox.h - 1; - - surface_set_target(_outSurf); + surface_set_target(_nbox.content); DRAW_CLEAR draw_set_color(_fcol); @@ -112,7 +110,7 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, if(_rela) _corn = max(0, round(_corn * min(_pbox.w, _pbox.h))); if(_corn > array_length(corner_pixels)) - draw_roundrect_ext(_pbox.x - 1, _pbox.y - 1, _pbox.x + _pbox.w - 1, _pbox.y + _pbox.h - 1, 6 + _corn, 6 + _corn, false); + draw_roundrect_ext(_x0, _y0, _x1, _y1, 6 + _corn, 6 + _corn, false); else { draw_rectangle(_x0, _y0, _x1, _y1, false); BLEND_SUBTRACT @@ -191,13 +189,11 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, } } - if(_mask && is_surface(_pbox.mask)) { - BLEND_MULTIPLY - draw_surface(_pbox.mask, _pbox.x, _pbox.y); - BLEND_NORMAL - } + PB_DRAW_APPLY_MASK surface_reset_target(); - return _outSurf; + PB_DRAW_CREATE_MASK + + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml b/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml index 830c9609d..52f7c3e86 100644 --- a/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml +++ b/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml @@ -15,12 +15,8 @@ function Node_PB_Draw_Semi_Ellipse(_x, _y, _group = noone) : Node_PB_Draw(_x, _y var _mask = _data[2]; var _side = _data[3]; - if(_output_index == 1) return _pbox; - if(_pbox == noone) return noone; - - _outSurf = surface_verify(_outSurf, _pbox.layer_w, _pbox.layer_h); - - var s = surface_create_valid(_pbox.w, _pbox.h); + var _nbox = _pbox.clone(); + _nbox.content = surface_verify(_nbox.content, _pbox.w, _pbox.h); switch(_side) { case 0 : if(_pbox.mirror_h) _side = 2; break; @@ -29,7 +25,7 @@ function Node_PB_Draw_Semi_Ellipse(_x, _y, _group = noone) : Node_PB_Draw(_x, _y case 3 : if(_pbox.mirror_v) _side = 1; break; } - surface_set_target(s); + surface_set_target(_nbox.content); DRAW_CLEAR var x1 = _pbox.w; @@ -43,21 +39,12 @@ function Node_PB_Draw_Semi_Ellipse(_x, _y, _group = noone) : Node_PB_Draw(_x, _y case 2 : draw_ellipse(-_pbox.w, -1, x1 - 1, y1 - 1, false); break; case 3 : draw_ellipse(-1, -_pbox.h, x1 - 1, y1 - 1, false); break; } + + PB_DRAW_APPLY_MASK surface_reset_target(); - surface_set_target(_outSurf); - DRAW_CLEAR - - draw_surface(s, ceil(_pbox.x), ceil(_pbox.y)); - surface_free(s); - - if(_mask && is_surface(_pbox.mask)) { - BLEND_MULTIPLY - draw_surface(_pbox.mask, ceil(_pbox.x), ceil(_pbox.y)); - BLEND_NORMAL - } - surface_reset_target(); + PB_DRAW_CREATE_MASK - return _outSurf; + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml index 377af71fc..c73050fef 100644 --- a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml +++ b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml @@ -42,15 +42,13 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ var _bev2 = _data[7]; var _invt = _data[8]; - if(_output_index == 1) return _pbox; - if(_pbox == noone) return noone; + var _nbox = _pbox.clone(); + _nbox.content = surface_verify(_nbox.content, _pbox.w, _pbox.h); - _outSurf = surface_verify(_outSurf, _pbox.layer_w, _pbox.layer_h); - - var p0x = _pbox.x, p0y = _pbox.y; - var p1x = _pbox.x + _pbox.w, p1y = _pbox.y; - var p2x = _pbox.x, p2y = _pbox.y + _pbox.h; - var p3x = _pbox.x + _pbox.w, p3y = _pbox.y + _pbox.h; + var p0x = 0, p0y = 0; + var p1x = _pbox.w, p1y = 0; + var p2x = 0, p2y = _pbox.h; + var p3x = _pbox.w, p3y = _pbox.h; if(_type == 0) { if(_axis == 0) { @@ -112,7 +110,7 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ } } - surface_set_target(_outSurf); + surface_set_target(_nbox.content); DRAW_CLEAR draw_set_color(_fcol); @@ -126,13 +124,11 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ draw_vertex(p3x, p3y); draw_primitive_end(); - if(_mask && is_surface(_pbox.mask)) { - BLEND_MULTIPLY - draw_surface(_pbox.mask, _pbox.x, _pbox.y); - BLEND_NORMAL - } + PB_DRAW_APPLY_MASK surface_reset_target(); - return _outSurf; + PB_DRAW_CREATE_MASK + + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_fx/node_pb_fx.gml b/scripts/node_pb_fx/node_pb_fx.gml index 0887f9967..84484cf3b 100644 --- a/scripts/node_pb_fx/node_pb_fx.gml +++ b/scripts/node_pb_fx/node_pb_fx.gml @@ -1,21 +1,29 @@ function Node_PB_Fx(_x, _y, _group = noone) : Node_PB(_x, _y, _group) constructor { name = "PB FX"; - inputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + inputs[| 0] = nodeValue("pBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone) .setVisible(true, true); - outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone) - .setVisible(false, false); - - static getpBox = function() { - var _n = inputs[| 0].value_from; - if(_n == noone) return; - - _n = _n.node; - - if(is_instanceof(_n, Node_PB_Draw)) - return _n.outputs[| 1].getValue(); - else if(is_instanceof(_n, Node_PB_Fx)) - return _n.getpBox(); - } -} \ No newline at end of file + outputs[| 0] = nodeValue("pBox", self, JUNCTION_CONNECT.output, VALUE_TYPE.pbBox, noone); +} + +#macro PB_FX_PBOX if(_output_index == 1) { \ + var _surf = outputs[| 0].getValue(); \ + if(is_array(_surf)) _surf = array_safe_get(_surf, _array_index); \ + if(!is_surface(_surf)) return noone; \ + \ + var _pbox = new __pbBox(); \ + \ + _pbox.w = surface_get_width(_surf); \ + _pbox.h = surface_get_height(_surf); \ + \ + _pbox.layer_w = surface_get_width(_surf); \ + _pbox.layer_h = surface_get_height(_surf); \ + \ + _pbox.mask = surface_create(_pbox.w, _pbox.h); \ + surface_set_shader(_pbox.mask, sh_pb_to_mask); \ + draw_surface(_surf, 0, 0); \ + surface_reset_shader(); \ + \ + return _pbox; \ + } \ No newline at end of file diff --git a/scripts/node_pb_fx_add/node_pb_fx_add.gml b/scripts/node_pb_fx_add/node_pb_fx_add.gml index da4157543..cee4d4bef 100644 --- a/scripts/node_pb_fx_add/node_pb_fx_add.gml +++ b/scripts/node_pb_fx_add/node_pb_fx_add.gml @@ -1,7 +1,7 @@ function Node_PB_Fx_Add(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { name = "Add"; - inputs[| 1] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + inputs[| 1] = nodeValue("pbox", self, JUNCTION_CONNECT.input, VALUE_TYPE.pbBox, noone ) .setVisible(true, true); input_display_list = [ 0, @@ -9,14 +9,35 @@ function Node_PB_Fx_Add(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) con ]; static process_data = function(_outSurf, _data, _output_index, _array_index) { - var _surf = _data[0]; - var _subs = _data[1]; + var _box1 = _data[0]; + var _box2 = _data[1]; - surface_set_shader(_outSurf); - draw_surface_safe(_surf); - draw_surface_safe(_subs); + if(_box1 == noone || _box2 == noone) return noone; + + var _nbox = new __pbBox(); + + _nbox.layer_w = _box1.layer_w; + _nbox.layer_h = _box1.layer_h; + + var x0 = min(_box1.x, _box2.x); + var y0 = min(_box1.y, _box2.y); + + var x1 = max(_box1.x + _box1.w, _box2.x + _box2.w); + var y1 = max(_box1.y + _box1.h, _box2.y + _box2.h); + + _nbox.x = x0; + _nbox.y = y0; + + _nbox.w = x1 - x0; + _nbox.h = y1 - y0; + + _nbox.content = surface_create(_box1.layer_w, _box1.layer_h); + + surface_set_shader(_nbox.content); + draw_surface_safe(_box1.content); + draw_surface_safe(_box2.content); surface_reset_shader(); - return _outSurf; + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_fx_brick/node_checkerboard.yy b/scripts/node_pb_fx_brick/node_checkerboard.yy new file mode 100644 index 000000000..f65eb196c --- /dev/null +++ b/scripts/node_pb_fx_brick/node_checkerboard.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, + "resourceVersion": "1.0", + "name": "node_checkerboard", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_pb_fx_brick/node_pb_fx_brick.gml b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml new file mode 100644 index 000000000..4b1bda874 --- /dev/null +++ b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml @@ -0,0 +1,55 @@ +function Node_PB_Fx_Brick(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { + name = "Brick"; + + inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 4, 1 ] ) + .setDisplay(VALUE_DISPLAY.vector); + + inputs[| 2] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) + .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ] ); + + inputs[| 3] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); + + inputs[| 4] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); + + inputs[| 5] = nodeValue("Dissolve", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0. ) + .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ] ) + + inputs[| 6] = nodeValue("Detail", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) + + inputs[| 7] = nodeValue("Dissolve Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ] ) + .setDisplay(VALUE_DISPLAY.vector); + + input_display_list = [ 0, + ["Effect", false], 1, 2, 3, 4, + ["Dissolve", false], 5, 7, 6, + ]; + + static process_data = function(_outSurf, _data, _output_index, _array_index) { + var _pbox = _data[0]; + var _nbox = _pbox.clone(); + + var _scal = _data[1]; + var _axis = _data[2]; + var _shft = _data[3]; + var _colr = _data[4]; + + var _diss = _data[5]; + var _dItr = _data[6]; + var _dSca = _data[7]; + + surface_set_shader(_nbox.content, sh_pb_brick); + shader_set_dim(, _pbox.content); + shader_set_f("scale", _scal); + shader_set_i("axis", _axis); + shader_set_f("shift", _shft); + + shader_set_f("dissolve", _diss); + shader_set_f("dissolveSca", _dSca); + shader_set_i("dissolveItr", _dItr); + + draw_surface_ext_safe(_pbox.content, 0, 0,,,, _colr); + surface_reset_shader(); + + return _nbox; + } +} \ No newline at end of file diff --git a/scripts/node_pb_fx_brick/node_pb_fx_brick.yy b/scripts/node_pb_fx_brick/node_pb_fx_brick.yy new file mode 100644 index 000000000..9c101c506 --- /dev/null +++ b/scripts/node_pb_fx_brick/node_pb_fx_brick.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_pb_fx_brick", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "effect", + "path": "folders/nodes/data/pixel builder/effect.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_pb_fx_brick/node_stripe.yy b/scripts/node_pb_fx_brick/node_stripe.yy new file mode 100644 index 000000000..3c179d416 --- /dev/null +++ b/scripts/node_pb_fx_brick/node_stripe.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, + "resourceVersion": "1.0", + "name": "node_stripe", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_pb_fx_hash/node_pb_fx_hash.gml b/scripts/node_pb_fx_hash/node_pb_fx_hash.gml index 98da46abc..953625dcf 100644 --- a/scripts/node_pb_fx_hash/node_pb_fx_hash.gml +++ b/scripts/node_pb_fx_hash/node_pb_fx_hash.gml @@ -7,26 +7,44 @@ function Node_PB_Fx_Hash(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) co inputs[| 3] = nodeValue("Invert", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); + inputs[| 4] = nodeValue("Dissolve", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0. ) + .setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ] ) + + inputs[| 5] = nodeValue("Detail", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) + + inputs[| 6] = nodeValue("Dissolve Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ] ) + .setDisplay(VALUE_DISPLAY.vector); + input_display_list = [ 0, - ["Effect", false], 2, 1, 3, + ["Effect", false], 2, 1, 3, + ["Dissolve", false], 4, 6, 5, ]; static process_data = function(_outSurf, _data, _output_index, _array_index) { - var _surf = _data[0]; + var _pbox = _data[0]; + var _nbox = _pbox.clone(); + var _colr = _data[1]; var _hash = _data[2]; var _inv = _data[3]; - surface_set_shader(_outSurf, sh_pb_hash); - shader_set_dim(, _surf); + var _diss = _data[4]; + var _dItr = _data[5]; + var _dSca = _data[6]; + + surface_set_shader(_nbox.content, sh_pb_hash); + shader_set_dim(, _pbox.content); shader_set_color("color", _colr); shader_set_f("hash", _hash); shader_set_i("invert", _inv); - DRAW_CLEAR - draw_surface_ext_safe(_surf, 0, 0,,,, _colr); + shader_set_f("dissolve", _diss); + shader_set_f("dissolveSca", _dSca); + shader_set_i("dissolveItr", _dItr); + + draw_surface_ext_safe(_pbox.content, 0, 0,,,, _colr); surface_reset_shader(); - return _outSurf; + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml b/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml index bd53c8ae2..571197268 100644 --- a/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml +++ b/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml @@ -80,7 +80,9 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou ]; static process_data = function(_outSurf, _data, _output_index, _array_index) { - var _surf = _data[0]; + var _pbox = _data[0]; + var _nbox = _pbox.clone(); + var _high = _data[1]; var _chig = _data[2]; var _csha = _data[3]; @@ -88,8 +90,8 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou var _rSca = _data[5]; var _seed = _data[6]; - surface_set_shader(_outSurf, sh_pb_highlight); - shader_set_dim(, _surf); + surface_set_shader(_nbox.content, sh_pb_highlight); + shader_set_dim(, _pbox.content); shader_set_i("sides", _high); shader_set_color("highlightColor", _chig); @@ -99,9 +101,9 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou shader_set_f("seed", _seed); DRAW_CLEAR - draw_surface_safe(_surf, 0, 0); + draw_surface_safe(_pbox.content, 0, 0); surface_reset_shader(); - return _outSurf; + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml b/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml index aa2552208..5e590f046 100644 --- a/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml +++ b/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml @@ -9,17 +9,38 @@ function Node_PB_Fx_Intersect(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou ]; static process_data = function(_outSurf, _data, _output_index, _array_index) { - var _surf = _data[0]; - var _subs = _data[1]; + var _box1 = _data[0]; + var _box2 = _data[1]; - surface_set_shader(_outSurf); - draw_surface_safe(_surf); + if(_box1 == noone || _box2 == noone) return noone; + + var _nbox = new __pbBox(); + + _nbox.layer_w = _box1.layer_w; + _nbox.layer_h = _box1.layer_h; + + var x0 = min(_box1.x, _box2.x); + var y0 = min(_box1.y, _box2.y); + + var x1 = max(_box1.x + _box1.w, _box2.x + _box2.w); + var y1 = max(_box1.y + _box1.h, _box2.y + _box2.h); + + _nbox.x = x0; + _nbox.y = y0; + + _nbox.w = x1 - x0; + _nbox.h = y1 - y0; + + _nbox.content = surface_create(_box1.layer_w, _box1.layer_h); + + surface_set_shader(_nbox.content); + draw_surface_safe(_box1.content); BLEND_MULTIPLY - draw_surface_safe(_subs); + draw_surface_safe(_box2.content); BLEND_NORMAL surface_reset_shader(); - return _outSurf; + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_fx_outline/node_pb_fx_outline.gml b/scripts/node_pb_fx_outline/node_pb_fx_outline.gml index 1ce45471e..241ae16fe 100644 --- a/scripts/node_pb_fx_outline/node_pb_fx_outline.gml +++ b/scripts/node_pb_fx_outline/node_pb_fx_outline.gml @@ -13,20 +13,22 @@ function Node_PB_Fx_Outline(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) ]; static process_data = function(_outSurf, _data, _output_index, _array_index) { - var _surf = _data[0]; + var _pbox = _data[0]; + var _nbox = _pbox.clone(); + var _corn = _data[1]; var _colr = _data[2]; var _side = _data[3]; - surface_set_shader(_outSurf, sh_pb_outline); - shader_set_dim(, _surf); + surface_set_shader(_nbox.content, sh_pb_outline); + shader_set_dim(, _pbox.content); shader_set_i("corner", _corn); shader_set_i("side", _side); DRAW_CLEAR - draw_surface_ext_safe(_surf, 0, 0,,,, _colr); + draw_surface_ext_safe(_pbox.content, 0, 0,,,, _colr); surface_reset_shader(); - return _outSurf; + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_fx_radial/node_pb_fx_radial.gml b/scripts/node_pb_fx_radial/node_pb_fx_radial.gml index 1332ca1de..46bc5e800 100644 --- a/scripts/node_pb_fx_radial/node_pb_fx_radial.gml +++ b/scripts/node_pb_fx_radial/node_pb_fx_radial.gml @@ -9,18 +9,20 @@ function Node_PB_Fx_Radial(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) ]; static process_data = function(_outSurf, _data, _output_index, _array_index) { - var _surf = _data[0]; + var _pbox = _data[0]; + var _nbox = _pbox.clone(); + var _amo = _data[1]; - surface_set_shader(_outSurf); + surface_set_shader(_nbox.content); for( var i = 0; i < _amo; i++ ) { var aa = i / _amo * 360; - var p = point_rotate(0, 0, surface_get_width(_outSurf) / 2, surface_get_height(_outSurf) / 2, aa); + var p = point_rotate(0, 0, surface_get_width(_pbox.content) / 2, surface_get_height(_pbox.content) / 2, aa); - draw_surface_ext_safe(_surf, p[0], p[1],,, aa); + draw_surface_ext_safe(_pbox.content, p[0], p[1],,, aa); } surface_reset_shader(); - return _outSurf; + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_fx_shading/node_pb_fx_shading.gml b/scripts/node_pb_fx_shading/node_pb_fx_shading.gml index f4fc2e4af..9f1261de8 100644 --- a/scripts/node_pb_fx_shading/node_pb_fx_shading.gml +++ b/scripts/node_pb_fx_shading/node_pb_fx_shading.gml @@ -11,18 +11,19 @@ function Node_PB_Fx_Shading(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) ]; static process_data = function(_outSurf, _data, _output_index, _array_index) { - var _surf = _data[0]; + var _pbox = _data[0]; + var _nbox = _pbox.clone(); + var _padd = _data[1]; var _colr = _data[2]; - surface_set_shader(_outSurf, sh_pb_shade); - shader_set_dim(, _surf); + surface_set_shader(_nbox.content, sh_pb_shade); + shader_set_dim(, _pbox.content); shader_set_f("padding", _padd); - DRAW_CLEAR - draw_surface_ext_safe(_surf, 0, 0,,,, _colr); + draw_surface_ext_safe(_pbox.content, 0, 0,,,, _colr); surface_reset_shader(); - return _outSurf; + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_fx_stack/node_pb_fx_stack.gml b/scripts/node_pb_fx_stack/node_pb_fx_stack.gml index 2de824f1e..d3ca4ccc7 100644 --- a/scripts/node_pb_fx_stack/node_pb_fx_stack.gml +++ b/scripts/node_pb_fx_stack/node_pb_fx_stack.gml @@ -25,7 +25,9 @@ function Node_PB_Fx_Stack(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c } static process_data = function(_outSurf, _data, _output_index, _array_index) { - var _surf = _data[0]; + var _pbox = _data[0]; + var _nbox = _pbox.clone(); + var _amou = _data[1]; var _dirr = _data[2]; var _colr = _data[3]; @@ -33,7 +35,7 @@ function Node_PB_Fx_Stack(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c var _hclr = _data[5]; var _invr = _data[6]; - surface_set_target(_outSurf); + surface_set_target(_nbox.content); DRAW_CLEAR var px = 0; var py = 0; @@ -52,7 +54,7 @@ function Node_PB_Fx_Stack(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c var cc = _colr; if(_high && i == _amou - 1) cc = _hclr; - draw_surface_ext_safe(_surf, px, py,,,, cc); + draw_surface_ext_safe(_pbox.content, px, py,,,, cc); switch(_dirr) { case 0 : px++; break; @@ -63,9 +65,9 @@ function Node_PB_Fx_Stack(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c } shader_reset(); - draw_surface_safe(_surf, px, py); + draw_surface_safe(_pbox.content, px, py); surface_reset_target(); - return _outSurf; + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pb_fx_strip/node_checkerboard.yy b/scripts/node_pb_fx_strip/node_checkerboard.yy new file mode 100644 index 000000000..f65eb196c --- /dev/null +++ b/scripts/node_pb_fx_strip/node_checkerboard.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, + "resourceVersion": "1.0", + "name": "node_checkerboard", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_pb_fx_strip/node_pb_fx_strip.gml b/scripts/node_pb_fx_strip/node_pb_fx_strip.gml new file mode 100644 index 000000000..6de3cd7fb --- /dev/null +++ b/scripts/node_pb_fx_strip/node_pb_fx_strip.gml @@ -0,0 +1,37 @@ +function Node_PB_Fx_Strip(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) constructor { + name = "Strip"; + + inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ); + + inputs[| 2] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); + + inputs[| 3] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ); + + inputs[| 4] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) + .setDisplay(VALUE_DISPLAY.enum_button, [ "X", "Y" ]); + + input_display_list = [ 0, + ["Effect", false], 1, 4, 2, 3, + ]; + + static process_data = function(_outSurf, _data, _output_index, _array_index) { + var _pbox = _data[0]; + var _nbox = _pbox.clone(); + + var _scal = _data[1]; + var _colr = _data[2]; + var _shft = _data[3]; + var _angl = _data[4]; + + surface_set_shader(_nbox.content, sh_pb_strip); + shader_set_dim(, _pbox.content); + shader_set_f("scale", _scal); + shader_set_i("shift", _shft); + shader_set_i("axis", _angl); + + draw_surface_ext_safe(_pbox.content, 0, 0,,,, _colr); + surface_reset_shader(); + + return _nbox; + } +} \ No newline at end of file diff --git a/scripts/node_pb_fx_strip/node_pb_fx_strip.yy b/scripts/node_pb_fx_strip/node_pb_fx_strip.yy new file mode 100644 index 000000000..4482f671b --- /dev/null +++ b/scripts/node_pb_fx_strip/node_pb_fx_strip.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_pb_fx_strip", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "effect", + "path": "folders/nodes/data/pixel builder/effect.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_pb_fx_strip/node_stripe.yy b/scripts/node_pb_fx_strip/node_stripe.yy new file mode 100644 index 000000000..3c179d416 --- /dev/null +++ b/scripts/node_pb_fx_strip/node_stripe.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, + "resourceVersion": "1.0", + "name": "node_stripe", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_pb_fx_substract/node_pb_fx_substract.gml b/scripts/node_pb_fx_substract/node_pb_fx_substract.gml index ae081a7ba..6e3cf2156 100644 --- a/scripts/node_pb_fx_substract/node_pb_fx_substract.gml +++ b/scripts/node_pb_fx_substract/node_pb_fx_substract.gml @@ -9,17 +9,38 @@ function Node_PB_Fx_Subtract(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group ]; static process_data = function(_outSurf, _data, _output_index, _array_index) { - var _surf = _data[0]; - var _subs = _data[1]; + var _box1 = _data[0]; + var _box2 = _data[1]; - surface_set_shader(_outSurf); - draw_surface_safe(_surf); + if(_box1 == noone || _box2 == noone) return noone; + + var _nbox = new __pbBox(); + + _nbox.layer_w = _box1.layer_w; + _nbox.layer_h = _box1.layer_h; + + var x0 = min(_box1.x, _box2.x); + var y0 = min(_box1.y, _box2.y); + + var x1 = max(_box1.x + _box1.w, _box2.x + _box2.w); + var y1 = max(_box1.y + _box1.h, _box2.y + _box2.h); + + _nbox.x = x0; + _nbox.y = y0; + + _nbox.w = x1 - x0; + _nbox.h = y1 - y0; + + _nbox.content = surface_create(_box1.layer_w, _box1.layer_h); + + surface_set_shader(_nbox.content); + draw_surface_safe(_box1.content); BLEND_SUBTRACT - draw_surface_safe(_subs); + draw_surface_safe(_box2.content); BLEND_NORMAL surface_reset_shader(); - return _outSurf; + return _nbox; } } \ No newline at end of file diff --git a/scripts/node_pixel_builder/node_pixel_builder.gml b/scripts/node_pixel_builder/node_pixel_builder.gml index 44f828f96..c25f316e4 100644 --- a/scripts/node_pixel_builder/node_pixel_builder.gml +++ b/scripts/node_pixel_builder/node_pixel_builder.gml @@ -83,36 +83,30 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g for( var i = 0; i < ds_list_size(nodes); i++ ) { var _n = nodes[| i]; - if(!_n.isTerminal()) continue; - var _surf, _pbox = noone; - - _surf = _n.outputs[| 0].getValue(); - - if(is_instanceof(_n, Node_PB_Draw)) - _pbox = _n.outputs[| 1].getValue(); - else if(is_instanceof(_n, Node_PB_Fx)) - _pbox = _n.getpBox(); - else - continue; - - if(_pbox == noone) - continue; - - if(!is_array(_surf)) - _surf = [ _surf ]; - if(!is_array(_pbox)) - _pbox = [ _pbox ]; - - for( var j = 0; j < array_length(_surf); j++ ) { - var _box = array_safe_get(_pbox, j) - if(!is_instanceof(_box, __pbBox)) continue; + for( var j = 0; j < ds_list_size(_n.outputs); j++ ) { + var _out = _n.outputs[| j]; - var _layer = _box.layer; - if(!ds_map_exists(_surfs, _layer)) - _surfs[? _layer] = []; - array_push(_surfs[? _layer], _surf[j]); - } + if(_out.type != VALUE_TYPE.pbBox) continue; + var _to = _out.getJunctionTo(); + if(array_length(_to)) continue; + + var _pbox = _n.outputs[| j].getValue(); + + if(!is_array(_pbox)) + _pbox = [ _pbox ]; + + for( var k = 0; k < array_length(_pbox); k++ ) { + var _box = _pbox[k]; + if(!is_instanceof(_box, __pbBox)) continue; + if(!is_surface(_box.content)) continue; + + var _layer = _box.layer; + if(!ds_map_exists(_surfs, _layer)) + _surfs[? _layer] = []; + array_push(_surfs[? _layer], _box); + } + } } var _outSurf = outputs[| 0].getValue(); @@ -130,13 +124,14 @@ function Node_Pixel_Builder(_x, _y, _group = noone) : Node_Collection(_x, _y, _g _outSurf = surface_create(_dim[0], _dim[1]); surface_set_target(_outSurf); + DRAW_CLEAR for( var k = 0; k < array_length(_layers); k++ ) { var _s = _surfs[? _layers[k]]; for( var j = 0; j < array_length(_s); j++ ) { - var _drawSurf = _s[j]; - draw_surface_safe(_drawSurf, 0, 0); + var _box = _s[j]; + draw_surface_safe(_box.content, _box.x, _box.y); } } diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index badc80ee0..89448e9c4 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -26,8 +26,8 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { return self; } - static getName = function() { return __txt_node_name(node, name); } - static getTooltip = function() { return __txt_node_tooltip(node, tooltip); } + static getName = function() { return name; /*__txt_node_name(node, name); */ } + static getTooltip = function() { return tooltip; /*__txt_node_tooltip(node, tooltip); */ } function build(_x, _y, _group = PANEL_GRAPH.getCurrentContext(), _param = "") { var _node = createNode[0]? new createNode[1](_x, _y, _group, _param) : createNode[1](_x, _y, _group, _param); @@ -314,7 +314,8 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(filter, "FXAA", s_node_FXAA, "Node_FXAA", [1, Node_FXAA]); ds_list_add(filter, "Colors"); - addNodeObject(filter, "Replace Color", s_node_color_replace, "Node_Color_replace", [1, Node_Color_replace], ["isolate color", "select color", "palette swap"], "Replace color that match one palette with another palette."); + addNodeObject(filter, "Replace Palette", s_node_replace_palette, "Node_Color_replace", [1, Node_Color_replace], ["isolate color", "select color", "palette swap", "color replace"], "Replace color that match one palette with another palette."); + addNodeObject(filter, "Replace Colors", s_node_color_replace, "Node_Colors_Replace", [1, Node_Colors_Replace]); addNodeObject(filter, "Remove Color", s_node_color_remove, "Node_Color_Remove", [1, Node_Color_Remove], ["delete color"], "Remove color that match a palette."); addNodeObject(filter, "Colorize", s_node_colorize, "Node_Colorize", [1, Node_Colorize], ["recolor"], "Map brightness of a pixel to a color from a gradient."); addNodeObject(filter, "Posterize", s_node_posterize, "Node_Posterize", [1, Node_Posterize],, "Reduce and remap color to match a palette."); @@ -374,7 +375,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(generator, "4 Points Gradient", s_node_gradient_4points, "Node_Gradient_Points", [1, Node_Gradient_Points],, "Create image from 4 color points."); ds_list_add(generator, "Drawer"); - addNodeObject(generator, "Pixel Builder", s_node_pixel_builder, "Node_Pixel_Builder", [1, Node_Pixel_Builder]).setVersion(1147); + //addNodeObject(generator, "Pixel Builder", s_node_pixel_builder, "Node_Pixel_Builder", [1, Node_Pixel_Builder]).setVersion(1147); addNodeObject(generator, "Line", s_node_line, "Node_Line", [1, Node_Line],, "Draw line on an image. Connect path data to it to draw line from path."); addNodeObject(generator, "Draw Text", s_node_text_render, "Node_Text", [1, Node_Text],, "Draw text on an image."); addNodeObject(generator, "Shape", s_node_shape, "Node_Shape", [1, Node_Shape],, "Draw simple shapes using signed distance field."); @@ -633,8 +634,10 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(pb_draw, "Rectangle", s_node_pb_draw_rectangle, "Node_PB_Draw_Rectangle", [1, Node_PB_Draw_Rectangle]); addNodeObject(pb_draw, "Round Rectangle", s_node_pb_draw_roundrectangle, "Node_PB_Draw_Round_Rectangle", [1, Node_PB_Draw_Round_Rectangle]); addNodeObject(pb_draw, "Trapezoid", s_node_pb_draw_trapezoid, "Node_PB_Draw_Trapezoid", [1, Node_PB_Draw_Trapezoid]); + addNodeObject(pb_draw, "Diamond", s_node_pb_draw_diamond, "Node_PB_Draw_Diamond", [1, Node_PB_Draw_Diamond]); addNodeObject(pb_draw, "Ellipse", s_node_pb_draw_ellipse, "Node_PB_Draw_Ellipse", [1, Node_PB_Draw_Ellipse]); addNodeObject(pb_draw, "Semi-Ellipse", s_node_pb_draw_semi_ellipse, "Node_PB_Draw_Semi_Ellipse", [1, Node_PB_Draw_Semi_Ellipse]); + addNodeObject(pb_draw, "Line", s_node_pb_draw_line, "Node_PB_Draw_Line", [1, Node_PB_Draw_Line]); addNodeObject(pb_draw, "Angle", s_node_pb_draw_angle, "Node_PB_Draw_Angle", [1, Node_PB_Draw_Angle]); addNodeObject(pb_draw, "Blob", s_node_pb_draw_blob, "Node_PB_Draw_Blob", [1, Node_PB_Draw_Blob]); @@ -665,6 +668,8 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { ds_list_add(pb_fx, "Texture"); addNodeObject(pb_fx, "Hashing", s_node_pb_fx_hash, "Node_PB_Fx_Hash", [1, Node_PB_Fx_Hash]); + addNodeObject(pb_fx, "Strip", s_node_pb_fx_strip, "Node_PB_Fx_Strip", [1, Node_PB_Fx_Strip]); + addNodeObject(pb_fx, "Brick", s_node_pb_fx_brick, "Node_PB_Fx_Brick", [1, Node_PB_Fx_Brick]); ds_list_add(pb_fx, "Blend"); addNodeObject(pb_fx, "Add", s_node_pb_fx_add, "Node_PB_Fx_Add", [1, Node_PB_Fx_Add]); diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index f44f98c64..ad9fb8544 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -1053,6 +1053,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru cache_hit &= cache_value[2] != undefined; cache_hit &= connect_type == JUNCTION_CONNECT.input; cache_hit &= unit.reference == VALUE_UNIT.constant; + if(cache_hit) { global.cache_hit++; return cache_value[2]; @@ -1062,11 +1063,13 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru var val = _getValue(_time, applyUnit, arrIndex); if(useCache) { - is_changed = !isEqual(cache_value[1], val); + is_changed = !isEqual(cache_value[2], val); cache_value[0] = true; - cache_value[1] = val; + cache_value[1] = _time; } + cache_value[2] = val; + return val; } diff --git a/scripts/panel_inspector/panel_inspector.gml b/scripts/panel_inspector/panel_inspector.gml index 2f603866a..8fbe9f07d 100644 --- a/scripts/panel_inspector/panel_inspector.gml +++ b/scripts/panel_inspector/panel_inspector.gml @@ -178,7 +178,7 @@ function Panel_Inspector() : PanelContent() constructor { var editW = _edt[j][2]; draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text_inner); - draw_text_add(ui(32), yy, __txt(title)); + draw_text_add(ui(16), yy, __txt(title)); yy += line_get_height() + ui(6); hh += line_get_height() + ui(6); @@ -207,7 +207,7 @@ function Panel_Inspector() : PanelContent() constructor { var display = meta.displays[j]; draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text_inner); - draw_text_add(ui(32), yy, __txt(display[0])); + draw_text_add(ui(16), yy, __txt(display[0])); yy += line_get_height() + ui(6); hh += line_get_height() + ui(6); diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index 1f4f0e761..5925e76fb 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -547,6 +547,7 @@ function Panel_Preview() : PanelContent() constructor { function drawPreviewOverlay() { right_menu_y = toolbar_height - ui(4); + toolbar_draw = false; if(PANEL_PREVIEW == self) { draw_set_text(f_p0, fa_right, fa_top, COLORS._main_text_accent); @@ -785,6 +786,9 @@ function Panel_Preview() : PanelContent() constructor { var scHeight = ui(32); draw_sprite_stretched(THEME.toolbar, 1, 0, 0, w, scHeight); + draw_sprite_stretched(THEME.toolbar, 0, 0, ty, w, h); + + if(!_node) return; if(tool_current != noone) { //tool settings var settings = _node.tool_settings; @@ -861,8 +865,6 @@ function Panel_Preview() : PanelContent() constructor { } } - draw_sprite_stretched(THEME.toolbar, 0, 0, ty, w, h); - var tbx = toolbar_height / 2; var tby = ty + toolbar_height / 2; @@ -1005,7 +1007,7 @@ function Panel_Preview() : PanelContent() constructor { } drawSplitView(); - if(tool) drawToolBar(tool); + drawToolBar(tool); } function copyCurrentFrame() { diff --git a/scripts/string_eval/string_eval.gml b/scripts/string_eval/string_eval.gml index 92ea6a1d0..78b1ae45e 100644 --- a/scripts/string_eval/string_eval.gml +++ b/scripts/string_eval/string_eval.gml @@ -246,9 +246,9 @@ function functionStringClean(fx) { } static getVal = function(val, params = {}, getRaw = false) { - if(is_struct(val)) return val.eval(params); - if(is_real(val)) return val; - if(getRaw) return val; + if(is_struct(val)) return val.eval(params, getRaw); + if(is_real(val)) return val; + if(getRaw) return val; if(is_string(val)) val = string_trim(val); @@ -325,7 +325,7 @@ function functionStringClean(fx) { return anim; } - static eval = function(params = {}) { + static eval = function(params = {}, isLeft = false) { if(ds_map_exists(global.FUNCTIONS, symbol)) { if(!is_array(l)) return 0; @@ -343,7 +343,7 @@ function functionStringClean(fx) { return res; } - var v1 = getVal(l, params, symbol == "=" || symbol == "【"); + var v1 = getVal(l, params, symbol == "=" || symbol == "【" || isLeft); var v2 = getVal(r, params); var res = 0; @@ -355,10 +355,18 @@ function functionStringClean(fx) { for( var i = 0; i < array_length(res); i++ ) res[i] = getVal(v1[i], params); } else if(symbol == "@") { - res = is_real(v2)? array_safe_get(v1, v2) : 0; + if(isLeft) res = [ v1, v2 ]; + else res = is_real(v2)? array_safe_get(v1, v2) : 0; } else if(symbol == "=") { - params[$ v1] = v2; - res = v2; + if(is_array(v1)) { + var val = params[$ v1[0]]; + array_safe_set(val, v1[1], v2); + params[$ v1[0]] = val; + res = val; + } else { + params[$ v1] = v2; + res = v2; + } } else if(is_array(v1) && !is_array(v2)) { res = array_create(array_length(v1)); for( var i = 0; i < array_length(res); i++ ) diff --git a/scripts/surface_functions/surface_functions.gml b/scripts/surface_functions/surface_functions.gml index 03e544e6c..dcf0c29ab 100644 --- a/scripts/surface_functions/surface_functions.gml +++ b/scripts/surface_functions/surface_functions.gml @@ -286,6 +286,41 @@ function surface_clone(surface, source = noone, format = noone) { return source; } +//in-place modification +function surface_stretch(surf, _w, _h) { + if(!is_surface(surf)) return noone; + + _w = surface_valid_size(_w); + _h = surface_valid_size(_h); + + var _surf = surface_create(_w, _h); + surface_set_target(_surf); + DRAW_CLEAR + draw_surface_stretched(surf, 0, 0, _w, _h); + surface_reset_target(); + + surface_free(surf); + return _surf; +} + +function surface_mirror(surf, _h, _v) { + if(!is_surface(surf)) return noone; + var _surf = surface_create_size(surf); + + surface_set_target(_surf); + DRAW_CLEAR + + var x0 = _h * surface_get_width(_surf); + var y0 = _v * surface_get_height(_surf); + + draw_surface_ext(surf, x0, y0, _h * 2 - 1, _v * 2 - 1, 0, c_white, 1); + surface_reset_target(); + surface_free(surf); + + return _surf; +} + +//others function surface_copy_size(dest, source, format = noone) { if(!is_surface(dest)) return; if(!is_surface(source)) return; @@ -364,6 +399,9 @@ function surface_array_deserialize(arr, index = -1) { function __surface_array_deserialize(arr) { if(!is_array(arr)) { + if(!is_struct(arr) || !struct_has(arr, "buffer")) + return noone; + var buff = buffer_base64_decode(arr.buffer); buff = buffer_decompress(buff); return surface_create_from_buffer(arr.width, arr.height, buff); diff --git a/scripts/time_source/time_source.gml b/scripts/time_source/time_source.gml index 088ae26ea..89240830b 100644 --- a/scripts/time_source/time_source.gml +++ b/scripts/time_source/time_source.gml @@ -1,4 +1,9 @@ function run_in(frame, func, args = []) { var ts = time_source_create(time_source_global, frame, time_source_units_frames, func, args); time_source_start(ts); +} + +function run_in_s(sec, func, args = []) { + var ts = time_source_create(time_source_global, sec, time_source_units_seconds, func, args); + time_source_start(ts); } \ No newline at end of file diff --git a/scripts/widget/widget.gml b/scripts/widget/widget.gml index 47207b9e1..52961dd3b 100644 --- a/scripts/widget/widget.gml +++ b/scripts/widget/widget.gml @@ -71,6 +71,6 @@ function widget() constructor { hover = false; } - static drawParam = function(param) {} + static drawParam = function(params) {} static draw = function() {} } \ No newline at end of file diff --git a/shaders/sh_colours_replace/sh_colours_replace.fsh b/shaders/sh_colours_replace/sh_colours_replace.fsh new file mode 100644 index 000000000..d933ffcc1 --- /dev/null +++ b/shaders/sh_colours_replace/sh_colours_replace.fsh @@ -0,0 +1,31 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform vec4 colorFrom[64]; +uniform int colorFromAmount; + +uniform vec4 colorTo[64]; +uniform int colorToAmount; + +uniform int useMask; +uniform sampler2D mask; + +void main() { + vec4 p = texture2D( gm_BaseTexture, v_vTexcoord ); + + int index = 0; + float minDist = 999.; + + for(int i = 0; i < colorFromAmount; i++ ) { + float dist = distance(p.rgb, colorFrom[i].rgb); + if(dist < minDist) { + minDist = dist; + index = i; + } + } + + gl_FragColor = vec4(colorTo[index].rgb, p.a); +} diff --git a/shaders/sh_colours_replace/sh_colours_replace.vsh b/shaders/sh_colours_replace/sh_colours_replace.vsh new file mode 100644 index 000000000..3900c20f4 --- /dev/null +++ b/shaders/sh_colours_replace/sh_colours_replace.vsh @@ -0,0 +1,19 @@ +// +// Simple passthrough vertex shader +// +attribute vec3 in_Position; // (x,y,z) +//attribute vec3 in_Normal; // (x,y,z) unused in this shader. +attribute vec4 in_Colour; // (r,g,b,a) +attribute vec2 in_TextureCoord; // (u,v) + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +void main() +{ + vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); + gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; + + v_vColour = in_Colour; + v_vTexcoord = in_TextureCoord; +} diff --git a/shaders/sh_colours_replace/sh_colours_replace.yy b/shaders/sh_colours_replace/sh_colours_replace.yy new file mode 100644 index 000000000..328c2c10d --- /dev/null +++ b/shaders/sh_colours_replace/sh_colours_replace.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_colours_replace", + "parent": { + "name": "filter", + "path": "folders/shader/filter.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_pb_brick/sh_pb_brick.fsh b/shaders/sh_pb_brick/sh_pb_brick.fsh new file mode 100644 index 000000000..047ce5c5a --- /dev/null +++ b/shaders/sh_pb_brick/sh_pb_brick.fsh @@ -0,0 +1,86 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform vec2 dimension; +uniform vec2 scale; +uniform int axis; +uniform float shift; + +uniform float dissolve; +uniform vec2 dissolveSca; +uniform int dissolveItr; + +///////////////////// PERLIN START ///////////////////// + +float random (in vec2 st) { return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453123); } + +float noise (in vec2 st) { + vec2 i = floor(st); + vec2 f = fract(st); + + // Four corners in 2D of a tile + float a = random(i); + float b = random(i + vec2(1.0, 0.0)); + float c = random(i + vec2(0.0, 1.0)); + float d = random(i + vec2(1.0, 1.0)); + + // Cubic Hermine Curve. Same as SmoothStep() + vec2 u = f * f * (3.0 - 2.0 * f); + + // Mix 4 coorners percentages + return mix(mix(a, b, u.x), mix(c, d, u.x), u.y); +} + +float perlin ( vec2 pos, int iteration ) { + float amp = pow(2., float(iteration) - 1.) / (pow(2., float(iteration)) - 1.); + float n = 0.; + + for(int i = 0; i < iteration; i++) { + n += noise(pos) * amp; + + amp *= .5; + pos *= 2.; + } + + return n; +} + +///////////////////// PERLIN END ///////////////////// + +void main() { + gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord ); + if(gl_FragColor.a == 0.) return; + + vec2 px = v_vTexcoord * dimension; + float _x = px.x; + float _y = px.y; + + if(axis == 1) { + float _z = _x; + _x = _y; + _y = _z; + } + + vec2 sca = scale + 1.; + + float rowInd = floor(_y / sca.y); + float rowPos = _y - rowInd * sca.y; + + if(rowPos > scale.y) return; + + if(mod(rowInd, 2.) >= 1.) + _x += shift; + + float colInd = floor(_x / sca.x); + float colPos = _x - colInd * sca.x; + + if(colPos > scale.x) return; + + if(dissolve > 0. && perlin( vec2( colInd, rowInd ) / dissolveSca, dissolveItr ) <= dissolve ) + return; + + gl_FragColor = v_vColour; +} diff --git a/shaders/sh_pb_brick/sh_pb_brick.vsh b/shaders/sh_pb_brick/sh_pb_brick.vsh new file mode 100644 index 000000000..3900c20f4 --- /dev/null +++ b/shaders/sh_pb_brick/sh_pb_brick.vsh @@ -0,0 +1,19 @@ +// +// Simple passthrough vertex shader +// +attribute vec3 in_Position; // (x,y,z) +//attribute vec3 in_Normal; // (x,y,z) unused in this shader. +attribute vec4 in_Colour; // (r,g,b,a) +attribute vec2 in_TextureCoord; // (u,v) + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +void main() +{ + vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); + gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; + + v_vColour = in_Colour; + v_vTexcoord = in_TextureCoord; +} diff --git a/shaders/sh_pb_brick/sh_pb_brick.yy b/shaders/sh_pb_brick/sh_pb_brick.yy new file mode 100644 index 000000000..b149a795b --- /dev/null +++ b/shaders/sh_pb_brick/sh_pb_brick.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_pb_brick", + "parent": { + "name": "pixel builder", + "path": "folders/shader/pixel builder.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_pb_draw_mask/sh_pb_draw_mask.fsh b/shaders/sh_pb_draw_mask/sh_pb_draw_mask.fsh new file mode 100644 index 000000000..7ee122217 --- /dev/null +++ b/shaders/sh_pb_draw_mask/sh_pb_draw_mask.fsh @@ -0,0 +1,32 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform vec2 dimension; + +vec4 sample ( vec2 position ) { + if(position.x < 0.) return vec4(0.); + if(position.y < 0.) return vec4(0.); + if(position.x > 1.) return vec4(0.); + if(position.y > 1.) return vec4(0.); + + return texture2D( gm_BaseTexture, position ); +} + +void main() { + vec2 tx = 1. / dimension; + + gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord ); + if(gl_FragColor.a == 0.) return; + gl_FragColor = vec4(0.); + + bool l = sample( v_vTexcoord - vec2(tx.x, 0.) ).a == 0.; + bool r = sample( v_vTexcoord + vec2(tx.x, 0.) ).a == 0.; + bool u = sample( v_vTexcoord - vec2(0., tx.y) ).a == 0.; + bool d = sample( v_vTexcoord + vec2(0., tx.y) ).a == 0.; + + if(l || r || u || d) + gl_FragColor = v_vColour; +} diff --git a/shaders/sh_pb_draw_mask/sh_pb_draw_mask.vsh b/shaders/sh_pb_draw_mask/sh_pb_draw_mask.vsh new file mode 100644 index 000000000..3900c20f4 --- /dev/null +++ b/shaders/sh_pb_draw_mask/sh_pb_draw_mask.vsh @@ -0,0 +1,19 @@ +// +// Simple passthrough vertex shader +// +attribute vec3 in_Position; // (x,y,z) +//attribute vec3 in_Normal; // (x,y,z) unused in this shader. +attribute vec4 in_Colour; // (r,g,b,a) +attribute vec2 in_TextureCoord; // (u,v) + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +void main() +{ + vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); + gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; + + v_vColour = in_Colour; + v_vTexcoord = in_TextureCoord; +} diff --git a/shaders/sh_pb_draw_mask/sh_pb_draw_mask.yy b/shaders/sh_pb_draw_mask/sh_pb_draw_mask.yy new file mode 100644 index 000000000..fab569151 --- /dev/null +++ b/shaders/sh_pb_draw_mask/sh_pb_draw_mask.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_pb_draw_mask", + "parent": { + "name": "pixel builder", + "path": "folders/shader/pixel builder.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_pb_hash/sh_pb_hash.fsh b/shaders/sh_pb_hash/sh_pb_hash.fsh index bc0553c72..62f4ae481 100644 --- a/shaders/sh_pb_hash/sh_pb_hash.fsh +++ b/shaders/sh_pb_hash/sh_pb_hash.fsh @@ -10,16 +10,60 @@ uniform vec4 color; uniform float hash; uniform int invert; +uniform float dissolve; +uniform vec2 dissolveSca; +uniform int dissolveItr; + +///////////////////// PERLIN START ///////////////////// + +float random (in vec2 st) { return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453123); } + +float noise (in vec2 st) { + vec2 i = floor(st); + vec2 f = fract(st); + + // Four corners in 2D of a tile + float a = random(i); + float b = random(i + vec2(1.0, 0.0)); + float c = random(i + vec2(0.0, 1.0)); + float d = random(i + vec2(1.0, 1.0)); + + // Cubic Hermine Curve. Same as SmoothStep() + vec2 u = f * f * (3.0 - 2.0 * f); + + // Mix 4 coorners percentages + return mix(mix(a, b, u.x), mix(c, d, u.x), u.y); +} + +float perlin ( vec2 pos, int iteration ) { + float amp = pow(2., float(iteration) - 1.) / (pow(2., float(iteration)) - 1.); + float n = 0.; + + for(int i = 0; i < iteration; i++) { + n += noise(pos) * amp; + + amp *= .5; + pos *= 2.; + } + + return n; +} + +///////////////////// PERLIN END ///////////////////// + void main() { + gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord ); + if(gl_FragColor.a == 0.) return; + vec2 px = v_vTexcoord * dimension; float index; if(invert == 1) index = px.x - px.y; else index = px.x + px.y; - if(mod(index, hash) >= hash / 2.) - gl_FragColor = color; - else - gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord ); + if(dissolve > 0. && perlin( v_vTexcoord * dimension / dissolveSca, dissolveItr ) <= dissolve) + return; + if(mod(index, hash) >= hash / 2.) + gl_FragColor = color; } diff --git a/shaders/sh_pb_mask_inset/sh_pb_mask_inset.fsh b/shaders/sh_pb_mask_inset/sh_pb_mask_inset.fsh new file mode 100644 index 000000000..ec8a11785 --- /dev/null +++ b/shaders/sh_pb_mask_inset/sh_pb_mask_inset.fsh @@ -0,0 +1,31 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform vec2 dimension; +uniform vec4 inset; + +void main() { + gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord ); + if(gl_FragColor.a == 0.) return; + + vec2 tx = 1. / dimension; + + for(int i = 0; i < 4; i++) + for(float j = 1.; j <= inset[i]; j++) { + vec2 pos; + + if(i == 0) pos = v_vTexcoord + vec2( tx.x * j, 0. ); + else if(i == 1) pos = v_vTexcoord - vec2( 0., tx.y * j ); + else if(i == 2) pos = v_vTexcoord - vec2( tx.x * j, 0. ); + else if(i == 3) pos = v_vTexcoord + vec2( 0., tx.y * j ); + + vec4 px = texture2D( gm_BaseTexture, pos ); + if(px.a == 0.) { + gl_FragColor = vec4(0.); + return; + } + } +} diff --git a/shaders/sh_pb_mask_inset/sh_pb_mask_inset.vsh b/shaders/sh_pb_mask_inset/sh_pb_mask_inset.vsh new file mode 100644 index 000000000..3900c20f4 --- /dev/null +++ b/shaders/sh_pb_mask_inset/sh_pb_mask_inset.vsh @@ -0,0 +1,19 @@ +// +// Simple passthrough vertex shader +// +attribute vec3 in_Position; // (x,y,z) +//attribute vec3 in_Normal; // (x,y,z) unused in this shader. +attribute vec4 in_Colour; // (r,g,b,a) +attribute vec2 in_TextureCoord; // (u,v) + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +void main() +{ + vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); + gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; + + v_vColour = in_Colour; + v_vTexcoord = in_TextureCoord; +} diff --git a/shaders/sh_pb_mask_inset/sh_pb_mask_inset.yy b/shaders/sh_pb_mask_inset/sh_pb_mask_inset.yy new file mode 100644 index 000000000..11b1a8f69 --- /dev/null +++ b/shaders/sh_pb_mask_inset/sh_pb_mask_inset.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_pb_mask_inset", + "parent": { + "name": "pixel builder", + "path": "folders/shader/pixel builder.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_pb_shade_half/sh_pb_shade_half.fsh b/shaders/sh_pb_shade_half/sh_pb_shade_half.fsh new file mode 100644 index 000000000..1a0fa6789 --- /dev/null +++ b/shaders/sh_pb_shade_half/sh_pb_shade_half.fsh @@ -0,0 +1,18 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform vec2 dimension; +uniform int side; + +void main() { + gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord ); + if(gl_FragColor.a == 0.) return; + + if(side == 0 && v_vTexcoord.x < 0.5) gl_FragColor = v_vColour; + else if(side == 1 && v_vTexcoord.y < 0.5) gl_FragColor = v_vColour; + else if(side == 2 && v_vTexcoord.x > 0.5) gl_FragColor = v_vColour; + else if(side == 3 && v_vTexcoord.y > 0.5) gl_FragColor = v_vColour; +} diff --git a/shaders/sh_pb_shade_half/sh_pb_shade_half.vsh b/shaders/sh_pb_shade_half/sh_pb_shade_half.vsh new file mode 100644 index 000000000..3900c20f4 --- /dev/null +++ b/shaders/sh_pb_shade_half/sh_pb_shade_half.vsh @@ -0,0 +1,19 @@ +// +// Simple passthrough vertex shader +// +attribute vec3 in_Position; // (x,y,z) +//attribute vec3 in_Normal; // (x,y,z) unused in this shader. +attribute vec4 in_Colour; // (r,g,b,a) +attribute vec2 in_TextureCoord; // (u,v) + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +void main() +{ + vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); + gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; + + v_vColour = in_Colour; + v_vTexcoord = in_TextureCoord; +} diff --git a/shaders/sh_pb_shade_half/sh_pb_shade_half.yy b/shaders/sh_pb_shade_half/sh_pb_shade_half.yy new file mode 100644 index 000000000..2a3079717 --- /dev/null +++ b/shaders/sh_pb_shade_half/sh_pb_shade_half.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_pb_shade_half", + "parent": { + "name": "pixel builder", + "path": "folders/shader/pixel builder.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_pb_strip/sh_pb_strip.fsh b/shaders/sh_pb_strip/sh_pb_strip.fsh new file mode 100644 index 000000000..7e9b11b5e --- /dev/null +++ b/shaders/sh_pb_strip/sh_pb_strip.fsh @@ -0,0 +1,23 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform vec2 dimension; +uniform float scale; +uniform int axis; +uniform int shift; + +void main() { + gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord ); + if(gl_FragColor.a == 0.) return; + + vec2 pos = v_vTexcoord * dimension; + float prog = axis == 0? pos.x : pos.y; + prog -= float(shift); + prog /= scale; + + prog = prog - floor(prog / 2.) * 2.; + if(prog >= 1.) gl_FragColor = v_vColour; +} diff --git a/shaders/sh_pb_strip/sh_pb_strip.vsh b/shaders/sh_pb_strip/sh_pb_strip.vsh new file mode 100644 index 000000000..3900c20f4 --- /dev/null +++ b/shaders/sh_pb_strip/sh_pb_strip.vsh @@ -0,0 +1,19 @@ +// +// Simple passthrough vertex shader +// +attribute vec3 in_Position; // (x,y,z) +//attribute vec3 in_Normal; // (x,y,z) unused in this shader. +attribute vec4 in_Colour; // (r,g,b,a) +attribute vec2 in_TextureCoord; // (u,v) + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +void main() +{ + vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); + gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; + + v_vColour = in_Colour; + v_vTexcoord = in_TextureCoord; +} diff --git a/shaders/sh_pb_strip/sh_pb_strip.yy b/shaders/sh_pb_strip/sh_pb_strip.yy new file mode 100644 index 000000000..76eb83d3f --- /dev/null +++ b/shaders/sh_pb_strip/sh_pb_strip.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_pb_strip", + "parent": { + "name": "pixel builder", + "path": "folders/shader/pixel builder.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_pb_to_mask/sh_pb_to_mask.fsh b/shaders/sh_pb_to_mask/sh_pb_to_mask.fsh new file mode 100644 index 000000000..c63eb6af7 --- /dev/null +++ b/shaders/sh_pb_to_mask/sh_pb_to_mask.fsh @@ -0,0 +1,13 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +void main() { + gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord ); + if(gl_FragColor.a == 0.) + gl_FragColor = vec4(0.); + else + gl_FragColor = vec4(1.); +} diff --git a/shaders/sh_pb_to_mask/sh_pb_to_mask.vsh b/shaders/sh_pb_to_mask/sh_pb_to_mask.vsh new file mode 100644 index 000000000..3900c20f4 --- /dev/null +++ b/shaders/sh_pb_to_mask/sh_pb_to_mask.vsh @@ -0,0 +1,19 @@ +// +// Simple passthrough vertex shader +// +attribute vec3 in_Position; // (x,y,z) +//attribute vec3 in_Normal; // (x,y,z) unused in this shader. +attribute vec4 in_Colour; // (r,g,b,a) +attribute vec2 in_TextureCoord; // (u,v) + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +void main() +{ + vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); + gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; + + v_vColour = in_Colour; + v_vTexcoord = in_TextureCoord; +} diff --git a/shaders/sh_pb_to_mask/sh_pb_to_mask.yy b/shaders/sh_pb_to_mask/sh_pb_to_mask.yy new file mode 100644 index 000000000..901528c64 --- /dev/null +++ b/shaders/sh_pb_to_mask/sh_pb_to_mask.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_pb_to_mask", + "parent": { + "name": "pixel builder", + "path": "folders/shader/pixel builder.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_perlin/sh_perlin.fsh b/shaders/sh_perlin/sh_perlin.fsh index f31729206..5191f3fea 100644 --- a/shaders/sh_perlin/sh_perlin.fsh +++ b/shaders/sh_perlin/sh_perlin.fsh @@ -10,6 +10,8 @@ uniform float scale; uniform float bright; uniform int iteration; +///////////////////// PERLIN START ///////////////////// + float random (in vec2 st) { return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453123); } float noise (in vec2 st) { @@ -29,8 +31,7 @@ float noise (in vec2 st) { return mix(mix(a, b, u.x), mix(c, d, u.x), u.y); } -void main() { - vec2 pos = position + v_vTexcoord * scale; +float perlin ( vec2 pos, int iteration ) { float amp = pow(2., float(iteration) - 1.) / (pow(2., float(iteration)) - 1.); float n = 0.; @@ -41,5 +42,14 @@ void main() { pos *= 2.; } + return n; +} + +///////////////////// PERLIN END ///////////////////// + +void main() { + vec2 pos = position + v_vTexcoord * scale; + float n = perlin(pos, iteration); + gl_FragColor = vec4(vec3(n), 1.0); } diff --git a/shaders/sh_stripe/sh_stripe.fsh b/shaders/sh_stripe/sh_stripe.fsh index 3291c7ff0..069603ad4 100644 --- a/shaders/sh_stripe/sh_stripe.fsh +++ b/shaders/sh_stripe/sh_stripe.fsh @@ -91,7 +91,7 @@ vec4 gradientEval(in float prog) { } void main() { - vec2 pos = v_vTexcoord - position; + vec2 pos = v_vTexcoord - position; float ratio = dimension.x / dimension.y; float prog = pos.x * ratio * cos(angle) - pos.y * sin(angle); float _a = 1. / amount; diff --git a/sprites/s_node_color_replace/133a4363-92eb-4b4a-9e35-61a7a1422e78.png b/sprites/s_node_color_replace/133a4363-92eb-4b4a-9e35-61a7a1422e78.png deleted file mode 100644 index d72682358..000000000 Binary files a/sprites/s_node_color_replace/133a4363-92eb-4b4a-9e35-61a7a1422e78.png and /dev/null differ diff --git a/sprites/s_node_color_replace/7493c107-7636-4bf6-ae8f-38319aed61e5.png b/sprites/s_node_color_replace/7493c107-7636-4bf6-ae8f-38319aed61e5.png new file mode 100644 index 000000000..48e2179d0 Binary files /dev/null and b/sprites/s_node_color_replace/7493c107-7636-4bf6-ae8f-38319aed61e5.png differ diff --git a/sprites/s_node_color_replace/layers/133a4363-92eb-4b4a-9e35-61a7a1422e78/6af05c97-ffcb-407d-a8d3-2ed5fd53441d.png b/sprites/s_node_color_replace/layers/133a4363-92eb-4b4a-9e35-61a7a1422e78/6af05c97-ffcb-407d-a8d3-2ed5fd53441d.png deleted file mode 100644 index d72682358..000000000 Binary files a/sprites/s_node_color_replace/layers/133a4363-92eb-4b4a-9e35-61a7a1422e78/6af05c97-ffcb-407d-a8d3-2ed5fd53441d.png and /dev/null differ diff --git a/sprites/s_node_color_replace/layers/7493c107-7636-4bf6-ae8f-38319aed61e5/74d6111f-b53b-4fd4-8537-682e61dc479d.png b/sprites/s_node_color_replace/layers/7493c107-7636-4bf6-ae8f-38319aed61e5/74d6111f-b53b-4fd4-8537-682e61dc479d.png new file mode 100644 index 000000000..48e2179d0 Binary files /dev/null and b/sprites/s_node_color_replace/layers/7493c107-7636-4bf6-ae8f-38319aed61e5/74d6111f-b53b-4fd4-8537-682e61dc479d.png differ diff --git a/sprites/s_node_color_replace/s_node_color_replace.yy b/sprites/s_node_color_replace/s_node_color_replace.yy index fdf6c1d2a..05af6665e 100644 --- a/sprites/s_node_color_replace/s_node_color_replace.yy +++ b/sprites/s_node_color_replace/s_node_color_replace.yy @@ -2,10 +2,10 @@ "resourceType": "GMSprite", "resourceVersion": "1.0", "name": "s_node_color_replace", - "bbox_bottom": 63, - "bbox_left": 0, - "bbox_right": 63, - "bbox_top": 0, + "bbox_bottom": 61, + "bbox_left": 2, + "bbox_right": 61, + "bbox_top": 2, "bboxMode": 0, "collisionKind": 1, "collisionTolerance": 0, @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"133a4363-92eb-4b4a-9e35-61a7a1422e78",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"7493c107-7636-4bf6-ae8f-38319aed61e5",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"6af05c97-ffcb-407d-a8d3-2ed5fd53441d","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"74d6111f-b53b-4fd4-8537-682e61dc479d","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,10 +54,10 @@ "timeUnits": 1, "tracks": [ {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ - {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"133a4363-92eb-4b4a-9e35-61a7a1422e78","path":"sprites/s_node_color_replace/s_node_color_replace.yy",},},},"Disabled":false,"id":"fd834153-e164-49bb-b215-df2f4865256a","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"7493c107-7636-4bf6-ae8f-38319aed61e5","path":"sprites/s_node_color_replace/s_node_color_replace.yy",},},},"Disabled":false,"id":"b6553b41-b23a-4036-a164-b9e19c7d3c70","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, diff --git a/sprites/s_node_pb_box_contract/65342bfd-1697-461b-925a-796ad0c481a8.png b/sprites/s_node_pb_box_contract/65342bfd-1697-461b-925a-796ad0c481a8.png deleted file mode 100644 index a7a509155..000000000 Binary files a/sprites/s_node_pb_box_contract/65342bfd-1697-461b-925a-796ad0c481a8.png and /dev/null differ diff --git a/sprites/s_node_pb_box_contract/f84917c1-415e-4614-b898-eea3751bcd05.png b/sprites/s_node_pb_box_contract/f84917c1-415e-4614-b898-eea3751bcd05.png new file mode 100644 index 000000000..d09468fcb Binary files /dev/null and b/sprites/s_node_pb_box_contract/f84917c1-415e-4614-b898-eea3751bcd05.png differ diff --git a/sprites/s_node_pb_box_contract/layers/65342bfd-1697-461b-925a-796ad0c481a8/8a0d5d07-5845-47f7-9908-efc37cd11d3f.png b/sprites/s_node_pb_box_contract/layers/65342bfd-1697-461b-925a-796ad0c481a8/8a0d5d07-5845-47f7-9908-efc37cd11d3f.png deleted file mode 100644 index a7a509155..000000000 Binary files a/sprites/s_node_pb_box_contract/layers/65342bfd-1697-461b-925a-796ad0c481a8/8a0d5d07-5845-47f7-9908-efc37cd11d3f.png and /dev/null differ diff --git a/sprites/s_node_pb_box_contract/layers/f84917c1-415e-4614-b898-eea3751bcd05/db75a0b5-b900-4b63-88d1-27a58141a37f.png b/sprites/s_node_pb_box_contract/layers/f84917c1-415e-4614-b898-eea3751bcd05/db75a0b5-b900-4b63-88d1-27a58141a37f.png new file mode 100644 index 000000000..d09468fcb Binary files /dev/null and b/sprites/s_node_pb_box_contract/layers/f84917c1-415e-4614-b898-eea3751bcd05/db75a0b5-b900-4b63-88d1-27a58141a37f.png differ diff --git a/sprites/s_node_pb_box_contract/s_node_pb_box_contract.yy b/sprites/s_node_pb_box_contract/s_node_pb_box_contract.yy index 1a3e3e2a3..eba62c10c 100644 --- a/sprites/s_node_pb_box_contract/s_node_pb_box_contract.yy +++ b/sprites/s_node_pb_box_contract/s_node_pb_box_contract.yy @@ -3,8 +3,8 @@ "resourceVersion": "1.0", "name": "s_node_pb_box_contract", "bbox_bottom": 61, - "bbox_left": 3, - "bbox_right": 60, + "bbox_left": 2, + "bbox_right": 61, "bbox_top": 2, "bboxMode": 0, "collisionKind": 1, @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"65342bfd-1697-461b-925a-796ad0c481a8",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"f84917c1-415e-4614-b898-eea3751bcd05",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"8a0d5d07-5845-47f7-9908-efc37cd11d3f","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"db75a0b5-b900-4b63-88d1-27a58141a37f","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "timeUnits": 1, "tracks": [ {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ - {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"65342bfd-1697-461b-925a-796ad0c481a8","path":"sprites/s_node_pb_box_contract/s_node_pb_box_contract.yy",},},},"Disabled":false,"id":"bb8d03d6-b788-4e8d-821b-651ccd4c86b1","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"f84917c1-415e-4614-b898-eea3751bcd05","path":"sprites/s_node_pb_box_contract/s_node_pb_box_contract.yy",},},},"Disabled":false,"id":"df43465b-e8aa-4493-ba83-26cbd6d5ac8b","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_pb_box_divide/84d0fdaf-1874-4559-b00c-e3d9c54c8951.png b/sprites/s_node_pb_box_divide/84d0fdaf-1874-4559-b00c-e3d9c54c8951.png new file mode 100644 index 000000000..6e01935be Binary files /dev/null and b/sprites/s_node_pb_box_divide/84d0fdaf-1874-4559-b00c-e3d9c54c8951.png differ diff --git a/sprites/s_node_pb_box_divide/d2983c5f-4e8a-4de9-a7cc-0d0c4a3fc6b5.png b/sprites/s_node_pb_box_divide/d2983c5f-4e8a-4de9-a7cc-0d0c4a3fc6b5.png deleted file mode 100644 index 0a4d7a153..000000000 Binary files a/sprites/s_node_pb_box_divide/d2983c5f-4e8a-4de9-a7cc-0d0c4a3fc6b5.png and /dev/null differ diff --git a/sprites/s_node_pb_box_divide/layers/84d0fdaf-1874-4559-b00c-e3d9c54c8951/b1abfef3-8a26-47ef-9a1e-9187e5e69fd6.png b/sprites/s_node_pb_box_divide/layers/84d0fdaf-1874-4559-b00c-e3d9c54c8951/b1abfef3-8a26-47ef-9a1e-9187e5e69fd6.png new file mode 100644 index 000000000..6e01935be Binary files /dev/null and b/sprites/s_node_pb_box_divide/layers/84d0fdaf-1874-4559-b00c-e3d9c54c8951/b1abfef3-8a26-47ef-9a1e-9187e5e69fd6.png differ diff --git a/sprites/s_node_pb_box_divide/layers/d2983c5f-4e8a-4de9-a7cc-0d0c4a3fc6b5/bc217285-104c-484e-b948-907b91cce514.png b/sprites/s_node_pb_box_divide/layers/d2983c5f-4e8a-4de9-a7cc-0d0c4a3fc6b5/bc217285-104c-484e-b948-907b91cce514.png deleted file mode 100644 index 0a4d7a153..000000000 Binary files a/sprites/s_node_pb_box_divide/layers/d2983c5f-4e8a-4de9-a7cc-0d0c4a3fc6b5/bc217285-104c-484e-b948-907b91cce514.png and /dev/null differ diff --git a/sprites/s_node_pb_box_divide/s_node_pb_box_divide.yy b/sprites/s_node_pb_box_divide/s_node_pb_box_divide.yy index b8290762e..157b69dad 100644 --- a/sprites/s_node_pb_box_divide/s_node_pb_box_divide.yy +++ b/sprites/s_node_pb_box_divide/s_node_pb_box_divide.yy @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"d2983c5f-4e8a-4de9-a7cc-0d0c4a3fc6b5",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"84d0fdaf-1874-4559-b00c-e3d9c54c8951",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"bc217285-104c-484e-b948-907b91cce514","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"b1abfef3-8a26-47ef-9a1e-9187e5e69fd6","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "timeUnits": 1, "tracks": [ {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ - {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"d2983c5f-4e8a-4de9-a7cc-0d0c4a3fc6b5","path":"sprites/s_node_pb_box_divide/s_node_pb_box_divide.yy",},},},"Disabled":false,"id":"3b483227-5fee-4fc9-802f-f5f0abb154ea","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"84d0fdaf-1874-4559-b00c-e3d9c54c8951","path":"sprites/s_node_pb_box_divide/s_node_pb_box_divide.yy",},},},"Disabled":false,"id":"8ad6e18d-32b8-4d60-bffe-34575e8dc2d8","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_pb_box_divide_grid/209d3225-6a62-4f9f-8941-d4d4d62bd77a.png b/sprites/s_node_pb_box_divide_grid/209d3225-6a62-4f9f-8941-d4d4d62bd77a.png deleted file mode 100644 index c496d97ce..000000000 Binary files a/sprites/s_node_pb_box_divide_grid/209d3225-6a62-4f9f-8941-d4d4d62bd77a.png and /dev/null differ diff --git a/sprites/s_node_pb_box_divide_grid/d10e311c-0076-4c13-84e4-7d595d690d3e.png b/sprites/s_node_pb_box_divide_grid/d10e311c-0076-4c13-84e4-7d595d690d3e.png new file mode 100644 index 000000000..e8856fa0c Binary files /dev/null and b/sprites/s_node_pb_box_divide_grid/d10e311c-0076-4c13-84e4-7d595d690d3e.png differ diff --git a/sprites/s_node_pb_box_divide_grid/layers/209d3225-6a62-4f9f-8941-d4d4d62bd77a/8d401f48-03fd-4d33-8978-d33b72ec5906.png b/sprites/s_node_pb_box_divide_grid/layers/209d3225-6a62-4f9f-8941-d4d4d62bd77a/8d401f48-03fd-4d33-8978-d33b72ec5906.png deleted file mode 100644 index c496d97ce..000000000 Binary files a/sprites/s_node_pb_box_divide_grid/layers/209d3225-6a62-4f9f-8941-d4d4d62bd77a/8d401f48-03fd-4d33-8978-d33b72ec5906.png and /dev/null differ diff --git a/sprites/s_node_pb_box_divide_grid/layers/d10e311c-0076-4c13-84e4-7d595d690d3e/16491b2b-0a56-4270-9cfd-0838651392d2.png b/sprites/s_node_pb_box_divide_grid/layers/d10e311c-0076-4c13-84e4-7d595d690d3e/16491b2b-0a56-4270-9cfd-0838651392d2.png new file mode 100644 index 000000000..e8856fa0c Binary files /dev/null and b/sprites/s_node_pb_box_divide_grid/layers/d10e311c-0076-4c13-84e4-7d595d690d3e/16491b2b-0a56-4270-9cfd-0838651392d2.png differ diff --git a/sprites/s_node_pb_box_divide_grid/s_node_pb_box_divide_grid.yy b/sprites/s_node_pb_box_divide_grid/s_node_pb_box_divide_grid.yy index fe32c7b15..edff07913 100644 --- a/sprites/s_node_pb_box_divide_grid/s_node_pb_box_divide_grid.yy +++ b/sprites/s_node_pb_box_divide_grid/s_node_pb_box_divide_grid.yy @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"209d3225-6a62-4f9f-8941-d4d4d62bd77a",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"d10e311c-0076-4c13-84e4-7d595d690d3e",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"8d401f48-03fd-4d33-8978-d33b72ec5906","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"16491b2b-0a56-4270-9cfd-0838651392d2","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "timeUnits": 1, "tracks": [ {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ - {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"209d3225-6a62-4f9f-8941-d4d4d62bd77a","path":"sprites/s_node_pb_box_divide_grid/s_node_pb_box_divide_grid.yy",},},},"Disabled":false,"id":"9a797cb9-a48c-41ae-9ebb-30cd9d043324","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"d10e311c-0076-4c13-84e4-7d595d690d3e","path":"sprites/s_node_pb_box_divide_grid/s_node_pb_box_divide_grid.yy",},},},"Disabled":false,"id":"bbdbb8f7-23d1-46a0-9fba-2d9e9ad6fd36","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_pb_box_inset/18b62ef8-498a-444a-b11d-bab636015a71.png b/sprites/s_node_pb_box_inset/18b62ef8-498a-444a-b11d-bab636015a71.png deleted file mode 100644 index 3ff37237e..000000000 Binary files a/sprites/s_node_pb_box_inset/18b62ef8-498a-444a-b11d-bab636015a71.png and /dev/null differ diff --git a/sprites/s_node_pb_box_inset/ebaece7f-27f5-430d-97ed-c09848db178d.png b/sprites/s_node_pb_box_inset/ebaece7f-27f5-430d-97ed-c09848db178d.png new file mode 100644 index 000000000..7daae3d95 Binary files /dev/null and b/sprites/s_node_pb_box_inset/ebaece7f-27f5-430d-97ed-c09848db178d.png differ diff --git a/sprites/s_node_pb_box_inset/layers/18b62ef8-498a-444a-b11d-bab636015a71/3fecb569-1a80-43a3-bd27-da27dbdf7d33.png b/sprites/s_node_pb_box_inset/layers/18b62ef8-498a-444a-b11d-bab636015a71/3fecb569-1a80-43a3-bd27-da27dbdf7d33.png deleted file mode 100644 index 3ff37237e..000000000 Binary files a/sprites/s_node_pb_box_inset/layers/18b62ef8-498a-444a-b11d-bab636015a71/3fecb569-1a80-43a3-bd27-da27dbdf7d33.png and /dev/null differ diff --git a/sprites/s_node_pb_box_inset/layers/ebaece7f-27f5-430d-97ed-c09848db178d/2a2b8c7d-db3e-418d-bda1-2842c5ca5f78.png b/sprites/s_node_pb_box_inset/layers/ebaece7f-27f5-430d-97ed-c09848db178d/2a2b8c7d-db3e-418d-bda1-2842c5ca5f78.png new file mode 100644 index 000000000..7daae3d95 Binary files /dev/null and b/sprites/s_node_pb_box_inset/layers/ebaece7f-27f5-430d-97ed-c09848db178d/2a2b8c7d-db3e-418d-bda1-2842c5ca5f78.png differ diff --git a/sprites/s_node_pb_box_inset/s_node_pb_box_inset.yy b/sprites/s_node_pb_box_inset/s_node_pb_box_inset.yy index acc366fd0..2cce55a47 100644 --- a/sprites/s_node_pb_box_inset/s_node_pb_box_inset.yy +++ b/sprites/s_node_pb_box_inset/s_node_pb_box_inset.yy @@ -2,10 +2,10 @@ "resourceType": "GMSprite", "resourceVersion": "1.0", "name": "s_node_pb_box_inset", - "bbox_bottom": 60, - "bbox_left": 3, - "bbox_right": 60, - "bbox_top": 3, + "bbox_bottom": 61, + "bbox_left": 2, + "bbox_right": 61, + "bbox_top": 2, "bboxMode": 0, "collisionKind": 1, "collisionTolerance": 0, @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"18b62ef8-498a-444a-b11d-bab636015a71",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"ebaece7f-27f5-430d-97ed-c09848db178d",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"3fecb569-1a80-43a3-bd27-da27dbdf7d33","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"2a2b8c7d-db3e-418d-bda1-2842c5ca5f78","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "timeUnits": 1, "tracks": [ {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ - {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"18b62ef8-498a-444a-b11d-bab636015a71","path":"sprites/s_node_pb_box_inset/s_node_pb_box_inset.yy",},},},"Disabled":false,"id":"ae973d44-ebfc-4881-9525-c65953c46eaf","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"ebaece7f-27f5-430d-97ed-c09848db178d","path":"sprites/s_node_pb_box_inset/s_node_pb_box_inset.yy",},},},"Disabled":false,"id":"e484fe37-607d-43ab-a0d7-f405e454f6e1","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_pb_box_mirror/f588fc02-4483-425b-bda1-9e53bbeffe11.png b/sprites/s_node_pb_box_mirror/e0198314-8305-4f0e-987f-1a631a8207bf.png similarity index 84% rename from sprites/s_node_pb_box_mirror/f588fc02-4483-425b-bda1-9e53bbeffe11.png rename to sprites/s_node_pb_box_mirror/e0198314-8305-4f0e-987f-1a631a8207bf.png index fca435e0a..94e9ab055 100644 Binary files a/sprites/s_node_pb_box_mirror/f588fc02-4483-425b-bda1-9e53bbeffe11.png and b/sprites/s_node_pb_box_mirror/e0198314-8305-4f0e-987f-1a631a8207bf.png differ diff --git a/sprites/s_node_pb_box_mirror/layers/f588fc02-4483-425b-bda1-9e53bbeffe11/c2babca2-a330-4521-aa78-d5631fe8cd93.png b/sprites/s_node_pb_box_mirror/layers/e0198314-8305-4f0e-987f-1a631a8207bf/c4284560-7b1f-4f57-80d3-030daa491a5b.png similarity index 84% rename from sprites/s_node_pb_box_mirror/layers/f588fc02-4483-425b-bda1-9e53bbeffe11/c2babca2-a330-4521-aa78-d5631fe8cd93.png rename to sprites/s_node_pb_box_mirror/layers/e0198314-8305-4f0e-987f-1a631a8207bf/c4284560-7b1f-4f57-80d3-030daa491a5b.png index fca435e0a..94e9ab055 100644 Binary files a/sprites/s_node_pb_box_mirror/layers/f588fc02-4483-425b-bda1-9e53bbeffe11/c2babca2-a330-4521-aa78-d5631fe8cd93.png and b/sprites/s_node_pb_box_mirror/layers/e0198314-8305-4f0e-987f-1a631a8207bf/c4284560-7b1f-4f57-80d3-030daa491a5b.png differ diff --git a/sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy b/sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy index a5626c215..3cffa28e7 100644 --- a/sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy +++ b/sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"f588fc02-4483-425b-bda1-9e53bbeffe11",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"e0198314-8305-4f0e-987f-1a631a8207bf",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"c2babca2-a330-4521-aa78-d5631fe8cd93","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"c4284560-7b1f-4f57-80d3-030daa491a5b","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "timeUnits": 1, "tracks": [ {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ - {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"f588fc02-4483-425b-bda1-9e53bbeffe11","path":"sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy",},},},"Disabled":false,"id":"41d30371-9f8b-45c0-b1c6-20f23553d9fb","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"e0198314-8305-4f0e-987f-1a631a8207bf","path":"sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy",},},},"Disabled":false,"id":"c07318c0-8e10-4496-9037-c3d9648a0f40","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_pb_box_split/75e88de5-cd3b-4325-8c97-168100ce3db6.png b/sprites/s_node_pb_box_split/75e88de5-cd3b-4325-8c97-168100ce3db6.png new file mode 100644 index 000000000..793e38a82 Binary files /dev/null and b/sprites/s_node_pb_box_split/75e88de5-cd3b-4325-8c97-168100ce3db6.png differ diff --git a/sprites/s_node_pb_box_split/d166c3d8-c027-4f6d-904d-84663b63d995.png b/sprites/s_node_pb_box_split/d166c3d8-c027-4f6d-904d-84663b63d995.png deleted file mode 100644 index af2b87fdd..000000000 Binary files a/sprites/s_node_pb_box_split/d166c3d8-c027-4f6d-904d-84663b63d995.png and /dev/null differ diff --git a/sprites/s_node_pb_box_split/layers/75e88de5-cd3b-4325-8c97-168100ce3db6/b1d6fefb-24bb-41ea-be0d-ceae7841b822.png b/sprites/s_node_pb_box_split/layers/75e88de5-cd3b-4325-8c97-168100ce3db6/b1d6fefb-24bb-41ea-be0d-ceae7841b822.png new file mode 100644 index 000000000..793e38a82 Binary files /dev/null and b/sprites/s_node_pb_box_split/layers/75e88de5-cd3b-4325-8c97-168100ce3db6/b1d6fefb-24bb-41ea-be0d-ceae7841b822.png differ diff --git a/sprites/s_node_pb_box_split/layers/d166c3d8-c027-4f6d-904d-84663b63d995/c8057d8c-39ca-4ba5-ad00-19192aaa0c20.png b/sprites/s_node_pb_box_split/layers/d166c3d8-c027-4f6d-904d-84663b63d995/c8057d8c-39ca-4ba5-ad00-19192aaa0c20.png deleted file mode 100644 index af2b87fdd..000000000 Binary files a/sprites/s_node_pb_box_split/layers/d166c3d8-c027-4f6d-904d-84663b63d995/c8057d8c-39ca-4ba5-ad00-19192aaa0c20.png and /dev/null differ diff --git a/sprites/s_node_pb_box_split/s_node_pb_box_split.yy b/sprites/s_node_pb_box_split/s_node_pb_box_split.yy index 0f3461257..3791e32c5 100644 --- a/sprites/s_node_pb_box_split/s_node_pb_box_split.yy +++ b/sprites/s_node_pb_box_split/s_node_pb_box_split.yy @@ -3,8 +3,8 @@ "resourceVersion": "1.0", "name": "s_node_pb_box_split", "bbox_bottom": 61, - "bbox_left": 3, - "bbox_right": 60, + "bbox_left": 2, + "bbox_right": 61, "bbox_top": 2, "bboxMode": 0, "collisionKind": 1, @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"d166c3d8-c027-4f6d-904d-84663b63d995",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"75e88de5-cd3b-4325-8c97-168100ce3db6",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"c8057d8c-39ca-4ba5-ad00-19192aaa0c20","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"b1d6fefb-24bb-41ea-be0d-ceae7841b822","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "timeUnits": 1, "tracks": [ {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ - {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"d166c3d8-c027-4f6d-904d-84663b63d995","path":"sprites/s_node_pb_box_split/s_node_pb_box_split.yy",},},},"Disabled":false,"id":"0aeb5b23-ed43-4cd4-b02e-1e84bfa26773","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"75e88de5-cd3b-4325-8c97-168100ce3db6","path":"sprites/s_node_pb_box_split/s_node_pb_box_split.yy",},},},"Disabled":false,"id":"4df00da8-9ff8-48d3-b122-862d250e849e","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_pb_box_transform/62948821-0a62-442a-b84b-6e1aa8d17b99.png b/sprites/s_node_pb_box_transform/62948821-0a62-442a-b84b-6e1aa8d17b99.png new file mode 100644 index 000000000..bae272e54 Binary files /dev/null and b/sprites/s_node_pb_box_transform/62948821-0a62-442a-b84b-6e1aa8d17b99.png differ diff --git a/sprites/s_node_pb_box_transform/b36bac71-415b-4c6d-bed2-09fc16232e98.png b/sprites/s_node_pb_box_transform/b36bac71-415b-4c6d-bed2-09fc16232e98.png deleted file mode 100644 index 31cce3eef..000000000 Binary files a/sprites/s_node_pb_box_transform/b36bac71-415b-4c6d-bed2-09fc16232e98.png and /dev/null differ diff --git a/sprites/s_node_pb_box_transform/layers/62948821-0a62-442a-b84b-6e1aa8d17b99/7f4868e6-4e18-46a3-a8e6-54355ea7a662.png b/sprites/s_node_pb_box_transform/layers/62948821-0a62-442a-b84b-6e1aa8d17b99/7f4868e6-4e18-46a3-a8e6-54355ea7a662.png new file mode 100644 index 000000000..bae272e54 Binary files /dev/null and b/sprites/s_node_pb_box_transform/layers/62948821-0a62-442a-b84b-6e1aa8d17b99/7f4868e6-4e18-46a3-a8e6-54355ea7a662.png differ diff --git a/sprites/s_node_pb_box_transform/layers/b36bac71-415b-4c6d-bed2-09fc16232e98/d21f2955-2370-4054-8031-af841ab2b95e.png b/sprites/s_node_pb_box_transform/layers/b36bac71-415b-4c6d-bed2-09fc16232e98/d21f2955-2370-4054-8031-af841ab2b95e.png deleted file mode 100644 index 31cce3eef..000000000 Binary files a/sprites/s_node_pb_box_transform/layers/b36bac71-415b-4c6d-bed2-09fc16232e98/d21f2955-2370-4054-8031-af841ab2b95e.png and /dev/null differ diff --git a/sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy b/sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy index e20ee9989..d74ec6476 100644 --- a/sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy +++ b/sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy @@ -3,9 +3,9 @@ "resourceVersion": "1.0", "name": "s_node_pb_box_transform", "bbox_bottom": 62, - "bbox_left": 3, + "bbox_left": 2, "bbox_right": 62, - "bbox_top": 3, + "bbox_top": 2, "bboxMode": 0, "collisionKind": 1, "collisionTolerance": 0, @@ -13,14 +13,14 @@ "edgeFiltering": false, "For3D": false, "frames": [ - {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"b36bac71-415b-4c6d-bed2-09fc16232e98",}, + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"62948821-0a62-442a-b84b-6e1aa8d17b99",}, ], "gridX": 0, "gridY": 0, "height": 64, "HTile": false, "layers": [ - {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"d21f2955-2370-4054-8031-af841ab2b95e","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"7f4868e6-4e18-46a3-a8e6-54355ea7a662","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, ], "nineSlice": null, "origin": 4, @@ -54,7 +54,7 @@ "timeUnits": 1, "tracks": [ {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ - {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"b36bac71-415b-4c6d-bed2-09fc16232e98","path":"sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy",},},},"Disabled":false,"id":"dc7a8ace-f09e-4680-bfad-9791d75e664b","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"62948821-0a62-442a-b84b-6e1aa8d17b99","path":"sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy",},},},"Disabled":false,"id":"c99a7ad4-770f-42ba-a079-38dd3798f696","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange": null, diff --git a/sprites/s_node_pb_draw_diamond/98b95984-8b54-4af3-9674-7f6381347625.png b/sprites/s_node_pb_draw_diamond/98b95984-8b54-4af3-9674-7f6381347625.png new file mode 100644 index 000000000..471d49eb6 Binary files /dev/null and b/sprites/s_node_pb_draw_diamond/98b95984-8b54-4af3-9674-7f6381347625.png differ diff --git a/sprites/s_node_pb_draw_diamond/layers/98b95984-8b54-4af3-9674-7f6381347625/775e9aa2-a371-4617-a62c-623ffb1d3385.png b/sprites/s_node_pb_draw_diamond/layers/98b95984-8b54-4af3-9674-7f6381347625/775e9aa2-a371-4617-a62c-623ffb1d3385.png new file mode 100644 index 000000000..471d49eb6 Binary files /dev/null and b/sprites/s_node_pb_draw_diamond/layers/98b95984-8b54-4af3-9674-7f6381347625/775e9aa2-a371-4617-a62c-623ffb1d3385.png differ diff --git a/sprites/s_node_pb_draw_diamond/s_node_pb_draw_diamond.yy b/sprites/s_node_pb_draw_diamond/s_node_pb_draw_diamond.yy new file mode 100644 index 000000000..1860d405e --- /dev/null +++ b/sprites/s_node_pb_draw_diamond/s_node_pb_draw_diamond.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_pb_draw_diamond", + "bbox_bottom": 53, + "bbox_left": 10, + "bbox_right": 53, + "bbox_top": 10, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"98b95984-8b54-4af3-9674-7f6381347625",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"775e9aa2-a371-4617-a62c-623ffb1d3385","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "pixel builder", + "path": "folders/nodes/icons/pixel builder.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_pb_draw_diamond", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","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","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"98b95984-8b54-4af3-9674-7f6381347625","path":"sprites/s_node_pb_draw_diamond/s_node_pb_draw_diamond.yy",},},},"Disabled":false,"id":"ff8873b0-15c6-44da-8873-3647aa2a7053","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, +} \ No newline at end of file diff --git a/sprites/s_node_pb_draw_line/fbbecab7-7220-4497-8454-b16699d6acd1.png b/sprites/s_node_pb_draw_line/fbbecab7-7220-4497-8454-b16699d6acd1.png new file mode 100644 index 000000000..357fd2d88 Binary files /dev/null and b/sprites/s_node_pb_draw_line/fbbecab7-7220-4497-8454-b16699d6acd1.png differ diff --git a/sprites/s_node_pb_draw_line/layers/fbbecab7-7220-4497-8454-b16699d6acd1/5fdfc417-a82f-4636-b44c-0c472371fe19.png b/sprites/s_node_pb_draw_line/layers/fbbecab7-7220-4497-8454-b16699d6acd1/5fdfc417-a82f-4636-b44c-0c472371fe19.png new file mode 100644 index 000000000..357fd2d88 Binary files /dev/null and b/sprites/s_node_pb_draw_line/layers/fbbecab7-7220-4497-8454-b16699d6acd1/5fdfc417-a82f-4636-b44c-0c472371fe19.png differ diff --git a/sprites/s_node_pb_draw_line/s_node_pb_draw_line.yy b/sprites/s_node_pb_draw_line/s_node_pb_draw_line.yy new file mode 100644 index 000000000..af89e9bd1 --- /dev/null +++ b/sprites/s_node_pb_draw_line/s_node_pb_draw_line.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_pb_draw_line", + "bbox_bottom": 53, + "bbox_left": 10, + "bbox_right": 53, + "bbox_top": 10, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"fbbecab7-7220-4497-8454-b16699d6acd1",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"5fdfc417-a82f-4636-b44c-0c472371fe19","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "pixel builder", + "path": "folders/nodes/icons/pixel builder.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_pb_draw_line", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","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","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"fbbecab7-7220-4497-8454-b16699d6acd1","path":"sprites/s_node_pb_draw_line/s_node_pb_draw_line.yy",},},},"Disabled":false,"id":"bb53d23d-5a24-44c9-aace-dc0801f94592","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, +} \ No newline at end of file diff --git a/sprites/s_node_pb_fx_brick/babefc83-0501-4d63-9446-e6bbfab20fe2.png b/sprites/s_node_pb_fx_brick/babefc83-0501-4d63-9446-e6bbfab20fe2.png new file mode 100644 index 000000000..22c7f9cdc Binary files /dev/null and b/sprites/s_node_pb_fx_brick/babefc83-0501-4d63-9446-e6bbfab20fe2.png differ diff --git a/sprites/s_node_pb_fx_brick/layers/babefc83-0501-4d63-9446-e6bbfab20fe2/0e8863e3-14e6-4c03-a113-a203d5c348ee.png b/sprites/s_node_pb_fx_brick/layers/babefc83-0501-4d63-9446-e6bbfab20fe2/0e8863e3-14e6-4c03-a113-a203d5c348ee.png new file mode 100644 index 000000000..22c7f9cdc Binary files /dev/null and b/sprites/s_node_pb_fx_brick/layers/babefc83-0501-4d63-9446-e6bbfab20fe2/0e8863e3-14e6-4c03-a113-a203d5c348ee.png differ diff --git a/sprites/s_node_pb_fx_brick/s_node_pb_fx_brick.yy b/sprites/s_node_pb_fx_brick/s_node_pb_fx_brick.yy new file mode 100644 index 000000000..b3eb40f5f --- /dev/null +++ b/sprites/s_node_pb_fx_brick/s_node_pb_fx_brick.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_pb_fx_brick", + "bbox_bottom": 55, + "bbox_left": 8, + "bbox_right": 55, + "bbox_top": 8, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"babefc83-0501-4d63-9446-e6bbfab20fe2",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"0e8863e3-14e6-4c03-a113-a203d5c348ee","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "pixel builder", + "path": "folders/nodes/icons/pixel builder.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_pb_fx_brick", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","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","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"babefc83-0501-4d63-9446-e6bbfab20fe2","path":"sprites/s_node_pb_fx_brick/s_node_pb_fx_brick.yy",},},},"Disabled":false,"id":"e61b6170-4a5a-441e-8e96-bc8374fa08ba","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, +} \ No newline at end of file diff --git a/sprites/s_node_pb_fx_strip/c6fe2ebe-df40-42a0-80be-17a1a75855b5.png b/sprites/s_node_pb_fx_strip/c6fe2ebe-df40-42a0-80be-17a1a75855b5.png new file mode 100644 index 000000000..81f943b5c Binary files /dev/null and b/sprites/s_node_pb_fx_strip/c6fe2ebe-df40-42a0-80be-17a1a75855b5.png differ diff --git a/sprites/s_node_pb_fx_strip/layers/c6fe2ebe-df40-42a0-80be-17a1a75855b5/96ee362c-c4fe-425d-b01c-4ae771d592e6.png b/sprites/s_node_pb_fx_strip/layers/c6fe2ebe-df40-42a0-80be-17a1a75855b5/96ee362c-c4fe-425d-b01c-4ae771d592e6.png new file mode 100644 index 000000000..81f943b5c Binary files /dev/null and b/sprites/s_node_pb_fx_strip/layers/c6fe2ebe-df40-42a0-80be-17a1a75855b5/96ee362c-c4fe-425d-b01c-4ae771d592e6.png differ diff --git a/sprites/s_node_pb_fx_strip/s_node_pb_fx_strip.yy b/sprites/s_node_pb_fx_strip/s_node_pb_fx_strip.yy new file mode 100644 index 000000000..2249336f7 --- /dev/null +++ b/sprites/s_node_pb_fx_strip/s_node_pb_fx_strip.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_pb_fx_strip", + "bbox_bottom": 55, + "bbox_left": 8, + "bbox_right": 55, + "bbox_top": 8, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"c6fe2ebe-df40-42a0-80be-17a1a75855b5",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"96ee362c-c4fe-425d-b01c-4ae771d592e6","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "pixel builder", + "path": "folders/nodes/icons/pixel builder.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_pb_fx_strip", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","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","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"c6fe2ebe-df40-42a0-80be-17a1a75855b5","path":"sprites/s_node_pb_fx_strip/s_node_pb_fx_strip.yy",},},},"Disabled":false,"id":"d1deab79-7d4a-45c6-ad2a-b955842af679","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, +} \ No newline at end of file diff --git a/sprites/s_node_replace_palette/a46179ae-f6a0-43ee-a81a-fe9699d9d4dd.png b/sprites/s_node_replace_palette/a46179ae-f6a0-43ee-a81a-fe9699d9d4dd.png new file mode 100644 index 000000000..b72184dc1 Binary files /dev/null and b/sprites/s_node_replace_palette/a46179ae-f6a0-43ee-a81a-fe9699d9d4dd.png differ diff --git a/sprites/s_node_replace_palette/layers/a46179ae-f6a0-43ee-a81a-fe9699d9d4dd/36690e6d-72df-4e19-b050-0d28599d075c.png b/sprites/s_node_replace_palette/layers/a46179ae-f6a0-43ee-a81a-fe9699d9d4dd/36690e6d-72df-4e19-b050-0d28599d075c.png new file mode 100644 index 000000000..b72184dc1 Binary files /dev/null and b/sprites/s_node_replace_palette/layers/a46179ae-f6a0-43ee-a81a-fe9699d9d4dd/36690e6d-72df-4e19-b050-0d28599d075c.png differ diff --git a/sprites/s_node_replace_palette/s_node_replace_palette.yy b/sprites/s_node_replace_palette/s_node_replace_palette.yy new file mode 100644 index 000000000..6472de911 --- /dev/null +++ b/sprites/s_node_replace_palette/s_node_replace_palette.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_replace_palette", + "bbox_bottom": 63, + "bbox_left": 0, + "bbox_right": 63, + "bbox_top": 0, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"a46179ae-f6a0-43ee-a81a-fe9699d9d4dd",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"36690e6d-72df-4e19-b050-0d28599d075c","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "filter", + "path": "folders/nodes/icons/filter.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_replace_palette", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","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","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"a46179ae-f6a0-43ee-a81a-fe9699d9d4dd","path":"sprites/s_node_replace_palette/s_node_replace_palette.yy",},},},"Disabled":false,"id":"5315dd13-d60f-488a-98ef-15d5f57cae90","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, +} \ No newline at end of file