mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-03 14:14:49 +01:00
Pixel Builder (disabled)
This commit is contained in:
parent
f3cb7ca365
commit
89694e99e8
162 changed files with 2619 additions and 664 deletions
|
@ -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",},
|
||||
|
|
|
@ -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",},},
|
||||
|
|
Binary file not shown.
4
objects/o_dialog_color_quick_pick/Create_0.gml
Normal file
4
objects/o_dialog_color_quick_pick/Create_0.gml
Normal file
|
@ -0,0 +1,4 @@
|
|||
/// @description
|
||||
depth = -999;
|
||||
selecting = noone;
|
||||
onApply = noone;
|
42
objects/o_dialog_color_quick_pick/Draw_64.gml
Normal file
42
objects/o_dialog_color_quick_pick/Draw_64.gml
Normal file
|
@ -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
|
|
@ -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,
|
||||
}
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ event_inherited();
|
|||
onApply = noone;
|
||||
selector = new colorSelector(setColor);
|
||||
selector.dropper_close = false;
|
||||
selector.discretize_pal = false;
|
||||
|
||||
previous_palette = c_black;
|
||||
|
||||
|
|
|
@ -291,8 +291,9 @@
|
|||
physics_world_update_iterations(100);
|
||||
#endregion
|
||||
|
||||
#region dropper
|
||||
globalvar NODE_DROPPER_TARGET, NODE_DROPPER_TARGET_CAN;
|
||||
#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
|
|
@ -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}%)");
|
||||
//if(global.cache_call) print($"CACHE called: {global.cache_call} | hit: {global.cache_hit} ({global.cache_hit / global.cache_call}%)");
|
|
@ -10,12 +10,45 @@ function __pbBox() constructor {
|
|||
layer_h = 32;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
49
scripts/_line_drawer/_line_drawer.gml
Normal file
49
scripts/_line_drawer/_line_drawer.gml
Normal file
|
@ -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();
|
||||
}
|
||||
}
|
11
scripts/_line_drawer/_line_drawer.yy
Normal file
11
scripts/_line_drawer/_line_drawer.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "_line_drawer",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "draw",
|
||||
"path": "folders/functions/draw.yy",
|
||||
},
|
||||
}
|
|
@ -14,6 +14,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;
|
||||
lua_thread_key = _lua_key;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -68,8 +68,10 @@ 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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -239,9 +239,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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,27 +1,36 @@
|
|||
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);
|
||||
}
|
||||
|
||||
function draw_line_round_color(x1, y1, x2, y2, w, c1, c2) {
|
||||
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, stCap = true, edCap = true) {
|
||||
draw_line_width_color(x1, y1, x2, y2, w, c1, c2);
|
||||
|
||||
draw_set_circle_precision(8);
|
||||
if(stCap) {
|
||||
draw_set_color(c1);
|
||||
draw_circle(x1, y1, 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) {
|
||||
draw_line_round(x1, y1, x2, y2, w);
|
||||
|
|
28
scripts/draw_line_width_vertex/draw_line_width_vertex.gml
Normal file
28
scripts/draw_line_width_vertex/draw_line_width_vertex.gml
Normal file
|
@ -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();
|
||||
}
|
11
scripts/draw_line_width_vertex/draw_line_width_vertex.yy
Normal file
11
scripts/draw_line_width_vertex/draw_line_width_vertex.yy
Normal file
|
@ -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",
|
||||
},
|
||||
}
|
|
@ -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) {
|
||||
|
|
|
@ -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++;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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",
|
||||
},
|
||||
}
|
12
scripts/node_color_palette_replacement/node_outline.yy
Normal file
12
scripts/node_color_palette_replacement/node_outline.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "process",
|
||||
"path": "folders/nodes/data/process.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_outline",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
|
@ -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;
|
||||
|
||||
input_display_list = [ 9,
|
||||
["Output", true], 0, 7, 8,
|
||||
["Palette", false], 1, 2,
|
||||
["Comparison", false], 3, 5,
|
||||
["Render", false], 4, 6
|
||||
selecting_index = 0;
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
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
|
||||
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);
|
||||
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, jun.value_from.drawLineIndex, jun.drawLineIndex, ty);
|
||||
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);
|
||||
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, jun.value_from.drawLineIndex, jun.drawLineIndex, ty);
|
||||
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) {
|
||||
|
|
|
@ -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 [];
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -30,18 +30,6 @@ function Node_PB_Box_Inset(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group)
|
|||
["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);
|
||||
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);
|
||||
|
||||
draw_set_color(c_white);
|
||||
var _msk = outputs[| 0].getValue();
|
||||
if(is_array(_msk)) _msk = array_safe_get(_msk, _array_index);
|
||||
|
||||
BLEND_SUBTRACT
|
||||
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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
_nbox.h = round(_h);
|
||||
|
||||
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 = _pbox.h - _h;
|
||||
_h = _nbox.h - _h;
|
||||
|
||||
_pbox.y += _pbox.h - round(_h);
|
||||
_pbox.h = round(_h);
|
||||
var shf = _nbox.h - round(_h);
|
||||
_nbox.y += shf;
|
||||
_nbox.h = round(_h);
|
||||
|
||||
if(_mirr) _pbox.mirror_v = !_pbox.mirror_v;
|
||||
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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
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 \
|
||||
}
|
|
@ -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 :
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
12
scripts/node_pb_draw_diamond/node_checkerboard.yy
Normal file
12
scripts/node_pb_draw_diamond/node_checkerboard.yy
Normal file
|
@ -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",
|
||||
}
|
46
scripts/node_pb_draw_diamond/node_pb_draw_diamond.gml
Normal file
46
scripts/node_pb_draw_diamond/node_pb_draw_diamond.gml
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
11
scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy
Normal file
11
scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy
Normal file
|
@ -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",
|
||||
},
|
||||
}
|
12
scripts/node_pb_draw_diamond/node_stripe.yy
Normal file
12
scripts/node_pb_draw_diamond/node_stripe.yy
Normal file
|
@ -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",
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
12
scripts/node_pb_draw_line/node_checkerboard.yy
Normal file
12
scripts/node_pb_draw_line/node_checkerboard.yy
Normal file
|
@ -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",
|
||||
}
|
77
scripts/node_pb_draw_line/node_pb_draw_line.gml
Normal file
77
scripts/node_pb_draw_line/node_pb_draw_line.gml
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
11
scripts/node_pb_draw_line/node_pb_draw_line.yy
Normal file
11
scripts/node_pb_draw_line/node_pb_draw_line.yy
Normal file
|
@ -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",
|
||||
},
|
||||
}
|
12
scripts/node_pb_draw_line/node_stripe.yy
Normal file
12
scripts/node_pb_draw_line/node_stripe.yy
Normal file
|
@ -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",
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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
|
||||
PB_DRAW_CREATE_MASK
|
||||
|
||||
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();
|
||||
|
||||
return _outSurf;
|
||||
return _nbox;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
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; \
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
12
scripts/node_pb_fx_brick/node_checkerboard.yy
Normal file
12
scripts/node_pb_fx_brick/node_checkerboard.yy
Normal file
|
@ -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",
|
||||
}
|
55
scripts/node_pb_fx_brick/node_pb_fx_brick.gml
Normal file
55
scripts/node_pb_fx_brick/node_pb_fx_brick.gml
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
11
scripts/node_pb_fx_brick/node_pb_fx_brick.yy
Normal file
11
scripts/node_pb_fx_brick/node_pb_fx_brick.yy
Normal file
|
@ -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",
|
||||
},
|
||||
}
|
12
scripts/node_pb_fx_brick/node_stripe.yy
Normal file
12
scripts/node_pb_fx_brick/node_stripe.yy
Normal file
|
@ -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",
|
||||
}
|
|
@ -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,
|
||||
["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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
12
scripts/node_pb_fx_strip/node_checkerboard.yy
Normal file
12
scripts/node_pb_fx_strip/node_checkerboard.yy
Normal file
|
@ -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",
|
||||
}
|
37
scripts/node_pb_fx_strip/node_pb_fx_strip.gml
Normal file
37
scripts/node_pb_fx_strip/node_pb_fx_strip.gml
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
11
scripts/node_pb_fx_strip/node_pb_fx_strip.yy
Normal file
11
scripts/node_pb_fx_strip/node_pb_fx_strip.yy
Normal file
|
@ -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",
|
||||
},
|
||||
}
|
12
scripts/node_pb_fx_strip/node_stripe.yy
Normal file
12
scripts/node_pb_fx_strip/node_stripe.yy
Normal file
|
@ -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",
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -83,35 +83,29 @@ 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;
|
||||
for( var j = 0; j < ds_list_size(_n.outputs); j++ ) {
|
||||
var _out = _n.outputs[| j];
|
||||
|
||||
_surf = _n.outputs[| 0].getValue();
|
||||
if(_out.type != VALUE_TYPE.pbBox) continue;
|
||||
var _to = _out.getJunctionTo();
|
||||
if(array_length(_to)) continue;
|
||||
|
||||
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;
|
||||
var _pbox = _n.outputs[| j].getValue();
|
||||
|
||||
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)
|
||||
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], _surf[j]);
|
||||
array_push(_surfs[? _layer], _box);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -246,7 +246,7 @@ function functionStringClean(fx) {
|
|||
}
|
||||
|
||||
static getVal = function(val, params = {}, getRaw = false) {
|
||||
if(is_struct(val)) return val.eval(params);
|
||||
if(is_struct(val)) return val.eval(params, getRaw);
|
||||
if(is_real(val)) return val;
|
||||
if(getRaw) return 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 == "=") {
|
||||
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++ )
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -2,3 +2,8 @@ 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);
|
||||
}
|
|
@ -71,6 +71,6 @@ function widget() constructor {
|
|||
hover = false;
|
||||
}
|
||||
|
||||
static drawParam = function(param) {}
|
||||
static drawParam = function(params) {}
|
||||
static draw = function() {}
|
||||
}
|
31
shaders/sh_colours_replace/sh_colours_replace.fsh
Normal file
31
shaders/sh_colours_replace/sh_colours_replace.fsh
Normal file
|
@ -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);
|
||||
}
|
19
shaders/sh_colours_replace/sh_colours_replace.vsh
Normal file
19
shaders/sh_colours_replace/sh_colours_replace.vsh
Normal file
|
@ -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;
|
||||
}
|
10
shaders/sh_colours_replace/sh_colours_replace.yy
Normal file
10
shaders/sh_colours_replace/sh_colours_replace.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_colours_replace",
|
||||
"parent": {
|
||||
"name": "filter",
|
||||
"path": "folders/shader/filter.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
86
shaders/sh_pb_brick/sh_pb_brick.fsh
Normal file
86
shaders/sh_pb_brick/sh_pb_brick.fsh
Normal file
|
@ -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;
|
||||
}
|
19
shaders/sh_pb_brick/sh_pb_brick.vsh
Normal file
19
shaders/sh_pb_brick/sh_pb_brick.vsh
Normal file
|
@ -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;
|
||||
}
|
10
shaders/sh_pb_brick/sh_pb_brick.yy
Normal file
10
shaders/sh_pb_brick/sh_pb_brick.yy
Normal file
|
@ -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,
|
||||
}
|
32
shaders/sh_pb_draw_mask/sh_pb_draw_mask.fsh
Normal file
32
shaders/sh_pb_draw_mask/sh_pb_draw_mask.fsh
Normal file
|
@ -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;
|
||||
}
|
19
shaders/sh_pb_draw_mask/sh_pb_draw_mask.vsh
Normal file
19
shaders/sh_pb_draw_mask/sh_pb_draw_mask.vsh
Normal file
|
@ -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;
|
||||
}
|
10
shaders/sh_pb_draw_mask/sh_pb_draw_mask.yy
Normal file
10
shaders/sh_pb_draw_mask/sh_pb_draw_mask.yy
Normal file
|
@ -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,
|
||||
}
|
|
@ -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(dissolve > 0. && perlin( v_vTexcoord * dimension / dissolveSca, dissolveItr ) <= dissolve)
|
||||
return;
|
||||
|
||||
if(mod(index, hash) >= hash / 2.)
|
||||
gl_FragColor = color;
|
||||
else
|
||||
gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
|
||||
}
|
||||
|
|
31
shaders/sh_pb_mask_inset/sh_pb_mask_inset.fsh
Normal file
31
shaders/sh_pb_mask_inset/sh_pb_mask_inset.fsh
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
19
shaders/sh_pb_mask_inset/sh_pb_mask_inset.vsh
Normal file
19
shaders/sh_pb_mask_inset/sh_pb_mask_inset.vsh
Normal file
|
@ -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;
|
||||
}
|
10
shaders/sh_pb_mask_inset/sh_pb_mask_inset.yy
Normal file
10
shaders/sh_pb_mask_inset/sh_pb_mask_inset.yy
Normal file
|
@ -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,
|
||||
}
|
18
shaders/sh_pb_shade_half/sh_pb_shade_half.fsh
Normal file
18
shaders/sh_pb_shade_half/sh_pb_shade_half.fsh
Normal file
|
@ -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;
|
||||
}
|
19
shaders/sh_pb_shade_half/sh_pb_shade_half.vsh
Normal file
19
shaders/sh_pb_shade_half/sh_pb_shade_half.vsh
Normal file
|
@ -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;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue