This commit is contained in:
Tanasart 2023-12-29 20:30:54 +07:00
parent 296c7847f3
commit 065b2cb4ad
66 changed files with 797 additions and 143 deletions

View file

@ -147,6 +147,7 @@
{"name":"effect","order":4,"path":"folders/nodes/data/pixel builder/effect.yy",}, {"name":"effect","order":4,"path":"folders/nodes/data/pixel builder/effect.yy",},
{"name":"render","order":3,"path":"folders/nodes/data/render.yy",}, {"name":"render","order":3,"path":"folders/nodes/data/render.yy",},
{"name":"simulation","order":16,"path":"folders/nodes/data/simulation.yy",}, {"name":"simulation","order":16,"path":"folders/nodes/data/simulation.yy",},
{"name":"FLIP","order":4,"path":"folders/nodes/data/simulation/FLIP.yy",},
{"name":"smokeSim","order":1,"path":"folders/nodes/data/simulation/smokeSim.yy",}, {"name":"smokeSim","order":1,"path":"folders/nodes/data/simulation/smokeSim.yy",},
{"name":"strandSim","order":3,"path":"folders/nodes/data/simulation/strandSim.yy",}, {"name":"strandSim","order":3,"path":"folders/nodes/data/simulation/strandSim.yy",},
{"name":"VFX","order":2,"path":"folders/nodes/data/simulation/VFX.yy",}, {"name":"VFX","order":2,"path":"folders/nodes/data/simulation/VFX.yy",},
@ -219,6 +220,7 @@
{"name":"filter","order":4,"path":"folders/shader/filter.yy",}, {"name":"filter","order":4,"path":"folders/shader/filter.yy",},
{"name":"color","order":53,"path":"folders/shader/filter/color.yy",}, {"name":"color","order":53,"path":"folders/shader/filter/color.yy",},
{"name":"shadow caster","order":46,"path":"folders/shader/filter/shadow caster.yy",}, {"name":"shadow caster","order":46,"path":"folders/shader/filter/shadow caster.yy",},
{"name":"FLIP","order":23,"path":"folders/shader/FLIP.yy",},
{"name":"flood fill","order":11,"path":"folders/shader/flood fill.yy",}, {"name":"flood fill","order":11,"path":"folders/shader/flood fill.yy",},
{"name":"fluid","order":20,"path":"folders/shader/fluid.yy",}, {"name":"fluid","order":20,"path":"folders/shader/fluid.yy",},
{"name":"generator","order":1,"path":"folders/shader/generator.yy",}, {"name":"generator","order":1,"path":"folders/shader/generator.yy",},
@ -420,6 +422,7 @@
{"name":"node_flip","order":13,"path":"scripts/node_flip/node_flip.yy",}, {"name":"node_flip","order":13,"path":"scripts/node_flip/node_flip.yy",},
{"name":"s_node_pb_fx_subtract","order":1,"path":"sprites/s_node_pb_fx_subtract/s_node_pb_fx_subtract.yy",}, {"name":"s_node_pb_fx_subtract","order":1,"path":"sprites/s_node_pb_fx_subtract/s_node_pb_fx_subtract.yy",},
{"name":"Room_FirebaseFirestore_Query","order":1,"path":"rooms/Room_FirebaseFirestore_Query/Room_FirebaseFirestore_Query.yy",}, {"name":"Room_FirebaseFirestore_Query","order":1,"path":"rooms/Room_FirebaseFirestore_Query/Room_FirebaseFirestore_Query.yy",},
{"name":"node_FLIP_spawner","order":6,"path":"scripts/node_FLIP_spawner/node_FLIP_spawner.yy",},
{"name":"Obj_FirebaseREST_Listener_Once_Firestore","order":4,"path":"objects/Obj_FirebaseREST_Listener_Once_Firestore/Obj_FirebaseREST_Listener_Once_Firestore.yy",}, {"name":"Obj_FirebaseREST_Listener_Once_Firestore","order":4,"path":"objects/Obj_FirebaseREST_Listener_Once_Firestore/Obj_FirebaseREST_Listener_Once_Firestore.yy",},
{"name":"sh_FXAA","order":52,"path":"shaders/sh_FXAA/sh_FXAA.yy",}, {"name":"sh_FXAA","order":52,"path":"shaders/sh_FXAA/sh_FXAA.yy",},
{"name":"s_biterator_slider","order":6,"path":"sprites/s_biterator_slider/s_biterator_slider.yy",}, {"name":"s_biterator_slider","order":6,"path":"sprites/s_biterator_slider/s_biterator_slider.yy",},
@ -928,6 +931,7 @@
{"name":"fd_rectangle_shift_content","order":19,"path":"scripts/fd_rectangle_shift_content/fd_rectangle_shift_content.yy",}, {"name":"fd_rectangle_shift_content","order":19,"path":"scripts/fd_rectangle_shift_content/fd_rectangle_shift_content.yy",},
{"name":"sh_texture_remap","order":24,"path":"shaders/sh_texture_remap/sh_texture_remap.yy",}, {"name":"sh_texture_remap","order":24,"path":"shaders/sh_texture_remap/sh_texture_remap.yy",},
{"name":"node_application_in","order":20,"path":"scripts/node_application_in/node_application_in.yy",}, {"name":"node_application_in","order":20,"path":"scripts/node_application_in/node_application_in.yy",},
{"name":"FLIP_Domain","order":4,"path":"objects/FLIP_Domain/FLIP_Domain.yy",},
{"name":"obj_fd_rectangle","order":1,"path":"objects/obj_fd_rectangle/obj_fd_rectangle.yy",}, {"name":"obj_fd_rectangle","order":1,"path":"objects/obj_fd_rectangle/obj_fd_rectangle.yy",},
{"name":"node_noise_simplex","order":7,"path":"scripts/node_noise_simplex/node_noise_simplex.yy",}, {"name":"node_noise_simplex","order":7,"path":"scripts/node_noise_simplex/node_noise_simplex.yy",},
{"name":"sh_fd_visualize_velocity_divergence_glsl","order":18,"path":"shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.yy",}, {"name":"sh_fd_visualize_velocity_divergence_glsl","order":18,"path":"shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.yy",},
@ -954,6 +958,7 @@
{"name":"node_json_file_read","order":7,"path":"scripts/node_json_file_read/node_json_file_read.yy",}, {"name":"node_json_file_read","order":7,"path":"scripts/node_json_file_read/node_json_file_read.yy",},
{"name":"s_node_array_remove","order":7,"path":"sprites/s_node_array_remove/s_node_array_remove.yy",}, {"name":"s_node_array_remove","order":7,"path":"sprites/s_node_array_remove/s_node_array_remove.yy",},
{"name":"s_node_zigzag","order":18,"path":"sprites/s_node_zigzag/s_node_zigzag.yy",}, {"name":"s_node_zigzag","order":18,"path":"sprites/s_node_zigzag/s_node_zigzag.yy",},
{"name":"node_FLIP_render","order":3,"path":"scripts/node_FLIP_render/node_FLIP_render.yy",},
{"name":"s_key_display_mouse","order":1,"path":"sprites/s_key_display_mouse/s_key_display_mouse.yy",}, {"name":"s_key_display_mouse","order":1,"path":"sprites/s_key_display_mouse/s_key_display_mouse.yy",},
{"name":"node_3d_repeat","order":1,"path":"scripts/node_3d_repeat/node_3d_repeat.yy",}, {"name":"node_3d_repeat","order":1,"path":"scripts/node_3d_repeat/node_3d_repeat.yy",},
{"name":"node_pb_fx_add","order":6,"path":"scripts/node_pb_fx_add/node_pb_fx_add.yy",}, {"name":"node_pb_fx_add","order":6,"path":"scripts/node_pb_fx_add/node_pb_fx_add.yy",},
@ -1118,6 +1123,7 @@
{"name":"node_fluid_domain_queue","order":9,"path":"scripts/node_fluid_domain_queue/node_fluid_domain_queue.yy",}, {"name":"node_fluid_domain_queue","order":9,"path":"scripts/node_fluid_domain_queue/node_fluid_domain_queue.yy",},
{"name":"node_sequence_to_anim","order":3,"path":"scripts/node_sequence_to_anim/node_sequence_to_anim.yy",}, {"name":"node_sequence_to_anim","order":3,"path":"scripts/node_sequence_to_anim/node_sequence_to_anim.yy",},
{"name":"sh_blend_replace","order":50,"path":"shaders/sh_blend_replace/sh_blend_replace.yy",}, {"name":"sh_blend_replace","order":50,"path":"shaders/sh_blend_replace/sh_blend_replace.yy",},
{"name":"node_FLIP_domain","order":1,"path":"scripts/node_FLIP_domain/node_FLIP_domain.yy",},
{"name":"node_rigid_render","order":3,"path":"scripts/node_rigid_render/node_rigid_render.yy",}, {"name":"node_rigid_render","order":3,"path":"scripts/node_rigid_render/node_rigid_render.yy",},
{"name":"node_image_splice_sheet","order":4,"path":"scripts/node_image_splice_sheet/node_image_splice_sheet.yy",}, {"name":"node_image_splice_sheet","order":4,"path":"scripts/node_image_splice_sheet/node_image_splice_sheet.yy",},
{"name":"node_VFX_renderer_output","order":8,"path":"scripts/node_VFX_renderer_output/node_VFX_renderer_output.yy",}, {"name":"node_VFX_renderer_output","order":8,"path":"scripts/node_VFX_renderer_output/node_VFX_renderer_output.yy",},
@ -1482,6 +1488,7 @@
{"name":"directory_object","order":3,"path":"scripts/directory_object/directory_object.yy",}, {"name":"directory_object","order":3,"path":"scripts/directory_object/directory_object.yy",},
{"name":"s_node_isosurf","order":2,"path":"sprites/s_node_isosurf/s_node_isosurf.yy",}, {"name":"s_node_isosurf","order":2,"path":"sprites/s_node_isosurf/s_node_isosurf.yy",},
{"name":"node_pb_box_divide","order":5,"path":"scripts/node_pb_box_divide/node_pb_box_divide.yy",}, {"name":"node_pb_box_divide","order":5,"path":"scripts/node_pb_box_divide/node_pb_box_divide.yy",},
{"name":"FLIP","order":5,"path":"extensions/FLIP/FLIP.yy",},
{"name":"node_websocket_sender","order":1,"path":"scripts/node_websocket_sender/node_websocket_sender.yy",}, {"name":"node_websocket_sender","order":1,"path":"scripts/node_websocket_sender/node_websocket_sender.yy",},
{"name":"fd_rectangle_get_acceleration_b","order":1,"path":"scripts/fd_rectangle_get_acceleration_b/fd_rectangle_get_acceleration_b.yy",}, {"name":"fd_rectangle_get_acceleration_b","order":1,"path":"scripts/fd_rectangle_get_acceleration_b/fd_rectangle_get_acceleration_b.yy",},
{"name":"surface_draw_functions","order":7,"path":"scripts/surface_draw_functions/surface_draw_functions.yy",}, {"name":"surface_draw_functions","order":7,"path":"scripts/surface_draw_functions/surface_draw_functions.yy",},
@ -1714,6 +1721,7 @@
{"name":"s_node_group_output","order":15,"path":"sprites/s_node_group_output/s_node_group_output.yy",}, {"name":"s_node_group_output","order":15,"path":"sprites/s_node_group_output/s_node_group_output.yy",},
{"name":"node_path_l_system","order":10,"path":"scripts/node_path_l_system/node_path_l_system.yy",}, {"name":"node_path_l_system","order":10,"path":"scripts/node_path_l_system/node_path_l_system.yy",},
{"name":"panel_gradient","order":2,"path":"scripts/panel_gradient/panel_gradient.yy",}, {"name":"panel_gradient","order":2,"path":"scripts/panel_gradient/panel_gradient.yy",},
{"name":"_FLIP","order":2,"path":"scripts/_FLIP/_FLIP.yy",},
{"name":"sh_draw_r16","order":10,"path":"shaders/sh_draw_r16/sh_draw_r16.yy",}, {"name":"sh_draw_r16","order":10,"path":"shaders/sh_draw_r16/sh_draw_r16.yy",},
{"name":"sh_channel_S","order":5,"path":"shaders/sh_channel_S/sh_channel_S.yy",}, {"name":"sh_channel_S","order":5,"path":"shaders/sh_channel_S/sh_channel_S.yy",},
{"name":"string_scale","order":4,"path":"scripts/string_scale/string_scale.yy",}, {"name":"string_scale","order":4,"path":"scripts/string_scale/string_scale.yy",},

View file

@ -175,6 +175,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"effect","folderPath":"folders/nodes/data/pixel builder/effect.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"effect","folderPath":"folders/nodes/data/pixel builder/effect.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"render","folderPath":"folders/nodes/data/render.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"render","folderPath":"folders/nodes/data/render.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"simulation","folderPath":"folders/nodes/data/simulation.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"simulation","folderPath":"folders/nodes/data/simulation.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"FLIP","folderPath":"folders/nodes/data/simulation/FLIP.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"rigidSim","folderPath":"folders/nodes/data/simulation/rigidSim.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"rigidSim","folderPath":"folders/nodes/data/simulation/rigidSim.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"smokeSim","folderPath":"folders/nodes/data/simulation/smokeSim.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"smokeSim","folderPath":"folders/nodes/data/simulation/smokeSim.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"strandSim","folderPath":"folders/nodes/data/simulation/strandSim.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"strandSim","folderPath":"folders/nodes/data/simulation/strandSim.yy",},
@ -251,6 +252,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"filter","folderPath":"folders/shader/filter.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"filter","folderPath":"folders/shader/filter.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"color","folderPath":"folders/shader/filter/color.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"color","folderPath":"folders/shader/filter/color.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"shadow caster","folderPath":"folders/shader/filter/shadow caster.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"shadow caster","folderPath":"folders/shader/filter/shadow caster.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"FLIP","folderPath":"folders/shader/FLIP.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"flood fill","folderPath":"folders/shader/flood fill.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"flood fill","folderPath":"folders/shader/flood fill.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"fluid","folderPath":"folders/shader/fluid.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"fluid","folderPath":"folders/shader/fluid.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"generator","folderPath":"folders/shader/generator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"generator","folderPath":"folders/shader/generator.yy",},
@ -519,6 +521,7 @@
{"id":{"name":"ds_list_queue","path":"scripts/ds_list_queue/ds_list_queue.yy",},}, {"id":{"name":"ds_list_queue","path":"scripts/ds_list_queue/ds_list_queue.yy",},},
{"id":{"name":"s_node_scale","path":"sprites/s_node_scale/s_node_scale.yy",},}, {"id":{"name":"s_node_scale","path":"sprites/s_node_scale/s_node_scale.yy",},},
{"id":{"name":"sh_color_picker_value","path":"shaders/sh_color_picker_value/sh_color_picker_value.yy",},}, {"id":{"name":"sh_color_picker_value","path":"shaders/sh_color_picker_value/sh_color_picker_value.yy",},},
{"id":{"name":"node_FLIP_group","path":"scripts/node_FLIP_group/node_FLIP_group.yy",},},
{"id":{"name":"textInput","path":"scripts/textInput/textInput.yy",},}, {"id":{"name":"textInput","path":"scripts/textInput/textInput.yy",},},
{"id":{"name":"Obj_FirebaseFirestore_Document_Read","path":"objects/Obj_FirebaseFirestore_Document_Read/Obj_FirebaseFirestore_Document_Read.yy",},}, {"id":{"name":"Obj_FirebaseFirestore_Document_Read","path":"objects/Obj_FirebaseFirestore_Document_Read/Obj_FirebaseFirestore_Document_Read.yy",},},
{"id":{"name":"node_dither","path":"scripts/node_dither/node_dither.yy",},}, {"id":{"name":"node_dither","path":"scripts/node_dither/node_dither.yy",},},
@ -632,6 +635,7 @@
{"id":{"name":"s_node_pb_fx_subtract","path":"sprites/s_node_pb_fx_subtract/s_node_pb_fx_subtract.yy",},}, {"id":{"name":"s_node_pb_fx_subtract","path":"sprites/s_node_pb_fx_subtract/s_node_pb_fx_subtract.yy",},},
{"id":{"name":"Room_FirebaseFirestore_Query","path":"rooms/Room_FirebaseFirestore_Query/Room_FirebaseFirestore_Query.yy",},}, {"id":{"name":"Room_FirebaseFirestore_Query","path":"rooms/Room_FirebaseFirestore_Query/Room_FirebaseFirestore_Query.yy",},},
{"id":{"name":"panel_node_credit","path":"scripts/panel_node_credit/panel_node_credit.yy",},}, {"id":{"name":"panel_node_credit","path":"scripts/panel_node_credit/panel_node_credit.yy",},},
{"id":{"name":"node_FLIP_spawner","path":"scripts/node_FLIP_spawner/node_FLIP_spawner.yy",},},
{"id":{"name":"Obj_FirebaseREST_Listener_Once_Firestore","path":"objects/Obj_FirebaseREST_Listener_Once_Firestore/Obj_FirebaseREST_Listener_Once_Firestore.yy",},}, {"id":{"name":"Obj_FirebaseREST_Listener_Once_Firestore","path":"objects/Obj_FirebaseREST_Listener_Once_Firestore/Obj_FirebaseREST_Listener_Once_Firestore.yy",},},
{"id":{"name":"sh_FXAA","path":"shaders/sh_FXAA/sh_FXAA.yy",},}, {"id":{"name":"sh_FXAA","path":"shaders/sh_FXAA/sh_FXAA.yy",},},
{"id":{"name":"s_biterator_slider","path":"sprites/s_biterator_slider/s_biterator_slider.yy",},}, {"id":{"name":"s_biterator_slider","path":"sprites/s_biterator_slider/s_biterator_slider.yy",},},
@ -1216,6 +1220,7 @@
{"id":{"name":"node_application_in","path":"scripts/node_application_in/node_application_in.yy",},}, {"id":{"name":"node_application_in","path":"scripts/node_application_in/node_application_in.yy",},},
{"id":{"name":"sh_fluid_bleach","path":"shaders/sh_fluid_bleach/sh_fluid_bleach.yy",},}, {"id":{"name":"sh_fluid_bleach","path":"shaders/sh_fluid_bleach/sh_fluid_bleach.yy",},},
{"id":{"name":"__node_3d_modifier","path":"scripts/__node_3d_modifier/__node_3d_modifier.yy",},}, {"id":{"name":"__node_3d_modifier","path":"scripts/__node_3d_modifier/__node_3d_modifier.yy",},},
{"id":{"name":"FLIP_Domain","path":"objects/FLIP_Domain/FLIP_Domain.yy",},},
{"id":{"name":"obj_fd_rectangle","path":"objects/obj_fd_rectangle/obj_fd_rectangle.yy",},}, {"id":{"name":"obj_fd_rectangle","path":"objects/obj_fd_rectangle/obj_fd_rectangle.yy",},},
{"id":{"name":"node_noise_simplex","path":"scripts/node_noise_simplex/node_noise_simplex.yy",},}, {"id":{"name":"node_noise_simplex","path":"scripts/node_noise_simplex/node_noise_simplex.yy",},},
{"id":{"name":"sh_fd_visualize_velocity_divergence_glsl","path":"shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.yy",},}, {"id":{"name":"sh_fd_visualize_velocity_divergence_glsl","path":"shaders/sh_fd_visualize_velocity_divergence_glsl/sh_fd_visualize_velocity_divergence_glsl.yy",},},
@ -1243,6 +1248,7 @@
{"id":{"name":"node_json_file_read","path":"scripts/node_json_file_read/node_json_file_read.yy",},}, {"id":{"name":"node_json_file_read","path":"scripts/node_json_file_read/node_json_file_read.yy",},},
{"id":{"name":"s_node_array_remove","path":"sprites/s_node_array_remove/s_node_array_remove.yy",},}, {"id":{"name":"s_node_array_remove","path":"sprites/s_node_array_remove/s_node_array_remove.yy",},},
{"id":{"name":"s_node_zigzag","path":"sprites/s_node_zigzag/s_node_zigzag.yy",},}, {"id":{"name":"s_node_zigzag","path":"sprites/s_node_zigzag/s_node_zigzag.yy",},},
{"id":{"name":"node_FLIP_render","path":"scripts/node_FLIP_render/node_FLIP_render.yy",},},
{"id":{"name":"s_key_display_mouse","path":"sprites/s_key_display_mouse/s_key_display_mouse.yy",},}, {"id":{"name":"s_key_display_mouse","path":"sprites/s_key_display_mouse/s_key_display_mouse.yy",},},
{"id":{"name":"node_3d_repeat","path":"scripts/node_3d_repeat/node_3d_repeat.yy",},}, {"id":{"name":"node_3d_repeat","path":"scripts/node_3d_repeat/node_3d_repeat.yy",},},
{"id":{"name":"node_pb_fx_add","path":"scripts/node_pb_fx_add/node_pb_fx_add.yy",},}, {"id":{"name":"node_pb_fx_add","path":"scripts/node_pb_fx_add/node_pb_fx_add.yy",},},
@ -1424,6 +1430,7 @@
{"id":{"name":"node_fluid_domain_queue","path":"scripts/node_fluid_domain_queue/node_fluid_domain_queue.yy",},}, {"id":{"name":"node_fluid_domain_queue","path":"scripts/node_fluid_domain_queue/node_fluid_domain_queue.yy",},},
{"id":{"name":"node_sequence_to_anim","path":"scripts/node_sequence_to_anim/node_sequence_to_anim.yy",},}, {"id":{"name":"node_sequence_to_anim","path":"scripts/node_sequence_to_anim/node_sequence_to_anim.yy",},},
{"id":{"name":"sh_blend_replace","path":"shaders/sh_blend_replace/sh_blend_replace.yy",},}, {"id":{"name":"sh_blend_replace","path":"shaders/sh_blend_replace/sh_blend_replace.yy",},},
{"id":{"name":"node_FLIP_domain","path":"scripts/node_FLIP_domain/node_FLIP_domain.yy",},},
{"id":{"name":"node_rigid_render","path":"scripts/node_rigid_render/node_rigid_render.yy",},}, {"id":{"name":"node_rigid_render","path":"scripts/node_rigid_render/node_rigid_render.yy",},},
{"id":{"name":"node_image_splice_sheet","path":"scripts/node_image_splice_sheet/node_image_splice_sheet.yy",},}, {"id":{"name":"node_image_splice_sheet","path":"scripts/node_image_splice_sheet/node_image_splice_sheet.yy",},},
{"id":{"name":"node_VFX_renderer_output","path":"scripts/node_VFX_renderer_output/node_VFX_renderer_output.yy",},}, {"id":{"name":"node_VFX_renderer_output","path":"scripts/node_VFX_renderer_output/node_VFX_renderer_output.yy",},},
@ -1700,6 +1707,7 @@
{"id":{"name":"s_node_pb_draw_angle","path":"sprites/s_node_pb_draw_angle/s_node_pb_draw_angle.yy",},}, {"id":{"name":"s_node_pb_draw_angle","path":"sprites/s_node_pb_draw_angle/s_node_pb_draw_angle.yy",},},
{"id":{"name":"node_PCX_var","path":"scripts/node_PCX_var/node_PCX_var.yy",},}, {"id":{"name":"node_PCX_var","path":"scripts/node_PCX_var/node_PCX_var.yy",},},
{"id":{"name":"_f_p3","path":"fonts/_f_p3/_f_p3.yy",},}, {"id":{"name":"_f_p3","path":"fonts/_f_p3/_f_p3.yy",},},
{"id":{"name":"sh_FLIP_render_threshold","path":"shaders/sh_FLIP_render_threshold/sh_FLIP_render_threshold.yy",},},
{"id":{"name":"cornerBox","path":"scripts/cornerBox/cornerBox.yy",},}, {"id":{"name":"cornerBox","path":"scripts/cornerBox/cornerBox.yy",},},
{"id":{"name":"node_group_input","path":"scripts/node_group_input/node_group_input.yy",},}, {"id":{"name":"node_group_input","path":"scripts/node_group_input/node_group_input.yy",},},
{"id":{"name":"fd_rectangle_set_material_dissipation_type","path":"scripts/fd_rectangle_set_material_dissipation_type/fd_rectangle_set_material_dissipation_type.yy",},}, {"id":{"name":"fd_rectangle_set_material_dissipation_type","path":"scripts/fd_rectangle_set_material_dissipation_type/fd_rectangle_set_material_dissipation_type.yy",},},
@ -1844,6 +1852,7 @@
{"id":{"name":"s_node_isosurf","path":"sprites/s_node_isosurf/s_node_isosurf.yy",},}, {"id":{"name":"s_node_isosurf","path":"sprites/s_node_isosurf/s_node_isosurf.yy",},},
{"id":{"name":"node_combine_hsv","path":"scripts/node_combine_hsv/node_combine_hsv.yy",},}, {"id":{"name":"node_combine_hsv","path":"scripts/node_combine_hsv/node_combine_hsv.yy",},},
{"id":{"name":"node_pb_box_divide","path":"scripts/node_pb_box_divide/node_pb_box_divide.yy",},}, {"id":{"name":"node_pb_box_divide","path":"scripts/node_pb_box_divide/node_pb_box_divide.yy",},},
{"id":{"name":"FLIP","path":"extensions/FLIP/FLIP.yy",},},
{"id":{"name":"node_dilate","path":"scripts/node_dilate/node_dilate.yy",},}, {"id":{"name":"node_dilate","path":"scripts/node_dilate/node_dilate.yy",},},
{"id":{"name":"node_websocket_sender","path":"scripts/node_websocket_sender/node_websocket_sender.yy",},}, {"id":{"name":"node_websocket_sender","path":"scripts/node_websocket_sender/node_websocket_sender.yy",},},
{"id":{"name":"fd_rectangle_get_acceleration_b","path":"scripts/fd_rectangle_get_acceleration_b/fd_rectangle_get_acceleration_b.yy",},}, {"id":{"name":"fd_rectangle_get_acceleration_b","path":"scripts/fd_rectangle_get_acceleration_b/fd_rectangle_get_acceleration_b.yy",},},
@ -2116,6 +2125,7 @@
{"id":{"name":"node_path_l_system","path":"scripts/node_path_l_system/node_path_l_system.yy",},}, {"id":{"name":"node_path_l_system","path":"scripts/node_path_l_system/node_path_l_system.yy",},},
{"id":{"name":"panel_gradient","path":"scripts/panel_gradient/panel_gradient.yy",},}, {"id":{"name":"panel_gradient","path":"scripts/panel_gradient/panel_gradient.yy",},},
{"id":{"name":"Obj_FirebaseFirestore_Collection_Add","path":"objects/Obj_FirebaseFirestore_Collection_Add/Obj_FirebaseFirestore_Collection_Add.yy",},}, {"id":{"name":"Obj_FirebaseFirestore_Collection_Add","path":"objects/Obj_FirebaseFirestore_Collection_Add/Obj_FirebaseFirestore_Collection_Add.yy",},},
{"id":{"name":"_FLIP","path":"scripts/_FLIP/_FLIP.yy",},},
{"id":{"name":"sh_draw_r16","path":"shaders/sh_draw_r16/sh_draw_r16.yy",},}, {"id":{"name":"sh_draw_r16","path":"shaders/sh_draw_r16/sh_draw_r16.yy",},},
{"id":{"name":"sh_channel_S","path":"shaders/sh_channel_S/sh_channel_S.yy",},}, {"id":{"name":"sh_channel_S","path":"shaders/sh_channel_S/sh_channel_S.yy",},},
{"id":{"name":"string_scale","path":"scripts/string_scale/string_scale.yy",},}, {"id":{"name":"string_scale","path":"scripts/string_scale/string_scale.yy",},},

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View file

@ -0,0 +1,5 @@
/// @description Insert description here
FLIP_cleanDomain(domain);
buffer_delete(particlePosBuff);
domain = noone;

View file

@ -0,0 +1,72 @@
/// @description Insert description here
#region params
domain = noone;
particlePosBuff = noone;
width = 0;
height = 0;
particleSize = 0;
density = 0;
maxParticles = 0;
numParticles = 0;
velocityDamping = 0.9;
dt = 0.1;
iteration = 8;
g = 1;
flipRatio = 0.8;
numPressureIters = 3;
numParticleIters = 3;
overRelaxation = 1.5;
#endregion
function init(width, height, particleSize, density, maxParticles) { #region domain init
particlePos = array_create(2 * maxParticles);
obstracles = [];
numParticles = 0;
if(domain != noone &&
self.width == width &&
self.height == height &&
self.particleSize == particleSize &&
self.density == density &&
self.maxParticles == maxParticles) {
FLIP_resetDomain(domain);
return;
}
self.width = width ;
self.height = height ;
self.particleSize = particleSize;
self.density = density ;
self.maxParticles = maxParticles;
particlePosBuff = buffer_create(maxParticles * 2 * 8, buffer_grow, 8);
domain = FLIP_initDomain(width, height, particleSize, density, maxParticles);
particleRadius = FLIP_getParticleRadius(domain);
} #endregion
function update() { #region
FLIP_setQuality( domain, iteration, numPressureIters, numParticleIters);
FLIP_setGravity( domain, g);
FLIP_setFlipRatio( domain, flipRatio);
FLIP_setVelocityDamping( domain, velocityDamping);
FLIP_setOverRelaxation( domain, overRelaxation);
} #endregion
function step() { #region
FLIP_resetDensity(domain);
for( var i = 0, n = array_length(obstracles); i < n; i++ )
obstracles[i].apply();
FLIP_simulate(domain, dt);
FLIP_setParticleBuffer(domain, buffer_get_address(particlePosBuff));
buffer_seek(particlePosBuff, buffer_seek_start, 0);
for(var i = 0; i < 2 * maxParticles; i++)
particlePos[i] = buffer_read(particlePosBuff, buffer_f64);
} #endregion

View file

@ -0,0 +1,18 @@
/// @description Insert description here
/*
draw_set_color(c_white);
draw_set_alpha(1);
for( var i = 0; i < numParticles; i++ ) {
var _x = particlePos[i * 2];
var _y = particlePos[i * 2 + 1];
draw_circle(dx + _x, dy + _y, particleRadius * 1, false);
//draw_point(_x, _y);
}
obstracles[0].draw();
obstracles[1].draw();
draw_set_color(c_white);
draw_set_halign(fa_right);
draw_text(room_width - 16, 16, fps_real);

View file

@ -0,0 +1,36 @@
{
"resourceType": "GMObject",
"resourceVersion": "1.0",
"name": "FLIP_Domain",
"eventList": [
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,},
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":3,"isDnD":false,},
{"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":12,"isDnD":false,},
],
"managed": true,
"overriddenProperties": [],
"parent": {
"name": "FLIP",
"path": "folders/nodes/data/simulation/FLIP.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,
}

View file

@ -0,0 +1,2 @@
/// @description Insert description here
//step();

View file

@ -42,17 +42,18 @@ if !ready exit;
var bx = presets_x + presets_w - ui(44); var bx = presets_x + presets_w - ui(44);
var by = dialog_y + ui(12); var by = dialog_y + ui(12);
var bs = ui(28);
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txt("Refresh"), THEME.refresh) == 2) if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sFOCUS, sHOVER, __txt("Refresh"), THEME.refresh_20) == 2)
__initPalette(); __initPalette();
bx -= ui(32); bx -= ui(32);
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txtx("color_selector_open_palette", "Open palette folder"), THEME.folder) == 2) if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sFOCUS, sHOVER, __txtx("color_selector_open_palette", "Open palette folder"), THEME.path_open_20) == 2)
shellOpenExplorer($"{DIRECTORY}Palettes"); shellOpenExplorer($"{DIRECTORY}Palettes");
draw_sprite_ui_uniform(THEME.path_open_20, 1, bx + bs / 2, by + bs / 2, 1, c_white);
bx -= ui(32); 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, NODE_COLOR_SHOW_PALETTE, c_white) == 2) if(buttonInstant(THEME.button_hide, bx, by, bs, bs, 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; NODE_COLOR_SHOW_PALETTE = !NODE_COLOR_SHOW_PALETTE;
bx -= ui(32); bx -= ui(32);
#endregion #endregion

View file

@ -128,7 +128,9 @@ event_inherited();
} }
return hh; return hh;
}) });
sp_presets.always_scroll = true;
#endregion #endregion
#region palette #region palette
@ -210,7 +212,9 @@ event_inherited();
click_block = false; click_block = false;
return hh; return hh;
}) });
sp_palettes.always_scroll = true;
#endregion #endregion
#region action #region action

View file

@ -47,37 +47,34 @@ if !ready exit;
var bx = presets_x + presets_w - ui(44); var bx = presets_x + presets_w - ui(44);
var by = dialog_y + ui(12); var by = dialog_y + ui(12);
var bs = ui(28);
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txtx("add_preset", "Add to preset")) == 2) { if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sFOCUS, sHOVER, __txtx("add_preset", "Add to preset"), THEME.add_20) == 2) {
var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8)); var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8));
dia.onModify = function (txt) { dia.onModify = function (txt) {
var gradStr = ""; var gradStr = "";
for(var i = 0; i < array_length(gradient.keys); i++) { for(var i = 0; i < array_length(gradient.keys); i++) {
var gr = gradient.keys[i]; var gr = gradient.keys[i];
var cc = gr.value; gradStr += $"{gr.value},{gr.time}\n";
var tt = gr.time;
gradStr += string(cc) + "," + string(tt) + "\n";
} }
var file = file_text_open_write(txt + ".txt"); file_text_write_all(txt + ".txt", gradStr);
file_text_write_string(file, gradStr);
file_text_close(file);
__initGradient(); __initGradient();
}; };
dia.path = DIRECTORY + "Gradients/" dia.path = DIRECTORY + "Gradients/"
} }
draw_sprite_ui_uniform(THEME.add, 0, bx + ui(14), by + ui(14), 1, COLORS._main_icon);
bx -= ui(32); bx -= ui(32);
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txt("Refresh"), THEME.refresh) == 2) if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sFOCUS, sHOVER, __txt("Refresh"), THEME.refresh_20) == 2)
__initGradient(); __initGradient();
bx -= ui(32); bx -= ui(32);
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txtx("graident_editor_open_folder", "Open gradient folder"), THEME.folder) == 2) { if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sFOCUS, sHOVER, __txtx("graident_editor_open_folder", "Open gradient folder"), THEME.path_open_20) == 2) {
var _realpath = DIRECTORY + "Gradients"; var _realpath = DIRECTORY + "Gradients";
shellOpenExplorer(_realpath) shellOpenExplorer(_realpath)
} }
draw_sprite_ui_uniform(THEME.path_open_20, 1, bx + bs / 2, by + bs / 2, 1, c_white);
bx -= ui(32); bx -= ui(32);
#endregion #endregion

View file

@ -102,7 +102,9 @@ event_inherited();
} }
return hh; return hh;
}) });
sp_presets.always_scroll = true;
#endregion #endregion
#region tools #region tools

View file

@ -41,8 +41,9 @@ if palette == 0 exit;
var bx = presets_x + presets_w - ui(44); var bx = presets_x + presets_w - ui(44);
var by = dialog_y + ui(12); var by = dialog_y + ui(12);
var bs = ui(28);
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txtx("add_preset", "Add to preset"), THEME.add) == 2) { if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sFOCUS, sHOVER, __txtx("add_preset", "Add to preset"), THEME.add_20) == 2) {
var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8)); var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8));
dia.onModify = function (txt) { dia.onModify = function (txt) {
var file = file_text_open_write(txt + ".hex"); var file = file_text_open_write(txt + ".hex");
@ -52,8 +53,7 @@ if palette == 0 exit;
var g = number_to_hex(color_get_green(cc)); var g = number_to_hex(color_get_green(cc));
var b = number_to_hex(color_get_blue(cc)); var b = number_to_hex(color_get_blue(cc));
file_text_write_string(file, r + g + b); file_text_write_string(file, $"{r}{g}{b}\n");
file_text_writeln(file);
} }
file_text_close(file); file_text_close(file);
__initPalette(); __initPalette();
@ -62,17 +62,15 @@ if palette == 0 exit;
} }
bx -= ui(32); bx -= ui(32);
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txt("Refresh"), THEME.refresh) == 2) if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sFOCUS, sHOVER, __txt("Refresh"), THEME.refresh_20) == 2)
__initPalette(); __initPalette();
draw_sprite_ui_uniform(THEME.refresh, 0, bx + ui(14), by + ui(14), 1, COLORS._main_icon);
bx -= ui(32); bx -= ui(32);
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, __txtx("color_selector_open_palette", "Open palette folder"), THEME.folder) == 2) { if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sFOCUS, sHOVER, __txtx("color_selector_open_palette", "Open palette folder"), THEME.path_open_20) == 2) {
var _realpath = DIRECTORY + "Palettes"; var _realpath = DIRECTORY + "Palettes";
shellOpenExplorer(_realpath) shellOpenExplorer(_realpath)
} }
draw_sprite_ui_uniform(THEME.folder, 0, bx + ui(14), by + ui(14), 1, COLORS._main_icon); draw_sprite_ui_uniform(THEME.path_open_20, 1, bx + bs / 2, by + bs / 2, 1, c_white);
bx -= ui(32); bx -= ui(32);
#endregion #endregion

View file

@ -777,7 +777,7 @@ event_inherited();
modified = true; modified = true;
var bx = x1 - ui(32); var bx = x1 - ui(32);
var by = yy + hh; var by = yy + hh;
if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, sFOCUS, sHOVER && sp_hotkey.hover, __txt("Reset"), THEME.refresh_s) == 2) { if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, sFOCUS, sHOVER && sp_hotkey.hover, __txt("Reset"), THEME.refresh_16) == 2) {
key.key = dkey; key.key = dkey;
key.modi = dmod; key.modi = dmod;
@ -856,7 +856,7 @@ event_inherited();
modified = true; modified = true;
var bx = x1 - ui(32); var bx = x1 - ui(32);
var by = yy + hh; var by = yy + hh;
if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, sFOCUS, sHOVER && sp_hotkey.hover, __txt("Reset"), THEME.refresh_s) == 2) { if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, sFOCUS, sHOVER && sp_hotkey.hover, __txt("Reset"), THEME.refresh_16) == 2) {
key.key = key.dkey; key.key = key.dkey;
PREF_SAVE(); PREF_SAVE();
@ -870,7 +870,7 @@ event_inherited();
//if(modified) { //if(modified) {
// var bx = x1 - ui(32); // var bx = x1 - ui(32);
// var by = yy + ui(2); // var by = yy + ui(2);
// if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, sFOCUS, sHOVER && sp_hotkey.hover, __txt("Reset all"), THEME.refresh_s) == 2) { // if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, sFOCUS, sHOVER && sp_hotkey.hover, __txt("Reset all"), THEME.refresh_16) == 2) {
// for(var j = 0; j < ds_list_size(HOTKEY_CONTEXT); j++) { // for(var j = 0; j < ds_list_size(HOTKEY_CONTEXT); j++) {
// var ll = HOTKEYS[? HOTKEY_CONTEXT[| j]]; // var ll = HOTKEYS[? HOTKEY_CONTEXT[| j]];
// for(var i = 0; i < ds_list_size(ll); i++) { // for(var i = 0; i < ds_list_size(ll); i++) {
@ -971,9 +971,9 @@ event_inherited();
var _by = yy + th / 2 - _bs / 2; var _by = yy + th / 2 - _bs / 2;
if(isEqual(data, _defVal)) if(isEqual(data, _defVal))
draw_sprite_ext(THEME.refresh_s, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark); draw_sprite_ext(THEME.refresh_16, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark);
else { else {
if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, sFOCUS, sHOVER && sp_pref.hover, __txt("Reset"), THEME.refresh_s) == 2) if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, sFOCUS, sHOVER && sp_pref.hover, __txt("Reset"), THEME.refresh_16) == 2)
_pref.onEdit(_defVal); _pref.onEdit(_defVal);
} }
} }

View file

@ -309,5 +309,7 @@
global.__debug_runner = 0; global.__debug_runner = 0;
__debug_animator_counter = 0; __debug_animator_counter = 0;
//instance_create(0, 0, o_video_banner); //instance_create(0, 0, o_video_banner, { title: "Trail effect" });
//instance_create_depth(0, 0, -32000, FLIP_Domain);
//instance_create_depth(0, 0, -32000, FLIP_Domain);
#endregion #endregion

View file

@ -53,7 +53,7 @@ if(winMan_isMinimized()) exit;
case VALUE_TYPE.pathnode : case VALUE_TYPE.pathnode :
draw_tooltip_text("[" + __txt("Path Object") + "]"); draw_tooltip_text("[" + __txt("Path Object") + "]");
break; break;
case VALUE_TYPE.fdomain : case VALUE_TYPE.sdomain :
draw_tooltip_text("[" + __txt("Domain") + " (id: " + string(content) + ")]"); draw_tooltip_text("[" + __txt("Domain") + " (id: " + string(content) + ")]");
break; break;
case VALUE_TYPE.strands : case VALUE_TYPE.strands :

View file

@ -16,7 +16,7 @@ surface_set_target(surface);
draw_set_text(f_h3, fa_left, fa_top, c_white); draw_set_text(f_h3, fa_left, fa_top, c_white);
draw_set_alpha(0.7); draw_set_alpha(0.7);
draw_text(210, h / 2 + 10, "Tutorial 20: 3D in 1.16"); draw_text(210, h / 2 + 10, title);
draw_set_alpha(1); draw_set_alpha(1);
surface_reset_target(); surface_reset_target();

19
scripts/_FLIP/_FLIP.gml Normal file
View file

@ -0,0 +1,19 @@
function FLIP_Obstracle(domain) constructor {
x = 0;
y = 0;
r = 20;
self.domain = domain;
raw = FLIP_createObstracle(domain);
static apply = function() {
FLIP_setObstacle_circle(domain, raw, x, y, r, false);
return self;
}
static draw = function() {
draw_set_color(c_red);
draw_circle(x, y, r, false);
return self;
}
}

11
scripts/_FLIP/_FLIP.yy Normal file
View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "_FLIP",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "FLIP",
"path": "folders/nodes/data/simulation/FLIP.yy",
},
}

View file

@ -112,9 +112,9 @@ function Panel_Linear_Setting() : PanelContent() constructor { #region
var _by = yy - _bs / 2; var _by = yy - _bs / 2;
if(isEqual(_data, _defVal)) if(isEqual(_data, _defVal))
draw_sprite_ext(THEME.refresh_s, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark); draw_sprite_ext(THEME.refresh_16, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark);
else { else {
if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mx, my ], pFOCUS, pHOVER, __txt("Reset"), THEME.refresh_s) == 2) if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mx, my ], pFOCUS, pHOVER, __txt("Reset"), THEME.refresh_16) == 2)
_prop.onEdit(_defVal); _prop.onEdit(_defVal);
} }
} }

View file

@ -116,9 +116,9 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor {
} }
if(is_array(current_color)) if(is_array(current_color))
drawPalette(current_color, _x + ui(6), _y + ui(6), _cw - ui(12), _h - ui(12)); drawPalette(current_color, _x + ui(4), _y + ui(4), _cw - ui(8), _h - ui(8));
else if(is_real(current_color)) else if(is_real(current_color))
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_sprite_stretched_ext(THEME.palette_mask, 1, _x + ui(4), _y + ui(4), _cw - ui(8), _h - ui(8), current_color, 1);
if(WIDGET_CURRENT == self) 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); draw_sprite_stretched_ext(THEME.widget_selecting, 0, _x - ui(3), _y - ui(3), _w + ui(6), _h + ui(6), COLORS._main_accent, 1);

View file

@ -28,8 +28,8 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor {
y = _y; y = _y;
w = _w; w = _w;
var _gw = _w - ui(12); var _gw = _w - ui(8);
var _gh = _h - ui(12); var _gh = _h - ui(8);
current_gradient = _gradient; current_gradient = _gradient;
@ -66,8 +66,8 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor {
for( var i = 0, n = array_length(_gradient); i < n; i++ ) { for( var i = 0, n = array_length(_gradient); i < n; i++ ) {
var _grad = _gradient[i]; var _grad = _gradient[i];
var _gx = _x + ui(6); var _gx = _x + ui(4);
var _gy = _y + ui(6) + i * _gh; var _gy = _y + ui(4) + i * _gh;
if(is_instanceof(_grad, gradientObject)) if(is_instanceof(_grad, gradientObject))
_grad.draw(_gx, _gy, _gw, _gh); _grad.draw(_gx, _gy, _gw, _gh);

View file

@ -28,8 +28,8 @@ function buttonPalette(_onApply, dialog = noone) : widget() constructor {
w = _w; w = _w;
h = _h; h = _h;
var _pw = _w - ui(12); var _pw = _w - ui(8);
var _ph = _h - ui(12); var _ph = _h - ui(8);
current_palette = _color; current_palette = _color;
@ -64,8 +64,8 @@ function buttonPalette(_onApply, dialog = noone) : widget() constructor {
for( var i = 0, n = array_length(_color); i < n; i++ ) { for( var i = 0, n = array_length(_color); i < n; i++ ) {
var _pal = _color[i]; var _pal = _color[i];
var _px = _x + ui(6); var _px = _x + ui(4);
var _py = _y + ui(6) + i * _ph; var _py = _y + ui(4) + i * _ph;
if(is_array(_pal)) if(is_array(_pal))
drawPalette(_pal, _px, _py, _pw, _ph); drawPalette(_pal, _px, _py, _pw, _ph);
@ -86,21 +86,35 @@ function buttonPalette(_onApply, dialog = noone) : widget() constructor {
} }
} }
function drawPalette(_pal, _x, _y, _w, _h, _a = 1) { function drawPalette(_pal, _x, _y, _w, _h, _a = 1) { #region
var ww = _w / array_length(_pal); var aa = array_length(_pal);
draw_set_alpha(_a);
for(var i = 0; i < array_length(_pal); i++) { if(aa == 1) {
if(!is_real(_pal[i])) continue; draw_sprite_stretched_ext(THEME.palette_mask, 1, _x, _y, _w, _h, _pal[0], _a);
draw_set_color(_pal[i]); return;
var _x0 = _x + i * ww;
var _x1 = _x0 + ww - 1;
draw_rectangle(_x0, _y, _x1, _y + _h, false);
} }
draw_set_alpha(1);
} var ww = _w / aa;
var _x0 = _x;
for(var i = 0; i < aa; i++) {
if(!is_real(_pal[i])) continue;
var _in = 0;
if(i == 0)
_in = 2;
else if(i == aa - 1)
_in = 3;
draw_sprite_stretched_ext(THEME.palette_mask, _in, floor(_x0), _y, ceil(ww), _h, _pal[i], _a);
_x0 += ww;
}
} #endregion
function drawPaletteGrid(_pal, _x, _y, _w, _gs = 24, c_color = -1) { function drawPaletteGrid(_pal, _x, _y, _w, _gs = 24, c_color = -1) { #region
var amo = array_length(_pal); var amo = array_length(_pal);
var col = floor(_w / _gs); var col = floor(_w / _gs);
var row = ceil(amo / col); var row = ceil(amo / col);
@ -123,4 +137,4 @@ function drawPaletteGrid(_pal, _x, _y, _w, _gs = 24, c_color = -1) {
draw_set_color(c_white); draw_set_color(c_white);
draw_rectangle_border(_x0, _y0 + 1, _x0 + _gs, _y0 + _gs, 2); draw_rectangle_border(_x0, _y0 + 1, _x0 + _gs, _y0 + _gs, 2);
} }
} } #endregion

View file

@ -25,10 +25,10 @@
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION; globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
LATEST_VERSION = 11500; LATEST_VERSION = 11500;
VERSION = 11610; VERSION = 11620;
SAVE_VERSION = 11610; SAVE_VERSION = 11620;
VERSION_STRING = "1.16.1.0"; VERSION_STRING = "1.16.2.0";
BUILD_NUMBER = 11610; BUILD_NUMBER = 11620;
globalvar APPEND_MAP; globalvar APPEND_MAP;
APPEND_MAP = ds_map_create(); APPEND_MAP = ds_map_create();

View file

@ -18,6 +18,7 @@ function gradientObject(color = c_black) constructor { #region
if(is_array(color)) keys = [ new gradientKey(0, color[0]), new gradientKey(1, color[1]) ]; if(is_array(color)) keys = [ new gradientKey(0, color[0]), new gradientKey(1, color[1]) ];
else keys = [ new gradientKey(0, color) ]; else keys = [ new gradientKey(0, color) ];
type = GRADIENT_INTER.smooth; type = GRADIENT_INTER.smooth;
surf = noone;
static clone = function() { #region static clone = function() { #region
var g = new gradientObject(); var g = new gradientObject();
@ -93,25 +94,39 @@ function gradientObject(color = c_black) constructor { #region
for(var i = 0; i < len; i++) { for(var i = 0; i < len; i++) {
if(keys[i].value == undefined) return; if(keys[i].value == undefined) return;
_grad_color[i * 4 + 0] = color_get_red(keys[i].value) / 255; _grad_color[i * 4 + 0] = color_get_red(keys[i].value) / 255;
_grad_color[i * 4 + 1] = color_get_green(keys[i].value) / 255; _grad_color[i * 4 + 1] = color_get_green(keys[i].value) / 255;
_grad_color[i * 4 + 2] = color_get_blue(keys[i].value) / 255; _grad_color[i * 4 + 2] = color_get_blue(keys[i].value) / 255;
_grad_color[i * 4 + 3] = 1; _grad_color[i * 4 + 3] = 1;
_grad_time[i] = keys[i].time; _grad_time[i] = keys[i].time;
} }
if(len == 0) { surf = surface_verify(surf, _w, _h);
draw_sprite_stretched_ext(s_fx_pixel, 0, _x, _y, _w, _h, c_white, _a)
} else {
shader_set(sh_gradient_display);
shader_set_uniform_i(uniform_grad_blend, type);
shader_set_uniform_f_array_safe(uniform_grad, _grad_color, GRADIENT_LIMIT * 4);
shader_set_uniform_f_array_safe(uniform_grad_time, _grad_time);
shader_set_uniform_i(uniform_grad_key, len);
draw_sprite_stretched_ext(s_fx_pixel, 0, _x, _y, _w, _h, c_white, _a) surface_set_target(surf);
shader_reset(); DRAW_CLEAR
}
gpu_set_colorwriteenable(0, 0, 0, 1);
draw_sprite_stretched_ext(THEME.gradient_mask, 0, 0, 0, _w, _h, c_white, _a)
gpu_set_colorwriteenable(1, 1, 1, 0);
if(len == 0) {
draw_sprite_stretched_ext(s_fx_pixel, 0, 0, 0, _w, _h, c_white, 1);
} else {
shader_set(sh_gradient_display);
shader_set_uniform_i(uniform_grad_blend, type);
shader_set_uniform_f_array_safe(uniform_grad, _grad_color, GRADIENT_LIMIT * 4);
shader_set_uniform_f_array_safe(uniform_grad_time, _grad_time);
shader_set_uniform_i(uniform_grad_key, len);
draw_sprite_stretched_ext(s_fx_pixel, 0, 0, 0, _w, _h, c_white, 1);
shader_reset();
}
gpu_set_colorwriteenable(1, 1, 1, 1);
surface_reset_target();
draw_surface(surf, _x, _y);
} #endregion } #endregion
static toArray = function() { #region static toArray = function() { #region

View file

@ -1,8 +1,4 @@
/// @description Creates an instance of a given object at a given position. function instance_create(_x, _y, object, params = {}) {
/// @param x The x position the object will be created at.
/// @param y The y position the object will be created at.
/// @param obj The object to create an instance of.
function instance_create(_x, _y, object) {
var myDepth = object_get_depth( object ); var myDepth = object_get_depth( object );
return instance_create_depth( _x, _y, myDepth, object ); return instance_create_depth( _x, _y, myDepth, object, params );
} }

View file

@ -223,10 +223,10 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
bx -= ui(28); bx -= ui(28);
if(jun.is_modified) { if(jun.is_modified) {
if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_reset", "Reset value"), THEME.refresh_s, 0, COLORS._main_icon) == 2) if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_reset", "Reset value"), THEME.refresh_16, 0, COLORS._main_icon) == 2)
jun.resetValue(); jun.resetValue();
} else } else
draw_sprite_ui(THEME.refresh_s, 0, bx, by,,,, COLORS._main_icon, 0.5); draw_sprite_ui(THEME.refresh_16, 0, bx, by,,,, COLORS._main_icon, 0.5);
bx -= ui(28); bx -= ui(28);
var ic_b = jun.expUse? c_white : COLORS._main_icon; var ic_b = jun.expUse? c_white : COLORS._main_icon;

View file

@ -0,0 +1,81 @@
function Node_FLIP_Domain(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Domain";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
manual_ungroupable = false;
update_on_frame = true;
inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF)
.setDisplay(VALUE_DISPLAY.vector);
inputs[| 1] = nodeValue("Particle Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2);
inputs[| 2] = nodeValue("Particle Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 10);
inputs[| 3] = nodeValue("FLIP Ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.8)
.setDisplay(VALUE_DISPLAY.slider);
inputs[| 4] = nodeValue("Resolve accelerator", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1.5);
inputs[| 5] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8);
inputs[| 6] = nodeValue("Damping", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.8)
.setDisplay(VALUE_DISPLAY.slider);
inputs[| 7] = nodeValue("Gravity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 5);
inputs[| 8] = nodeValue("Time Step", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.05);
input_display_list = [
["Domain", false], 0, 1, 2,
["Solver", false], 3, 4, 5,
["Physics", false], 8, 6, 7,
]
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone);
attributes.max_particles = 10000;
domain = instance_create(0, 0, FLIP_Domain);
static update = function(frame = CURRENT_FRAME) {
var _dim = getInputData(0);
var _siz = getInputData(1);
var _den = getInputData(2);
var _flp = getInputData(3);
var _ovr = getInputData(4);
var _itr = getInputData(5);
var _dmp = getInputData(6);
var _grv = getInputData(7);
var _dt = getInputData(8);
if(frame == 0 || domain == noone) {
var width = _dim[0] + _siz * 2;
var height = _dim[1] + _siz * 2;
var particleSize = _siz;
var density = _den;
var maxParticles = attributes.max_particles;
domain.init(width, height, particleSize, density, maxParticles);
}
domain.velocityDamping = _dmp;
domain.dt = _dt;
domain.iteration = _itr;
domain.g = _grv;
domain.flipRatio = _flp;
domain.numPressureIters = 3;
domain.numParticleIters = 3;
domain.overRelaxation = _ovr;
domain.update();
outputs[| 0].setValue(domain);
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_FLIP_domain",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "FLIP",
"path": "folders/nodes/data/simulation/FLIP.yy",
},
}

View file

@ -0,0 +1,20 @@
function Node_FLIP_Group_Inline(_x, _y, _group = noone) : Node_Collection_Inline(_x, _y, _group) constructor {
name = "FLIP Fluid";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
update_on_frame = true;
if(!LOADING && !APPENDING && !CLONING) {
var _domain = nodeBuild("Node_FLIP_Domain", x, y);
var _spawn = nodeBuild("Node_FLIP_Spawner", x + 160, y);
var _render = nodeBuild("Node_FLIP_Render", x + 320, y);
_spawn.inputs[| 0].setFrom(_domain.outputs[| 0]);
_render.inputs[| 0].setFrom(_spawn.outputs[| 0]);
addNode(_domain);
addNode(_spawn);
addNode(_render);
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_FLIP_group",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "FLIP",
"path": "folders/nodes/data/simulation/FLIP.yy",
},
}

View file

@ -0,0 +1,58 @@
function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Render";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone)
.setVisible(true, true);
input_display_list = [ 0 ];
outputs[| 0] = nodeValue("Rendered", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
temp_surface = [ noone ]
static update = function(frame = CURRENT_FRAME) {
var domain = getInputData(0);
if(!instance_exists(domain)) return;
domain.step();
var _outSurf = outputs[| 0].getValue();
var _padd = domain.particleSize;
var _ww = domain.width - _padd * 2;
var _hh = domain.height - _padd * 2;
_outSurf = surface_verify(_outSurf, _ww, _hh);
temp_surface[0] = surface_verify(temp_surface[0], _ww, _hh);
outputs[| 0].setValue(_outSurf);
var _rad = domain.particleRadius;
surface_set_target(temp_surface[0]);
DRAW_CLEAR
BLEND_ADD
for( var i = 0; i < domain.numParticles; i++ ) {
var _x = domain.particlePos[i * 2 + 0];
var _y = domain.particlePos[i * 2 + 1];
if(_x == 0 && _y == 0) continue;
_x -= _padd
_y -= _padd
draw_circle_color(_x, _y, _rad * 4, c_white, c_black, false);
}
BLEND_NORMAL
surface_reset_target();
surface_set_shader(_outSurf, sh_FLIP_render_threshold);
draw_surface(temp_surface[0], 0, 0);
surface_reset_shader();
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_FLIP_render",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "FLIP",
"path": "folders/nodes/data/simulation/FLIP.yy",
},
}

View file

@ -0,0 +1,171 @@
function Node_FLIP_Spawner(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Spawner";
color = COLORS.node_blend_fluid;
icon = THEME.fluid_sim;
w = 96;
min_h = 96;
manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone )
.setVisible(true, true);
inputs[| 1] = nodeValue("Spawn shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Circle", "Surface" ]);
inputs[| 2] = nodeValue("Spawn position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] )
.setDisplay(VALUE_DISPLAY.vector);
inputs[| 3] = nodeValue("Spawn type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Stream", "Splash" ]);
inputs[| 4] = nodeValue("Spawn frame", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 );
inputs[| 5] = nodeValue("Spawn amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 );
inputs[| 6] = nodeValue("Spawn velocity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] )
.setDisplay(VALUE_DISPLAY.vector);
inputs[| 7] = nodeValue("Spawn surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
inputs[| 8] = nodeValue("Spawn radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 )
.setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] });
inputs[| 9] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom_range(100000, 999999) );
input_display_list = [ 0, 9,
["Spawner", false], 1, 7, 8, 2, 3, 4, 5,
["Physics", false], 6,
]
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone );
spawn_amo = 0;
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
var _shp = getInputData(1);
var _posit = getInputData(2);
var _velo = getInputData(6);
var _px = _x + _posit[0] * _s;
var _py = _y + _posit[1] * _s;
var _vx = _px + _velo[0] * _s;
var _vy = _py + _velo[1] * _s;
if(_shp == 0) {
var _rad = getInputData(8);
if(inputs[| 8].drawOverlay(active, _px, _py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori)) active = false;
draw_set_color(COLORS._main_accent);
draw_circle(_px, _py, _rad * _s, true);
} else if(_shp == 1) {
var _surf = getInputData(7);
if(!is_surface(_surf)) return;
var _sw = surface_get_width_safe(_surf);
var _sh = surface_get_height_safe(_surf);
draw_surface_ext(_surf, _px - _sw * _s / 2, _py - _sh * _s / 2, _s, _s, 0, c_white, 0.5);
}
draw_set_color(COLORS._main_accent);
draw_set_alpha(0.5);
draw_line_width2(_px, _py, _vx, _vy, 6, 2);
draw_set_alpha(1);
if(inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false;
if(inputs[| 6].drawOverlay(active, _px, _py, _s, _mx, _my, _snx, _sny)) active = false;
} #endregion
static step = function() { #region
var _shp = getInputData(1);
var _typ = getInputData(3);
inputs[| 4].setVisible(_typ == 1);
inputs[| 7].setVisible(_shp == 1, _shp == 1);
inputs[| 8].setVisible(_shp == 0);
} #endregion
static update = function(frame = CURRENT_FRAME) {
var domain = getInputData(0);
if(!instance_exists(domain)) return;
outputs[| 0].setValue(domain);
var _shape = getInputData(1);
var _posit = getInputData(2);
var _type = getInputData(3);
var _fra = getInputData(4);
var _amo = getInputData(5);
var _vel = getInputData(6);
var _surf = getInputData(7);
var _rad = getInputData(8);
var _seed = getInputData(9);
_amo = min(_amo, domain.maxParticles - domain.numParticles);
spawn_amo += _amo;
if(spawn_amo < 1) return;
if(_type == 1 && frame != _fra) return;
if(_shape == 1 && !is_surface(_surf)) return;
var _samo = floor(spawn_amo);
spawn_amo -= _samo;
if(_shape == 1) {
var _sw = surface_get_width(_surf);
var _sh = surface_get_height(_surf);
var _points = get_points_from_dist(_surf, _samo, _seed + ceil(_amo) * frame);
_samo = array_length(_points);
if(_samo == 0) return;
}
domain.numParticles += _samo;
var _buffP = buffer_create(_samo * 2 * 8, buffer_fixed, 8);
var _buffV = buffer_create(_samo * 2 * 8, buffer_fixed, 8);
buffer_seek(_buffP, buffer_seek_start, 0);
buffer_seek(_buffV, buffer_seek_start, 0);
random_set_seed(_seed + ceil(_amo) * frame);
var ind = 0;
repeat(_samo) {
var _x = _posit[0];
var _y = _posit[1];
if(_shape == 0) {
var _dir = random(360);
var _dis = sqrt(random(1)) * _rad;
_x = _posit[0] + lengthdir_x(_dis, _dir);
_y = _posit[1] + lengthdir_y(_dis, _dir);
buffer_write(_buffP, buffer_f64, _x);
buffer_write(_buffP, buffer_f64, _y);
} else if(_shape == 1) {
_x = _posit[0] - _sw / 2 + _points[ind][0] * _sw;
_y = _posit[1] - _sh / 2 + _points[ind][1] * _sh;
buffer_write(_buffP, buffer_f64, _x);
buffer_write(_buffP, buffer_f64, _y);
}
buffer_write(_buffV, buffer_f64, _vel[0]);
buffer_write(_buffV, buffer_f64, _vel[1]);
ind++;
}
FLIP_spawnParticles(domain.domain, buffer_get_address(_buffP), buffer_get_address(_buffV), _amo);
buffer_delete(_buffP);
buffer_delete(_buffV);
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_FLIP_spawner",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "FLIP",
"path": "folders/nodes/data/simulation/FLIP.yy",
},
}

View file

@ -1,5 +1,5 @@
function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Color"; name = "Color";
w = 96; w = 96;
inputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
@ -21,7 +21,6 @@ function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
return; return;
} }
draw_set_color(col); draw_sprite_stretched_ext(THEME.palette_mask, 1, bbox.x0, bbox.y0, bbox.w, bbox.h, col, 1);
draw_rectangle(bbox.x0, bbox.y0, bbox.x1, bbox.y1, 0);
} }
} }

View file

@ -36,7 +36,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
var by = _y; var by = _y;
var bs = ui(24); var bs = ui(24);
if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover,, THEME.refresh_s) == 2) if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover,, THEME.refresh_16) == 2)
refreshPalette(); refreshPalette();
bx += bs + ui(4); bx += bs + ui(4);

View file

@ -982,7 +982,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
draw_set_text(f_p1, fa_left, fa_center, cc); draw_set_text(f_p1, fa_left, fa_center, cc);
if(hasInspector1Update()) icon = THEME.refresh_s; if(hasInspector1Update()) icon = THEME.refresh_16;
var ts = clamp(power(_s, 0.5), 0.5, 1); var ts = clamp(power(_s, 0.5), 0.5, 1);
var aa = 0.5 + 0.5 * renderActive; var aa = 0.5 + 0.5 * renderActive;

View file

@ -7,7 +7,7 @@ function Node_Fluid_Add(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) con
manual_ungroupable = false; manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone) inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)
.setVisible(true, true); .setVisible(true, true);
inputs[| 1] = nodeValue("Fluid brush", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Fluid brush", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
@ -36,7 +36,7 @@ function Node_Fluid_Add(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) con
_prevPos = noone; _prevPos = noone;
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone);
temp_surface = [ surface_create(1, 1) ]; temp_surface = [ surface_create(1, 1) ];

View file

@ -5,7 +5,7 @@ function Node_Fluid_Add_Collider(_x, _y, _group = noone) : Node_Fluid(_x, _y, _g
manual_ungroupable = false; manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone) inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)
.setVisible(true, true); .setVisible(true, true);
inputs[| 1] = nodeValue("Collider", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Collider", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
@ -18,7 +18,7 @@ function Node_Fluid_Add_Collider(_x, _y, _group = noone) : Node_Fluid(_x, _y, _g
["Collider", false], 1, 2, ["Collider", false], 1, 2,
]; ];
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone);
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
var _mat = getInputData(1); var _mat = getInputData(1);

View file

@ -5,7 +5,7 @@ function Node_Fluid_Apply_Velocity(_x, _y, _group = noone) : Node_Fluid(_x, _y,
manual_ungroupable = false; manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone) inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)
.setVisible(true, true); .setVisible(true, true);
inputs[| 1] = nodeValue("Brush", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Brush", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
@ -23,7 +23,7 @@ function Node_Fluid_Apply_Velocity(_x, _y, _group = noone) : Node_Fluid(_x, _y,
["Velocity", false], 4, 1, 2, 3 ["Velocity", false], 4, 1, 2, 3
]; ];
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone);
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
var _mat = getInputData(1); var _mat = getInputData(1);

View file

@ -40,7 +40,7 @@ function Node_Fluid_Domain(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group)
inputs[| 11] = nodeValue("Wrap", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 11] = nodeValue("Wrap", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone);
input_display_list = [ input_display_list = [
["Domain", false], 0, 11, 1, ["Domain", false], 0, 11, 1,

View file

@ -4,12 +4,12 @@ function Node_Fluid_Domain_Queue(_x, _y, _group = noone) : Node_Fluid(_x, _y, _g
manual_ungroupable = false; manual_ungroupable = false;
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone);
static createNewInput = function() { static createNewInput = function() {
var index = ds_list_size(inputs); var index = ds_list_size(inputs);
inputs[| index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone ) inputs[| index] = nodeValue("Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone )
.setVisible(true, true); .setVisible(true, true);
return inputs[| index]; return inputs[| index];

View file

@ -6,7 +6,7 @@ function Node_Fluid_Render(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group)
manual_ungroupable = false; manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone) inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)
.setVisible(true, true); .setVisible(true, true);
inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF)

View file

@ -11,7 +11,7 @@ function Node_Fluid_Render_Output(_x, _y, _group = noone) : Node_Group_Output(_x
manual_ungroupable = false; manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone) inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)
.setVisible(true, true); .setVisible(true, true);
inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF) inputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF)

View file

@ -5,7 +5,7 @@ function Node_Fluid_Repulse(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group)
manual_ungroupable = false; manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone) inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)
.setVisible(true, true); .setVisible(true, true);
inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0])
@ -24,7 +24,7 @@ function Node_Fluid_Repulse(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group)
["Repulse", false], 4, 1, 2, 3 ["Repulse", false], 4, 1, 2, 3
]; ];
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone);
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
var _pos = getInputData(1); var _pos = getInputData(1);

View file

@ -5,7 +5,7 @@ function Node_Fluid_Turbulence(_x, _y, _group = noone) : Node_Fluid(_x, _y, _gro
manual_ungroupable = false; manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone) inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)
.setVisible(true, true); .setVisible(true, true);
inputs[| 1] = nodeValue("Effect area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, AREA_DEF) inputs[| 1] = nodeValue("Effect area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, AREA_DEF)
@ -27,7 +27,7 @@ function Node_Fluid_Turbulence(_x, _y, _group = noone) : Node_Fluid(_x, _y, _gro
["Turbulence", false], 5, 1, 2, 4, 3 ["Turbulence", false], 5, 1, 2, 4, 3
]; ];
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone);
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);

View file

@ -7,7 +7,7 @@ function Node_Fluid_Update(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group)
manual_ungroupable = false; manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone) inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)
.setVisible(true, true); .setVisible(true, true);
inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
@ -17,7 +17,7 @@ function Node_Fluid_Update(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group)
["Update", false], 1, ["Update", false], 1,
] ]
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone);
static update = function(frame = CURRENT_FRAME) { static update = function(frame = CURRENT_FRAME) {
if(!PROJECT.animator.is_playing) return; if(!PROJECT.animator.is_playing) return;

View file

@ -5,7 +5,7 @@ function Node_Fluid_Vortex(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group)
manual_ungroupable = false; manual_ungroupable = false;
inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.fdomain, noone) inputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.input, VALUE_TYPE.sdomain, noone)
.setVisible(true, true); .setVisible(true, true);
inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0])
@ -27,7 +27,7 @@ function Node_Fluid_Vortex(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group)
["Vortex", false], 5, 1, 2, 3, 4 ["Vortex", false], 5, 1, 2, 3, 4
]; ];
outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.fdomain, noone); outputs[| 0] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.sdomain, noone);
outputs[| 1] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 1] = nodeValue("Domain", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {

View file

@ -26,7 +26,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru
data_type_map = [ VALUE_TYPE.integer, VALUE_TYPE.float, VALUE_TYPE.boolean, VALUE_TYPE.color, VALUE_TYPE.surface, data_type_map = [ VALUE_TYPE.integer, VALUE_TYPE.float, VALUE_TYPE.boolean, VALUE_TYPE.color, VALUE_TYPE.surface,
VALUE_TYPE.path, VALUE_TYPE.curve, VALUE_TYPE.text, VALUE_TYPE.object, VALUE_TYPE.node, VALUE_TYPE.path, VALUE_TYPE.curve, VALUE_TYPE.text, VALUE_TYPE.object, VALUE_TYPE.node,
noone, VALUE_TYPE.any, VALUE_TYPE.pathnode, VALUE_TYPE.particle, VALUE_TYPE.rigid, noone, VALUE_TYPE.any, VALUE_TYPE.pathnode, VALUE_TYPE.particle, VALUE_TYPE.rigid,
VALUE_TYPE.fdomain, VALUE_TYPE.struct, VALUE_TYPE.strands, VALUE_TYPE.mesh, VALUE_TYPE.trigger, VALUE_TYPE.sdomain, VALUE_TYPE.struct, VALUE_TYPE.strands, VALUE_TYPE.mesh, VALUE_TYPE.trigger,
noone, VALUE_TYPE.d3Mesh, VALUE_TYPE.d3Light, VALUE_TYPE.d3Scene, VALUE_TYPE.d3Material, noone, VALUE_TYPE.d3Mesh, VALUE_TYPE.d3Light, VALUE_TYPE.d3Scene, VALUE_TYPE.d3Material,
noone, VALUE_TYPE.audioBit, noone, VALUE_TYPE.audioBit,

View file

@ -81,7 +81,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
if(!_node) return noone; if(!_node) return noone;
if(!LOADING && !APPENDING) _node.doUpdate(); //if(!LOADING && !APPENDING) _node.doUpdate();
return _node; return _node;
} #endregion } #endregion
@ -393,6 +393,16 @@ function __initNodes() {
addNodeObject(smokeSim, "Turbulence", s_node_smokeSim_turbulence, "Node_Fluid_Turbulence", [1, Node_Fluid_Turbulence],, "Apply random velocity map to the smoke.").hideRecent().setVersion(1120); addNodeObject(smokeSim, "Turbulence", s_node_smokeSim_turbulence, "Node_Fluid_Turbulence", [1, Node_Fluid_Turbulence],, "Apply random velocity map to the smoke.").hideRecent().setVersion(1120);
#endregion #endregion
var flipSim = ds_list_create(); #region
addNodeCatagory("FLIP Fluid", smokeSim, ["Node_FLIP_Group_Inline"]);
ds_list_add(flipSim, "Domain");
addNodeObject(flipSim, "Domain", s_node_smokeSim_domain, "Node_FLIP_Domain", [1, Node_FLIP_Domain]).hideRecent().setVersion(11620);
addNodeObject(flipSim, "Render", s_node_smokeSim_domain, "Node_FLIP_Render", [1, Node_FLIP_Render]).hideRecent().setVersion(11620);
ds_list_add(flipSim, "Fluid");
addNodeObject(flipSim, "Spawner", s_node_smokeSim_domain, "Node_FLIP_Spawner", [1, Node_FLIP_Spawner]).hideRecent().setVersion(11620);
#endregion
var strandSim = ds_list_create(); #region var strandSim = ds_list_create(); #region
addNodeCatagory("StrandSim", strandSim, ["Node_Strand_Group", "Node_Strand_Group_Inline"]); addNodeCatagory("StrandSim", strandSim, ["Node_Strand_Group", "Node_Strand_Group_Inline"]);
ds_list_add(strandSim, "Group"); ds_list_add(strandSim, "Group");
@ -636,7 +646,8 @@ function __initNodes() {
addNodeObject(generator, "Particle", s_node_particle, "Node_Particle", [1, Node_Particle],, "Generate particle effect."); addNodeObject(generator, "Particle", s_node_particle, "Node_Particle", [1, Node_Particle],, "Generate particle effect.");
addNodeObject(generator, "VFX", s_node_vfx, "Node_VFX_Group_Inline", [1, Node_VFX_Group_Inline],, "Create VFX group, which generate particles that can be manipulated using different force nodes."); addNodeObject(generator, "VFX", s_node_vfx, "Node_VFX_Group_Inline", [1, Node_VFX_Group_Inline],, "Create VFX group, which generate particles that can be manipulated using different force nodes.");
addNodeObject(generator, "RigidSim", s_node_rigidSim, "Node_Rigid_Group_Inline", [1, Node_Rigid_Group_Inline],, "Create group for rigidbody simulation.").setVersion(1110); addNodeObject(generator, "RigidSim", s_node_rigidSim, "Node_Rigid_Group_Inline", [1, Node_Rigid_Group_Inline],, "Create group for rigidbody simulation.").setVersion(1110);
addNodeObject(generator, "SmokeSim", s_node_smokeSim_group, "Node_Fluid_Group_Inline", [1, Node_Fluid_Group_Inline],, "Create group for fluid simulation.").setVersion(1120); /**/ addNodeObject(generator, "FLIP Fluid", s_node_rigidSim, "Node_FLIP_Group_Inline", [1, Node_FLIP_Group_Inline],, "Create group for fluid simulation.").setVersion(11620);
addNodeObject(generator, "SmokeSim", s_node_smokeSim_group, "Node_Fluid_Group_Inline", [1, Node_Fluid_Group_Inline],, "Create group for smoke simulation.").setVersion(1120);
addNodeObject(generator, "StrandSim", s_node_strandSim, "Node_Strand_Group_Inline", [1, Node_Strand_Group_Inline], ["Hair"], "Create group for hair simulation.").setVersion(1140); addNodeObject(generator, "StrandSim", s_node_strandSim, "Node_Strand_Group_Inline", [1, Node_Strand_Group_Inline], ["Hair"], "Create group for hair simulation.").setVersion(1140);
ds_list_add(generator, "Region"); ds_list_add(generator, "Region");

View file

@ -3,23 +3,23 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
use_cache = CACHE_USE.manual; use_cache = CACHE_USE.manual;
clearCacheOnChange = false; clearCacheOnChange = false;
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 1] = nodeValue("Max life", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 5); inputs[| 1] = nodeValue("Max life", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 5);
inputs[| 2] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 2] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
inputs[| 3] = nodeValue("Max distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, -1, "Maximum distance to search for movement, set to -1 to search the entire image."); inputs[| 3] = nodeValue("Max distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, -1, "Maximum distance to search for movement, set to -1 to search the entire image.");
inputs[| 4] = nodeValue("Match color", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Make trail track pixels of the same color, instead of the closet pixels."); inputs[| 4] = nodeValue("Match color", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Make trail track pixels of the same color, instead of the closet pixels.");
inputs[| 5] = nodeValue("Blend color", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Blend color between two pixel smoothly."); inputs[| 5] = nodeValue("Blend color", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Blend color between two pixel smoothly.");
inputs[| 6] = nodeValue("Alpha over life", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); inputs[| 6] = nodeValue("Alpha over life", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11);
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
outputs[| 1] = nodeValue("Trail UV", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 1] = nodeValue("Trail UV", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ input_display_list = [
["Surfaces", true], 0, ["Surfaces", true], 0,
@ -30,8 +30,20 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
temp_surface = [ surface_create(1, 1), surface_create(1, 1), surface_create(1, 1) ]; temp_surface = [ surface_create(1, 1), surface_create(1, 1), surface_create(1, 1) ];
cached_trail = [];
attribute_surface_depth(); attribute_surface_depth();
insp2UpdateTooltip = "Clear cache";
insp2UpdateIcon = [ THEME.cache, 0, COLORS._main_icon ];
static onInspector2Update = function() {
clearCache(true);
for( var i = 0, n = array_length(cached_trail); i < n; i++ )
surface_free_safe(cached_trail[i]);
cached_trail = [];
}
static step = function() { static step = function() {
var _colr = getInputData(4); var _colr = getInputData(4);
@ -73,7 +85,6 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
var frame_amo = _loop? _life : min(_life, curf); var frame_amo = _loop? _life : min(_life, curf);
var st_frame = curf - frame_amo; var st_frame = curf - frame_amo;
BLEND_NORMAL
for(var i = 0; i <= frame_amo; i++) { for(var i = 0; i <= frame_amo; i++) {
var frame_idx = st_frame + i; var frame_idx = st_frame + i;
var prog = (frame_idx - (curf - _life)) / _life; var prog = (frame_idx - (curf - _life)) / _life;
@ -123,7 +134,6 @@ function Node_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
shader_reset(); shader_reset();
} }
BLEND_NORMAL
surface_set_target(temp_surface[1]); surface_set_target(temp_surface[1]);
shader_set(sh_trail_filler_pass2); shader_set(sh_trail_filler_pass2);

View file

@ -32,7 +32,7 @@ enum VALUE_TYPE {
pathnode = 12, pathnode = 12,
particle = 13, particle = 13,
rigid = 14, rigid = 14,
fdomain = 15, sdomain = 15,
struct = 16, struct = 16,
strands = 17, strands = 17,
mesh = 18, mesh = 18,
@ -57,6 +57,8 @@ enum VALUE_TYPE {
audioBit = 33, audioBit = 33,
fdomain = 34,
action = 99, action = 99,
} }
@ -161,7 +163,7 @@ function value_color(i) { #region
#ffb5b5, //path #ffb5b5, //path
#8fde5d, //particle #8fde5d, //particle
#88ffe9, //rigid #88ffe9, //rigid
#6d6e71, //fdomain #6d6e71, //sdomain
#8c3f5d, //struct #8c3f5d, //struct
#ff9166, //strand #ff9166, //strand
#c2c2d1, //mesh #c2c2d1, //mesh
@ -180,6 +182,7 @@ function value_color(i) { #region
#ff6b97, //dynaSurf #ff6b97, //dynaSurf
#c2c2d1, //PCX #c2c2d1, //PCX
#8fde5d, //audiobit #8fde5d, //audiobit
#4da6ff, //flipfluid
]; ];
if(i == 99) return $5dde8f; if(i == 99) return $5dde8f;
@ -207,7 +210,7 @@ function value_color_bg_array(i) { #region
#e28989, //path #e28989, //path
#3ca370, //particle #3ca370, //particle
#4da6ff, //rigid #4da6ff, //rigid
#4b5bab, //fdomain #4b5bab, //sdomain
#5e315b, //struct #5e315b, //struct
#e36956, //strand #e36956, //strand
#83839b, //mesh #83839b, //mesh
@ -250,7 +253,7 @@ function value_bit(i) { #region
case VALUE_TYPE.pathnode : return 1 << 15; case VALUE_TYPE.pathnode : return 1 << 15;
case VALUE_TYPE.particle : return 1 << 16; case VALUE_TYPE.particle : return 1 << 16;
case VALUE_TYPE.rigid : return 1 << 17; case VALUE_TYPE.rigid : return 1 << 17;
case VALUE_TYPE.fdomain : return 1 << 18; case VALUE_TYPE.sdomain : return 1 << 18;
case VALUE_TYPE.struct : return 1 << 19; case VALUE_TYPE.struct : return 1 << 19;
case VALUE_TYPE.strands : return 1 << 20; case VALUE_TYPE.strands : return 1 << 20;
case VALUE_TYPE.mesh : return 1 << 21; case VALUE_TYPE.mesh : return 1 << 21;
@ -273,6 +276,7 @@ function value_bit(i) { #region
case VALUE_TYPE.PCXnode : return 1 << 34; case VALUE_TYPE.PCXnode : return 1 << 34;
case VALUE_TYPE.audioBit : return 1 << 35; case VALUE_TYPE.audioBit : return 1 << 35;
case VALUE_TYPE.fdomain : return 1 << 36;
case VALUE_TYPE.any : return ~0 & ~(1 << 32); case VALUE_TYPE.any : return ~0 & ~(1 << 32);
} }
@ -324,7 +328,7 @@ function value_type_from_string(str) { #region
case "pathnode" : return VALUE_TYPE.pathnode; case "pathnode" : return VALUE_TYPE.pathnode;
case "particle" : return VALUE_TYPE.particle; case "particle" : return VALUE_TYPE.particle;
case "rigid" : return VALUE_TYPE.rigid; case "rigid" : return VALUE_TYPE.rigid;
case "fdomain" : return VALUE_TYPE.fdomain; case "sdomain" : return VALUE_TYPE.sdomain;
case "struct" : return VALUE_TYPE.struct; case "struct" : return VALUE_TYPE.struct;
case "strands" : return VALUE_TYPE.strands; case "strands" : return VALUE_TYPE.strands;
case "mesh" : return VALUE_TYPE.mesh; case "mesh" : return VALUE_TYPE.mesh;

View file

@ -478,8 +478,9 @@ function Panel_Collection() : PanelContent() constructor {
if(bx > rootx) { if(bx > rootx) {
var txt = __txtx("panel_collection_open_file", "Open in file explorer"); var txt = __txtx("panel_collection_open_file", "Open in file explorer");
if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [mx, my], pFOCUS, pHOVER, txt, THEME.button_path_open) == 2) if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [mx, my], pFOCUS, pHOVER, txt, THEME.path_open) == 2)
shellOpenExplorer(context.path); shellOpenExplorer(context.path);
draw_sprite_ui_uniform(THEME.path_open, 1, bx + bs / 2, by + bs / 2, 1, c_white);
} }
bx -= ui(36); bx -= ui(36);

View file

@ -1048,9 +1048,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
try { try {
var val = _node.drawNode(gr_x, gr_y, mx, my, graph_s, display_parameter); var val = _node.drawNode(gr_x, gr_y, mx, my, graph_s, display_parameter);
if(val) { if(val) {
value_focus = val;
if(key_mod_press(SHIFT)) if(key_mod_press(SHIFT))
TOOLTIP = [ val.getValue(), val.type ]; TOOLTIP = [ val.getValue(), val.type ];
value_focus = val;
} }
} catch(e) { } catch(e) {
log_warning("NODE DRAW", exception_print(e)); log_warning("NODE DRAW", exception_print(e));
@ -1059,6 +1059,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
for(var i = 0; i < ds_list_size(nodes_list); i++) for(var i = 0; i < ds_list_size(nodes_list); i++)
nodes_list[| i].drawBadge(gr_x, gr_y, graph_s); nodes_list[| i].drawBadge(gr_x, gr_y, graph_s);
if(PANEL_INSPECTOR && PANEL_INSPECTOR.prop_hover != noone)
value_focus = PANEL_INSPECTOR.prop_hover;
#endregion #endregion
printIf(log, $"Draw node: {get_timer() - t}"); t = get_timer(); printIf(log, $"Draw node: {get_timer() - t}"); t = get_timer();

View file

@ -131,7 +131,7 @@ function Panel_Graph_Export_Image(targetPanel) : PanelContent() constructor {
if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, pFOCUS, pHOVER) == 2) if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, pFOCUS, pHOVER) == 2)
refresh(); refresh();
draw_sprite_ui(THEME.refresh_s, 0, bx + ui(12), by + ui(12),,,, COLORS._main_icon, 1); draw_sprite_ui(THEME.refresh_16, 0, bx + ui(12), by + ui(12),,,, COLORS._main_icon, 1);
var sx = tx; var sx = tx;
var sy = ty + sh + ui(16); var sy = ty + sh + ui(16);

View file

@ -588,13 +588,11 @@ function Panel_Inspector() : PanelContent() constructor {
draw_sprite_stretched_ext(THEME.ui_panel_active, 0, ui(4), yy, contentPane.surface_w - ui(4), _selH, COLORS._main_accent, aa); draw_sprite_stretched_ext(THEME.ui_panel_active, 0, ui(4), yy, contentPane.surface_w - ui(4), _selH, COLORS._main_accent, aa);
} }
if(_hover && lbHov) { if(_hover && lbHov && prop_dragging == noone && mouse_press(mb_left, pFOCUS)) {
if(prop_dragging == noone && mouse_press(mb_left, pFOCUS)) { prop_dragging = jun;
prop_dragging = jun;
prop_sel_drag_x = mouse_mx; prop_sel_drag_x = mouse_mx;
prop_sel_drag_y = mouse_my; prop_sel_drag_y = mouse_my;
}
} }
#endregion #endregion
@ -612,7 +610,9 @@ function Panel_Inspector() : PanelContent() constructor {
if(_hover && point_in_rectangle(_m[0], _m[1], ui(4), _selY, contentPane.surface_w - ui(4), _selY + _selH)) { #region mouse in widget if(_hover && point_in_rectangle(_m[0], _m[1], ui(4), _selY, contentPane.surface_w - ui(4), _selY + _selH)) { #region mouse in widget
_HOVERING_ELEMENT = jun; _HOVERING_ELEMENT = jun;
if(NODE_DROPPER_TARGET != noone && NODE_DROPPER_TARGET != jun) { var hov = PANEL_GRAPH.value_dragging != noone || (NODE_DROPPER_TARGET != noone && NODE_DROPPER_TARGET != jun);
if(hov) {
draw_sprite_stretched_ext(THEME.ui_panel_active, 0, ui(4), _selY, contentPane.surface_w - ui(8), _selH, COLORS._main_value_positive, 1); draw_sprite_stretched_ext(THEME.ui_panel_active, 0, ui(4), _selY, contentPane.surface_w - ui(8), _selH, COLORS._main_value_positive, 1);
if(mouse_press(mb_left, NODE_DROPPER_TARGET_CAN)) { if(mouse_press(mb_left, NODE_DROPPER_TARGET_CAN)) {
NODE_DROPPER_TARGET.expression += $"{jun.node.internalName}.{jun.connect_type == JUNCTION_CONNECT.input? "inputs" : "outputs"}.{jun.internalName}"; NODE_DROPPER_TARGET.expression += $"{jun.node.internalName}.{jun.connect_type == JUNCTION_CONNECT.input? "inputs" : "outputs"}.{jun.internalName}";

View file

@ -13,10 +13,10 @@ function scrollPane(_w, _h, ondraw) : widget() constructor {
drawFunc = ondraw; drawFunc = ondraw;
content_h = 0; content_h = 0;
is_scroll = true; is_scroll = true;
always_scroll = false; always_scroll = false;
show_scroll = true; show_scroll = true;
scroll_step = 64; scroll_step = 64;
scroll_lock = false; scroll_lock = false;

View file

@ -138,7 +138,7 @@ function Theme() constructor {
timeline_graph = noone; timeline_graph = noone;
canvas_tools_pencil = noone; canvas_tools_pencil = noone;
path_tools_draw = noone; path_tools_draw = noone;
refresh_s = noone; refresh_16 = noone;
menu_button = noone; menu_button = noone;
icon_save_all = noone; icon_save_all = noone;
button_hide_middle = noone; button_hide_middle = noone;

View file

@ -0,0 +1,13 @@
//
// Simple passthrough fragment shader
//
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
void main() {
vec4 fluid = texture2D( gm_BaseTexture, v_vTexcoord );
gl_FragColor = vec4(0.);
if(fluid.r * fluid.a > 0.5)
gl_FragColor = vec4(1.);
}

View 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;
}

View file

@ -0,0 +1,10 @@
{
"resourceType": "GMShader",
"resourceVersion": "1.0",
"name": "sh_FLIP_render_threshold",
"parent": {
"name": "FLIP",
"path": "folders/shader/FLIP.yy",
},
"type": 1,
}