mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-06 23:51:08 +01:00
- [Patreon exclusive] New extra perlin noises node.
This commit is contained in:
parent
265f7c997e
commit
e8418a809c
84 changed files with 1057 additions and 55144 deletions
|
@ -494,6 +494,7 @@
|
||||||
{"name":"s_workshop_badge","order":1,"path":"sprites/s_workshop_badge/s_workshop_badge.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_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_compare","order":16,"path":"scripts/node_compare/node_compare.yy",},
|
||||||
|
{"name":"node_3d_transform","order":6,"path":"scripts/node_3d_transform/node_3d_transform.yy",},
|
||||||
{"name":"node_iterator_each_size","order":3,"path":"scripts/node_iterator_each_size/node_iterator_each_size.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":"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_HSV_combine","order":44,"path":"sprites/s_node_HSV_combine/s_node_HSV_combine.yy",},
|
||||||
|
@ -538,7 +539,7 @@
|
||||||
{"name":"text_file","order":5,"path":"scripts/text_file/text_file.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":"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":"s_node_pb_draw_diamond","order":29,"path":"sprites/s_node_pb_draw_diamond/s_node_pb_draw_diamond.yy",},
|
||||||
{"name":"node_3d_transform","order":4,"path":"scripts/node_3d_transform/node_3d_transform.yy",},
|
{"name":"node_3d_transform_scene","order":4,"path":"scripts/node_3d_transform_scene/node_3d_transform_scene.yy",},
|
||||||
{"name":"sh_trail_filler_pass1","order":49,"path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.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_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_pb_fx_strip","order":26,"path":"sprites/s_node_pb_fx_strip/s_node_pb_fx_strip.yy",},
|
||||||
|
@ -1028,6 +1029,7 @@
|
||||||
{"name":"sh_greyscale","order":13,"path":"shaders/sh_greyscale/sh_greyscale.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":"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":"s_node_pb_box_mirror","order":21,"path":"sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy",},
|
||||||
|
{"name":"__node_shader_generator","order":22,"path":"scripts/__node_shader_generator/__node_shader_generator.yy",},
|
||||||
{"name":"node_global","order":3,"path":"scripts/node_global/node_global.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":"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",},
|
{"name":"s_node_draw_stack","order":4,"path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",},
|
||||||
|
@ -1067,6 +1069,7 @@
|
||||||
{"name":"s_node_flood_fill","order":24,"path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",},
|
{"name":"s_node_flood_fill","order":24,"path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",},
|
||||||
{"name":"json_compare","order":21,"path":"scripts/json_compare/json_compare.yy",},
|
{"name":"json_compare","order":21,"path":"scripts/json_compare/json_compare.yy",},
|
||||||
{"name":"node_rigid_force_apply","order":4,"path":"scripts/node_rigid_force_apply/node_rigid_force_apply.yy",},
|
{"name":"node_rigid_force_apply","order":4,"path":"scripts/node_rigid_force_apply/node_rigid_force_apply.yy",},
|
||||||
|
{"name":"__node_shader","order":21,"path":"scripts/__node_shader/__node_shader.yy",},
|
||||||
{"name":"__node_iterator","order":6,"path":"scripts/__node_iterator/__node_iterator.yy",},
|
{"name":"__node_iterator","order":6,"path":"scripts/__node_iterator/__node_iterator.yy",},
|
||||||
{"name":"s_node_rigid_variable","order":8,"path":"sprites/s_node_rigid_variable/s_node_rigid_variable.yy",},
|
{"name":"s_node_rigid_variable","order":8,"path":"sprites/s_node_rigid_variable/s_node_rigid_variable.yy",},
|
||||||
{"name":"safe_operation","order":6,"path":"scripts/safe_operation/safe_operation.yy",},
|
{"name":"safe_operation","order":6,"path":"scripts/safe_operation/safe_operation.yy",},
|
||||||
|
@ -1142,6 +1145,7 @@
|
||||||
{"name":"node_PCX_fn_surface_width","order":1,"path":"scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.yy",},
|
{"name":"node_PCX_fn_surface_width","order":1,"path":"scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.yy",},
|
||||||
{"name":"o_main","order":1,"path":"objects/o_main/o_main.yy",},
|
{"name":"o_main","order":1,"path":"objects/o_main/o_main.yy",},
|
||||||
{"name":"area_function","order":2,"path":"scripts/area_function/area_function.yy",},
|
{"name":"area_function","order":2,"path":"scripts/area_function/area_function.yy",},
|
||||||
|
{"name":"__node_shader_processor","order":23,"path":"scripts/__node_shader_processor/__node_shader_processor.yy",},
|
||||||
{"name":"Obj_FirebaseFirestore_Collection_Query_options_value","order":11,"path":"objects/Obj_FirebaseFirestore_Collection_Query_options_value/Obj_FirebaseFirestore_Collection_Query_options_value.yy",},
|
{"name":"Obj_FirebaseFirestore_Collection_Query_options_value","order":11,"path":"objects/Obj_FirebaseFirestore_Collection_Query_options_value/Obj_FirebaseFirestore_Collection_Query_options_value.yy",},
|
||||||
{"name":"__node_3d_mesh","order":1,"path":"scripts/__node_3d_mesh/__node_3d_mesh.yy",},
|
{"name":"__node_3d_mesh","order":1,"path":"scripts/__node_3d_mesh/__node_3d_mesh.yy",},
|
||||||
{"name":"d3d_surface_extrude","order":7,"path":"scripts/d3d_surface_extrude/d3d_surface_extrude.yy",},
|
{"name":"d3d_surface_extrude","order":7,"path":"scripts/d3d_surface_extrude/d3d_surface_extrude.yy",},
|
||||||
|
@ -1198,6 +1202,7 @@
|
||||||
{"name":"Obj_FirebaseREST_Listener_On_firestore_document","order":3,"path":"objects/Obj_FirebaseREST_Listener_On_firestore_document/Obj_FirebaseREST_Listener_On_firestore_document.yy",},
|
{"name":"Obj_FirebaseREST_Listener_On_firestore_document","order":3,"path":"objects/Obj_FirebaseREST_Listener_On_firestore_document/Obj_FirebaseREST_Listener_On_firestore_document.yy",},
|
||||||
{"name":"sh_blend_add_alpha_adj","order":2,"path":"shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.yy",},
|
{"name":"sh_blend_add_alpha_adj","order":2,"path":"shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.yy",},
|
||||||
{"name":"preview_overlay_area","order":3,"path":"scripts/preview_overlay_area/preview_overlay_area.yy",},
|
{"name":"preview_overlay_area","order":3,"path":"scripts/preview_overlay_area/preview_overlay_area.yy",},
|
||||||
|
{"name":"sh_perlin_extra","order":9,"path":"shaders/sh_perlin_extra/sh_perlin_extra.yy",},
|
||||||
{"name":"node_text","order":4,"path":"scripts/node_text/node_text.yy",},
|
{"name":"node_text","order":4,"path":"scripts/node_text/node_text.yy",},
|
||||||
{"name":"panel_collection","order":3,"path":"scripts/panel_collection/panel_collection.yy",},
|
{"name":"panel_collection","order":3,"path":"scripts/panel_collection/panel_collection.yy",},
|
||||||
{"name":"node_string_trim","order":4,"path":"scripts/node_string_trim/node_string_trim.yy",},
|
{"name":"node_string_trim","order":4,"path":"scripts/node_string_trim/node_string_trim.yy",},
|
||||||
|
@ -1551,6 +1556,7 @@
|
||||||
{"name":"sh_blend_screen","order":3,"path":"shaders/sh_blend_screen/sh_blend_screen.yy",},
|
{"name":"sh_blend_screen","order":3,"path":"shaders/sh_blend_screen/sh_blend_screen.yy",},
|
||||||
{"name":"node_group_output","order":2,"path":"scripts/node_group_output/node_group_output.yy",},
|
{"name":"node_group_output","order":2,"path":"scripts/node_group_output/node_group_output.yy",},
|
||||||
{"name":"s_node_palette_extract","order":12,"path":"sprites/s_node_palette_extract/s_node_palette_extract.yy",},
|
{"name":"s_node_palette_extract","order":12,"path":"sprites/s_node_palette_extract/s_node_palette_extract.yy",},
|
||||||
|
{"name":"node_perlin_extra","order":10,"path":"scripts/node_perlin_extra/node_perlin_extra.yy",},
|
||||||
{"name":"node_palette_replacement","order":2,"path":"scripts/node_palette_replacement/node_palette_replacement.yy",},
|
{"name":"node_palette_replacement","order":2,"path":"scripts/node_palette_replacement/node_palette_replacement.yy",},
|
||||||
{"name":"s_node_scatter","order":19,"path":"sprites/s_node_scatter/s_node_scatter.yy",},
|
{"name":"s_node_scatter","order":19,"path":"sprites/s_node_scatter/s_node_scatter.yy",},
|
||||||
{"name":"s_node_bokeh","order":51,"path":"sprites/s_node_bokeh/s_node_bokeh.yy",},
|
{"name":"s_node_bokeh","order":51,"path":"sprites/s_node_bokeh/s_node_bokeh.yy",},
|
||||||
|
|
|
@ -673,7 +673,6 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_panel_active.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_panel_active.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_panel_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_panel_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_panel_fg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_panel_fg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_panel_inner_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_panel_tab.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_panel_tab.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_scroll_bar.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_scroll_bar.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_selection.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_ui_selection.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
||||||
|
@ -719,7 +718,7 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"1 image import.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"1 image import.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"1 image import.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"1 image import.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"10 RigidSim.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"10 RigidSim.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"11 Fluid sim.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"11 Smoke sim.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"12 Strand sim.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"12 Strand sim.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"13 Expression.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"13 Expression.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"14 Audio.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"14 Audio.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
|
@ -742,9 +741,6 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"card_clubs_03.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"card_clubs_03.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"card_clubs_04.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"card_clubs_04.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"card_clubs_05.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"card_clubs_05.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"back-buildings.png","CopyToMask":-1,"filePath":"datafiles/Getting started/cyberpunk street",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"far-buildings.png","CopyToMask":-1,"filePath":"datafiles/Getting started/cyberpunk street",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"foreground.png","CopyToMask":-1,"filePath":"datafiles/Getting started/cyberpunk street",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"dice_1.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"dice_1.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"dice_2.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"dice_2.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"dice_3.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"dice_3.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
|
@ -1092,6 +1088,7 @@
|
||||||
{"id":{"name":"s_workshop_badge","path":"sprites/s_workshop_badge/s_workshop_badge.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_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_compare","path":"scripts/node_compare/node_compare.yy",},},
|
||||||
|
{"id":{"name":"node_3d_transform","path":"scripts/node_3d_transform/node_3d_transform.yy",},},
|
||||||
{"id":{"name":"node_iterator_each_size","path":"scripts/node_iterator_each_size/node_iterator_each_size.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",},},
|
{"id":{"name":"sh_trans_node_prev_drop","path":"shaders/sh_trans_node_prev_drop/sh_trans_node_prev_drop.yy",},},
|
||||||
{"id":{"name":"fd_draw_self_to_collision_mask_surface","path":"scripts/fd_draw_self_to_collision_mask_surface/fd_draw_self_to_collision_mask_surface.yy",},},
|
{"id":{"name":"fd_draw_self_to_collision_mask_surface","path":"scripts/fd_draw_self_to_collision_mask_surface/fd_draw_self_to_collision_mask_surface.yy",},},
|
||||||
|
@ -1145,7 +1142,7 @@
|
||||||
{"id":{"name":"text_file","path":"scripts/text_file/text_file.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":"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":"s_node_pb_draw_diamond","path":"sprites/s_node_pb_draw_diamond/s_node_pb_draw_diamond.yy",},},
|
||||||
{"id":{"name":"node_3d_transform","path":"scripts/node_3d_transform/node_3d_transform.yy",},},
|
{"id":{"name":"node_3d_transform_scene","path":"scripts/node_3d_transform_scene/node_3d_transform_scene.yy",},},
|
||||||
{"id":{"name":"sh_trail_filler_pass1","path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.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_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_pb_fx_strip","path":"sprites/s_node_pb_fx_strip/s_node_pb_fx_strip.yy",},},
|
||||||
|
@ -1706,6 +1703,7 @@
|
||||||
{"id":{"name":"sh_greyscale","path":"shaders/sh_greyscale/sh_greyscale.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":"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":"s_node_pb_box_mirror","path":"sprites/s_node_pb_box_mirror/s_node_pb_box_mirror.yy",},},
|
||||||
|
{"id":{"name":"__node_shader_generator","path":"scripts/__node_shader_generator/__node_shader_generator.yy",},},
|
||||||
{"id":{"name":"node_global","path":"scripts/node_global/node_global.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":"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",},},
|
{"id":{"name":"s_node_draw_stack","path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",},},
|
||||||
|
@ -1748,6 +1746,7 @@
|
||||||
{"id":{"name":"s_node_flood_fill","path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",},},
|
{"id":{"name":"s_node_flood_fill","path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",},},
|
||||||
{"id":{"name":"json_compare","path":"scripts/json_compare/json_compare.yy",},},
|
{"id":{"name":"json_compare","path":"scripts/json_compare/json_compare.yy",},},
|
||||||
{"id":{"name":"node_rigid_force_apply","path":"scripts/node_rigid_force_apply/node_rigid_force_apply.yy",},},
|
{"id":{"name":"node_rigid_force_apply","path":"scripts/node_rigid_force_apply/node_rigid_force_apply.yy",},},
|
||||||
|
{"id":{"name":"__node_shader","path":"scripts/__node_shader/__node_shader.yy",},},
|
||||||
{"id":{"name":"__node_iterator","path":"scripts/__node_iterator/__node_iterator.yy",},},
|
{"id":{"name":"__node_iterator","path":"scripts/__node_iterator/__node_iterator.yy",},},
|
||||||
{"id":{"name":"s_node_rigid_variable","path":"sprites/s_node_rigid_variable/s_node_rigid_variable.yy",},},
|
{"id":{"name":"s_node_rigid_variable","path":"sprites/s_node_rigid_variable/s_node_rigid_variable.yy",},},
|
||||||
{"id":{"name":"safe_operation","path":"scripts/safe_operation/safe_operation.yy",},},
|
{"id":{"name":"safe_operation","path":"scripts/safe_operation/safe_operation.yy",},},
|
||||||
|
@ -1832,6 +1831,7 @@
|
||||||
{"id":{"name":"node_PCX_fn_surface_width","path":"scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.yy",},},
|
{"id":{"name":"node_PCX_fn_surface_width","path":"scripts/node_PCX_fn_surface_width/node_PCX_fn_surface_width.yy",},},
|
||||||
{"id":{"name":"o_main","path":"objects/o_main/o_main.yy",},},
|
{"id":{"name":"o_main","path":"objects/o_main/o_main.yy",},},
|
||||||
{"id":{"name":"area_function","path":"scripts/area_function/area_function.yy",},},
|
{"id":{"name":"area_function","path":"scripts/area_function/area_function.yy",},},
|
||||||
|
{"id":{"name":"__node_shader_processor","path":"scripts/__node_shader_processor/__node_shader_processor.yy",},},
|
||||||
{"id":{"name":"Obj_FirebaseFirestore_Collection_Query_options_value","path":"objects/Obj_FirebaseFirestore_Collection_Query_options_value/Obj_FirebaseFirestore_Collection_Query_options_value.yy",},},
|
{"id":{"name":"Obj_FirebaseFirestore_Collection_Query_options_value","path":"objects/Obj_FirebaseFirestore_Collection_Query_options_value/Obj_FirebaseFirestore_Collection_Query_options_value.yy",},},
|
||||||
{"id":{"name":"__node_3d_mesh","path":"scripts/__node_3d_mesh/__node_3d_mesh.yy",},},
|
{"id":{"name":"__node_3d_mesh","path":"scripts/__node_3d_mesh/__node_3d_mesh.yy",},},
|
||||||
{"id":{"name":"Obj_FirebaseFirestore_Collection_Query","path":"objects/Obj_FirebaseFirestore_Collection_Query/Obj_FirebaseFirestore_Collection_Query.yy",},},
|
{"id":{"name":"Obj_FirebaseFirestore_Collection_Query","path":"objects/Obj_FirebaseFirestore_Collection_Query/Obj_FirebaseFirestore_Collection_Query.yy",},},
|
||||||
|
@ -1894,6 +1894,7 @@
|
||||||
{"id":{"name":"Obj_FirebaseREST_Listener_On_firestore_document","path":"objects/Obj_FirebaseREST_Listener_On_firestore_document/Obj_FirebaseREST_Listener_On_firestore_document.yy",},},
|
{"id":{"name":"Obj_FirebaseREST_Listener_On_firestore_document","path":"objects/Obj_FirebaseREST_Listener_On_firestore_document/Obj_FirebaseREST_Listener_On_firestore_document.yy",},},
|
||||||
{"id":{"name":"sh_blend_add_alpha_adj","path":"shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.yy",},},
|
{"id":{"name":"sh_blend_add_alpha_adj","path":"shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.yy",},},
|
||||||
{"id":{"name":"preview_overlay_area","path":"scripts/preview_overlay_area/preview_overlay_area.yy",},},
|
{"id":{"name":"preview_overlay_area","path":"scripts/preview_overlay_area/preview_overlay_area.yy",},},
|
||||||
|
{"id":{"name":"sh_perlin_extra","path":"shaders/sh_perlin_extra/sh_perlin_extra.yy",},},
|
||||||
{"id":{"name":"node_text","path":"scripts/node_text/node_text.yy",},},
|
{"id":{"name":"node_text","path":"scripts/node_text/node_text.yy",},},
|
||||||
{"id":{"name":"panel_collection","path":"scripts/panel_collection/panel_collection.yy",},},
|
{"id":{"name":"panel_collection","path":"scripts/panel_collection/panel_collection.yy",},},
|
||||||
{"id":{"name":"contextMenu_controller","path":"scripts/contextMenu_controller/contextMenu_controller.yy",},},
|
{"id":{"name":"contextMenu_controller","path":"scripts/contextMenu_controller/contextMenu_controller.yy",},},
|
||||||
|
@ -2307,6 +2308,7 @@
|
||||||
{"id":{"name":"sh_blend_screen","path":"shaders/sh_blend_screen/sh_blend_screen.yy",},},
|
{"id":{"name":"sh_blend_screen","path":"shaders/sh_blend_screen/sh_blend_screen.yy",},},
|
||||||
{"id":{"name":"node_group_output","path":"scripts/node_group_output/node_group_output.yy",},},
|
{"id":{"name":"node_group_output","path":"scripts/node_group_output/node_group_output.yy",},},
|
||||||
{"id":{"name":"s_node_palette_extract","path":"sprites/s_node_palette_extract/s_node_palette_extract.yy",},},
|
{"id":{"name":"s_node_palette_extract","path":"sprites/s_node_palette_extract/s_node_palette_extract.yy",},},
|
||||||
|
{"id":{"name":"node_perlin_extra","path":"scripts/node_perlin_extra/node_perlin_extra.yy",},},
|
||||||
{"id":{"name":"node_palette_replacement","path":"scripts/node_palette_replacement/node_palette_replacement.yy",},},
|
{"id":{"name":"node_palette_replacement","path":"scripts/node_palette_replacement/node_palette_replacement.yy",},},
|
||||||
{"id":{"name":"s_node_scatter","path":"sprites/s_node_scatter/s_node_scatter.yy",},},
|
{"id":{"name":"s_node_scatter","path":"sprites/s_node_scatter/s_node_scatter.yy",},},
|
||||||
{"id":{"name":"s_node_bokeh","path":"sprites/s_node_bokeh/s_node_bokeh.yy",},},
|
{"id":{"name":"s_node_bokeh","path":"sprites/s_node_bokeh/s_node_bokeh.yy",},},
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -73,6 +73,7 @@ event_inherited();
|
||||||
if(node_called == noone && junction_hovering == noone) return true;
|
if(node_called == noone && junction_hovering == noone) return true;
|
||||||
if(!struct_has(node, "node")) return true;
|
if(!struct_has(node, "node")) return true;
|
||||||
if(!struct_has(global.NODE_GUIDE, node.node)) return true;
|
if(!struct_has(global.NODE_GUIDE, node.node)) return true;
|
||||||
|
if(is_instanceof(node, NodeObject) && node.is_patreon_extra && !IS_PATREON) return false;
|
||||||
|
|
||||||
var io = global.NODE_GUIDE[$ node.node];
|
var io = global.NODE_GUIDE[$ node.node];
|
||||||
|
|
||||||
|
@ -156,7 +157,7 @@ event_inherited();
|
||||||
if(category == NODE_CATEGORY && _node.show_in_recent) {
|
if(category == NODE_CATEGORY && _node.show_in_recent) {
|
||||||
array_remove(global.RECENT_NODES, _node.node);
|
array_remove(global.RECENT_NODES, _node.node);
|
||||||
array_insert(global.RECENT_NODES, 0, _node.node);
|
array_insert(global.RECENT_NODES, 0, _node.node);
|
||||||
if(array_length(global.RECENT_NODES) > 20)
|
if(array_length(global.RECENT_NODES) > PREFERENCES.node_recents_amount)
|
||||||
array_pop(global.RECENT_NODES);
|
array_pop(global.RECENT_NODES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,16 +435,6 @@ event_inherited();
|
||||||
rightClick(_node);
|
rightClick(_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
var spr_x = _boxx + grid_size / 2;
|
|
||||||
var spr_y = yy + grid_size / 2;
|
|
||||||
|
|
||||||
if(variable_struct_exists(_node, "getSpr")) _node.getSpr();
|
|
||||||
if(sprite_exists(_node.spr))
|
|
||||||
draw_sprite_ui_uniform(_node.spr, 0, spr_x, spr_y, 0.5);
|
|
||||||
|
|
||||||
if(is_instanceof(_node, NodeAction))
|
|
||||||
draw_sprite_ui_uniform(THEME.play_action, 0, _boxx + grid_size - 16, yy + grid_size - 16, 1, COLORS.add_node_blend_action);
|
|
||||||
|
|
||||||
if(_node.getTooltip() != "") {
|
if(_node.getTooltip() != "") {
|
||||||
if(point_in_rectangle(_m[0], _m[1], _boxx, yy, _boxx + ui(16), yy + ui(16))) {
|
if(point_in_rectangle(_m[0], _m[1], _boxx, yy, _boxx + ui(16), yy + ui(16))) {
|
||||||
draw_sprite_ui_uniform(THEME.info, 0, _boxx + ui(8), yy + ui(8), 0.7, COLORS._main_icon, 1.0);
|
draw_sprite_ui_uniform(THEME.info, 0, _boxx + ui(8), yy + ui(8), 0.7, COLORS._main_icon, 1.0);
|
||||||
|
@ -454,19 +445,18 @@ event_inherited();
|
||||||
draw_sprite_ui_uniform(THEME.info, 0, _boxx + ui(8), yy + ui(8), 0.7, COLORS._main_icon, 0.5);
|
draw_sprite_ui_uniform(THEME.info, 0, _boxx + ui(8), yy + ui(8), 0.7, COLORS._main_icon, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_node.new_node) {
|
|
||||||
draw_sprite_ui_uniform(THEME.node_new_badge, 0, _boxx + grid_size - ui(12), yy + ui(6),, COLORS._main_accent);
|
|
||||||
draw_sprite_ui_uniform(THEME.node_new_badge, 1, _boxx + grid_size - ui(12), yy + ui(6));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(struct_try_get(_node, "deprecated")) {
|
|
||||||
draw_sprite_ui_uniform(THEME.node_deprecated_badge, 0, _boxx + grid_size - ui(12), yy + ui(6),, COLORS._main_value_negative);
|
|
||||||
draw_sprite_ui_uniform(THEME.node_deprecated_badge, 1, _boxx + grid_size - ui(12), yy + ui(6));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(is_instanceof(_node, NodeObject)) {
|
if(is_instanceof(_node, NodeObject)) {
|
||||||
var fav = array_exists(global.FAV_NODES, _node.node);
|
_node.drawGrid(_boxx, yy, _m[0], _m[1], grid_size);
|
||||||
if(fav) draw_sprite_ui_uniform(THEME.star, 0, _boxx + grid_size - ui(10), yy + grid_size - ui(10), 0.7, COLORS._main_accent, 1.);
|
} else {
|
||||||
|
var spr_x = _boxx + grid_size / 2;
|
||||||
|
var spr_y = yy + grid_size / 2;
|
||||||
|
|
||||||
|
if(variable_struct_exists(_node, "getSpr")) _node.getSpr();
|
||||||
|
if(sprite_exists(_node.spr))
|
||||||
|
draw_sprite_ui_uniform(_node.spr, 0, spr_x, spr_y, 0.5);
|
||||||
|
|
||||||
|
if(is_instanceof(_node, NodeAction))
|
||||||
|
draw_sprite_ui_uniform(THEME.play_action, 0, _boxx + grid_size - 16, yy + grid_size - 16, 1, COLORS.add_node_blend_action);
|
||||||
}
|
}
|
||||||
|
|
||||||
var _name = _node.getName();
|
var _name = _node.getName();
|
||||||
|
@ -486,6 +476,7 @@ event_inherited();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ADD_NODE_PAGE > -1 && PREFERENCES.dialog_add_node_grouping) {
|
||||||
var len = array_length(group_labels);
|
var len = array_length(group_labels);
|
||||||
if(len) {
|
if(len) {
|
||||||
gpu_set_blendmode(bm_subtract);
|
gpu_set_blendmode(bm_subtract);
|
||||||
|
@ -505,6 +496,7 @@ event_inherited();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(ui(16 + 16), _yy + ui(12), lb.text);
|
draw_text(ui(16 + 16), _yy + ui(12), lb.text);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
hh += curr_height;
|
hh += curr_height;
|
||||||
yy += curr_height;
|
yy += curr_height;
|
||||||
|
@ -540,30 +532,30 @@ event_inherited();
|
||||||
|
|
||||||
if(++bg_ind % 2) {
|
if(++bg_ind % 2) {
|
||||||
BLEND_OVERRIDE;
|
BLEND_OVERRIDE;
|
||||||
draw_sprite_stretched_ext(THEME.node_bg, 0, ui(4), yy, list_width - ui(8), list_height, c_white, 0.2);
|
draw_sprite_stretched_ext(THEME.node_bg, 0, ui(16), yy, list_width - ui(32), list_height, c_white, 0.1);
|
||||||
BLEND_NORMAL;
|
BLEND_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, list_width, yy + list_height - 1)) {
|
if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, list_width, yy + list_height - 1)) {
|
||||||
if(_node.getTooltip() != "") {
|
if(_node.getTooltip() != "") {
|
||||||
node_tooltip = _node;
|
node_tooltip = _node;
|
||||||
node_tooltip_x = content_pane.x + 0;
|
node_tooltip_x = content_pane.x + ui(16);
|
||||||
node_tooltip_y = content_pane.y + yy
|
node_tooltip_y = content_pane.y + yy
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_sprite_stretched_ext(THEME.node_active, 0, ui(4), yy, list_width - ui(8), list_height, COLORS._main_accent, 1);
|
draw_sprite_stretched_ext(THEME.node_active, 0, ui(16), yy, list_width - ui(32), list_height, COLORS._main_accent, 1);
|
||||||
if(mouse_press(mb_left, sFOCUS))
|
if(mouse_press(mb_left, sFOCUS))
|
||||||
buildNode(_node);
|
buildNode(_node);
|
||||||
else if(mouse_press(mb_right, sFOCUS))
|
else if(mouse_press(mb_right, sFOCUS))
|
||||||
rightClick(_node);
|
rightClick(_node);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_instanceof(_node, NodeObject)) {
|
var tx = list_height + ui(52);
|
||||||
var fav = array_exists(global.FAV_NODES, _node.node);
|
|
||||||
if(fav) draw_sprite_ui_uniform(THEME.star, 0, ui(20), yy + list_height / 2, 0.7, COLORS._main_accent, 1.);
|
|
||||||
}
|
|
||||||
|
|
||||||
var spr_x = list_height / 2 + ui(32);
|
if(is_instanceof(_node, NodeObject)) {
|
||||||
|
tx = _node.drawList(0, yy, _m[0], _m[1], list_height);
|
||||||
|
} else {
|
||||||
|
var spr_x = list_height / 2 + ui(44);
|
||||||
var spr_y = yy + list_height / 2;
|
var spr_y = yy + list_height / 2;
|
||||||
|
|
||||||
if(variable_struct_exists(_node, "getSpr")) _node.getSpr();
|
if(variable_struct_exists(_node, "getSpr")) _node.getSpr();
|
||||||
|
@ -575,27 +567,15 @@ event_inherited();
|
||||||
if(is_instanceof(_node, NodeAction))
|
if(is_instanceof(_node, NodeAction))
|
||||||
draw_sprite_ui_uniform(THEME.play_action, 0, spr_x + list_height / 2 - 8, spr_y + list_height / 2 - 8, 0.5, COLORS.add_node_blend_action);
|
draw_sprite_ui_uniform(THEME.play_action, 0, spr_x + list_height / 2 - 8, spr_y + list_height / 2 - 8, 0.5, COLORS.add_node_blend_action);
|
||||||
|
|
||||||
var tx = list_height + ui(40);
|
|
||||||
|
|
||||||
if(_node.new_node) {
|
|
||||||
draw_sprite_ui_uniform(THEME.node_new_badge, 0, tx + ui(16), yy + list_height / 2 + ui(1),, COLORS._main_accent);
|
|
||||||
draw_sprite_ui_uniform(THEME.node_new_badge, 1, tx + ui(16), yy + list_height / 2 + ui(1));
|
|
||||||
tx += ui(40);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(struct_try_get(_node, "deprecated")) {
|
|
||||||
draw_sprite_ui_uniform(THEME.node_deprecated_badge, 0, tx + ui(16), yy + list_height / 2 + ui(1),, COLORS._main_value_negative);
|
|
||||||
draw_sprite_ui_uniform(THEME.node_deprecated_badge, 1, tx + ui(16), yy + list_height / 2 + ui(1));
|
|
||||||
tx += ui(40);
|
|
||||||
}
|
|
||||||
|
|
||||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text_add(tx, yy + list_height / 2, _node.getName());
|
draw_text_add(tx, yy + list_height / 2, _node.getName());
|
||||||
|
}
|
||||||
|
|
||||||
yy += list_height;
|
yy += list_height;
|
||||||
hh += list_height;
|
hh += list_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ADD_NODE_PAGE > -1 && PREFERENCES.dialog_add_node_grouping) {
|
||||||
gpu_set_blendmode(bm_subtract);
|
gpu_set_blendmode(bm_subtract);
|
||||||
draw_set_color(c_white);
|
draw_set_color(c_white);
|
||||||
draw_rectangle(0, 0, content_pane.surface_w, ui(16 + 24 / 2), false);
|
draw_rectangle(0, 0, content_pane.surface_w, ui(16 + 24 / 2), false);
|
||||||
|
@ -607,13 +587,14 @@ event_inherited();
|
||||||
var _yy = max(lb.y, i == len - 1? ui(8) : min(ui(8), group_labels[i + 1].y - ui(32)));
|
var _yy = max(lb.y, i == len - 1? ui(8) : min(ui(8), group_labels[i + 1].y - ui(32)));
|
||||||
|
|
||||||
BLEND_OVERRIDE;
|
BLEND_OVERRIDE;
|
||||||
draw_sprite_stretched(THEME.group_label, 0, ui(16), _yy, content_pane.surface_w - ui(32), ui(24));
|
draw_sprite_stretched_ext(THEME.group_label, 0, ui(16), _yy, content_pane.surface_w - ui(32), ui(24), c_white, 0.3);
|
||||||
BLEND_NORMAL;
|
BLEND_NORMAL;
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(ui(16 + 16), _yy + ui(12), lb.text);
|
draw_text(ui(16 + 16), _yy + ui(12), lb.text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(ADD_NODE_PAGE == -1)
|
if(ADD_NODE_PAGE == -1)
|
||||||
ds_list_destroy(_list);
|
ds_list_destroy(_list);
|
||||||
|
@ -768,32 +749,6 @@ event_inherited();
|
||||||
draw_sprite_stretched_ext(THEME.node_bg, 0, _boxx, yy, grid_size, grid_size, COLORS.dialog_add_node_collection, 1);
|
draw_sprite_stretched_ext(THEME.node_bg, 0, _boxx, yy, grid_size, grid_size, COLORS.dialog_add_node_collection, 1);
|
||||||
BLEND_NORMAL;
|
BLEND_NORMAL;
|
||||||
|
|
||||||
if(variable_struct_exists(_node, "getSpr")) _node.getSpr();
|
|
||||||
if(sprite_exists(_node.spr)) {
|
|
||||||
var _si = current_time * PREFERENCES.collection_preview_speed / 3000;
|
|
||||||
var _sw = sprite_get_width(_node.spr);
|
|
||||||
var _sh = sprite_get_height(_node.spr);
|
|
||||||
var _ss = ui(32) / max(_sw, _sh);
|
|
||||||
|
|
||||||
var _sox = sprite_get_xoffset(_node.spr);
|
|
||||||
var _soy = sprite_get_yoffset(_node.spr);
|
|
||||||
|
|
||||||
var _sx = _boxx + grid_size / 2;
|
|
||||||
var _sy = yy + grid_size / 2;
|
|
||||||
_sx += _sw * _ss / 2 - _sox * _ss;
|
|
||||||
_sy += _sh * _ss / 2 - _soy * _ss;
|
|
||||||
|
|
||||||
draw_sprite_ext(_node.spr, _si, _sx, _sy, _ss, _ss, 0, c_white, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(is_instanceof(_node, NodeAction))
|
|
||||||
draw_sprite_ui_uniform(THEME.play_action, 0, _boxx + grid_size - 16, yy + grid_size - 16, 1, COLORS.add_node_blend_action);
|
|
||||||
|
|
||||||
draw_set_text(f_p2, fa_center, fa_top, COLORS._main_text);
|
|
||||||
var txt = _node.getName();
|
|
||||||
name_height = max(name_height, string_height_ext(txt, -1, grid_width) + ui(8));
|
|
||||||
draw_text_ext_add(_boxx + grid_size / 2, yy + grid_size + 4, txt, -1, grid_width);
|
|
||||||
|
|
||||||
if(_hover && point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_width, yy + grid_size)) {
|
if(_hover && point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_width, yy + grid_size)) {
|
||||||
node_selecting = i;
|
node_selecting = i;
|
||||||
if(mouse_press(mb_left, sFOCUS))
|
if(mouse_press(mb_left, sFOCUS))
|
||||||
|
@ -817,11 +772,39 @@ event_inherited();
|
||||||
} else
|
} else
|
||||||
draw_sprite_ui_uniform(THEME.info, 0, _boxx + ui(8), yy + ui(8), 0.7, COLORS._main_icon, 0.5);
|
draw_sprite_ui_uniform(THEME.info, 0, _boxx + ui(8), yy + ui(8), 0.7, COLORS._main_icon, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_instanceof(_node, NodeObject)) {
|
if(is_instanceof(_node, NodeObject)) {
|
||||||
var fav = struct_has(_node, "node") && array_exists(global.FAV_NODES, _node.node);
|
_node.drawGrid(_boxx, yy, _m[0], _m[1], grid_size);
|
||||||
if(fav) draw_sprite_ui_uniform(THEME.star, 0, _boxx + grid_size - ui(10), yy + grid_size - ui(10), 0.7, COLORS._main_accent, 1.);
|
} else {
|
||||||
|
if(variable_struct_exists(_node, "getSpr")) _node.getSpr();
|
||||||
|
if(sprite_exists(_node.spr)) {
|
||||||
|
var _si = current_time * PREFERENCES.collection_preview_speed / 3000;
|
||||||
|
var _sw = sprite_get_width(_node.spr);
|
||||||
|
var _sh = sprite_get_height(_node.spr);
|
||||||
|
var _ss = ui(32) / max(_sw, _sh);
|
||||||
|
|
||||||
|
var _sox = sprite_get_xoffset(_node.spr);
|
||||||
|
var _soy = sprite_get_yoffset(_node.spr);
|
||||||
|
|
||||||
|
var _sx = _boxx + grid_size / 2;
|
||||||
|
var _sy = yy + grid_size / 2;
|
||||||
|
_sx += _sw * _ss / 2 - _sox * _ss;
|
||||||
|
_sy += _sh * _ss / 2 - _soy * _ss;
|
||||||
|
|
||||||
|
draw_sprite_ext(_node.spr, _si, _sx, _sy, _ss, _ss, 0, c_white, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(is_instanceof(_node, NodeAction))
|
||||||
|
draw_sprite_ui_uniform(THEME.play_action, 0, _boxx + grid_size - 16, yy + grid_size - 16, 1, COLORS.add_node_blend_action);
|
||||||
|
}
|
||||||
|
|
||||||
|
var _name = _node.getName();
|
||||||
|
|
||||||
|
draw_set_text(f_p2, fa_center, fa_top, COLORS._main_text);
|
||||||
|
draw_text_ext_add(_boxx + grid_size / 2, yy + grid_size + 4, _name, -1, grid_width);
|
||||||
|
|
||||||
|
name_height = max(name_height, string_height_ext(_name, -1, grid_width) + ui(8));
|
||||||
|
|
||||||
if(node_focusing == i)
|
if(node_focusing == i)
|
||||||
search_pane.scroll_y_to = -max(0, hh - search_pane.h);
|
search_pane.scroll_y_to = -max(0, hh - search_pane.h);
|
||||||
|
|
||||||
|
@ -854,6 +837,29 @@ event_inherited();
|
||||||
BLEND_NORMAL;
|
BLEND_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, list_width, yy + list_height - 1)) {
|
||||||
|
if(struct_has(_node, "tooltip") && _node.getTooltip() != "") {
|
||||||
|
node_tooltip = _node;
|
||||||
|
node_tooltip_x = search_pane.x + 0;
|
||||||
|
node_tooltip_y = search_pane.y + yy
|
||||||
|
}
|
||||||
|
|
||||||
|
node_selecting = i;
|
||||||
|
if(mouse_press(mb_left, sFOCUS))
|
||||||
|
buildNode(_node, _param);
|
||||||
|
else if(struct_has(_node, "node") && mouse_press(mb_right, sFOCUS))
|
||||||
|
rightClick(_node);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(node_selecting == i) {
|
||||||
|
draw_sprite_stretched_ext(THEME.node_active, 0, ui(4), yy, list_width - ui(8), list_height, COLORS._main_accent, 1);
|
||||||
|
if(keyboard_check_pressed(vk_enter))
|
||||||
|
buildNode(_node, _param);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_instanceof(_node, NodeObject)) {
|
||||||
|
_node.drawList(0, yy, _m[0], _m[1], list_height);
|
||||||
|
} else {
|
||||||
if(variable_struct_exists(_node, "getSpr")) _node.getSpr();
|
if(variable_struct_exists(_node, "getSpr")) _node.getSpr();
|
||||||
if(sprite_exists(_node.spr)) {
|
if(sprite_exists(_node.spr)) {
|
||||||
var _si = current_time * PREFERENCES.collection_preview_speed / 3000;
|
var _si = current_time * PREFERENCES.collection_preview_speed / 3000;
|
||||||
|
@ -875,36 +881,11 @@ event_inherited();
|
||||||
draw_sprite_ui_uniform(THEME.play_action, 0, _sx + list_height / 2 - 8, _sy + list_height / 2 - 8, 0.5, COLORS.add_node_blend_action);
|
draw_sprite_ui_uniform(THEME.play_action, 0, _sx + list_height / 2 - 8, _sy + list_height / 2 - 8, 0.5, COLORS.add_node_blend_action);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_instanceof(_node, NodeObject)) {
|
|
||||||
var fav = struct_has(_node, "node") && array_exists(global.FAV_NODES, _node.node);
|
|
||||||
if(fav) draw_sprite_ui_uniform(THEME.star, 0, ui(20), yy + list_height / 2, 0.7, COLORS._main_accent, 1.);
|
|
||||||
}
|
|
||||||
|
|
||||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text_add(list_height + ui(40), yy + list_height / 2, _node.getName());
|
draw_text_add(list_height + ui(40), yy + list_height / 2, _node.getName());
|
||||||
|
|
||||||
if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, list_width, yy + list_height - 1)) {
|
|
||||||
if(struct_has(_node, "tooltip") && _node.getTooltip() != "") {
|
|
||||||
node_tooltip = _node;
|
|
||||||
node_tooltip_x = search_pane.x + 0;
|
|
||||||
node_tooltip_y = search_pane.y + yy
|
|
||||||
}
|
}
|
||||||
|
|
||||||
node_selecting = i;
|
if(node_focusing == i) search_pane.scroll_y_to = -max(0, hh - search_pane.h);
|
||||||
if(mouse_press(mb_left, sFOCUS))
|
|
||||||
buildNode(_node, _param);
|
|
||||||
else if(struct_has(_node, "node") && mouse_press(mb_right, sFOCUS))
|
|
||||||
rightClick(_node);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(node_selecting == i) {
|
|
||||||
draw_sprite_stretched_ext(THEME.node_active, 0, ui(4), yy, list_width - ui(8), list_height, COLORS._main_accent, 1);
|
|
||||||
if(keyboard_check_pressed(vk_enter))
|
|
||||||
buildNode(_node, _param);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(node_focusing == i)
|
|
||||||
search_pane.scroll_y_to = -max(0, hh - search_pane.h);
|
|
||||||
|
|
||||||
hh += list_height;
|
hh += list_height;
|
||||||
yy += list_height;
|
yy += list_height;
|
||||||
|
|
|
@ -226,6 +226,45 @@ event_inherited();
|
||||||
PREF_SAVE();
|
PREF_SAVE();
|
||||||
})
|
})
|
||||||
));
|
));
|
||||||
|
|
||||||
|
ds_list_add(pref_global, __txt("Libraries"));
|
||||||
|
|
||||||
|
ds_list_add(pref_global, new __Panel_Linear_Setting_Item_Preference(
|
||||||
|
__txtx("pref_directory_ImageMagick", "ImageMagick path*"),
|
||||||
|
"ImageMagick_path",
|
||||||
|
new textBox(TEXTBOX_INPUT.text, function(txt) { PREFERENCES.ImageMagick_path = txt; PREF_SAVE(); })
|
||||||
|
.setSideButton(button(function() { PREFERENCES.ImageMagick_path = get_directory(PREFERENCES.ImageMagick_path); PREF_SAVE(); }, THEME.button_path_icon))
|
||||||
|
.setFont(f_p2)
|
||||||
|
.setEmpty(),
|
||||||
|
));
|
||||||
|
|
||||||
|
ds_list_add(pref_global, new __Panel_Linear_Setting_Item_Preference(
|
||||||
|
__txtx("pref_directory_webp", "Webp path*"),
|
||||||
|
"webp_path",
|
||||||
|
new textBox(TEXTBOX_INPUT.text, function(txt) { PREFERENCES.webp_path = txt; PREF_SAVE(); })
|
||||||
|
.setSideButton(button(function() { PREFERENCES.webp_path = get_directory(PREFERENCES.webp_path); PREF_SAVE(); }, THEME.button_path_icon))
|
||||||
|
.setFont(f_p2)
|
||||||
|
.setEmpty(),
|
||||||
|
));
|
||||||
|
|
||||||
|
ds_list_add(pref_global, new __Panel_Linear_Setting_Item_Preference(
|
||||||
|
__txtx("pref_directory_gifski", "Gifski path*"),
|
||||||
|
"gifski_path",
|
||||||
|
new textBox(TEXTBOX_INPUT.text, function(txt) { PREFERENCES.gifski_path = txt; PREF_SAVE(); })
|
||||||
|
.setSideButton(button(function() { PREFERENCES.gifski_path = get_directory(PREFERENCES.gifski_path); PREF_SAVE(); }, THEME.button_path_icon))
|
||||||
|
.setFont(f_p2)
|
||||||
|
.setEmpty(),
|
||||||
|
));
|
||||||
|
|
||||||
|
ds_list_add(pref_global, new __Panel_Linear_Setting_Item_Preference(
|
||||||
|
__txtx("pref_directory_FFmpeg", "FFmpeg path*"),
|
||||||
|
"ffmpeg_path",
|
||||||
|
new textBox(TEXTBOX_INPUT.text, function(txt) { PREFERENCES.gifski_path = txt; PREF_SAVE(); })
|
||||||
|
.setSideButton(button(function() { PREFERENCES.ffmpeg_path = get_directory(PREFERENCES.ffmpeg_path); PREF_SAVE(); }, THEME.button_path_icon))
|
||||||
|
.setFont(f_p2)
|
||||||
|
.setEmpty(),
|
||||||
|
));
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region interface
|
#region interface
|
||||||
|
|
|
@ -28,7 +28,7 @@ if !ready exit;
|
||||||
|
|
||||||
draw_set_text(f_code, fa_left, fa_top, COLORS._main_text);
|
draw_set_text(f_code, fa_left, fa_top, COLORS._main_text);
|
||||||
var _hh = string_height_ext(ctxt[1], -1, dialog_w - ui(64));
|
var _hh = string_height_ext(ctxt[1], -1, dialog_w - ui(64));
|
||||||
draw_sprite_stretched(THEME.ui_panel_inner_bg, 1, dialog_x + ui(24), py - ui(8), dialog_w - ui(48), _hh + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, 1, dialog_x + ui(24), py - ui(8), dialog_w - ui(48), _hh + ui(16));
|
||||||
|
|
||||||
draw_text_ext(dialog_x + ui(32), py, ctxt[1], -1, dialog_w - ui(64));
|
draw_text_ext(dialog_x + ui(32), py, ctxt[1], -1, dialog_w - ui(64));
|
||||||
py += _hh + ui(16);
|
py += _hh + ui(16);
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
/// @description
|
/// @description
|
||||||
if(tb == noone) exit;
|
if(tb == noone) exit;
|
||||||
|
|
||||||
|
if(slide_da == -1) {
|
||||||
|
var _dist = point_distance(slide_dx, slide_dy, mouse_mx, mouse_my);
|
||||||
|
var _dirr = point_direction(slide_dx, slide_dy, mouse_mx, mouse_my);
|
||||||
|
|
||||||
|
if(_dist > 16) {
|
||||||
|
if(_dirr < 45) slide_da = 0;
|
||||||
|
else if(_dirr < 135) slide_da = 1;
|
||||||
|
else if(_dirr < 225) slide_da = 0;
|
||||||
|
else if(_dirr < 315) slide_da = 1;
|
||||||
|
else slide_da = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
tb = noone;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
if(!MOUSE_WRAPPING) {
|
if(!MOUSE_WRAPPING) {
|
||||||
var _adx = mouse_mx - slide_dx;
|
var _adx = mouse_mx - slide_dx;
|
||||||
var _ady = slide_dy - mouse_my;
|
var _ady = slide_dy - mouse_my;
|
||||||
|
|
||||||
if(slide_da == -1 && abs(_ady - _adx) > 8) slide_da = abs(_adx) > abs(_ady);
|
|
||||||
else if(slide_da == 0 && abs(_ady) > abs(_adx) + 8 && abs(mouse_my - slide_dy) > 64) slide_da = 1;
|
|
||||||
else if(slide_da == 1 && abs(_adx) > abs(_ady) + 8 && abs(mouse_mx - slide_dx) > 64) slide_da = 0;
|
|
||||||
|
|
||||||
var _s = tb.slide_speed;
|
var _s = tb.slide_speed;
|
||||||
if(key_mod_press(CTRL)) _s *= 10;
|
if(key_mod_press(CTRL)) _s *= 10;
|
||||||
if(key_mod_press(ALT)) _s /= 10;
|
if(key_mod_press(ALT)) _s /= 10;
|
||||||
|
|
38
scripts/__node_shader/__node_shader.gml
Normal file
38
scripts/__node_shader/__node_shader.gml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
enum SHADER_UNIFORM {
|
||||||
|
integer,
|
||||||
|
float,
|
||||||
|
color,
|
||||||
|
}
|
||||||
|
|
||||||
|
function addShaderProp(_type = undefined, _key = undefined) {
|
||||||
|
INLINE
|
||||||
|
var _ind = ds_list_size(inputs) - 1;
|
||||||
|
shader_data[_ind] = _type == undefined? 0 : { type: _type, key: _key };
|
||||||
|
}
|
||||||
|
|
||||||
|
function Node_Shader(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "";
|
||||||
|
shader = noone;
|
||||||
|
shader_data = [];
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
static setShader = function(_data) { #region
|
||||||
|
for( var i = 0, n = array_length(shader_data); i < n; i++ ) {
|
||||||
|
var _dat = shader_data[i];
|
||||||
|
if(_dat == 0) continue;
|
||||||
|
|
||||||
|
var _val = _data[i];
|
||||||
|
|
||||||
|
switch(_dat.type) {
|
||||||
|
case SHADER_UNIFORM.integer : shader_set_i(_dat.key, _val); break;
|
||||||
|
case SHADER_UNIFORM.float : shader_set_f(_dat.key, _val); break;
|
||||||
|
case SHADER_UNIFORM.color : shader_set_color(_dat.key, _val); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
||||||
|
return _outSurf;
|
||||||
|
} #endregion
|
||||||
|
}
|
11
scripts/__node_shader/__node_shader.yy
Normal file
11
scripts/__node_shader/__node_shader.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "__node_shader",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "data",
|
||||||
|
"path": "folders/nodes/data.yy",
|
||||||
|
},
|
||||||
|
}
|
12
scripts/__node_shader/node_gradient.yy
Normal file
12
scripts/__node_shader/node_gradient.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_gradient",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
12
scripts/__node_shader/node_perlin.yy
Normal file
12
scripts/__node_shader/node_perlin.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_perlin",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
25
scripts/__node_shader_generator/__node_shader_generator.gml
Normal file
25
scripts/__node_shader_generator/__node_shader_generator.gml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
function Node_Shader_Generator(_x, _y, _group = noone) : Node_Shader(_x, _y, _group) constructor {
|
||||||
|
name = "";
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
addShaderProp(SHADER_UNIFORM.float, "u_resolution");
|
||||||
|
|
||||||
|
attribute_surface_depth();
|
||||||
|
|
||||||
|
static generateShader = function(_outSurf, _data) { #region
|
||||||
|
var _dim = _data[0];
|
||||||
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
||||||
|
|
||||||
|
surface_set_shader(_outSurf, shader);
|
||||||
|
setShader(_data);
|
||||||
|
draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1);
|
||||||
|
surface_reset_shader();
|
||||||
|
|
||||||
|
return _outSurf;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
||||||
|
return generateShader(_outSurf, _data);
|
||||||
|
} #endregion
|
||||||
|
}
|
11
scripts/__node_shader_generator/__node_shader_generator.yy
Normal file
11
scripts/__node_shader_generator/__node_shader_generator.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "__node_shader_generator",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "data",
|
||||||
|
"path": "folders/nodes/data.yy",
|
||||||
|
},
|
||||||
|
}
|
12
scripts/__node_shader_generator/node_gradient.yy
Normal file
12
scripts/__node_shader_generator/node_gradient.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_gradient",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
12
scripts/__node_shader_generator/node_perlin.yy
Normal file
12
scripts/__node_shader_generator/node_perlin.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_perlin",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
26
scripts/__node_shader_processor/__node_shader_processor.gml
Normal file
26
scripts/__node_shader_processor/__node_shader_processor.gml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
function Node_Shader_Processor(_x, _y, _group = noone) : Node_Shader(_x, _y, _group) constructor {
|
||||||
|
name = "";
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
addShaderProp();
|
||||||
|
|
||||||
|
attribute_surface_depth();
|
||||||
|
|
||||||
|
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
||||||
|
var _surf = _data[0];
|
||||||
|
if(!is_surface(_surf)) return _outSurf;
|
||||||
|
|
||||||
|
var _sw = surface_get_width_safe(_surf);
|
||||||
|
var _sh = surface_get_height_safe(_surf);
|
||||||
|
|
||||||
|
_outSurf = surface_verify(_outSurf, _sw, _sh, attrDepth());
|
||||||
|
|
||||||
|
surface_set_shader(_outSurf, shader);
|
||||||
|
setShader(_data);
|
||||||
|
draw_surface_safe(_surf);
|
||||||
|
surface_reset_shader();
|
||||||
|
|
||||||
|
return _outSurf;
|
||||||
|
} #endregion
|
||||||
|
}
|
11
scripts/__node_shader_processor/__node_shader_processor.yy
Normal file
11
scripts/__node_shader_processor/__node_shader_processor.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "__node_shader_processor",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "data",
|
||||||
|
"path": "folders/nodes/data.yy",
|
||||||
|
},
|
||||||
|
}
|
12
scripts/__node_shader_processor/node_gradient.yy
Normal file
12
scripts/__node_shader_processor/node_gradient.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_gradient",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
12
scripts/__node_shader_processor/node_perlin.yy
Normal file
12
scripts/__node_shader_processor/node_perlin.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_perlin",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
|
@ -87,7 +87,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
|
||||||
|
|
||||||
static setSlideSpeed = function(speed) { #region
|
static setSlideSpeed = function(speed) { #region
|
||||||
for(var i = 0; i < 4; i++)
|
for(var i = 0; i < 4; i++)
|
||||||
tb[i].slide_speed = speed;
|
tb[i].setSlidable(speed);
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static setInteract = function(interactable = noone) { #region
|
static setInteract = function(interactable = noone) { #region
|
||||||
|
|
|
@ -27,7 +27,7 @@ function cornerBox(_onModify, _unit = noone) : widget() constructor {
|
||||||
|
|
||||||
static setSlideSpeed = function(speed) {
|
static setSlideSpeed = function(speed) {
|
||||||
for(var i = 0; i < 4; i++)
|
for(var i = 0; i < 4; i++)
|
||||||
tb[i].slide_speed = speed;
|
tb[i].setSlidable(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static setInteract = function(interactable = noone) {
|
static setInteract = function(interactable = noone) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ function filepath_resolve(path) {
|
||||||
var _path = path;
|
var _path = path;
|
||||||
|
|
||||||
_path = string_replace_all(_path, "%DIR%/", DIRECTORY);
|
_path = string_replace_all(_path, "%DIR%/", DIRECTORY);
|
||||||
_path = string_replace_all(_path, "%APP%/", working_directory);
|
_path = string_replace_all(_path, "%APP%/", program_directory);
|
||||||
|
|
||||||
return _path;
|
return _path;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ function matrixGrid(_type, _size, _onModify, _unit = noone) : widget() construct
|
||||||
|
|
||||||
static setSlideSpeed = function(speed) {
|
static setSlideSpeed = function(speed) {
|
||||||
for(var i = 0; i < inputs; i++)
|
for(var i = 0; i < inputs; i++)
|
||||||
tb[i].slide_speed = speed;
|
tb[i].setSlidable(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static drawParam = function(params) {
|
static drawParam = function(params) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ function Node_3D_Camera_Set(_x, _y, _group = noone) : Node_3D_Camera(_x, _y, _gr
|
||||||
inputs[| in_cam + 0] = nodeValue("Horizontal angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 )
|
inputs[| in_cam + 0] = nodeValue("Horizontal angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 )
|
||||||
.setDisplay(VALUE_DISPLAY.rotation);
|
.setDisplay(VALUE_DISPLAY.rotation);
|
||||||
|
|
||||||
inputs[| in_cam + 1] = nodeValue("Vertical angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 )
|
inputs[| in_cam + 1] = nodeValue("Vertical angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 215 )
|
||||||
.setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 1] });
|
.setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 1] });
|
||||||
|
|
||||||
inputs[| in_cam + 2] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white )
|
inputs[| in_cam + 2] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white )
|
||||||
|
|
|
@ -32,8 +32,9 @@ function Node_3D_Mesh_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr
|
||||||
|
|
||||||
var _matN = _mat.clone();
|
var _matN = _mat.clone();
|
||||||
var _nSurf = surface_create(surface_get_width(_surf), surface_get_height(_surf));
|
var _nSurf = surface_create(surface_get_width(_surf), surface_get_height(_surf));
|
||||||
|
|
||||||
surface_set_shader(_nSurf, sh_d3d_extrude_extends);
|
surface_set_shader(_nSurf, sh_d3d_extrude_extends);
|
||||||
shader_set_f("dimension", surface_get_width(_surf), surface_get_height(_surf));
|
shader_set_dim("dimension", _surf);
|
||||||
draw_surface_safe(_surf);
|
draw_surface_safe(_surf);
|
||||||
surface_reset_shader();
|
surface_reset_shader();
|
||||||
|
|
||||||
|
|
|
@ -1,92 +1,19 @@
|
||||||
function Node_3D_Transform_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor {
|
function Node_3D_Transform(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) constructor {
|
||||||
name = "Transform Scene";
|
name = "Transform";
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Scene", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Scene, noone)
|
inputs[| in_d3d + 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Mesh, noone)
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
|
outputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Mesh, noone);
|
||||||
.setArrayDepth(2);
|
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
|
input_display_list = [ in_d3d + 0,
|
||||||
.setArrayDepth(2);
|
["Transform", false], 0, 1, 2,
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
|
|
||||||
.setArrayDepth(2);
|
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Positioning type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Override" ]);
|
|
||||||
|
|
||||||
inputs[| 5] = nodeValue("Rotating type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Override" ]);
|
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Scaling type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Multiplicative", "Override" ]);
|
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Scene", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Scene, noone);
|
|
||||||
|
|
||||||
input_display_list = [ 0,
|
|
||||||
["Transform", false], 1, 2, 3,
|
|
||||||
["Settings", true], 4, 5, 6,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
static processData = function(_output, _data, _output_index, _array_index = 0) { #region
|
static processData = function(_output, _data, _output_index, _array_index = 0) { #region
|
||||||
var _scn = _data[0];
|
var _mesh = _data[in_d3d + 0].clone();
|
||||||
if(!is_instanceof(_scn, __3dGroup)) return noone;
|
setTransform(_mesh, _data);
|
||||||
|
|
||||||
var _nscn = _scn.clone(false);
|
return _mesh;
|
||||||
|
|
||||||
_temp_data = _data;
|
|
||||||
array_foreach(_nscn.objects, function(_object, _index) {
|
|
||||||
|
|
||||||
var _pos = array_safe_get(_temp_data[1], _index, 0);
|
|
||||||
if(is_array(_pos)) {
|
|
||||||
if(_temp_data[4] == 0) {
|
|
||||||
_object.transform.position.x += _pos[0];
|
|
||||||
_object.transform.position.y += _pos[1];
|
|
||||||
_object.transform.position.z += _pos[2];
|
|
||||||
} else if(_temp_data[4] == 1) {
|
|
||||||
_object.transform.position.x = _pos[0];
|
|
||||||
_object.transform.position.y = _pos[1];
|
|
||||||
_object.transform.position.z = _pos[2];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var _rot = array_safe_get(_temp_data[2], _index, 0);
|
|
||||||
if(is_array(_rot)) {
|
|
||||||
var _rotQ = new BBMOD_Quaternion().FromEuler(_rot[0], _rot[1], _rot[2]);
|
|
||||||
|
|
||||||
if(_temp_data[5] == 0)
|
|
||||||
_object.transform.rotation = _object.transform.rotation.Mul(_rotQ);
|
|
||||||
else if(_temp_data[5] == 1)
|
|
||||||
_object.transform.rotation = _rotQ;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _sca = array_safe_get(_temp_data[3], _index, 0);
|
|
||||||
if(is_array(_sca)) {
|
|
||||||
if(_temp_data[6] == 0) {
|
|
||||||
_object.transform.scale.x += _sca[0];
|
|
||||||
_object.transform.scale.y += _sca[1];
|
|
||||||
_object.transform.scale.z += _sca[2];
|
|
||||||
} else if(_temp_data[6] == 1) {
|
|
||||||
_object.transform.scale.x *= _sca[0];
|
|
||||||
_object.transform.scale.y *= _sca[1];
|
|
||||||
_object.transform.scale.z *= _sca[2];
|
|
||||||
} else if(_temp_data[6] == 2) {
|
|
||||||
_object.transform.scale.x = _sca[0];
|
|
||||||
_object.transform.scale.y = _sca[1];
|
|
||||||
_object.transform.scale.z = _sca[2];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return _nscn;
|
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static getPreviewObject = function() { #region
|
|
||||||
var _obj = outputs[| 0].getValue();
|
|
||||||
if(is_array(_obj)) _obj = array_safe_get(_obj, preview_index, noone);
|
|
||||||
|
|
||||||
return _obj;
|
|
||||||
} #endregion
|
|
||||||
|
|
||||||
}
|
}
|
92
scripts/node_3d_transform_scene/node_3d_transform_scene.gml
Normal file
92
scripts/node_3d_transform_scene/node_3d_transform_scene.gml
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
function Node_3D_Transform_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor {
|
||||||
|
name = "Transform Scene";
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Scene", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3Scene, noone)
|
||||||
|
.setVisible(true, true);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
|
||||||
|
.setArrayDepth(2);
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
|
||||||
|
.setArrayDepth(2);
|
||||||
|
|
||||||
|
inputs[| 3] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [])
|
||||||
|
.setArrayDepth(2);
|
||||||
|
|
||||||
|
inputs[| 4] = nodeValue("Positioning type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Override" ]);
|
||||||
|
|
||||||
|
inputs[| 5] = nodeValue("Rotating type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Override" ]);
|
||||||
|
|
||||||
|
inputs[| 6] = nodeValue("Scaling type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Additive", "Multiplicative", "Override" ]);
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Scene", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Scene, noone);
|
||||||
|
|
||||||
|
input_display_list = [ 0,
|
||||||
|
["Transform", false], 1, 2, 3,
|
||||||
|
["Settings", true], 4, 5, 6,
|
||||||
|
];
|
||||||
|
|
||||||
|
static processData = function(_output, _data, _output_index, _array_index = 0) { #region
|
||||||
|
var _scn = _data[0];
|
||||||
|
if(!is_instanceof(_scn, __3dGroup)) return noone;
|
||||||
|
|
||||||
|
var _nscn = _scn.clone(false);
|
||||||
|
|
||||||
|
_temp_data = _data;
|
||||||
|
array_foreach(_nscn.objects, function(_object, _index) {
|
||||||
|
|
||||||
|
var _pos = array_safe_get(_temp_data[1], _index, 0);
|
||||||
|
if(is_array(_pos)) {
|
||||||
|
if(_temp_data[4] == 0) {
|
||||||
|
_object.transform.position.x += _pos[0];
|
||||||
|
_object.transform.position.y += _pos[1];
|
||||||
|
_object.transform.position.z += _pos[2];
|
||||||
|
} else if(_temp_data[4] == 1) {
|
||||||
|
_object.transform.position.x = _pos[0];
|
||||||
|
_object.transform.position.y = _pos[1];
|
||||||
|
_object.transform.position.z = _pos[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var _rot = array_safe_get(_temp_data[2], _index, 0);
|
||||||
|
if(is_array(_rot)) {
|
||||||
|
var _rotQ = new BBMOD_Quaternion().FromEuler(_rot[0], _rot[1], _rot[2]);
|
||||||
|
|
||||||
|
if(_temp_data[5] == 0)
|
||||||
|
_object.transform.rotation = _object.transform.rotation.Mul(_rotQ);
|
||||||
|
else if(_temp_data[5] == 1)
|
||||||
|
_object.transform.rotation = _rotQ;
|
||||||
|
}
|
||||||
|
|
||||||
|
var _sca = array_safe_get(_temp_data[3], _index, 0);
|
||||||
|
if(is_array(_sca)) {
|
||||||
|
if(_temp_data[6] == 0) {
|
||||||
|
_object.transform.scale.x += _sca[0];
|
||||||
|
_object.transform.scale.y += _sca[1];
|
||||||
|
_object.transform.scale.z += _sca[2];
|
||||||
|
} else if(_temp_data[6] == 1) {
|
||||||
|
_object.transform.scale.x *= _sca[0];
|
||||||
|
_object.transform.scale.y *= _sca[1];
|
||||||
|
_object.transform.scale.z *= _sca[2];
|
||||||
|
} else if(_temp_data[6] == 2) {
|
||||||
|
_object.transform.scale.x = _sca[0];
|
||||||
|
_object.transform.scale.y = _sca[1];
|
||||||
|
_object.transform.scale.z = _sca[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return _nscn;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static getPreviewObject = function() { #region
|
||||||
|
var _obj = outputs[| 0].getValue();
|
||||||
|
if(is_array(_obj)) _obj = array_safe_get(_obj, preview_index, noone);
|
||||||
|
|
||||||
|
return _obj;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
}
|
11
scripts/node_3d_transform_scene/node_3d_transform_scene.yy
Normal file
11
scripts/node_3d_transform_scene/node_3d_transform_scene.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_3d_transform_scene",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "d3d modifier",
|
||||||
|
"path": "folders/nodes/data/3D/d3d modifier.yy",
|
||||||
|
},
|
||||||
|
}
|
12
scripts/node_3d_transform_scene/node_counter.yy
Normal file
12
scripts/node_3d_transform_scene/node_counter.yy
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "variable",
|
||||||
|
"path": "folders/nodes/data/variable.yy",
|
||||||
|
},
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_counter",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
|
@ -8,11 +8,15 @@ function Node_3D_UV_Remap(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _grou
|
||||||
inputs[| in_d3d + 1] = nodeValue("Target subobject", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, -1)
|
inputs[| in_d3d + 1] = nodeValue("Target subobject", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, -1)
|
||||||
.setArrayDepth(1);
|
.setArrayDepth(1);
|
||||||
|
|
||||||
|
inputs[| in_d3d + 2] = nodeValue("Bake UV", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.button, { name: "Bake", onClick: function() { attributes.bakedUV = !attributes.bakedUV; triggerRender(); } });
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Mesh, noone);
|
outputs[| 0] = nodeValue("Mesh", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Mesh, noone);
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
["Transform", false], 0, 1, 2,
|
["Transform", false], 0, 1, 2,
|
||||||
["UV", false], in_d3d + 0, in_d3d + 1,
|
["UV", false], in_d3d + 0, in_d3d + 1,
|
||||||
|
["Bake", false], in_d3d + 2,
|
||||||
];
|
];
|
||||||
|
|
||||||
remap_position = [ 0, 0, 0 ];
|
remap_position = [ 0, 0, 0 ];
|
||||||
|
@ -21,6 +25,15 @@ function Node_3D_UV_Remap(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _grou
|
||||||
remap_normal_y = [ 0, 0, 0 ];
|
remap_normal_y = [ 0, 0, 0 ];
|
||||||
remap_scale = [ 1, 1, 1 ];
|
remap_scale = [ 1, 1, 1 ];
|
||||||
|
|
||||||
|
attributes.bakedUV = false;
|
||||||
|
attributes.bakedUVdata = [];
|
||||||
|
|
||||||
|
modify_object_index = 0;
|
||||||
|
|
||||||
|
static step = function() { #region
|
||||||
|
inputs[| in_d3d + 2].editWidget.text = attributes.bakedUV? "Unbake" : "Bake";
|
||||||
|
} #endregion
|
||||||
|
|
||||||
static modify_object = function(_object, _data, _matrix) { #region
|
static modify_object = function(_object, _data, _matrix) { #region
|
||||||
if(_object.VF != global.VF_POS_NORM_TEX_COL) return _object;
|
if(_object.VF != global.VF_POS_NORM_TEX_COL) return _object;
|
||||||
|
|
||||||
|
@ -33,6 +46,10 @@ function Node_3D_UV_Remap(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _grou
|
||||||
var _fil = _data[in_d3d + 1];
|
var _fil = _data[in_d3d + 1];
|
||||||
if(_fil != -1 && !is_array(_fil)) _fil = [ _fil ];
|
if(_fil != -1 && !is_array(_fil)) _fil = [ _fil ];
|
||||||
|
|
||||||
|
var _vertex_index = 0;
|
||||||
|
if(!attributes.bakedUV) attributes.bakedUVdata[modify_object_index] = [];
|
||||||
|
var _baked_vertex = attributes.bakedUVdata[modify_object_index];
|
||||||
|
|
||||||
for( var i = 0, n = array_length(_object.VB); i < n; i++ ) {
|
for( var i = 0, n = array_length(_object.VB); i < n; i++ ) {
|
||||||
if(_fil != -1 && !array_exists(_fil, i)) {
|
if(_fil != -1 && !array_exists(_fil, i)) {
|
||||||
_obj.VB[i] = _object.VB[i];
|
_obj.VB[i] = _object.VB[i];
|
||||||
|
@ -64,9 +81,14 @@ function Node_3D_UV_Remap(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _grou
|
||||||
var _v4 = new BBMOD_Vec4(_x, _y, _z, 1);
|
var _v4 = new BBMOD_Vec4(_x, _y, _z, 1);
|
||||||
var _vt = _mat.Transform(_v4);
|
var _vt = _mat.Transform(_v4);
|
||||||
|
|
||||||
|
if(attributes.bakedUV) {
|
||||||
|
_posOnMap = _baked_vertex[_vertex_index];
|
||||||
|
} else {
|
||||||
var _posOnMap = d3d_point_project_plane_uv(remap_position, remap_normal, [_vt.X, _vt.Y, _vt.Z], remap_normal_x, remap_normal_y);
|
var _posOnMap = d3d_point_project_plane_uv(remap_position, remap_normal, [_vt.X, _vt.Y, _vt.Z], remap_normal_x, remap_normal_y);
|
||||||
_posOnMap[0] = _posOnMap[0] / remap_scale[0] + 0.5;
|
_posOnMap[0] = _posOnMap[0] / remap_scale[0] + 0.5;
|
||||||
_posOnMap[1] = _posOnMap[1] / remap_scale[1] + 0.5;
|
_posOnMap[1] = _posOnMap[1] / remap_scale[1] + 0.5;
|
||||||
|
_baked_vertex[_vertex_index] = _posOnMap;
|
||||||
|
}
|
||||||
|
|
||||||
buffer_seek(buff, buffer_seek_relative, -12);
|
buffer_seek(buff, buffer_seek_relative, -12);
|
||||||
|
|
||||||
|
@ -74,11 +96,13 @@ function Node_3D_UV_Remap(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _grou
|
||||||
buffer_write(buff, buffer_f32, _posOnMap[1]);
|
buffer_write(buff, buffer_f32, _posOnMap[1]);
|
||||||
|
|
||||||
buffer_seek(buff, buffer_seek_relative, 4);
|
buffer_seek(buff, buffer_seek_relative, 4);
|
||||||
|
_vertex_index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
_obj.VB[i] = vertex_create_buffer_from_buffer(buff, global.VF_POS_NORM_TEX_COL);
|
_obj.VB[i] = vertex_create_buffer_from_buffer(buff, global.VF_POS_NORM_TEX_COL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
modify_object_index++;
|
||||||
return _obj;
|
return _obj;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
@ -115,6 +139,7 @@ function Node_3D_UV_Remap(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _grou
|
||||||
remap_position = _data[0];
|
remap_position = _data[0];
|
||||||
remap_scale = _data[2];
|
remap_scale = _data[2];
|
||||||
|
|
||||||
|
modify_object_index = 0;
|
||||||
return modify(_data[in_d3d + 0], _data);
|
return modify(_data[in_d3d + 0], _data);
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
|
|
@ -560,6 +560,16 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
return noone;
|
return noone;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
static enable = function() { #region
|
||||||
|
active = true; timeline_item.active = true;
|
||||||
|
for( var i = 0, n = ds_list_size(nodes); i < n; i++ ) nodes[| i].enable();
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static disable = function() { #region
|
||||||
|
active = false; timeline_item.active = false;
|
||||||
|
for( var i = 0, n = ds_list_size(nodes); i < n; i++ ) nodes[| i].disable();
|
||||||
|
} #endregion
|
||||||
|
|
||||||
static processSerialize = function(_map) { #region
|
static processSerialize = function(_map) { #region
|
||||||
_map[? "instance_base"] = instanceBase? instanceBase.node_id : noone;
|
_map[? "instance_base"] = instanceBase? instanceBase.node_id : noone;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
|
@ -527,6 +527,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
doUpdate();
|
doUpdate();
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
static postupdate = function(frame = CURRENT_FRAME) {}
|
||||||
|
|
||||||
static doUpdate = function(frame = CURRENT_FRAME) { #region
|
static doUpdate = function(frame = CURRENT_FRAME) { #region
|
||||||
if(PROJECT.safeMode) return;
|
if(PROJECT.safeMode) return;
|
||||||
if(NODE_EXTRACT) return;
|
if(NODE_EXTRACT) return;
|
||||||
|
@ -558,6 +560,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
postupdate(frame);
|
||||||
cached_manual = false;
|
cached_manual = false;
|
||||||
|
|
||||||
if(!use_cache && PROJECT.onion_skin.enabled) {
|
if(!use_cache && PROJECT.onion_skin.enabled) {
|
||||||
|
@ -1260,8 +1263,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
|
|
||||||
static getAnimationCacheExist = function(frame) { return cacheExist(frame); }
|
static getAnimationCacheExist = function(frame) { return cacheExist(frame); }
|
||||||
|
|
||||||
static enable = function() { INLINE active = true; }
|
static enable = function() { INLINE active = true; timeline_item.active = true; }
|
||||||
static disable = function() { INLINE active = false; }
|
static disable = function() { INLINE active = false; timeline_item.active = false; }
|
||||||
|
|
||||||
static destroy = function(_merge = false) { #region
|
static destroy = function(_merge = false) { #region
|
||||||
if(!active) return;
|
if(!active) return;
|
||||||
|
@ -1273,7 +1276,6 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
if(PANEL_INSPECTOR.inspecting == self) PANEL_INSPECTOR.inspecting = noone;
|
if(PANEL_INSPECTOR.inspecting == self) PANEL_INSPECTOR.inspecting = noone;
|
||||||
|
|
||||||
PANEL_PREVIEW.removeNodePreview(self);
|
PANEL_PREVIEW.removeNodePreview(self);
|
||||||
timeline_item.removeSelf();
|
|
||||||
|
|
||||||
for(var i = 0; i < ds_list_size(outputs); i++) {
|
for(var i = 0; i < ds_list_size(outputs); i++) {
|
||||||
var jun = outputs[| i];
|
var jun = outputs[| i];
|
||||||
|
@ -1774,11 +1776,11 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
createNewInput();
|
createNewInput();
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static attributeDeserialize = function(attr) {
|
static attributeDeserialize = function(attr) { #region
|
||||||
if(struct_has(attributes, "use_project_dimension") && !struct_has(attr, "use_project_dimension"))
|
if(struct_has(attributes, "use_project_dimension") && !struct_has(attr, "use_project_dimension"))
|
||||||
attributes.use_project_dimension = false;
|
attributes.use_project_dimension = false;
|
||||||
struct_override(attributes, attr);
|
struct_override(attributes, attr);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
static postDeserialize = function() {}
|
static postDeserialize = function() {}
|
||||||
static processDeserialize = function() {}
|
static processDeserialize = function() {}
|
||||||
|
|
|
@ -77,7 +77,8 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
_tw = string_width(_bch) * _s;
|
_tw = string_width(_bch) * _s;
|
||||||
_th = string_height(_bch) * _s;
|
_th = string_height(_bch) * _s;
|
||||||
|
|
||||||
draw_sprite_stretched_points(THEME.node_bg, 0, _tx - 4, _y - 4, _tx + _tw + 4, _y + _th + 4);
|
draw_sprite_stretched_points(THEME.ui_panel_bg, 0, _tx - 4, _y - 4, _tx + _tw + 4, _y + _th + 4, COLORS._main_icon_light);
|
||||||
|
draw_sprite_stretched_points(THEME.ui_panel_fg, 0, _tx - 4, _y - 4, _tx + _tw + 4, _y + _th + 4);
|
||||||
|
|
||||||
draw_set_color(_cc);
|
draw_set_color(_cc);
|
||||||
draw_text_transformed(_tx, _y, _bch, _s, _s, 0);
|
draw_text_transformed(_tx, _y, _bch, _s, _s, 0);
|
||||||
|
|
|
@ -112,11 +112,20 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(prop.display_type == VALUE_DISPLAY.d3quarternion) {
|
if(prop.display_type == VALUE_DISPLAY.d3quarternion) {
|
||||||
|
if(prop.display_data.angle_display == 0) {
|
||||||
var _qf = new BBMOD_Quaternion(_f[0], _f[1], _f[2], _f[3]);
|
var _qf = new BBMOD_Quaternion(_f[0], _f[1], _f[2], _f[3]);
|
||||||
var _qt = new BBMOD_Quaternion(_t[0], _t[1], _t[2], _t[3]);
|
var _qt = new BBMOD_Quaternion(_t[0], _t[1], _t[2], _t[3]);
|
||||||
|
|
||||||
var _ql = _qf.Slerp(_qt, _lrp);
|
var _ql = _qf.Slerp(_qt, _lrp);
|
||||||
|
|
||||||
return _ql.ToArray();
|
return _ql.ToArray();
|
||||||
|
} else {
|
||||||
|
return [
|
||||||
|
lerp(_f[0], _t[0], _lrp),
|
||||||
|
lerp(_f[1], _t[1], _lrp),
|
||||||
|
lerp(_f[2], _t[2], _lrp),
|
||||||
|
0,
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(prop.type == VALUE_TYPE.color) {
|
if(prop.type == VALUE_TYPE.color) {
|
||||||
|
|
|
@ -83,7 +83,7 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
|
|
||||||
for( var i = 0; i < 1; i++ ) {
|
for( var i = 0; i < 1; i++ ) {
|
||||||
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
||||||
inputs[| i].editWidget.slide_speed = int? 1 : 0.1;
|
inputs[| i].editWidget.setSlidable(int? 0.1 : 0.01);
|
||||||
}
|
}
|
||||||
|
|
||||||
outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
||||||
|
@ -330,7 +330,7 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
|
|
||||||
for( var i = 0; i < 2; i++ ) {
|
for( var i = 0; i < 2; i++ ) {
|
||||||
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
||||||
inputs[| i].editWidget.slide_speed = int? 1 : 0.1;
|
inputs[| i].editWidget.setSlidable(int? 0.1 : 0.01);
|
||||||
}
|
}
|
||||||
|
|
||||||
inputs[| 4].setVisible(disp == 1, disp == 1);
|
inputs[| 4].setVisible(disp == 1, disp == 1);
|
||||||
|
@ -515,7 +515,7 @@ function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
var int = getInputData(3);
|
var int = getInputData(3);
|
||||||
for( var i = 0; i < 3; i++ ) {
|
for( var i = 0; i < 3; i++ ) {
|
||||||
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
||||||
inputs[| i].editWidget.slide_speed = int? 1 : 0.1;
|
inputs[| i].editWidget.setSlidable(int? 0.1 : 0.01);
|
||||||
}
|
}
|
||||||
|
|
||||||
outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
||||||
|
@ -574,7 +574,7 @@ function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
var int = getInputData(4);
|
var int = getInputData(4);
|
||||||
for( var i = 0; i < 4; i++ ) {
|
for( var i = 0; i < 4; i++ ) {
|
||||||
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
||||||
inputs[| i].editWidget.slide_speed = int? 1 : 0.1;
|
inputs[| i].editWidget.setSlidable(int? 0.1 : 0.01);
|
||||||
}
|
}
|
||||||
|
|
||||||
outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
|
||||||
|
|
|
@ -47,14 +47,14 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x,
|
||||||
inputs[| 4].setType(VALUE_TYPE.float);
|
inputs[| 4].setType(VALUE_TYPE.float);
|
||||||
inputs[| 5].setType(VALUE_TYPE.float);
|
inputs[| 5].setType(VALUE_TYPE.float);
|
||||||
|
|
||||||
inputs[| 4].editWidget.slide_speed = 0.01;
|
inputs[| 4].editWidget.setSlideSpeed(0.001);
|
||||||
inputs[| 5].editWidget.setSlideSpeed(0.01);
|
inputs[| 5].editWidget.setSlideSpeed(0.001);
|
||||||
} else {
|
} else {
|
||||||
inputs[| 4].setType(VALUE_TYPE.integer);
|
inputs[| 4].setType(VALUE_TYPE.integer);
|
||||||
inputs[| 5].setType(VALUE_TYPE.integer);
|
inputs[| 5].setType(VALUE_TYPE.integer);
|
||||||
|
|
||||||
inputs[| 4].editWidget.slide_speed = 1;
|
inputs[| 4].editWidget.setSlideSpeed(0.01);
|
||||||
inputs[| 5].editWidget.setSlideSpeed(1);
|
inputs[| 5].editWidget.setSlideSpeed(0.01);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
12
scripts/node_perlin_extra/node_gradient.yy
Normal file
12
scripts/node_perlin_extra/node_gradient.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_gradient",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
64
scripts/node_perlin_extra/node_perlin_extra.gml
Normal file
64
scripts/node_perlin_extra/node_perlin_extra.gml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
function Node_Perlin_Extra(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
|
||||||
|
name = "Extra Perlins";
|
||||||
|
shader = sh_perlin_extra;
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
addShaderProp(SHADER_UNIFORM.float, "position");
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
addShaderProp(SHADER_UNIFORM.float, "scale");
|
||||||
|
|
||||||
|
inputs[| 3] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2);
|
||||||
|
addShaderProp(SHADER_UNIFORM.integer, "iteration");
|
||||||
|
|
||||||
|
inputs[| 4] = nodeValue("Tile", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||||
|
addShaderProp(SHADER_UNIFORM.integer, "tile");
|
||||||
|
|
||||||
|
inputs[| 5] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(99999));
|
||||||
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||||
|
|
||||||
|
inputs[| 6] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "RGB", "HSV" ]);
|
||||||
|
addShaderProp(SHADER_UNIFORM.integer, "colored");
|
||||||
|
|
||||||
|
inputs[| 7] = nodeValue("Color R range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider_range);
|
||||||
|
addShaderProp(SHADER_UNIFORM.float, "colorRanR");
|
||||||
|
|
||||||
|
inputs[| 8] = nodeValue("Color G range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider_range);
|
||||||
|
addShaderProp(SHADER_UNIFORM.float, "colorRanG");
|
||||||
|
|
||||||
|
inputs[| 9] = nodeValue("Color B range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider_range);
|
||||||
|
addShaderProp(SHADER_UNIFORM.float, "colorRanB");
|
||||||
|
|
||||||
|
inputs[| 10] = nodeValue("Noise type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Absolute worley", "Fluid", "Noisy perlin", "Camo" ]);
|
||||||
|
addShaderProp(SHADER_UNIFORM.integer, "type");
|
||||||
|
|
||||||
|
input_display_list = [
|
||||||
|
["Output", true], 0, 5,
|
||||||
|
["Noise", false], 10, 1, 2, 3, 4,
|
||||||
|
["Render", false], 6, 7, 8, 9,
|
||||||
|
];
|
||||||
|
|
||||||
|
static step = function() { #region
|
||||||
|
var _col = getInputData(6);
|
||||||
|
|
||||||
|
inputs[| 7].setVisible(_col != 0);
|
||||||
|
inputs[| 8].setVisible(_col != 0);
|
||||||
|
inputs[| 9].setVisible(_col != 0);
|
||||||
|
|
||||||
|
inputs[| 7].name = _col == 1? "Color R range" : "Color H range";
|
||||||
|
inputs[| 8].name = _col == 1? "Color G range" : "Color S range";
|
||||||
|
inputs[| 9].name = _col == 1? "Color B range" : "Color V range";
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
||||||
|
return generateShader(_outSurf, _data);
|
||||||
|
} #endregion
|
||||||
|
}
|
11
scripts/node_perlin_extra/node_perlin_extra.yy
Normal file
11
scripts/node_perlin_extra/node_perlin_extra.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_perlin_extra",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "noise",
|
||||||
|
"path": "folders/nodes/data/generator/noise.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,13 +1,6 @@
|
||||||
function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
name = "Smear noise";
|
name = "Smear noise";
|
||||||
|
|
||||||
shader = sh_perlin_smear;
|
|
||||||
uniform_dim = shader_get_uniform(shader, "u_resolution");
|
|
||||||
uniform_pos = shader_get_uniform(shader, "position");
|
|
||||||
uniform_sca = shader_get_uniform(shader, "scale");
|
|
||||||
uniform_ite = shader_get_uniform(shader, "iteration");
|
|
||||||
uniform_bri = shader_get_uniform(shader, "bright");
|
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF )
|
inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF )
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
@ -36,16 +29,14 @@ function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
||||||
|
|
||||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
||||||
|
|
||||||
surface_set_target(_outSurf);
|
surface_set_shader(_outSurf, sh_perlin_smear);
|
||||||
shader_set(shader);
|
shader_set_f("u_resolution", _dim);
|
||||||
shader_set_uniform_f_array_safe(uniform_dim, _dim);
|
shader_set_f("position", _pos);
|
||||||
shader_set_uniform_f_array_safe(uniform_pos, _pos);
|
shader_set_f("scale", _sca);
|
||||||
shader_set_uniform_f_array_safe(uniform_sca, _sca);
|
shader_set_f("bright", _bri);
|
||||||
shader_set_uniform_f(uniform_bri, _bri);
|
shader_set_i("iteration", _ite);
|
||||||
shader_set_uniform_i(uniform_ite, _ite);
|
|
||||||
draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1);
|
draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1);
|
||||||
shader_reset();
|
surface_reset_shader();
|
||||||
surface_reset_target();
|
|
||||||
|
|
||||||
return _outSurf;
|
return _outSurf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,8 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
|
||||||
|
|
||||||
show_in_recent = true;
|
show_in_recent = true;
|
||||||
|
|
||||||
|
is_patreon_extra = false;
|
||||||
|
|
||||||
var pth = DIRECTORY + "Nodes/tooltip/" + node + ".png";
|
var pth = DIRECTORY + "Nodes/tooltip/" + node + ".png";
|
||||||
if(file_exists(pth))
|
if(file_exists(pth))
|
||||||
tooltip_spr = sprite_add(pth, 0, false, false, 0, 0);
|
tooltip_spr = sprite_add(pth, 0, false, false, 0, 0);
|
||||||
|
@ -24,20 +26,29 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
|
||||||
}
|
}
|
||||||
|
|
||||||
static setVersion = function(version) {
|
static setVersion = function(version) {
|
||||||
|
INLINE
|
||||||
new_node = version == VERSION;
|
new_node = version == VERSION;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
static isDeprecated = function() {
|
static isDeprecated = function() {
|
||||||
|
INLINE
|
||||||
deprecated = true;
|
deprecated = true;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
static hideRecent = function() {
|
static hideRecent = function() {
|
||||||
|
INLINE
|
||||||
show_in_recent = false;
|
show_in_recent = false;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static patreonExtra = function() {
|
||||||
|
INLINE
|
||||||
|
is_patreon_extra = true;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
static getName = function() { return __txt_node_name(node, name); }
|
static getName = function() { return __txt_node_name(node, name); }
|
||||||
static getTooltip = function() { return __txt_node_tooltip(node, tooltip); }
|
static getTooltip = function() { return __txt_node_tooltip(node, tooltip); }
|
||||||
|
|
||||||
|
@ -55,6 +66,89 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
|
||||||
if(!LOADING && !APPENDING) _node.doUpdate();
|
if(!LOADING && !APPENDING) _node.doUpdate();
|
||||||
return _node;
|
return _node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static drawGrid = function(_x, _y, _mx, _my, grid_size) { #region
|
||||||
|
var spr_x = _x + grid_size / 2;
|
||||||
|
var spr_y = _y + grid_size / 2;
|
||||||
|
|
||||||
|
draw_sprite_ui_uniform(spr, 0, spr_x, spr_y, 0.5);
|
||||||
|
|
||||||
|
if(new_node) {
|
||||||
|
draw_sprite_ui_uniform(THEME.node_new_badge, 0, _x + grid_size - ui(12), _y + ui(6),, COLORS._main_accent);
|
||||||
|
draw_sprite_ui_uniform(THEME.node_new_badge, 1, _x + grid_size - ui(12), _y + ui(6));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(deprecated) {
|
||||||
|
draw_sprite_ui_uniform(THEME.node_deprecated_badge, 0, _x + grid_size - ui(12), _y + ui(6),, COLORS._main_value_negative);
|
||||||
|
draw_sprite_ui_uniform(THEME.node_deprecated_badge, 1, _x + grid_size - ui(12), _y + ui(6));
|
||||||
|
}
|
||||||
|
|
||||||
|
var fav = array_exists(global.FAV_NODES, node);
|
||||||
|
if(fav) draw_sprite_ui_uniform(THEME.star, 0, _x + grid_size - ui(10), _y + grid_size - ui(10), 0.7, COLORS._main_accent, 1.);
|
||||||
|
|
||||||
|
if(IS_PATREON && is_patreon_extra) {
|
||||||
|
var spr_x = _x + grid_size - 4;
|
||||||
|
var spr_y = _y + 4;
|
||||||
|
|
||||||
|
BLEND_SUBTRACT
|
||||||
|
gpu_set_colorwriteenable(0, 0, 0, 1);
|
||||||
|
draw_sprite_ext(s_patreon_supporter, 0, spr_x, spr_y, 1, 1, 0, c_white, 1);
|
||||||
|
gpu_set_colorwriteenable(1, 1, 1, 1);
|
||||||
|
BLEND_NORMAL
|
||||||
|
|
||||||
|
draw_sprite_ext(s_patreon_supporter, 1, spr_x, spr_y, 1, 1, 0, COLORS._main_accent, 1);
|
||||||
|
|
||||||
|
if(point_in_circle(_mx, _my, spr_x, spr_y, 10)) TOOLTIP = "Supporter exclusive";
|
||||||
|
}
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static drawList = function(_x, _y, _mx, _my, list_height) { #region
|
||||||
|
var fav = array_exists(global.FAV_NODES, node);
|
||||||
|
if(fav) draw_sprite_ui_uniform(THEME.star, 0, ui(32), yy + list_height / 2, 0.7, COLORS._main_accent, 1.);
|
||||||
|
|
||||||
|
var spr_x = list_height / 2 + ui(44);
|
||||||
|
var spr_y = _y + list_height / 2;
|
||||||
|
|
||||||
|
var ss = (list_height - ui(8)) / max(sprite_get_width(spr), sprite_get_height(spr));
|
||||||
|
draw_sprite_ext(spr, 0, spr_x, spr_y, ss, ss, 0, c_white, 1);
|
||||||
|
|
||||||
|
var tx = list_height + ui(52);
|
||||||
|
|
||||||
|
if(new_node) {
|
||||||
|
draw_sprite_ui_uniform(THEME.node_new_badge, 0, tx + ui(16), _y + list_height / 2 + ui(1),, COLORS._main_accent);
|
||||||
|
draw_sprite_ui_uniform(THEME.node_new_badge, 1, tx + ui(16), _y + list_height / 2 + ui(1));
|
||||||
|
tx += ui(40);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(deprecated) {
|
||||||
|
draw_sprite_ui_uniform(THEME.node_deprecated_badge, 0, tx + ui(16), _y + list_height / 2 + ui(1),, COLORS._main_value_negative);
|
||||||
|
draw_sprite_ui_uniform(THEME.node_deprecated_badge, 1, tx + ui(16), _y + list_height / 2 + ui(1));
|
||||||
|
tx += ui(40);
|
||||||
|
}
|
||||||
|
|
||||||
|
var _txt = getName();
|
||||||
|
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||||
|
draw_text_add(tx, _y + list_height / 2, _txt);
|
||||||
|
|
||||||
|
tx += string_width(_txt);
|
||||||
|
|
||||||
|
if(IS_PATREON && is_patreon_extra) {
|
||||||
|
var spr_x = tx + 8;
|
||||||
|
var spr_y = _y + list_height / 2 - 4;
|
||||||
|
|
||||||
|
BLEND_SUBTRACT
|
||||||
|
gpu_set_colorwriteenable(0, 0, 0, 1);
|
||||||
|
draw_sprite_ext(s_patreon_supporter, 0, spr_x, spr_y, 1, 1, 0, c_white, 1);
|
||||||
|
gpu_set_colorwriteenable(1, 1, 1, 1);
|
||||||
|
BLEND_NORMAL
|
||||||
|
|
||||||
|
draw_sprite_ext(s_patreon_supporter, 1, spr_x, spr_y, 1, 1, 0, COLORS._main_accent, 1);
|
||||||
|
|
||||||
|
if(point_in_circle(_mx, _my, spr_x, spr_y, 10)) TOOLTIP = "Supporter exclusive";
|
||||||
|
}
|
||||||
|
|
||||||
|
return tx;
|
||||||
|
} #endregion
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
#region nodes
|
#region nodes
|
||||||
|
@ -455,6 +549,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
|
||||||
addNodeObject(generator, "Simplex Noise", s_node_noise_simplex, "Node_Noise_Simplex", [1, Node_Noise_Simplex], ["perlin"], "Generate simplex noise, similiar to perlin noise with better fidelity but non-tilable.").setVersion(1080);
|
addNodeObject(generator, "Simplex Noise", s_node_noise_simplex, "Node_Noise_Simplex", [1, Node_Noise_Simplex], ["perlin"], "Generate simplex noise, similiar to perlin noise with better fidelity but non-tilable.").setVersion(1080);
|
||||||
addNodeObject(generator, "Cellular Noise", s_node_noise_cell, "Node_Cellular", [1, Node_Cellular], ["voronoi", "worley"], "Generate voronoi pattern.");
|
addNodeObject(generator, "Cellular Noise", s_node_noise_cell, "Node_Cellular", [1, Node_Cellular], ["voronoi", "worley"], "Generate voronoi pattern.");
|
||||||
addNodeObject(generator, "Anisotropic Noise", s_node_noise_aniso, "Node_Noise_Aniso", [1, Node_Noise_Aniso],, "Generate anisotropic noise.");
|
addNodeObject(generator, "Anisotropic Noise", s_node_noise_aniso, "Node_Noise_Aniso", [1, Node_Noise_Aniso],, "Generate anisotropic noise.");
|
||||||
|
/**/ addNodeObject(generator, "Extra Perlins", s_node_noise_aniso, "Node_Perlin_Extra", [1, Node_Perlin_Extra], ["noise"], "Random perlin noise made with different algorithms.").patreonExtra();
|
||||||
|
|
||||||
ds_list_add(generator, "Patterns");
|
ds_list_add(generator, "Patterns");
|
||||||
addNodeObject(generator, "Stripe", s_node_stripe, "Node_Stripe", [1, Node_Stripe],, "Generate stripe pattern.");
|
addNodeObject(generator, "Stripe", s_node_stripe, "Node_Stripe", [1, Node_Stripe],, "Generate stripe pattern.");
|
||||||
|
|
|
@ -70,6 +70,10 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
||||||
update_on_frame = grup == 0;
|
update_on_frame = grup == 0;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
static postupdate = function(frame = CURRENT_FRAME) {
|
||||||
|
if(LAST_FRAME) array_remove(RENDERING, node_id);
|
||||||
|
}
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) { #region
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
var inpt = getInputData(0);
|
var inpt = getInputData(0);
|
||||||
var grup = getInputData(1);
|
var grup = getInputData(1);
|
||||||
|
@ -249,9 +253,6 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
||||||
|
|
||||||
if(drawn) array_safe_set(anim_drawn, CURRENT_FRAME, true);
|
if(drawn) array_safe_set(anim_drawn, CURRENT_FRAME, true);
|
||||||
outputs[| 1].setValue(_atl);
|
outputs[| 1].setValue(_atl);
|
||||||
|
|
||||||
if(LAST_FRAME)
|
|
||||||
array_remove(RENDERING, node_id);
|
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static onInspector1Update = function(updateAll = true) { #region
|
static onInspector1Update = function(updateAll = true) { #region
|
||||||
|
|
|
@ -809,9 +809,9 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
return setValueDirect(val);
|
return setValueDirect(val);
|
||||||
} );
|
} );
|
||||||
editWidget.slidable = true;
|
editWidget.slidable = true;
|
||||||
if(type == VALUE_TYPE.integer) editWidget.slide_speed = 1;
|
if(type == VALUE_TYPE.integer) editWidget.setSlidable();
|
||||||
|
|
||||||
if(struct_has(display_data, "slide_speed")) editWidget.slide_speed = display_data.slide_speed;
|
if(struct_has(display_data, "slide_speed")) editWidget.setSlidable(display_data.slide_speed);
|
||||||
if(struct_has(display_data, "unit")) editWidget.unit = display_data.unit;
|
if(struct_has(display_data, "unit")) editWidget.unit = display_data.unit;
|
||||||
if(struct_has(display_data, "side_button")) editWidget.side_button = display_data.side_button;
|
if(struct_has(display_data, "side_button")) editWidget.side_button = display_data.side_button;
|
||||||
|
|
||||||
|
@ -1347,6 +1347,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
if(display_type == VALUE_DISPLAY.d3quarternion) { #region
|
if(display_type == VALUE_DISPLAY.d3quarternion) { #region
|
||||||
|
if(!applyUnit) return value;
|
||||||
var dispType = struct_try_get(nodeFrom.display_data, "angle_display");
|
var dispType = struct_try_get(nodeFrom.display_data, "angle_display");
|
||||||
switch(dispType) {
|
switch(dispType) {
|
||||||
case QUARTERNION_DISPLAY.quarterion : return value;
|
case QUARTERNION_DISPLAY.quarterion : return value;
|
||||||
|
@ -1399,8 +1400,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { #region
|
static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { #region
|
||||||
if(type == VALUE_TYPE.trigger)
|
if(type == VALUE_TYPE.trigger)
|
||||||
useCache = false;
|
useCache = false;
|
||||||
if(value_tag == "dimension" && node.attributes.use_project_dimension)
|
|
||||||
return PROJECT.attributes.surface_dimension;
|
|
||||||
|
|
||||||
global.cache_call++;
|
global.cache_call++;
|
||||||
if(useCache && use_cache) {
|
if(useCache && use_cache) {
|
||||||
|
@ -1442,6 +1441,9 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static __getAnimValue = function(_time = CURRENT_FRAME) { #region
|
static __getAnimValue = function(_time = CURRENT_FRAME) { #region
|
||||||
|
if(value_tag == "dimension" && node.attributes.use_project_dimension)
|
||||||
|
return PROJECT.attributes.surface_dimension;
|
||||||
|
|
||||||
if(sep_axis) {
|
if(sep_axis) {
|
||||||
var val = [];
|
var val = [];
|
||||||
for( var i = 0, n = array_length(animators); i < n; i++ )
|
for( var i = 0, n = array_length(animators); i < n; i++ )
|
||||||
|
@ -1706,6 +1708,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
|
|
||||||
static setValueDirect = function(val = 0, index = noone, record = true, time = CURRENT_FRAME, _update = true) { #region
|
static setValueDirect = function(val = 0, index = noone, record = true, time = CURRENT_FRAME, _update = true) { #region
|
||||||
var updated = false;
|
var updated = false;
|
||||||
|
var _val;
|
||||||
|
|
||||||
if(sep_axis) {
|
if(sep_axis) {
|
||||||
if(index == noone) {
|
if(index == noone) {
|
||||||
|
@ -1715,11 +1718,11 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
updated = animators[index].setValue(val, connect_type == JUNCTION_CONNECT.input && record, time);
|
updated = animators[index].setValue(val, connect_type == JUNCTION_CONNECT.input && record, time);
|
||||||
} else {
|
} else {
|
||||||
if(index != noone) {
|
if(index != noone) {
|
||||||
var _val = variable_clone(animator.getValue(time));
|
_val = variable_clone(animator.getValue(time));
|
||||||
_val[index] = val;
|
_val[index] = val;
|
||||||
updated = animator.setValue(_val, connect_type == JUNCTION_CONNECT.input && record, time);
|
|
||||||
} else
|
} else
|
||||||
updated = animator.setValue(val, connect_type == JUNCTION_CONNECT.input && record, time);
|
_val = val;
|
||||||
|
updated = animator.setValue(_val, connect_type == JUNCTION_CONNECT.input && record, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type == VALUE_TYPE.gradient) updated = true;
|
if(type == VALUE_TYPE.gradient) updated = true;
|
||||||
|
|
|
@ -35,7 +35,7 @@ function paddingBox(_onModify, _unit = noone) : widget() constructor {
|
||||||
|
|
||||||
static setSlideSpeed = function(speed) {
|
static setSlideSpeed = function(speed) {
|
||||||
for(var i = 0; i < 4; i++)
|
for(var i = 0; i < 4; i++)
|
||||||
tb[i].slide_speed = speed;
|
tb[i].setSlidable(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static setInteract = function(interactable = noone) {
|
static setInteract = function(interactable = noone) {
|
||||||
|
|
|
@ -443,6 +443,8 @@ function Panel_Animation() : PanelContent() constructor {
|
||||||
|
|
||||||
for( var i = 0, n = array_length(folder.contents); i < n; i++ ) {
|
for( var i = 0, n = array_length(folder.contents); i < n; i++ ) {
|
||||||
var _cont = folder.contents[i];
|
var _cont = folder.contents[i];
|
||||||
|
if(!_cont.active) continue;
|
||||||
|
|
||||||
var _content = {
|
var _content = {
|
||||||
item: _cont,
|
item: _cont,
|
||||||
parent: _cont.parent,
|
parent: _cont.parent,
|
||||||
|
|
|
@ -250,14 +250,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
||||||
addHotkey("Graph", "Copy", "C", MOD_KEY.ctrl, function() { PANEL_GRAPH.doCopy(); });
|
addHotkey("Graph", "Copy", "C", MOD_KEY.ctrl, function() { PANEL_GRAPH.doCopy(); });
|
||||||
addHotkey("Graph", "Paste", "V", MOD_KEY.ctrl, function() { PANEL_GRAPH.doPaste(); });
|
addHotkey("Graph", "Paste", "V", MOD_KEY.ctrl, function() { PANEL_GRAPH.doPaste(); });
|
||||||
|
|
||||||
addHotkey("Graph", "Pan", "", MOD_KEY.alt, function() {
|
addHotkey("Graph", "Pan", "", MOD_KEY.ctrl, function() { PANEL_GRAPH.graph_dragging_key = true; });
|
||||||
if(PREFERENCES.alt_picker) return;
|
addHotkey("Graph", "Zoom", "", MOD_KEY.alt | MOD_KEY.ctrl, function() { PANEL_GRAPH.graph_zooming_key = true; });
|
||||||
PANEL_GRAPH.graph_dragging_key = true;
|
|
||||||
});
|
|
||||||
addHotkey("Graph", "Zoom", "", MOD_KEY.alt | MOD_KEY.ctrl, function() {
|
|
||||||
if(PREFERENCES.alt_picker) return;
|
|
||||||
PANEL_GRAPH.graph_zooming_key = true;
|
|
||||||
});
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ++++ node setters ++++
|
#region ++++ node setters ++++
|
||||||
|
|
|
@ -742,7 +742,7 @@ function Panel_Menu() : PanelContent() constructor {
|
||||||
var _ib = COLORS._main_text_sub;
|
var _ib = COLORS._main_text_sub;
|
||||||
|
|
||||||
if(pHOVER && point_in_rectangle(mx, my, _cx - 12, _cy - 12, _cx + 12, _cy + 12)) {
|
if(pHOVER && point_in_rectangle(mx, my, _cx - 12, _cy - 12, _cx + 12, _cy + 12)) {
|
||||||
TOOLTIP = "Verified supporter";
|
TOOLTIP = "Supporter";
|
||||||
_ib = COLORS._main_accent;
|
_ib = COLORS._main_accent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -273,14 +273,8 @@ function Panel_Preview() : PanelContent() constructor {
|
||||||
addHotkey("Preview", "Preview window", "P", MOD_KEY.ctrl, function() { create_preview_window(PANEL_PREVIEW.getNodePreview()); });
|
addHotkey("Preview", "Preview window", "P", MOD_KEY.ctrl, function() { create_preview_window(PANEL_PREVIEW.getNodePreview()); });
|
||||||
addHotkey("Preview", "Toggle grid", "G", MOD_KEY.ctrl, function() { PROJECT.previewGrid.show = !PROJECT.previewGrid.show; });
|
addHotkey("Preview", "Toggle grid", "G", MOD_KEY.ctrl, function() { PROJECT.previewGrid.show = !PROJECT.previewGrid.show; });
|
||||||
|
|
||||||
addHotkey("Preview", "Pan", "", MOD_KEY.alt, function() {
|
addHotkey("Preview", "Pan", "", MOD_KEY.ctrl, function() { PANEL_PREVIEW.canvas_dragging_key = true; });
|
||||||
if(PREFERENCES.alt_picker) return;
|
addHotkey("Preview", "Zoom", "", MOD_KEY.alt | MOD_KEY.ctrl, function() { PANEL_PREVIEW.canvas_zooming_key = true; });
|
||||||
PANEL_PREVIEW.canvas_dragging_key = true;
|
|
||||||
});
|
|
||||||
addHotkey("Preview", "Zoom", "", MOD_KEY.alt | MOD_KEY.ctrl, function() {
|
|
||||||
if(PREFERENCES.alt_picker) return;
|
|
||||||
PANEL_PREVIEW.canvas_zooming_key = true;
|
|
||||||
});
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
function setNodePreview(node) { #region
|
function setNodePreview(node) { #region
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
PREFERENCES.ui_framerate = 60;
|
PREFERENCES.ui_framerate = 60;
|
||||||
PREFERENCES.path_resolution = 32;
|
PREFERENCES.path_resolution = 32;
|
||||||
|
|
||||||
|
PREFERENCES.node_recents_amount = 20;
|
||||||
|
|
||||||
PREFERENCES.double_click_delay = 0.25;
|
PREFERENCES.double_click_delay = 0.25;
|
||||||
PREFERENCES.mouse_wheel_speed = 1.00;
|
PREFERENCES.mouse_wheel_speed = 1.00;
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ function quarternionBox(_onModify) : widget() constructor {
|
||||||
|
|
||||||
static setSlideSpeed = function(speed) {
|
static setSlideSpeed = function(speed) {
|
||||||
for(var i = 0; i < size; i++)
|
for(var i = 0; i < size; i++)
|
||||||
tb[i].slide_speed = speed;
|
tb[i].setSlidable(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static setInteract = function(interactable) {
|
static setInteract = function(interactable) {
|
||||||
|
@ -82,9 +82,13 @@ function quarternionBox(_onModify) : widget() constructor {
|
||||||
var bx = _x;
|
var bx = _x;
|
||||||
disp_w = disp_w == noone? ww : lerp_float(disp_w, ww, 3);
|
disp_w = disp_w == noone? ww : lerp_float(disp_w, ww, 3);
|
||||||
|
|
||||||
|
var _dispDat = _data;
|
||||||
|
|
||||||
for(var i = 0; i < size; i++) {
|
for(var i = 0; i < size; i++) {
|
||||||
|
var _a = _dispDat[i];
|
||||||
|
|
||||||
tb[i].setFocusHover(clickable && active, hover);
|
tb[i].setFocusHover(clickable && active, hover);
|
||||||
tb[i].draw(bx + ui(24), _y, disp_w - ui(24), _h, _data[i], _m);
|
tb[i].draw(bx + ui(24), _y, disp_w - ui(24), _h, _a, _m);
|
||||||
|
|
||||||
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner);
|
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner);
|
||||||
draw_text(bx + ui(8), _y + _h / 2, axis[i]);
|
draw_text(bx + ui(8), _y + _h / 2, axis[i]);
|
||||||
|
|
|
@ -31,8 +31,8 @@ function rangeBox(_type, _onModify) : widget() constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
static setSlideSpeed = function(speed) {
|
static setSlideSpeed = function(speed) {
|
||||||
tb[0].slide_speed = speed;
|
tb[0].setSlidable(speed);
|
||||||
tb[1].slide_speed = speed;
|
tb[1].setSlidable(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static setInteract = function(interactable = noone) {
|
static setInteract = function(interactable = noone) {
|
||||||
|
|
|
@ -11,9 +11,7 @@ function rotator(_onModify, _step = -1) : widget() constructor {
|
||||||
spr_bg = THEME.rotator_bg;
|
spr_bg = THEME.rotator_bg;
|
||||||
spr_knob = THEME.rotator_knob;
|
spr_knob = THEME.rotator_knob;
|
||||||
|
|
||||||
tb_value = new textBox(TEXTBOX_INPUT.number, onModify);
|
tb_value = new textBox(TEXTBOX_INPUT.number, onModify).setSlidable();
|
||||||
tb_value.slidable = true;
|
|
||||||
tb_value.slide_speed = 1;
|
|
||||||
|
|
||||||
halign = fa_center;
|
halign = fa_center;
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,9 @@ function rotatorRange(_onModify) : widget() constructor {
|
||||||
drag_sa = 0;
|
drag_sa = 0;
|
||||||
drag_sc = 0;
|
drag_sc = 0;
|
||||||
|
|
||||||
tb_min = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(0, val); } );
|
tb_min = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(0, val); } ).setSlidable();
|
||||||
tb_min.slidable = true;
|
|
||||||
tb_min.slide_speed = 1;
|
|
||||||
|
|
||||||
tb_max = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(1, val); } );
|
tb_max = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(1, val); } ).setSlidable();
|
||||||
tb_max.slidable = true;
|
|
||||||
tb_max.slide_speed = 1;
|
|
||||||
|
|
||||||
static setInteract = function(interactable = noone) {
|
static setInteract = function(interactable = noone) {
|
||||||
self.interactable = interactable;
|
self.interactable = interactable;
|
||||||
|
|
|
@ -197,6 +197,7 @@ function SAVE_COLLECTION(_node, _path, save_surface = true, metadata = noone, co
|
||||||
var _name = filename_name_only(_path);
|
var _name = filename_name_only(_path);
|
||||||
var _mpath = $"{_dir}/{_name}.meta";
|
var _mpath = $"{_dir}/{_name}.meta";
|
||||||
|
|
||||||
|
_meta.version = SAVE_VERSION;
|
||||||
json_save_struct(_mpath, _meta, true);
|
json_save_struct(_mpath, _meta, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ function slider(_min, _max, _step, _onModify = noone, _onRelease = noone) : widg
|
||||||
tb_value = new textBox(TEXTBOX_INPUT.number, onApply);
|
tb_value = new textBox(TEXTBOX_INPUT.number, onApply);
|
||||||
|
|
||||||
static setSlideSpeed = function(speed) {
|
static setSlideSpeed = function(speed) {
|
||||||
tb_value.slide_speed = speed;
|
tb_value.setSlidable(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static setInteract = function(interactable = noone) {
|
static setInteract = function(interactable = noone) {
|
||||||
|
|
|
@ -17,8 +17,8 @@ function sliderRange(_min, _max, _step, _onModify) : widget() constructor {
|
||||||
tb_value_max.slidable = true;
|
tb_value_max.slidable = true;
|
||||||
|
|
||||||
static setSlideSpeed = function(speed) {
|
static setSlideSpeed = function(speed) {
|
||||||
tb_value_min.slide_speed = speed;
|
tb_value_min.setSlidable(speed);
|
||||||
tb_value_max.slide_speed = speed;
|
tb_value_max.setSlidable(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static setInteract = function(interactable = noone) {
|
static setInteract = function(interactable = noone) {
|
||||||
|
|
|
@ -97,19 +97,6 @@ function surfaceBox(_onModify, def_path = "") : widget() constructor {
|
||||||
draw_sprite_ui_uniform(THEME.scroll_box_arrow, 0, _x + _w - ui(20), _y + _h / 2, 1, COLORS._main_icon);
|
draw_sprite_ui_uniform(THEME.scroll_box_arrow, 0, _x + _w - ui(20), _y + _h / 2, 1, COLORS._main_icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if(_type == VALUE_TYPE.atlas) {
|
|
||||||
// draw_sprite_stretched_ext(THEME.ui_panel_inner_bg, 1, _x, _y + _h + ui(8), _w, ui(40), COLORS.node_composite_bg_blend, 1);
|
|
||||||
|
|
||||||
// var set_y = _y + _h + ui(16);
|
|
||||||
// var set_w = ui(64);
|
|
||||||
// var set_h = ui(24);
|
|
||||||
|
|
||||||
// draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text);
|
|
||||||
// draw_text_add(_x + ui(16), set_y + set_h / 2, __txt("Crop atlas"));
|
|
||||||
|
|
||||||
// cb_atlas_crop.drawParam(new widgetParam(_x + _w - set_w, set_y, set_w, set_h, display_data.atlas_crop,, _m, _rx, _ry));
|
|
||||||
//}
|
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@ function __test_update_current_collections() {
|
||||||
var _node = _st.content[| i];
|
var _node = _st.content[| i];
|
||||||
|
|
||||||
print(" > Updating " + _node.path);
|
print(" > Updating " + _node.path);
|
||||||
var _map = json_load(_node.path);
|
var _map = json_load_struct(_node.path);
|
||||||
_map[? "version"] = SAVE_VERSION;
|
_map.version = SAVE_VERSION;
|
||||||
json_save(_node.meta_path, _map);
|
json_save_struct(_node.meta_path, _map);
|
||||||
}
|
}
|
||||||
|
|
||||||
for( var i = 0; i < ds_list_size(_st.subDir); i++ )
|
for( var i = 0; i < ds_list_size(_st.subDir); i++ )
|
||||||
|
|
|
@ -42,9 +42,10 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
|
||||||
|
|
||||||
text_surface = surface_create(1, 1);
|
text_surface = surface_create(1, 1);
|
||||||
|
|
||||||
static setSlidable = function(slidable = true, slideStep = slide_speed) { #region
|
static setSlidable = function(slideStep = slide_speed) { #region
|
||||||
self.slidable = slidable;
|
slidable = true;
|
||||||
slide_speed = slideStep;
|
slide_speed = slideStep;
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
@ -499,7 +500,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
|
||||||
|
|
||||||
if(sliding > 0) { #region
|
if(sliding > 0) { #region
|
||||||
var dx = _m[0] - slide_mx;
|
var dx = _m[0] - slide_mx;
|
||||||
var dy = -(_m[1] - slide_my);
|
var dy = _m[1] - slide_my;
|
||||||
|
|
||||||
if(sliding == 1 && (abs(dx) > 16 || abs(dy) > 16)) {
|
if(sliding == 1 && (abs(dx) > 16 || abs(dy) > 16)) {
|
||||||
sliding = 2;
|
sliding = 2;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
function timelineItem() constructor {
|
function timelineItem() constructor {
|
||||||
show = true;
|
show = true;
|
||||||
|
active = true;
|
||||||
|
|
||||||
color = -1;
|
color = -1;
|
||||||
color_cur = CDEF.main_grey;
|
color_cur = CDEF.main_grey;
|
||||||
|
|
|
@ -58,7 +58,7 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor {
|
||||||
|
|
||||||
static setSlideSpeed = function(speed) {
|
static setSlideSpeed = function(speed) {
|
||||||
for(var i = 0; i < size; i++)
|
for(var i = 0; i < size; i++)
|
||||||
tb[i].slide_speed = speed;
|
tb[i].setSlidable(speed);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const
|
||||||
|
|
||||||
static setSlideSpeed = function(speed) {
|
static setSlideSpeed = function(speed) {
|
||||||
for(var i = 0; i < size; i++)
|
for(var i = 0; i < size; i++)
|
||||||
tb[i].slide_speed = speed;
|
tb[i].setSlidable(speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static setInteract = function(interactable = noone) {
|
static setInteract = function(interactable = noone) {
|
||||||
|
|
11
shaders/sh_perlin_extra/sh_perlin.yy
Normal file
11
shaders/sh_perlin_extra/sh_perlin.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"type": 1,
|
||||||
|
"parent": {
|
||||||
|
"name": "shader",
|
||||||
|
"path": "folders/shader.yy",
|
||||||
|
},
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "sh_perlin",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMShader",
|
||||||
|
}
|
143
shaders/sh_perlin_extra/sh_perlin_extra.fsh
Normal file
143
shaders/sh_perlin_extra/sh_perlin_extra.fsh
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
//
|
||||||
|
// Simple passthrough fragment shader
|
||||||
|
//
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
uniform int type;
|
||||||
|
|
||||||
|
uniform vec2 position;
|
||||||
|
uniform vec2 u_resolution;
|
||||||
|
uniform vec2 scale;
|
||||||
|
uniform int iteration;
|
||||||
|
uniform float seed;
|
||||||
|
uniform int tile;
|
||||||
|
|
||||||
|
uniform int colored;
|
||||||
|
uniform vec2 colorRanR;
|
||||||
|
uniform vec2 colorRanG;
|
||||||
|
uniform vec2 colorRanB;
|
||||||
|
|
||||||
|
vec3 hsv2rgb(vec3 c) { #region
|
||||||
|
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||||
|
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
||||||
|
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + vec2(21.4564, 46.8564), vec2(12.9898, 78.233))) * (43758.5453123 + seed)); }
|
||||||
|
float randomFloat (in vec2 st, float seed) { #region
|
||||||
|
float sedSt = floor(seed);
|
||||||
|
float sedFr = fract(seed);
|
||||||
|
//sedFr = sedFr * sedFr * (3.0 - 2.0 * sedFr);
|
||||||
|
|
||||||
|
return mix(random(st, sedSt), random(st, sedSt + 1.), sedFr);
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
vec2 random2 (in vec2 st, float seed) { return vec2(randomFloat(st, seed), randomFloat(st, seed + 1.864354564)); }
|
||||||
|
|
||||||
|
float noise (in vec2 st, in vec2 scale) { #region
|
||||||
|
vec2 cellMin = floor(st);
|
||||||
|
vec2 cellMax = floor(st) + vec2(1., 1.);
|
||||||
|
|
||||||
|
if(tile == 1) {
|
||||||
|
cellMin = mod(cellMin, scale);
|
||||||
|
cellMax = mod(cellMax, scale);
|
||||||
|
}
|
||||||
|
|
||||||
|
vec2 f = fract(st);
|
||||||
|
vec2 u = f * f * (3.0 - 2.0 * f);
|
||||||
|
|
||||||
|
float a = 0., b = 0., c = 0., d = 0.;
|
||||||
|
|
||||||
|
if(type == 0) {
|
||||||
|
a = dot( random2(vec2(cellMin.x, cellMin.y) * 2. - 1., seed), f - vec2(0., 0.) );
|
||||||
|
b = dot( random2(vec2(cellMax.x, cellMin.y) * 2. - 1., seed), f - vec2(1., 0.) );
|
||||||
|
c = dot( random2(vec2(cellMin.x, cellMax.y) * 2. - 1., seed), f - vec2(0., 1.) );
|
||||||
|
d = dot( random2(vec2(cellMax.x, cellMax.y) * 2. - 1., seed), f - vec2(1., 1.) );
|
||||||
|
|
||||||
|
return abs(mix(mix(a, b, u.x), mix(c, d, u.x), u.y));
|
||||||
|
} else if(type == 1 || type == 2 || type == 3) {
|
||||||
|
a = randomFloat(vec2(cellMin.x, cellMin.y), seed);
|
||||||
|
b = randomFloat(vec2(cellMax.x, cellMin.y), seed);
|
||||||
|
c = randomFloat(vec2(cellMin.x, cellMax.y), seed);
|
||||||
|
d = randomFloat(vec2(cellMax.x, cellMax.y), seed);
|
||||||
|
|
||||||
|
float _m = mix(mix(a, b, u.x), mix(c, d, u.x), u.y);
|
||||||
|
|
||||||
|
return _m;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0.;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
float perlin(in vec2 st) { #region
|
||||||
|
float amp = pow(2., float(iteration) - 1.) / (pow(2., float(iteration)) - 1.);
|
||||||
|
if(type == 0) amp = pow(2., float(iteration) + 1.) / (pow(2., float(iteration)) - 1.);
|
||||||
|
if(type == 3) amp *= 1.25;
|
||||||
|
|
||||||
|
float n = 0., m = 0.;
|
||||||
|
vec2 pos = st;
|
||||||
|
vec2 sc = scale;
|
||||||
|
float it = float(iteration);
|
||||||
|
|
||||||
|
if(type == 3) it *= 3.;
|
||||||
|
|
||||||
|
for(float i = 0.; i < it; i++) {
|
||||||
|
float _n = noise(pos, sc);
|
||||||
|
|
||||||
|
if(type == 3) {
|
||||||
|
m += _n * amp;
|
||||||
|
if(mod(i, 3.) == 2.) {
|
||||||
|
n += smoothstep(0.4, 0.6, m) * amp;
|
||||||
|
m = 0.;
|
||||||
|
|
||||||
|
sc /= 1.5;
|
||||||
|
amp /= .75;
|
||||||
|
pos /= 1.5;
|
||||||
|
} else {
|
||||||
|
sc *= 1.5;
|
||||||
|
amp *= .75;
|
||||||
|
pos *= 1.5;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
n += _n * amp;
|
||||||
|
|
||||||
|
pos += random2(vec2(float(i)), 0.574186) * sc;
|
||||||
|
|
||||||
|
if(type == 0) {
|
||||||
|
sc *= 2.;
|
||||||
|
amp *= .5;
|
||||||
|
pos *= 2.;
|
||||||
|
} else if(type == 1) {
|
||||||
|
sc *= 2.;
|
||||||
|
amp *= .5;
|
||||||
|
pos *= 1. + _n;
|
||||||
|
} else if(type == 2) {
|
||||||
|
sc *= 2.;
|
||||||
|
amp *= .5;
|
||||||
|
pos += random2(vec2(n), seed) / sc;
|
||||||
|
pos *= 2.;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return n;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
void main() { #region
|
||||||
|
if(colored == 0) {
|
||||||
|
vec2 pos = (v_vTexcoord + position) * scale;
|
||||||
|
gl_FragColor = vec4(vec3(perlin(pos)), 1.0);
|
||||||
|
} else if(colored == 1) {
|
||||||
|
float randR = colorRanR[0] + perlin((v_vTexcoord + position) * scale) * (colorRanR[1] - colorRanR[0]);
|
||||||
|
float randG = colorRanG[0] + perlin((v_vTexcoord + position + vec2(1.7227, 4.55529)) * scale) * (colorRanG[1] - colorRanG[0]);
|
||||||
|
float randB = colorRanB[0] + perlin((v_vTexcoord + position + vec2(6.9950, 6.82063)) * scale) * (colorRanB[1] - colorRanB[0]);
|
||||||
|
|
||||||
|
gl_FragColor = vec4(randR, randG, randB, 1.0);
|
||||||
|
} else if(colored == 2) {
|
||||||
|
float randH = colorRanR[0] + perlin((v_vTexcoord + position) * scale) * (colorRanR[1] - colorRanR[0]);
|
||||||
|
float randS = colorRanG[0] + perlin((v_vTexcoord + position + vec2(1.7227, 4.55529)) * scale) * (colorRanG[1] - colorRanG[0]);
|
||||||
|
float randV = colorRanB[0] + perlin((v_vTexcoord + position + vec2(6.9950, 6.82063)) * scale) * (colorRanB[1] - colorRanB[0]);
|
||||||
|
|
||||||
|
gl_FragColor = vec4(hsv2rgb(vec3(randH, randS, randV)), 1.0);
|
||||||
|
}
|
||||||
|
} #endregion
|
19
shaders/sh_perlin_extra/sh_perlin_extra.vsh
Normal file
19
shaders/sh_perlin_extra/sh_perlin_extra.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_perlin_extra/sh_perlin_extra.yy
Normal file
10
shaders/sh_perlin_extra/sh_perlin_extra.yy
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMShader",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "sh_perlin_extra",
|
||||||
|
"parent": {
|
||||||
|
"name": "noise",
|
||||||
|
"path": "folders/shader/generator/noise.yy",
|
||||||
|
},
|
||||||
|
"type": 1,
|
||||||
|
}
|
|
@ -16,38 +16,43 @@ uniform vec2 colorRanR;
|
||||||
uniform vec2 colorRanG;
|
uniform vec2 colorRanG;
|
||||||
uniform vec2 colorRanB;
|
uniform vec2 colorRanB;
|
||||||
|
|
||||||
vec3 hsv2rgb(vec3 c) {
|
vec3 hsv2rgb(vec3 c) { #region
|
||||||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||||
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
||||||
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
float random (in vec2 st, float seed) {
|
float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + vec2(21.4564, 46.8564), vec2(12.9898, 78.233))) * (43758.5453123 + seed)); }
|
||||||
return fract(sin(dot(st.xy + vec2(21.4564, 46.8564), vec2(12.9898, 78.233))) * (43758.5453123 + seed));
|
float randomFloat (in vec2 st, float seed) { #region
|
||||||
}
|
|
||||||
|
|
||||||
float noise (in vec2 st, in vec2 scale) {
|
|
||||||
vec2 cellMin = tile == 1? mod(floor(st), scale) : floor(st);
|
|
||||||
vec2 cellMax = tile == 1? mod(floor(st) + vec2(1., 1.), scale) : floor(st) + vec2(1., 1.);
|
|
||||||
vec2 f = fract(st);
|
|
||||||
|
|
||||||
// Four corners in 2D of a tile
|
|
||||||
float sedSt = floor(seed);
|
float sedSt = floor(seed);
|
||||||
float sedFr = fract(seed);
|
float sedFr = fract(seed);
|
||||||
|
|
||||||
float a = mix(random(vec2(cellMin.x, cellMin.y), sedSt), random(vec2(cellMin.x, cellMin.y), sedSt + 1.), sedFr);
|
return mix(random(st, sedSt), random(st, sedSt + 1.), sedFr);
|
||||||
float b = mix(random(vec2(cellMax.x, cellMin.y), sedSt), random(vec2(cellMax.x, cellMin.y), sedSt + 1.), sedFr);
|
} #endregion
|
||||||
float c = mix(random(vec2(cellMin.x, cellMax.y), sedSt), random(vec2(cellMin.x, cellMax.y), sedSt + 1.), sedFr);
|
|
||||||
float d = mix(random(vec2(cellMax.x, cellMax.y), sedSt), random(vec2(cellMax.x, cellMax.y), sedSt + 1.), sedFr);
|
|
||||||
|
|
||||||
// Cubic Hermine Curve. Same as SmoothStep()
|
vec2 random2 (in vec2 st, float seed) { return vec2(random(st, seed), random(st, seed + 1.864354564)); }
|
||||||
vec2 u = f * f * (3.0 - 2.0 * f);
|
|
||||||
|
|
||||||
// Mix 4 coorners percentages
|
float noise (in vec2 st, in vec2 scale) { #region
|
||||||
return mix(mix(a, b, u.x), mix(c, d, u.x), u.y);
|
vec2 cellMin = floor(st);
|
||||||
|
vec2 cellMax = floor(st) + vec2(1., 1.);
|
||||||
|
|
||||||
|
if(tile == 1) {
|
||||||
|
cellMin = mod(cellMin, scale);
|
||||||
|
cellMax = mod(cellMax, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
float perlin(in vec2 st) {
|
vec2 f = fract(st);
|
||||||
|
vec2 u = f * f * (3.0 - 2.0 * f);
|
||||||
|
|
||||||
|
float a = randomFloat(vec2(cellMin.x, cellMin.y), seed);
|
||||||
|
float b = randomFloat(vec2(cellMax.x, cellMin.y), seed);
|
||||||
|
float c = randomFloat(vec2(cellMin.x, cellMax.y), seed);
|
||||||
|
float d = randomFloat(vec2(cellMax.x, cellMax.y), seed);
|
||||||
|
|
||||||
|
return abs(mix(mix(a, b, u.x), mix(c, d, u.x), u.y));
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
float perlin(in vec2 st) { #region
|
||||||
float amp = pow(2., float(iteration) - 1.) / (pow(2., float(iteration)) - 1.);
|
float amp = pow(2., float(iteration) - 1.) / (pow(2., float(iteration)) - 1.);
|
||||||
float n = 0.;
|
float n = 0.;
|
||||||
vec2 pos = st;
|
vec2 pos = st;
|
||||||
|
@ -56,15 +61,18 @@ float perlin(in vec2 st) {
|
||||||
for(int i = 0; i < iteration; i++) {
|
for(int i = 0; i < iteration; i++) {
|
||||||
n += noise(pos, sc) * amp;
|
n += noise(pos, sc) * amp;
|
||||||
|
|
||||||
|
pos.x += random(vec2(float(i)), 0.574186) * sc;
|
||||||
|
pos.y += random(vec2(float(i)), 0.821458) * sc;
|
||||||
|
|
||||||
sc *= 2.;
|
sc *= 2.;
|
||||||
amp *= .5;
|
amp *= .5;
|
||||||
pos *= 2.;
|
pos *= 2.;
|
||||||
}
|
}
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
void main() {
|
void main() { #region
|
||||||
if(colored == 0) {
|
if(colored == 0) {
|
||||||
vec2 pos = (v_vTexcoord + position) * scale;
|
vec2 pos = (v_vTexcoord + position) * scale;
|
||||||
gl_FragColor = vec4(vec3(perlin(pos)), 1.0);
|
gl_FragColor = vec4(vec3(perlin(pos)), 1.0);
|
||||||
|
@ -81,4 +89,4 @@ void main() {
|
||||||
|
|
||||||
gl_FragColor = vec4(hsv2rgb(vec3(randH, randS, randV)), 1.0);
|
gl_FragColor = vec4(hsv2rgb(vec3(randH, randS, randV)), 1.0);
|
||||||
}
|
}
|
||||||
}
|
} #endregion
|
Loading…
Add table
Reference in a new issue