mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-03 14:14:49 +01:00
1.0.9 update
This commit is contained in:
parent
2b1edf0457
commit
2adbd51215
178 changed files with 6612 additions and 3634 deletions
|
@ -10,6 +10,7 @@
|
||||||
{"id":{"name":"sh_perlin","path":"shaders/sh_perlin/sh_perlin.yy",},"order":1,},
|
{"id":{"name":"sh_perlin","path":"shaders/sh_perlin/sh_perlin.yy",},"order":1,},
|
||||||
{"id":{"name":"sh_normal_light","path":"shaders/sh_normal_light/sh_normal_light.yy",},"order":0,},
|
{"id":{"name":"sh_normal_light","path":"shaders/sh_normal_light/sh_normal_light.yy",},"order":0,},
|
||||||
{"id":{"name":"sh_scale3x","path":"shaders/sh_scale3x/sh_scale3x.yy",},"order":31,},
|
{"id":{"name":"sh_scale3x","path":"shaders/sh_scale3x/sh_scale3x.yy",},"order":31,},
|
||||||
|
{"id":{"name":"node_csv_file_write","path":"scripts/node_csv_file_write/node_csv_file_write.yy",},"order":13,},
|
||||||
{"id":{"name":"surface_functions","path":"scripts/surface_functions/surface_functions.yy",},"order":5,},
|
{"id":{"name":"surface_functions","path":"scripts/surface_functions/surface_functions.yy",},"order":5,},
|
||||||
{"id":{"name":"s_node_normal","path":"sprites/s_node_normal/s_node_normal.yy",},"order":28,},
|
{"id":{"name":"s_node_normal","path":"sprites/s_node_normal/s_node_normal.yy",},"order":28,},
|
||||||
{"id":{"name":"buffer_surface","path":"scripts/buffer_surface/buffer_surface.yy",},"order":3,},
|
{"id":{"name":"buffer_surface","path":"scripts/buffer_surface/buffer_surface.yy",},"order":3,},
|
||||||
|
@ -19,11 +20,14 @@
|
||||||
{"id":{"name":"panel_data","path":"scripts/panel_data/panel_data.yy",},"order":0,},
|
{"id":{"name":"panel_data","path":"scripts/panel_data/panel_data.yy",},"order":0,},
|
||||||
{"id":{"name":"s_node_text_file_read","path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},"order":16,},
|
{"id":{"name":"s_node_text_file_read","path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},"order":16,},
|
||||||
{"id":{"name":"s_node_text_trim","path":"sprites/s_node_text_trim/s_node_text_trim.yy",},"order":18,},
|
{"id":{"name":"s_node_text_trim","path":"sprites/s_node_text_trim/s_node_text_trim.yy",},"order":18,},
|
||||||
|
{"id":{"name":"sh_noise_grid_hex","path":"shaders/sh_noise_grid_hex/sh_noise_grid_hex.yy",},"order":24,},
|
||||||
{"id":{"name":"node_3d_obj","path":"scripts/node_3d_obj/node_3d_obj.yy",},"order":8,},
|
{"id":{"name":"node_3d_obj","path":"scripts/node_3d_obj/node_3d_obj.yy",},"order":8,},
|
||||||
|
{"id":{"name":"s_node_grid_tri_noise","path":"sprites/s_node_grid_tri_noise/s_node_grid_tri_noise.yy",},"order":22,},
|
||||||
{"id":{"name":"o_dialog_menubox","path":"objects/o_dialog_menubox/o_dialog_menubox.yy",},"order":1,},
|
{"id":{"name":"o_dialog_menubox","path":"objects/o_dialog_menubox/o_dialog_menubox.yy",},"order":1,},
|
||||||
{"id":{"name":"s_node_blend","path":"sprites/s_node_blend/s_node_blend.yy",},"order":5,},
|
{"id":{"name":"s_node_blend","path":"sprites/s_node_blend/s_node_blend.yy",},"order":5,},
|
||||||
{"id":{"name":"draw_text_function","path":"scripts/draw_text_function/draw_text_function.yy",},"order":11,},
|
{"id":{"name":"draw_text_function","path":"scripts/draw_text_function/draw_text_function.yy",},"order":11,},
|
||||||
{"id":{"name":"libdlgmodule","path":"extensions/libdlgmodule/libdlgmodule.yy",},"order":2,},
|
{"id":{"name":"libdlgmodule","path":"extensions/libdlgmodule/libdlgmodule.yy",},"order":2,},
|
||||||
|
{"id":{"name":"node_3d_prim_cone","path":"scripts/node_3d_prim_cone/node_3d_prim_cone.yy",},"order":14,},
|
||||||
{"id":{"name":"node_line","path":"scripts/node_line/node_line.yy",},"order":7,},
|
{"id":{"name":"node_line","path":"scripts/node_line/node_line.yy",},"order":7,},
|
||||||
{"id":{"name":"s_node_frame","path":"sprites/s_node_frame/s_node_frame.yy",},"order":1,},
|
{"id":{"name":"s_node_frame","path":"sprites/s_node_frame/s_node_frame.yy",},"order":1,},
|
||||||
{"id":{"name":"node_2d_light","path":"scripts/node_2d_light/node_2d_light.yy",},"order":40,},
|
{"id":{"name":"node_2d_light","path":"scripts/node_2d_light/node_2d_light.yy",},"order":40,},
|
||||||
|
@ -79,6 +83,7 @@
|
||||||
{"id":{"name":"s_node_vfx","path":"sprites/s_node_vfx/s_node_vfx.yy",},"order":9,},
|
{"id":{"name":"s_node_vfx","path":"sprites/s_node_vfx/s_node_vfx.yy",},"order":9,},
|
||||||
{"id":{"name":"draw_surface_blend","path":"scripts/draw_surface_blend/draw_surface_blend.yy",},"order":1,},
|
{"id":{"name":"draw_surface_blend","path":"scripts/draw_surface_blend/draw_surface_blend.yy",},"order":1,},
|
||||||
{"id":{"name":"sh_simplex","path":"shaders/sh_simplex/sh_simplex.yy",},"order":22,},
|
{"id":{"name":"sh_simplex","path":"shaders/sh_simplex/sh_simplex.yy",},"order":22,},
|
||||||
|
{"id":{"name":"node_noise_grid_tri","path":"scripts/node_noise_grid_tri/node_noise_grid_tri.yy",},"order":25,},
|
||||||
{"id":{"name":"blurSurface","path":"scripts/blurSurface/blurSurface.yy",},"order":0,},
|
{"id":{"name":"blurSurface","path":"scripts/blurSurface/blurSurface.yy",},"order":0,},
|
||||||
{"id":{"name":"node_threshold","path":"scripts/node_threshold/node_threshold.yy",},"order":51,},
|
{"id":{"name":"node_threshold","path":"scripts/node_threshold/node_threshold.yy",},"order":51,},
|
||||||
{"id":{"name":"sh_cell_noise_edge","path":"shaders/sh_cell_noise_edge/sh_cell_noise_edge.yy",},"order":5,},
|
{"id":{"name":"sh_cell_noise_edge","path":"shaders/sh_cell_noise_edge/sh_cell_noise_edge.yy",},"order":5,},
|
||||||
|
@ -101,9 +106,11 @@
|
||||||
{"id":{"name":"s_node_trail","path":"sprites/s_node_trail/s_node_trail.yy",},"order":38,},
|
{"id":{"name":"s_node_trail","path":"sprites/s_node_trail/s_node_trail.yy",},"order":38,},
|
||||||
{"id":{"name":"sh_level_selector","path":"shaders/sh_level_selector/sh_level_selector.yy",},"order":25,},
|
{"id":{"name":"sh_level_selector","path":"shaders/sh_level_selector/sh_level_selector.yy",},"order":25,},
|
||||||
{"id":{"name":"string_eval","path":"scripts/string_eval/string_eval.yy",},"order":0,},
|
{"id":{"name":"string_eval","path":"scripts/string_eval/string_eval.yy",},"order":0,},
|
||||||
|
{"id":{"name":"sh_noise_grid_tri","path":"shaders/sh_noise_grid_tri/sh_noise_grid_tri.yy",},"order":25,},
|
||||||
{"id":{"name":"globals","path":"scripts/globals/globals.yy",},"order":1,},
|
{"id":{"name":"globals","path":"scripts/globals/globals.yy",},"order":1,},
|
||||||
{"id":{"name":"s_node_noise_perlin","path":"sprites/s_node_noise_perlin/s_node_noise_perlin.yy",},"order":11,},
|
{"id":{"name":"s_node_noise_perlin","path":"sprites/s_node_noise_perlin/s_node_noise_perlin.yy",},"order":11,},
|
||||||
{"id":{"name":"s_node_dithering","path":"sprites/s_node_dithering/s_node_dithering.yy",},"order":19,},
|
{"id":{"name":"s_node_dithering","path":"sprites/s_node_dithering/s_node_dithering.yy",},"order":19,},
|
||||||
|
{"id":{"name":"s_node_boolean","path":"sprites/s_node_boolean/s_node_boolean.yy",},"order":21,},
|
||||||
{"id":{"name":"node_compare","path":"scripts/node_compare/node_compare.yy",},"order":16,},
|
{"id":{"name":"node_compare","path":"scripts/node_compare/node_compare.yy",},"order":16,},
|
||||||
{"id":{"name":"s_node_HSV_combine","path":"sprites/s_node_HSV_combine/s_node_HSV_combine.yy",},"order":42,},
|
{"id":{"name":"s_node_HSV_combine","path":"sprites/s_node_HSV_combine/s_node_HSV_combine.yy",},"order":42,},
|
||||||
{"id":{"name":"node_normal_light","path":"scripts/node_normal_light/node_normal_light.yy",},"order":0,},
|
{"id":{"name":"node_normal_light","path":"scripts/node_normal_light/node_normal_light.yy",},"order":0,},
|
||||||
|
@ -115,6 +122,7 @@
|
||||||
{"id":{"name":"s_node_pixel_cloud","path":"sprites/s_node_pixel_cloud/s_node_pixel_cloud.yy",},"order":30,},
|
{"id":{"name":"s_node_pixel_cloud","path":"sprites/s_node_pixel_cloud/s_node_pixel_cloud.yy",},"order":30,},
|
||||||
{"id":{"name":"node_noise_grid","path":"scripts/node_noise_grid/node_noise_grid.yy",},"order":8,},
|
{"id":{"name":"node_noise_grid","path":"scripts/node_noise_grid/node_noise_grid.yy",},"order":8,},
|
||||||
{"id":{"name":"s_node_HSV","path":"sprites/s_node_HSV/s_node_HSV.yy",},"order":44,},
|
{"id":{"name":"s_node_HSV","path":"sprites/s_node_HSV/s_node_HSV.yy",},"order":44,},
|
||||||
|
{"id":{"name":"s_node_3d_cone","path":"sprites/s_node_3d_cone/s_node_3d_cone.yy",},"order":9,},
|
||||||
{"id":{"name":"s_node_compose","path":"sprites/s_node_compose/s_node_compose.yy",},"order":1,},
|
{"id":{"name":"s_node_compose","path":"sprites/s_node_compose/s_node_compose.yy",},"order":1,},
|
||||||
{"id":{"name":"s_node_switch","path":"sprites/s_node_switch/s_node_switch.yy",},"order":20,},
|
{"id":{"name":"s_node_switch","path":"sprites/s_node_switch/s_node_switch.yy",},"order":20,},
|
||||||
{"id":{"name":"s_node_crop","path":"sprites/s_node_crop/s_node_crop.yy",},"order":2,},
|
{"id":{"name":"s_node_crop","path":"sprites/s_node_crop/s_node_crop.yy",},"order":2,},
|
||||||
|
@ -159,6 +167,7 @@
|
||||||
{"id":{"name":"node_processor","path":"scripts/node_processor/node_processor.yy",},"order":8,},
|
{"id":{"name":"node_processor","path":"scripts/node_processor/node_processor.yy",},"order":8,},
|
||||||
{"id":{"name":"animation_controller","path":"scripts/animation_controller/animation_controller.yy",},"order":1,},
|
{"id":{"name":"animation_controller","path":"scripts/animation_controller/animation_controller.yy",},"order":1,},
|
||||||
{"id":{"name":"s_node_shadow","path":"sprites/s_node_shadow/s_node_shadow.yy",},"order":34,},
|
{"id":{"name":"s_node_shadow","path":"sprites/s_node_shadow/s_node_shadow.yy",},"order":34,},
|
||||||
|
{"id":{"name":"s_node_grid_hex_noise","path":"sprites/s_node_grid_hex_noise/s_node_grid_hex_noise.yy",},"order":21,},
|
||||||
{"id":{"name":"sh_zigzag","path":"shaders/sh_zigzag/sh_zigzag.yy",},"order":11,},
|
{"id":{"name":"sh_zigzag","path":"shaders/sh_zigzag/sh_zigzag.yy",},"order":11,},
|
||||||
{"id":{"name":"sh_color_remove","path":"shaders/sh_color_remove/sh_color_remove.yy",},"order":24,},
|
{"id":{"name":"sh_color_remove","path":"shaders/sh_color_remove/sh_color_remove.yy",},"order":24,},
|
||||||
{"id":{"name":"s_node_blur","path":"sprites/s_node_blur/s_node_blur.yy",},"order":7,},
|
{"id":{"name":"s_node_blur","path":"sprites/s_node_blur/s_node_blur.yy",},"order":7,},
|
||||||
|
@ -166,6 +175,7 @@
|
||||||
{"id":{"name":"s_node_gradient_4points","path":"sprites/s_node_gradient_4points/s_node_gradient_4points.yy",},"order":2,},
|
{"id":{"name":"s_node_gradient_4points","path":"sprites/s_node_gradient_4points/s_node_gradient_4points.yy",},"order":2,},
|
||||||
{"id":{"name":"s_node_gradient_out","path":"sprites/s_node_gradient_out/s_node_gradient_out.yy",},"order":8,},
|
{"id":{"name":"s_node_gradient_out","path":"sprites/s_node_gradient_out/s_node_gradient_out.yy",},"order":8,},
|
||||||
{"id":{"name":"s_node_vec3","path":"sprites/s_node_vec3/s_node_vec3.yy",},"order":7,},
|
{"id":{"name":"s_node_vec3","path":"sprites/s_node_vec3/s_node_vec3.yy",},"order":7,},
|
||||||
|
{"id":{"name":"sh_vertex_normal_pass","path":"shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.yy",},"order":5,},
|
||||||
{"id":{"name":"surface_valid","path":"scripts/surface_valid/surface_valid.yy",},"order":6,},
|
{"id":{"name":"surface_valid","path":"scripts/surface_valid/surface_valid.yy",},"order":6,},
|
||||||
{"id":{"name":"sh_blur_radial","path":"shaders/sh_blur_radial/sh_blur_radial.yy",},"order":5,},
|
{"id":{"name":"sh_blur_radial","path":"shaders/sh_blur_radial/sh_blur_radial.yy",},"order":5,},
|
||||||
{"id":{"name":"node_VFX_renderer","path":"scripts/node_VFX_renderer/node_VFX_renderer.yy",},"order":5,},
|
{"id":{"name":"node_VFX_renderer","path":"scripts/node_VFX_renderer/node_VFX_renderer.yy",},"order":5,},
|
||||||
|
@ -184,6 +194,7 @@
|
||||||
{"id":{"name":"node_blur","path":"scripts/node_blur/node_blur.yy",},"order":16,},
|
{"id":{"name":"node_blur","path":"scripts/node_blur/node_blur.yy",},"order":16,},
|
||||||
{"id":{"name":"s_node_loop","path":"sprites/s_node_loop/s_node_loop.yy",},"order":5,},
|
{"id":{"name":"s_node_loop","path":"sprites/s_node_loop/s_node_loop.yy",},"order":5,},
|
||||||
{"id":{"name":"node_zigzag","path":"scripts/node_zigzag/node_zigzag.yy",},"order":12,},
|
{"id":{"name":"node_zigzag","path":"scripts/node_zigzag/node_zigzag.yy",},"order":12,},
|
||||||
|
{"id":{"name":"node_equation","path":"scripts/node_equation/node_equation.yy",},"order":18,},
|
||||||
{"id":{"name":"preset_data","path":"scripts/preset_data/preset_data.yy",},"order":7,},
|
{"id":{"name":"preset_data","path":"scripts/preset_data/preset_data.yy",},"order":7,},
|
||||||
{"id":{"name":"_f_h5","path":"fonts/_f_h5/_f_h5.yy",},"order":2,},
|
{"id":{"name":"_f_h5","path":"fonts/_f_h5/_f_h5.yy",},"order":2,},
|
||||||
{"id":{"name":"node_color","path":"scripts/node_color/node_color.yy",},"order":0,},
|
{"id":{"name":"node_color","path":"scripts/node_color/node_color.yy",},"order":0,},
|
||||||
|
@ -262,6 +273,7 @@
|
||||||
{"id":{"name":"notification_system","path":"scripts/notification_system/notification_system.yy",},"order":6,},
|
{"id":{"name":"notification_system","path":"scripts/notification_system/notification_system.yy",},"order":6,},
|
||||||
{"id":{"name":"node_color_from_hsv","path":"scripts/node_color_from_hsv/node_color_from_hsv.yy",},"order":6,},
|
{"id":{"name":"node_color_from_hsv","path":"scripts/node_color_from_hsv/node_color_from_hsv.yy",},"order":6,},
|
||||||
{"id":{"name":"s_node_image_copy","path":"sprites/s_node_image_copy/s_node_image_copy.yy",},"order":6,},
|
{"id":{"name":"s_node_image_copy","path":"sprites/s_node_image_copy/s_node_image_copy.yy",},"order":6,},
|
||||||
|
{"id":{"name":"node_boolean","path":"scripts/node_boolean/node_boolean.yy",},"order":17,},
|
||||||
{"id":{"name":"node_grid_tri","path":"scripts/node_grid_tri/node_grid_tri.yy",},"order":21,},
|
{"id":{"name":"node_grid_tri","path":"scripts/node_grid_tri/node_grid_tri.yy",},"order":21,},
|
||||||
{"id":{"name":"window_command_hook","path":"extensions/window_command_hook/window_command_hook.yy",},"order":6,},
|
{"id":{"name":"window_command_hook","path":"extensions/window_command_hook/window_command_hook.yy",},"order":6,},
|
||||||
{"id":{"name":"slider","path":"scripts/slider/slider.yy",},"order":15,},
|
{"id":{"name":"slider","path":"scripts/slider/slider.yy",},"order":15,},
|
||||||
|
@ -307,6 +319,7 @@
|
||||||
{"id":{"name":"s_node_blur_simple","path":"sprites/s_node_blur_simple/s_node_blur_simple.yy",},"order":41,},
|
{"id":{"name":"s_node_blur_simple","path":"sprites/s_node_blur_simple/s_node_blur_simple.yy",},"order":41,},
|
||||||
{"id":{"name":"node_VFX_spawner","path":"scripts/node_VFX_spawner/node_VFX_spawner.yy",},"order":2,},
|
{"id":{"name":"node_VFX_spawner","path":"scripts/node_VFX_spawner/node_VFX_spawner.yy",},"order":2,},
|
||||||
{"id":{"name":"libfilesystem","path":"extensions/libfilesystem/libfilesystem.yy",},"order":3,},
|
{"id":{"name":"libfilesystem","path":"extensions/libfilesystem/libfilesystem.yy",},"order":3,},
|
||||||
|
{"id":{"name":"s_node_equation","path":"sprites/s_node_equation/s_node_equation.yy",},"order":22,},
|
||||||
{"id":{"name":"sh_color_replace","path":"shaders/sh_color_replace/sh_color_replace.yy",},"order":4,},
|
{"id":{"name":"sh_color_replace","path":"shaders/sh_color_replace/sh_color_replace.yy",},"order":4,},
|
||||||
{"id":{"name":"Apollo","path":"extensions/Apollo/Apollo.yy",},"order":8,},
|
{"id":{"name":"Apollo","path":"extensions/Apollo/Apollo.yy",},"order":8,},
|
||||||
{"id":{"name":"rotator","path":"scripts/rotator/rotator.yy",},"order":11,},
|
{"id":{"name":"rotator","path":"scripts/rotator/rotator.yy",},"order":11,},
|
||||||
|
@ -325,6 +338,7 @@
|
||||||
{"id":{"name":"matrixGrid","path":"scripts/matrixGrid/matrixGrid.yy",},"order":23,},
|
{"id":{"name":"matrixGrid","path":"scripts/matrixGrid/matrixGrid.yy",},"order":23,},
|
||||||
{"id":{"name":"_node_VFX_effector","path":"scripts/_node_VFX_effector/_node_VFX_effector.yy",},"order":1,},
|
{"id":{"name":"_node_VFX_effector","path":"scripts/_node_VFX_effector/_node_VFX_effector.yy",},"order":1,},
|
||||||
{"id":{"name":"areaBox","path":"scripts/areaBox/areaBox.yy",},"order":1,},
|
{"id":{"name":"areaBox","path":"scripts/areaBox/areaBox.yy",},"order":1,},
|
||||||
|
{"id":{"name":"node_noise_grid_hex","path":"scripts/node_noise_grid_hex/node_noise_grid_hex.yy",},"order":24,},
|
||||||
{"id":{"name":"node_lua_global","path":"scripts/node_lua_global/node_lua_global.yy",},"order":6,},
|
{"id":{"name":"node_lua_global","path":"scripts/node_lua_global/node_lua_global.yy",},"order":6,},
|
||||||
{"id":{"name":"o_dialog_preset","path":"objects/o_dialog_preset/o_dialog_preset.yy",},"order":1,},
|
{"id":{"name":"o_dialog_preset","path":"objects/o_dialog_preset/o_dialog_preset.yy",},"order":1,},
|
||||||
{"id":{"name":"s_node_erode","path":"sprites/s_node_erode/s_node_erode.yy",},"order":21,},
|
{"id":{"name":"s_node_erode","path":"sprites/s_node_erode/s_node_erode.yy",},"order":21,},
|
||||||
|
@ -442,6 +456,7 @@
|
||||||
{"id":{"name":"_p_dialog","path":"objects/_p_dialog/_p_dialog.yy",},"order":0,},
|
{"id":{"name":"_p_dialog","path":"objects/_p_dialog/_p_dialog.yy",},"order":0,},
|
||||||
{"id":{"name":"render_data","path":"scripts/render_data/render_data.yy",},"order":2,},
|
{"id":{"name":"render_data","path":"scripts/render_data/render_data.yy",},"order":2,},
|
||||||
{"id":{"name":"_node_VFX","path":"scripts/_node_VFX/_node_VFX.yy",},"order":4,},
|
{"id":{"name":"_node_VFX","path":"scripts/_node_VFX/_node_VFX.yy",},"order":4,},
|
||||||
|
{"id":{"name":"addon_key_displayer","path":"objects/addon_key_displayer/addon_key_displayer.yy",},"order":0,},
|
||||||
{"id":{"name":"s_node_blur_directional","path":"sprites/s_node_blur_directional/s_node_blur_directional.yy",},"order":9,},
|
{"id":{"name":"s_node_blur_directional","path":"sprites/s_node_blur_directional/s_node_blur_directional.yy",},"order":9,},
|
||||||
{"id":{"name":"distance_to_line","path":"scripts/distance_to_line/distance_to_line.yy",},"order":0,},
|
{"id":{"name":"distance_to_line","path":"scripts/distance_to_line/distance_to_line.yy",},"order":0,},
|
||||||
{"id":{"name":"s_node_sprite_sheet","path":"sprites/s_node_sprite_sheet/s_node_sprite_sheet.yy",},"order":1,},
|
{"id":{"name":"s_node_sprite_sheet","path":"sprites/s_node_sprite_sheet/s_node_sprite_sheet.yy",},"order":1,},
|
||||||
|
@ -461,8 +476,8 @@
|
||||||
{"id":{"name":"node_image_sequence","path":"scripts/node_image_sequence/node_image_sequence.yy",},"order":1,},
|
{"id":{"name":"node_image_sequence","path":"scripts/node_image_sequence/node_image_sequence.yy",},"order":1,},
|
||||||
{"id":{"name":"node_text_file_read","path":"scripts/node_text_file_read/node_text_file_read.yy",},"order":7,},
|
{"id":{"name":"node_text_file_read","path":"scripts/node_text_file_read/node_text_file_read.yy",},"order":7,},
|
||||||
{"id":{"name":"s_menu_transparent","path":"sprites/s_menu_transparent/s_menu_transparent.yy",},"order":0,},
|
{"id":{"name":"s_menu_transparent","path":"sprites/s_menu_transparent/s_menu_transparent.yy",},"order":0,},
|
||||||
|
{"id":{"name":"sh_palette_replace","path":"shaders/sh_palette_replace/sh_palette_replace.yy",},"order":51,},
|
||||||
{"id":{"name":"key_press","path":"scripts/key_press/key_press.yy",},"order":0,},
|
{"id":{"name":"key_press","path":"scripts/key_press/key_press.yy",},"order":0,},
|
||||||
{"id":{"name":"curve_power_function","path":"scripts/curve_power_function/curve_power_function.yy",},"order":3,},
|
|
||||||
{"id":{"name":"sh_mirror","path":"shaders/sh_mirror/sh_mirror.yy",},"order":0,},
|
{"id":{"name":"sh_mirror","path":"shaders/sh_mirror/sh_mirror.yy",},"order":0,},
|
||||||
{"id":{"name":"sh_cell_noise_random","path":"shaders/sh_cell_noise_random/sh_cell_noise_random.yy",},"order":6,},
|
{"id":{"name":"sh_cell_noise_random","path":"shaders/sh_cell_noise_random/sh_cell_noise_random.yy",},"order":6,},
|
||||||
{"id":{"name":"node_iterator_input","path":"scripts/node_iterator_input/node_iterator_input.yy",},"order":2,},
|
{"id":{"name":"node_iterator_input","path":"scripts/node_iterator_input/node_iterator_input.yy",},"order":2,},
|
||||||
|
@ -535,6 +550,7 @@
|
||||||
{"id":{"name":"s_node_level_selector","path":"sprites/s_node_level_selector/s_node_level_selector.yy",},"order":27,},
|
{"id":{"name":"s_node_level_selector","path":"sprites/s_node_level_selector/s_node_level_selector.yy",},"order":27,},
|
||||||
{"id":{"name":"random_function","path":"scripts/random_function/random_function.yy",},"order":3,},
|
{"id":{"name":"random_function","path":"scripts/random_function/random_function.yy",},"order":3,},
|
||||||
{"id":{"name":"s_node_input","path":"sprites/s_node_input/s_node_input.yy",},"order":6,},
|
{"id":{"name":"s_node_input","path":"sprites/s_node_input/s_node_input.yy",},"order":6,},
|
||||||
|
{"id":{"name":"addon","path":"objects/addon/addon.yy",},"order":1,},
|
||||||
{"id":{"name":"string_decimal","path":"scripts/string_decimal/string_decimal.yy",},"order":0,},
|
{"id":{"name":"string_decimal","path":"scripts/string_decimal/string_decimal.yy",},"order":0,},
|
||||||
{"id":{"name":"_f_h3","path":"fonts/_f_h3/_f_h3.yy",},"order":3,},
|
{"id":{"name":"_f_h3","path":"fonts/_f_h3/_f_h3.yy",},"order":3,},
|
||||||
{"id":{"name":"s_node_math","path":"sprites/s_node_math/s_node_math.yy",},"order":2,},
|
{"id":{"name":"s_node_math","path":"sprites/s_node_math/s_node_math.yy",},"order":2,},
|
||||||
|
@ -580,11 +596,14 @@
|
||||||
{"id":{"name":"draw_line_curve","path":"scripts/draw_line_curve/draw_line_curve.yy",},"order":5,},
|
{"id":{"name":"draw_line_curve","path":"scripts/draw_line_curve/draw_line_curve.yy",},"order":5,},
|
||||||
{"id":{"name":"sh_blend_screen","path":"shaders/sh_blend_screen/sh_blend_screen.yy",},"order":3,},
|
{"id":{"name":"sh_blend_screen","path":"shaders/sh_blend_screen/sh_blend_screen.yy",},"order":3,},
|
||||||
{"id":{"name":"node_group_output","path":"scripts/node_group_output/node_group_output.yy",},"order":2,},
|
{"id":{"name":"node_group_output","path":"scripts/node_group_output/node_group_output.yy",},"order":2,},
|
||||||
|
{"id":{"name":"node_palette_replacement","path":"scripts/node_palette_replacement/node_palette_replacement.yy",},"order":54,},
|
||||||
{"id":{"name":"s_node_scatter","path":"sprites/s_node_scatter/s_node_scatter.yy",},"order":19,},
|
{"id":{"name":"s_node_scatter","path":"sprites/s_node_scatter/s_node_scatter.yy",},"order":19,},
|
||||||
|
{"id":{"name":"sh_vertex_depth_pass","path":"shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.yy",},"order":6,},
|
||||||
{"id":{"name":"_f_p2","path":"fonts/_f_p2/_f_p2.yy",},"order":4,},
|
{"id":{"name":"_f_p2","path":"fonts/_f_p2/_f_p2.yy",},"order":4,},
|
||||||
{"id":{"name":"node_text_file_write","path":"scripts/node_text_file_write/node_text_file_write.yy",},"order":11,},
|
{"id":{"name":"node_text_file_write","path":"scripts/node_text_file_write/node_text_file_write.yy",},"order":11,},
|
||||||
{"id":{"name":"sh_lum2alpha","path":"shaders/sh_lum2alpha/sh_lum2alpha.yy",},"order":43,},
|
{"id":{"name":"sh_lum2alpha","path":"shaders/sh_lum2alpha/sh_lum2alpha.yy",},"order":43,},
|
||||||
{"id":{"name":"button","path":"scripts/button/button.yy",},"order":2,},
|
{"id":{"name":"button","path":"scripts/button/button.yy",},"order":2,},
|
||||||
|
{"id":{"name":"s_node_3d_sphere","path":"sprites/s_node_3d_sphere/s_node_3d_sphere.yy",},"order":8,},
|
||||||
{"id":{"name":"node_VFX_effector","path":"scripts/node_VFX_effector/node_VFX_effector.yy",},"order":8,},
|
{"id":{"name":"node_VFX_effector","path":"scripts/node_VFX_effector/node_VFX_effector.yy",},"order":8,},
|
||||||
{"id":{"name":"sh_blur_gaussian","path":"shaders/sh_blur_gaussian/sh_blur_gaussian.yy",},"order":0,},
|
{"id":{"name":"sh_blur_gaussian","path":"shaders/sh_blur_gaussian/sh_blur_gaussian.yy",},"order":0,},
|
||||||
{"id":{"name":"s_node_3d_cylinder","path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",},"order":1,},
|
{"id":{"name":"s_node_3d_cylinder","path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",},"order":1,},
|
||||||
|
@ -644,6 +663,7 @@
|
||||||
{"id":{"name":"shell_helper","path":"scripts/shell_helper/shell_helper.yy",},"order":20,},
|
{"id":{"name":"shell_helper","path":"scripts/shell_helper/shell_helper.yy",},"order":20,},
|
||||||
{"id":{"name":"o_dialog_preference","path":"objects/o_dialog_preference/o_dialog_preference.yy",},"order":15,},
|
{"id":{"name":"o_dialog_preference","path":"objects/o_dialog_preference/o_dialog_preference.yy",},"order":15,},
|
||||||
{"id":{"name":"node_wrap","path":"scripts/node_wrap/node_wrap.yy",},"order":2,},
|
{"id":{"name":"node_wrap","path":"scripts/node_wrap/node_wrap.yy",},"order":2,},
|
||||||
|
{"id":{"name":"node_3d_prim_sphere","path":"scripts/node_3d_prim_sphere/node_3d_prim_sphere.yy",},"order":13,},
|
||||||
{"id":{"name":"o_dialog_about","path":"objects/o_dialog_about/o_dialog_about.yy",},"order":13,},
|
{"id":{"name":"o_dialog_about","path":"objects/o_dialog_about/o_dialog_about.yy",},"order":13,},
|
||||||
{"id":{"name":"dialog_management","path":"scripts/dialog_management/dialog_management.yy",},"order":5,},
|
{"id":{"name":"dialog_management","path":"scripts/dialog_management/dialog_management.yy",},"order":5,},
|
||||||
{"id":{"name":"draw_shapes","path":"scripts/draw_shapes/draw_shapes.yy",},"order":10,},
|
{"id":{"name":"draw_shapes","path":"scripts/draw_shapes/draw_shapes.yy",},"order":10,},
|
||||||
|
@ -686,6 +706,7 @@
|
||||||
{"roomId":{"name":"rm_main","path":"rooms/rm_main/rm_main.yy",},},
|
{"roomId":{"name":"rm_main","path":"rooms/rm_main/rm_main.yy",},},
|
||||||
],
|
],
|
||||||
"Folders": [
|
"Folders": [
|
||||||
|
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"addons","folderPath":"folders/addons.yy","order":15,},
|
||||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation_curve","folderPath":"folders/animation_curve.yy","order":14,},
|
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation_curve","folderPath":"folders/animation_curve.yy","order":14,},
|
||||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"dialog","folderPath":"folders/dialog.yy","order":5,},
|
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"dialog","folderPath":"folders/dialog.yy","order":5,},
|
||||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/dialog/animation.yy","order":31,},
|
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/dialog/animation.yy","order":31,},
|
||||||
|
@ -878,7 +899,6 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_splice_draw.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/tool",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_splice_draw.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/tool",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_timeline_elastic.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/timeline",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_timeline_elastic.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/timeline",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_timeline_keyframe_selecting.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/timeline",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_timeline_keyframe_selecting.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/timeline",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_timeline_ease_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/timeline",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_draw_area.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_draw_area.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_draw_path.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_draw_path.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_junction_name_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_junction_name_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
|
@ -979,9 +999,7 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_color_picker_dropper.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_color_picker_dropper.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_workspace_1.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_workspace_1.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_padding.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_padding.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_prop_on_end_strip3.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_active.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_active.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/timeline",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_timeline_keyframes_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/timeline",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_timeline_keyframes_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/timeline",},
|
||||||
{"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_slider_strip5.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_slider_strip5.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
||||||
|
@ -991,7 +1009,6 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"A9Rwvus4g_1fk5bwb_iqs.tmp","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"A9Rwvus4g_1fk5bwb_iqs.tmp","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_checkbox_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_checkbox_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_bg_name.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_bg_name.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_area_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_area_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_cache.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_cache.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_timeline_keyframe_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_timeline_keyframe_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
|
@ -1007,7 +1024,6 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_file_save.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_file_save.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_file_load.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_file_load.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_state_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_state_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_dialog_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_dialog_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_refresh_24.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_refresh_24.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_tile_view_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_tile_view_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
|
@ -1033,15 +1049,23 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_new_badge.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_new_badge.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_junctions_single.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_junctions_single.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_glow.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_glow.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Collections.zip","CopyToMask":-1,"filePath":"datafiles/data",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"FiraCode-Medium.ttf","CopyToMask":-1,"filePath":"datafiles/data/themes/default/fonts",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"FiraCode-Medium.ttf","CopyToMask":-1,"filePath":"datafiles/data/themes/default/fonts",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_textbox_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_textbox_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_textbox_code_line.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_textbox_code_line.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/widget",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_prop_on_end.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"1.png.tmp$$","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_view_group.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_key_display.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/UI",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/timeline",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_timeline_ease_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/timeline",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"default.zip","CopyToMask":-1,"filePath":"datafiles/data/themes",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"default.zip","CopyToMask":-1,"filePath":"datafiles/data/themes",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Collections.zip","CopyToMask":-1,"filePath":"datafiles/data",},
|
||||||
],
|
],
|
||||||
"MetaData": {
|
"MetaData": {
|
||||||
"IDEVersion": "2022.11.1.56",
|
"IDEVersion": "2022.11.1.56",
|
||||||
|
|
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
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
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
datafiles/data/themes/default/graphics/UI/s_key_display.png
Normal file
BIN
datafiles/data/themes/default/graphics/UI/s_key_display.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 200 B |
|
@ -382,6 +382,13 @@
|
||||||
"yorigin": 16,
|
"yorigin": 16,
|
||||||
"slice": null
|
"slice": null
|
||||||
},
|
},
|
||||||
|
"view_group": {
|
||||||
|
"path": "./icon/s_view_group.png",
|
||||||
|
"subimages": 2,
|
||||||
|
"xorigin": 24,
|
||||||
|
"yorigin": 24,
|
||||||
|
"slice": null
|
||||||
|
},
|
||||||
"view_mode": {
|
"view_mode": {
|
||||||
"path": "./icon/s_view_mode_strip2.png",
|
"path": "./icon/s_view_mode_strip2.png",
|
||||||
"subimages": 2,
|
"subimages": 2,
|
||||||
|
@ -439,8 +446,8 @@
|
||||||
"slice": null
|
"slice": null
|
||||||
},
|
},
|
||||||
"prop_on_end": {
|
"prop_on_end": {
|
||||||
"path": "./inspector/s_prop_on_end_strip3.png",
|
"path": "./inspector/s_prop_on_end.png",
|
||||||
"subimages": 3,
|
"subimages": 4,
|
||||||
"xorigin": 16,
|
"xorigin": 16,
|
||||||
"yorigin": 16,
|
"yorigin": 16,
|
||||||
"slice": null
|
"slice": null
|
||||||
|
@ -818,6 +825,19 @@
|
||||||
"bottom": 5
|
"bottom": 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"key_display": {
|
||||||
|
"path": "./UI/s_key_display.png",
|
||||||
|
"subimages": 1,
|
||||||
|
"xorigin": 0,
|
||||||
|
"yorigin": 0,
|
||||||
|
"slice": {
|
||||||
|
"enabled": true,
|
||||||
|
"left": 10,
|
||||||
|
"right": 10,
|
||||||
|
"top": 10,
|
||||||
|
"bottom": 10
|
||||||
|
}
|
||||||
|
},
|
||||||
"toolbar_shadow": {
|
"toolbar_shadow": {
|
||||||
"path": "./UI/s_toolbar_shadow.png",
|
"path": "./UI/s_toolbar_shadow.png",
|
||||||
"subimages": 1,
|
"subimages": 1,
|
||||||
|
|
0
datafiles/data/themes/default/graphics/icon/1.png.tmp$$
Normal file
0
datafiles/data/themes/default/graphics/icon/1.png.tmp$$
Normal file
File diff suppressed because it is too large
Load diff
BIN
datafiles/data/themes/default/graphics/icon/s_view_group.png
Normal file
BIN
datafiles/data/themes/default/graphics/icon/s_view_group.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 827 B |
File diff suppressed because it is too large
Load diff
Binary file not shown.
After Width: | Height: | Size: 883 B |
Binary file not shown.
Before Width: | Height: | Size: 559 B |
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
2
objects/addon/Create_0.gml
Normal file
2
objects/addon/Create_0.gml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/// @description
|
||||||
|
name = "";
|
33
objects/addon/addon.yy
Normal file
33
objects/addon/addon.yy
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMObject",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "addon",
|
||||||
|
"spriteId": null,
|
||||||
|
"solid": false,
|
||||||
|
"visible": true,
|
||||||
|
"managed": true,
|
||||||
|
"spriteMaskId": null,
|
||||||
|
"persistent": false,
|
||||||
|
"parentObjectId": null,
|
||||||
|
"physicsObject": false,
|
||||||
|
"physicsSensor": false,
|
||||||
|
"physicsShape": 1,
|
||||||
|
"physicsGroup": 1,
|
||||||
|
"physicsDensity": 0.5,
|
||||||
|
"physicsRestitution": 0.1,
|
||||||
|
"physicsLinearDamping": 0.1,
|
||||||
|
"physicsAngularDamping": 0.1,
|
||||||
|
"physicsFriction": 0.2,
|
||||||
|
"physicsStartAwake": true,
|
||||||
|
"physicsKinematic": false,
|
||||||
|
"physicsShapePoints": [],
|
||||||
|
"eventList": [
|
||||||
|
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,},
|
||||||
|
],
|
||||||
|
"properties": [],
|
||||||
|
"overriddenProperties": [],
|
||||||
|
"parent": {
|
||||||
|
"name": "addons",
|
||||||
|
"path": "folders/addons.yy",
|
||||||
|
},
|
||||||
|
}
|
7
objects/addon_key_displayer/Create_0.gml
Normal file
7
objects/addon_key_displayer/Create_0.gml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
/// @description
|
||||||
|
event_inherited();
|
||||||
|
|
||||||
|
name = "Key display";
|
||||||
|
alpha = 0;
|
||||||
|
disp_text = "";
|
||||||
|
depth = -999;
|
44
objects/addon_key_displayer/Draw_75.gml
Normal file
44
objects/addon_key_displayer/Draw_75.gml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
/// @description
|
||||||
|
#region draw
|
||||||
|
var key = "";
|
||||||
|
|
||||||
|
if(keyboard_check(vk_control))
|
||||||
|
key += "Ctrl";
|
||||||
|
if(keyboard_check(vk_shift))
|
||||||
|
key += key == ""? "Shift" : " + Shift";
|
||||||
|
if(keyboard_check(vk_alt))
|
||||||
|
key += key == ""? "Alt" : " + Alt";
|
||||||
|
|
||||||
|
if(keyboard_check(vk_anykey)) {
|
||||||
|
var pres = keyboard_lastkey;
|
||||||
|
|
||||||
|
if(pres >= 32 && pres <= 126) {
|
||||||
|
pres = string_upper(ansi_char(pres));
|
||||||
|
key += key == ""? pres : " + " + pres;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var pressing = key != "";
|
||||||
|
if(key != "") {
|
||||||
|
disp_text = key;
|
||||||
|
alpha = 2;
|
||||||
|
} else
|
||||||
|
alpha = lerp_linear(alpha, 0, 0.01);
|
||||||
|
|
||||||
|
if(alpha > 0) {
|
||||||
|
draw_set_text(f_h3, fa_right, fa_bottom, COLORS._main_icon_dark);
|
||||||
|
var ww = string_width(disp_text) + ui(16);
|
||||||
|
var hh = string_height(disp_text) + ui(16);
|
||||||
|
|
||||||
|
var x1 = WIN_W - ui(8);
|
||||||
|
var y1 = WIN_H - ui(8);
|
||||||
|
var x0 = x1 - ww;
|
||||||
|
var y0 = y1 - hh;
|
||||||
|
|
||||||
|
draw_sprite_stretched_ext(THEME.key_display, 0, x0, y0, ww, hh,
|
||||||
|
pressing? COLORS._main_accent : COLORS._main_icon, alpha);
|
||||||
|
draw_set_alpha(alpha);
|
||||||
|
draw_text(x1 - ui(8), y1 - ui(8), disp_text);
|
||||||
|
draw_set_alpha(1);
|
||||||
|
}
|
||||||
|
#endregion
|
37
objects/addon_key_displayer/addon_key_displayer.yy
Normal file
37
objects/addon_key_displayer/addon_key_displayer.yy
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMObject",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "addon_key_displayer",
|
||||||
|
"spriteId": null,
|
||||||
|
"solid": false,
|
||||||
|
"visible": true,
|
||||||
|
"managed": true,
|
||||||
|
"spriteMaskId": null,
|
||||||
|
"persistent": false,
|
||||||
|
"parentObjectId": {
|
||||||
|
"name": "addon",
|
||||||
|
"path": "objects/addon/addon.yy",
|
||||||
|
},
|
||||||
|
"physicsObject": false,
|
||||||
|
"physicsSensor": false,
|
||||||
|
"physicsShape": 1,
|
||||||
|
"physicsGroup": 1,
|
||||||
|
"physicsDensity": 0.5,
|
||||||
|
"physicsRestitution": 0.1,
|
||||||
|
"physicsLinearDamping": 0.1,
|
||||||
|
"physicsAngularDamping": 0.1,
|
||||||
|
"physicsFriction": 0.2,
|
||||||
|
"physicsStartAwake": true,
|
||||||
|
"physicsKinematic": false,
|
||||||
|
"physicsShapePoints": [],
|
||||||
|
"eventList": [
|
||||||
|
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":75,"eventType":8,"collisionObjectId":null,},
|
||||||
|
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,},
|
||||||
|
],
|
||||||
|
"properties": [],
|
||||||
|
"overriddenProperties": [],
|
||||||
|
"parent": {
|
||||||
|
"name": "addons",
|
||||||
|
"path": "folders/addons.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -146,7 +146,7 @@ event_inherited();
|
||||||
var hh = 0;
|
var hh = 0;
|
||||||
var _hover = sHOVER && content_pane.hover;
|
var _hover = sHOVER && content_pane.hover;
|
||||||
|
|
||||||
if(ADD_NODE_MODE == 0) {
|
if(PREF_MAP[? "dialog_add_node_view"] == 0) {
|
||||||
var grid_size = ui(64);
|
var grid_size = ui(64);
|
||||||
var grid_width = ui(80);
|
var grid_width = ui(80);
|
||||||
var grid_space = ui(12);
|
var grid_space = ui(12);
|
||||||
|
@ -160,6 +160,8 @@ event_inherited();
|
||||||
for(var index = 0; index < node_count; index++) {
|
for(var index = 0; index < node_count; index++) {
|
||||||
var _node = node_list[| index];
|
var _node = node_list[| index];
|
||||||
if(is_string(_node)) {
|
if(is_string(_node)) {
|
||||||
|
if(!PREF_MAP[? "dialog_add_node_grouping"])
|
||||||
|
continue;
|
||||||
hh += curr_height;
|
hh += curr_height;
|
||||||
yy += curr_height;
|
yy += curr_height;
|
||||||
|
|
||||||
|
@ -216,7 +218,7 @@ event_inherited();
|
||||||
|
|
||||||
hh += curr_height;
|
hh += curr_height;
|
||||||
yy += curr_height;
|
yy += curr_height;
|
||||||
} else if(ADD_NODE_MODE == 1) {
|
} else if(PREF_MAP[? "dialog_add_node_view"] == 1) {
|
||||||
var list_width = content_pane.surface_w;
|
var list_width = content_pane.surface_w;
|
||||||
var list_height = ui(28);
|
var list_height = ui(28);
|
||||||
var yy = _y + list_height / 2;
|
var yy = _y + list_height / 2;
|
||||||
|
@ -226,6 +228,9 @@ event_inherited();
|
||||||
var _node = node_list[| i];
|
var _node = node_list[| i];
|
||||||
|
|
||||||
if(is_string(_node)) {
|
if(is_string(_node)) {
|
||||||
|
if(!PREF_MAP[? "dialog_add_node_grouping"])
|
||||||
|
continue;
|
||||||
|
|
||||||
hh += ui(8);
|
hh += ui(8);
|
||||||
yy += ui(8);
|
yy += ui(8);
|
||||||
|
|
||||||
|
@ -359,7 +364,7 @@ event_inherited();
|
||||||
var hh = 0;
|
var hh = 0;
|
||||||
var _hover = sHOVER && search_pane.hover;
|
var _hover = sHOVER && search_pane.hover;
|
||||||
|
|
||||||
if(ADD_NODE_MODE == 0) {
|
if(PREF_MAP[? "dialog_add_node_view"] == 0) {
|
||||||
var grid_size = ui(64);
|
var grid_size = ui(64);
|
||||||
var grid_width = ui(80);
|
var grid_width = ui(80);
|
||||||
var grid_space = ui(16);
|
var grid_space = ui(16);
|
||||||
|
@ -434,7 +439,7 @@ event_inherited();
|
||||||
yy += hght;
|
yy += hght;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(ADD_NODE_MODE == 1) {
|
} else if(PREF_MAP[? "dialog_add_node_view"] == 1) {
|
||||||
var list_width = search_pane.surface_w;
|
var list_width = search_pane.surface_w;
|
||||||
var list_height = ui(28);
|
var list_height = ui(28);
|
||||||
var yy = _y + list_height / 2;
|
var yy = _y + list_height / 2;
|
||||||
|
|
|
@ -31,11 +31,18 @@ if !ready exit;
|
||||||
search_pane.draw(dialog_x + ui(16), dialog_y + ui(52));
|
search_pane.draw(dialog_x + ui(16), dialog_y + ui(52));
|
||||||
}
|
}
|
||||||
|
|
||||||
tb_search.draw(dialog_x + ui(14), dialog_y + ui(14), dialog_w - ui(64), ui(32), search_string, mouse_ui);
|
tb_search.draw(dialog_x + ui(14), dialog_y + ui(14), dialog_w - ui(96), ui(32), search_string, mouse_ui);
|
||||||
|
|
||||||
var bx = dialog_x + dialog_w - ui(44);
|
var bx = dialog_x + dialog_w - ui(44);
|
||||||
var by = dialog_y + ui(16);
|
var by = dialog_y + ui(16);
|
||||||
var b = buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER,
|
var b = buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER,
|
||||||
ADD_NODE_MODE == 1? "List view" : "Grid view", THEME.view_mode, ADD_NODE_MODE, COLORS._main_icon);
|
PREF_MAP[? "dialog_add_node_view"]? "List view" : "Grid view", THEME.view_mode, PREF_MAP[? "dialog_add_node_view"], COLORS._main_icon);
|
||||||
if(b == 2)
|
if(b == 2)
|
||||||
ADD_NODE_MODE = !ADD_NODE_MODE;
|
PREF_MAP[? "dialog_add_node_view"] = !PREF_MAP[? "dialog_add_node_view"];
|
||||||
|
|
||||||
|
bx -= ui(32);
|
||||||
|
var b = buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER,
|
||||||
|
PREF_MAP[? "dialog_add_node_grouping"]? "Group enabled" : "Group disabled", THEME.view_group, PREF_MAP[? "dialog_add_node_grouping"], COLORS._main_icon);
|
||||||
|
if(b == 2)
|
||||||
|
PREF_MAP[? "dialog_add_node_grouping"] = !PREF_MAP[? "dialog_add_node_grouping"];
|
||||||
#endregion
|
#endregion
|
|
@ -39,7 +39,7 @@ if !ready exit;
|
||||||
if(!in.animator.is_anim) continue;
|
if(!in.animator.is_anim) continue;
|
||||||
for(var j = 0; j < ds_list_size(in.animator.values); j++) {
|
for(var j = 0; j < ds_list_size(in.animator.values); j++) {
|
||||||
var t = in.animator.values[| j];
|
var t = in.animator.values[| j];
|
||||||
t.time = t.ratio * len;
|
t.time = t.ratio * scale_to;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ event_inherited();
|
||||||
|
|
||||||
function sortPalette(sortFunc) {
|
function sortPalette(sortFunc) {
|
||||||
array_sort(palette, sortFunc);
|
array_sort(palette, sortFunc);
|
||||||
selector.onApply();
|
onApply(palette);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ if palette == 0 exit;
|
||||||
|
|
||||||
if(array_length(palette) > 1) {
|
if(array_length(palette) > 1) {
|
||||||
if(buttonInstant(THEME.button, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, "", THEME.minus) == 2) {
|
if(buttonInstant(THEME.button, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, "", THEME.minus) == 2) {
|
||||||
array_resize(palette, array_length(palette) - 1);
|
array_delete(palette, index_selecting, 1);
|
||||||
onApply(palette);
|
onApply(palette);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
enum CAMERA_PROJ {
|
||||||
|
ortho,
|
||||||
|
perspective
|
||||||
|
}
|
||||||
|
|
||||||
#region setup
|
#region setup
|
||||||
globalvar PRIMITIVES, FORMAT_PT, FORMAT_PNT;
|
globalvar PRIMITIVES, FORMAT_PT, FORMAT_PNT;
|
||||||
PRIMITIVES = ds_map_create();
|
PRIMITIVES = ds_map_create();
|
||||||
|
@ -110,22 +115,17 @@
|
||||||
|
|
||||||
#region helper
|
#region helper
|
||||||
function _3d_node_init(iDim, iPos, iRot, iSca) {
|
function _3d_node_init(iDim, iPos, iRot, iSca) {
|
||||||
uniVertex_lightFor = shader_get_uniform(sh_vertex_pnt_light, "u_LightForward");
|
|
||||||
uniLightAmb = shader_get_uniform(sh_vertex_pnt_light, "u_AmbientLight");
|
|
||||||
uniLightClr = shader_get_uniform(sh_vertex_pnt_light, "u_LightColor");
|
|
||||||
uniLightInt = shader_get_uniform(sh_vertex_pnt_light, "u_LightIntensity");
|
|
||||||
uniLightNrm = shader_get_uniform(sh_vertex_pnt_light, "useNormal");
|
|
||||||
|
|
||||||
VB = [];
|
VB = [];
|
||||||
use_normal = true;
|
use_normal = true;
|
||||||
|
|
||||||
TM = matrix_build(0, 0, 0, 0, 0, 0, 1, 1, 1);
|
TM = matrix_build(0, 0, 0, 0, 0, 0, 1, 1, 1);
|
||||||
cam = camera_create();
|
cam = camera_create();
|
||||||
|
|
||||||
cam_view = matrix_build_lookat(0, 0, 1, 0, 0, 0, 0, 1, 0);
|
cam_view = matrix_build_lookat(0, 0, 1, 0, 0, 0, 0, 1, 0);
|
||||||
cam_proj = matrix_build_projection_ortho(1, 1, 1, 100);
|
cam_proj = matrix_build_projection_ortho(1, 1, 1, 100);
|
||||||
|
|
||||||
camera_set_proj_mat(cam, cam_view);
|
camera_set_view_mat(cam, cam_view);
|
||||||
camera_set_view_mat(cam, cam_proj);
|
camera_set_proj_mat(cam, cam_proj);
|
||||||
|
|
||||||
drag_index = -1;
|
drag_index = -1;
|
||||||
drag_sv = 0;
|
drag_sv = 0;
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
input_sca = iSca;
|
input_sca = iSca;
|
||||||
}
|
}
|
||||||
|
|
||||||
function _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny, inv = false) {
|
function _3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny, invx = false, invy = true) {
|
||||||
if(inputs[| input_pos].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false;
|
if(inputs[| input_pos].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false;
|
||||||
|
|
||||||
var _dim = inputs[| input_dim].getValue();
|
var _dim = inputs[| input_dim].getValue();
|
||||||
|
@ -158,7 +158,7 @@
|
||||||
|
|
||||||
if(drag_index == 0) {
|
if(drag_index == 0) {
|
||||||
var dx = (_mx - drag_mx) / _s * -6;
|
var dx = (_mx - drag_mx) / _s * -6;
|
||||||
_rot[1] = drag_sv - dx * (inv? -1 : 1);
|
_rot[1] = drag_sv - dx * (invx? -1 : 1);
|
||||||
|
|
||||||
if(inputs[| input_rot].setValue(_rot))
|
if(inputs[| input_rot].setValue(_rot))
|
||||||
UNDO_HOLDING = true;
|
UNDO_HOLDING = true;
|
||||||
|
@ -169,7 +169,7 @@
|
||||||
}
|
}
|
||||||
} else if(drag_index == 1) {
|
} else if(drag_index == 1) {
|
||||||
var dy = (_my - drag_my) / _s * 6;
|
var dy = (_my - drag_my) / _s * 6;
|
||||||
_rot[0] = drag_sv - dy * (inv? -1 : 1);
|
_rot[0] = drag_sv - dy * (invy? -1 : 1);
|
||||||
|
|
||||||
if(inputs[| input_rot].setValue(_rot))
|
if(inputs[| input_rot].setValue(_rot))
|
||||||
UNDO_HOLDING = true;
|
UNDO_HOLDING = true;
|
||||||
|
@ -237,29 +237,57 @@
|
||||||
matrix_stack_pop();
|
matrix_stack_pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
function _3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _applyLocal = true) {
|
function _3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _proj = CAMERA_PROJ.perspective, _fov = 60, _pass = "diff", _applyLocal = true) {
|
||||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
||||||
|
|
||||||
var cam_proj = matrix_build_projection_ortho(_dim[0], _dim[1], 1, 100);
|
|
||||||
camera_set_proj_mat(cam, cam_proj);
|
|
||||||
camera_set_view_size(cam, _dim[0], _dim[1]);
|
|
||||||
|
|
||||||
var lightFor = [ -cos(degtorad(_ldir)), -_lhgt, -sin(degtorad(_ldir)) ];
|
var lightFor = [ -cos(degtorad(_ldir)), -_lhgt, -sin(degtorad(_ldir)) ];
|
||||||
|
|
||||||
gpu_set_ztestenable(true);
|
gpu_set_ztestenable(true);
|
||||||
surface_set_target(_outSurf);
|
surface_set_target(_outSurf);
|
||||||
draw_clear_alpha(0, 0);
|
draw_clear_alpha(0, 0);
|
||||||
|
|
||||||
shader_set(sh_vertex_pnt_light);
|
var shader = sh_vertex_pnt_light;
|
||||||
|
if(_pass == "diff") shader = sh_vertex_pnt_light;
|
||||||
|
else if(_pass == "norm") shader = sh_vertex_normal_pass;
|
||||||
|
else if(_pass == "dept") shader = sh_vertex_depth_pass;
|
||||||
|
|
||||||
|
uniVertex_lightFor = shader_get_uniform(shader, "u_LightForward");
|
||||||
|
uniLightAmb = shader_get_uniform(shader, "u_AmbientLight");
|
||||||
|
uniLightClr = shader_get_uniform(shader, "u_LightColor");
|
||||||
|
uniLightInt = shader_get_uniform(shader, "u_LightIntensity");
|
||||||
|
uniLightNrm = shader_get_uniform(shader, "useNormal");
|
||||||
|
|
||||||
|
shader_set(shader);
|
||||||
shader_set_uniform_f_array(uniVertex_lightFor, lightFor);
|
shader_set_uniform_f_array(uniVertex_lightFor, lightFor);
|
||||||
shader_set_uniform_f_array(uniLightAmb, colorArrayFromReal(_aclr));
|
shader_set_uniform_f_array(uniLightAmb, colorArrayFromReal(_aclr));
|
||||||
shader_set_uniform_f_array(uniLightClr, colorArrayFromReal(_lclr));
|
shader_set_uniform_f_array(uniLightClr, colorArrayFromReal(_lclr));
|
||||||
shader_set_uniform_f(uniLightInt, _lint);
|
shader_set_uniform_f(uniLightInt, _lint);
|
||||||
shader_set_uniform_i(uniLightNrm, use_normal);
|
shader_set_uniform_i(uniLightNrm, use_normal);
|
||||||
|
|
||||||
|
var cam_view, cam_proj;
|
||||||
|
|
||||||
|
if(_proj == CAMERA_PROJ.ortho) {
|
||||||
|
cam_view = matrix_build_lookat(0, 0, 128, 0, 0, 0, 0, 1, 0);
|
||||||
|
cam_proj = matrix_build_projection_ortho(_dim[0], _dim[1], 0.1, 256);
|
||||||
|
} else {
|
||||||
|
var _adjFov = power(_fov / 90, 1 / 4) * 90;
|
||||||
|
var dist = _dim[0] / 2 * dtan(90 - _adjFov);
|
||||||
|
cam_view = matrix_build_lookat(0, 0, 1 + dist, 0, 0, 0, 0, 1, 0);
|
||||||
|
cam_proj = matrix_build_projection_perspective(_dim[0], _dim[1], dist, dist + 256);
|
||||||
|
}
|
||||||
|
|
||||||
|
var cam = camera_get_active();
|
||||||
|
camera_set_view_size(cam, _dim[0], _dim[1]);
|
||||||
|
camera_set_view_mat(cam, cam_view);
|
||||||
|
camera_set_proj_mat(cam, cam_proj);
|
||||||
camera_apply(cam);
|
camera_apply(cam);
|
||||||
|
|
||||||
matrix_stack_push(matrix_build(_pos[0], _pos[1], 0, 0, 0, 0, _dim[0] * _sca[0], _dim[1] * _sca[1], 1));
|
if(_proj == CAMERA_PROJ.ortho)
|
||||||
|
matrix_stack_push(matrix_build(_dim[0] / 2 - _pos[0], _pos[1] - _dim[1] / 2, 0, 0, 0, 0, _dim[0] * _sca[0], _dim[1] * _sca[1], 1));
|
||||||
|
else
|
||||||
|
matrix_stack_push(matrix_build(_dim[0] / 2 - _pos[0], _pos[1] - _dim[1] / 2, 0, 0, 0, 0, _dim[0] * _sca[0], _dim[1] * _sca[1], 1));
|
||||||
|
//matrix_stack_push(matrix_build(0, 0, 0, 0, 0, 0, 1, 1, 1));
|
||||||
|
|
||||||
if(_applyLocal) _3d_local_transform(_lpos, _lrot, _lsca);
|
if(_applyLocal) _3d_local_transform(_lpos, _lrot, _lsca);
|
||||||
|
|
||||||
matrix_set(matrix_world, matrix_stack_top());
|
matrix_set(matrix_world, matrix_stack_top());
|
||||||
|
@ -272,7 +300,10 @@
|
||||||
matrix_set(matrix_world, MATRIX_IDENTITY);
|
matrix_set(matrix_world, MATRIX_IDENTITY);
|
||||||
|
|
||||||
gpu_set_ztestenable(false);
|
gpu_set_ztestenable(false);
|
||||||
camera_apply(0);
|
var cam = camera_get_active();
|
||||||
|
camera_set_view_mat(cam, matrix_build_lookat(0, 0, 1, 0, 0, 0, 0, 1, 0));
|
||||||
|
camera_set_proj_mat(cam, matrix_build_projection_ortho(1, 1, 0.1, 256));
|
||||||
|
camera_apply(cam);
|
||||||
|
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ function __part(_node) constructor {
|
||||||
rot = point_direction(xp, yp, x, y);
|
rot = point_direction(xp, yp, x, y);
|
||||||
else
|
else
|
||||||
rot += rot_s;
|
rot += rot_s;
|
||||||
alp_draw = alp * eval_bezier_cubic(1 - life / life_total, alp_fade[0], alp_fade[1], alp_fade[2], alp_fade[3]);
|
alp_draw = alp * eval_curve_bezier_cubic_x(alp_fade, 1 - life / life_total);
|
||||||
|
|
||||||
if(step_int > 0 && safe_mod(life, step_int) == 0)
|
if(step_int > 0 && safe_mod(life, step_int) == 0)
|
||||||
node.onPartStep(self);
|
node.onPartStep(self);
|
||||||
|
|
|
@ -40,7 +40,7 @@ function Node_VFX(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
|
||||||
.setDisplay(VALUE_DISPLAY.gradient);
|
.setDisplay(VALUE_DISPLAY.gradient);
|
||||||
inputs[| 14] = nodeValue(14, "Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ])
|
inputs[| 14] = nodeValue(14, "Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ])
|
||||||
.setDisplay(VALUE_DISPLAY.range);
|
.setDisplay(VALUE_DISPLAY.range);
|
||||||
inputs[| 15] = nodeValue(15, "Alpha over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, [1, 1, 1, 1]);
|
inputs[| 15] = nodeValue(15, "Alpha over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11);
|
||||||
|
|
||||||
inputs[| 16] = nodeValue(16, "Rotate by direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
inputs[| 16] = nodeValue(16, "Rotate by direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ function Node_Particle_Effector(_x, _y, _group = -1) : Node(_x, _y, _group) cons
|
||||||
inputs[| 2] = nodeValue(2, "Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16, 4, 4, AREA_SHAPE.rectangle ])
|
inputs[| 2] = nodeValue(2, "Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16, 4, 4, AREA_SHAPE.rectangle ])
|
||||||
.setDisplay(VALUE_DISPLAY.area);
|
.setDisplay(VALUE_DISPLAY.area);
|
||||||
|
|
||||||
inputs[| 3] = nodeValue(3, "Falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, [0, 0, 1, 1] )
|
inputs[| 3] = nodeValue(3, "Falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01 )
|
||||||
.setDisplay(VALUE_DISPLAY.curve);
|
.setDisplay(VALUE_DISPLAY.curve);
|
||||||
|
|
||||||
inputs[| 4] = nodeValue(4, "Falloff distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 );
|
inputs[| 4] = nodeValue(4, "Falloff distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 );
|
||||||
|
|
|
@ -35,7 +35,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = -1) : Node(_x, _y, _group) const
|
||||||
.setDisplay(VALUE_DISPLAY.gradient);
|
.setDisplay(VALUE_DISPLAY.gradient);
|
||||||
inputs[| 13] = nodeValue(13, "Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ])
|
inputs[| 13] = nodeValue(13, "Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ])
|
||||||
.setDisplay(VALUE_DISPLAY.range);
|
.setDisplay(VALUE_DISPLAY.range);
|
||||||
inputs[| 14] = nodeValue(14, "Alpha over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, [1, 1, 1, 1]);
|
inputs[| 14] = nodeValue(14, "Alpha over time", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11);
|
||||||
|
|
||||||
inputs[| 15] = nodeValue(15, "Rotate by direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
inputs[| 15] = nodeValue(15, "Rotate by direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
|
|
|
@ -70,8 +70,6 @@ function APPEND(_path) {
|
||||||
appended_list[| i].preConnect();
|
appended_list[| i].preConnect();
|
||||||
for(var i = 0; i < ds_list_size(appended_list); i++)
|
for(var i = 0; i < ds_list_size(appended_list); i++)
|
||||||
appended_list[| i].connect();
|
appended_list[| i].connect();
|
||||||
for(var i = 0; i < ds_list_size(appended_list); i++)
|
|
||||||
appended_list[| i].postConnect();
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
log_warning("APPEND, connect", exception_print(e));
|
log_warning("APPEND, connect", exception_print(e));
|
||||||
}
|
}
|
||||||
|
@ -85,8 +83,6 @@ function APPEND(_path) {
|
||||||
}
|
}
|
||||||
printlog("Update time: " + string(current_time - t)); t = current_time;
|
printlog("Update time: " + string(current_time - t)); t = current_time;
|
||||||
|
|
||||||
ds_list_destroy(appended_list);
|
|
||||||
|
|
||||||
Render(true);
|
Render(true);
|
||||||
|
|
||||||
if(!ds_queue_empty(CONNECTION_CONFLICT)) {
|
if(!ds_queue_empty(CONNECTION_CONFLICT)) {
|
||||||
|
@ -113,6 +109,15 @@ function APPEND(_path) {
|
||||||
}
|
}
|
||||||
printlog("Conflict time: " + string(current_time - t)); t = current_time;
|
printlog("Conflict time: " + string(current_time - t)); t = current_time;
|
||||||
|
|
||||||
|
try {
|
||||||
|
for(var i = 0; i < ds_list_size(appended_list); i++)
|
||||||
|
appended_list[| i].postConnect();
|
||||||
|
} catch(e) {
|
||||||
|
log_warning("APPEND, connect", exception_print(e));
|
||||||
|
}
|
||||||
|
|
||||||
|
ds_list_destroy(appended_list);
|
||||||
|
|
||||||
APPENDING = false;
|
APPENDING = false;
|
||||||
PANEL_ANIMATION.updatePropertyList();
|
PANEL_ANIMATION.updatePropertyList();
|
||||||
UPDATE = RENDER_TYPE.full;
|
UPDATE = RENDER_TYPE.full;
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
function array_create_from_list(list) {
|
||||||
|
var arr = array_create(ds_list_size(list));
|
||||||
|
for( var i = 0; i < ds_list_size(list); i++ )
|
||||||
|
arr[i] = list[| i];
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
|
||||||
function array_safe_set(arr, index, value) {
|
function array_safe_set(arr, index, value) {
|
||||||
if(index < 0) return;
|
if(index < 0) return;
|
||||||
if(index >= array_length(arr)) return;
|
if(index >= array_length(arr)) return;
|
||||||
|
@ -56,3 +63,21 @@ function array_clone(arr) {
|
||||||
}
|
}
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function array_min(arr) {
|
||||||
|
if(array_length(arr) == 0) return 0;
|
||||||
|
|
||||||
|
var mn = arr[0];
|
||||||
|
for( var i = 0; i < array_length(arr); i++ )
|
||||||
|
mn = min(mn, arr[i]);
|
||||||
|
return mn;
|
||||||
|
}
|
||||||
|
|
||||||
|
function array_max(arr) {
|
||||||
|
if(array_length(arr) == 0) return 0;
|
||||||
|
|
||||||
|
var mx = arr[0];
|
||||||
|
for( var i = 0; i < array_length(arr); i++ )
|
||||||
|
mx = max(mx, arr[i]);
|
||||||
|
return mx;
|
||||||
|
}
|
|
@ -17,81 +17,95 @@ function curveBox(_onModify) constructor {
|
||||||
static curve_amo = 3;
|
static curve_amo = 3;
|
||||||
var curve_h = _h;
|
var curve_h = _h;
|
||||||
|
|
||||||
#region curve
|
var yS = _data[0];
|
||||||
var _range;
|
var x0 = _data[1], y0 = _data[2];
|
||||||
_range = bezier_range(_data[0], _data[1], _data[2], _data[3]);
|
var x1 = _data[3], y1 = _data[4];
|
||||||
var y_min = min(0, _range[0]);
|
var yE = _data[5];
|
||||||
var y_max = max(1, _range[1]);
|
|
||||||
var y_range = y_max - y_min;
|
|
||||||
|
|
||||||
var _y_0 = get_y(0, _y, curve_h, y_max, y_range);
|
var _range = bezier_range(_data);
|
||||||
var _y_1 = get_y(1, _y, curve_h, y_max, y_range);
|
var y_min = min(0, _range[0]);
|
||||||
|
var y_max = max(1, _range[1]);
|
||||||
|
var y_range = y_max - y_min;
|
||||||
|
|
||||||
|
var yS = get_y(yS, _y, curve_h, y_max, y_range);
|
||||||
|
var yE = get_y(yE, _y, curve_h, y_max, y_range);
|
||||||
|
|
||||||
|
#region draw frame
|
||||||
draw_set_color(COLORS.widget_curve_outline);
|
draw_set_color(COLORS.widget_curve_outline);
|
||||||
draw_set_alpha(0.5);
|
draw_set_alpha(0.5);
|
||||||
draw_line(_x + _w / 3, _y, _x + _w / 3, _y + curve_h);
|
draw_line(_x, yS, _x + _w, yS);
|
||||||
draw_line(_x + _w / 3 * 2, _y, _x + _w / 3 * 2, _y + curve_h);
|
draw_line(_x, yE, _x + _w, yE);
|
||||||
|
|
||||||
draw_line(_x, _y_0, _x + _w, _y_0);
|
|
||||||
draw_line(_x, _y_1, _x + _w, _y_1);
|
|
||||||
draw_set_alpha(1);
|
draw_set_alpha(1);
|
||||||
|
|
||||||
draw_rectangle(_x, _y, _x + _w, _y + curve_h, true);
|
draw_rectangle(_x, _y, _x + _w, _y + curve_h, true);
|
||||||
|
|
||||||
if(node_dragging != -1) {
|
|
||||||
var _my = -((_m[1] - _y) / curve_h * drag_range - drag_max);
|
|
||||||
_my = clamp(_my, 0, 1);
|
|
||||||
|
|
||||||
_data[node_dragging] = _my;
|
|
||||||
|
|
||||||
if(mouse_release(mb_left)) {
|
|
||||||
onModify(_data);
|
|
||||||
node_dragging = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var _y0 = _data[0];
|
|
||||||
var _y1 = _data[1];
|
|
||||||
var _y2 = _data[2];
|
|
||||||
var _y3 = _data[3];
|
|
||||||
|
|
||||||
var _dy = _y + (y_max - 1) / y_range * curve_h;
|
|
||||||
var _dh = -curve_h / y_range;
|
|
||||||
|
|
||||||
draw_set_color(COLORS.widget_curve_line);
|
|
||||||
draw_line_bezier_cubic(_x, _dy, _w, _dh, _y0, _y1, _y2, _y3);
|
|
||||||
|
|
||||||
var node_hovering = -1;
|
|
||||||
for(var i = 0; i < 4; i++) {
|
|
||||||
var _nx = i / 3 * _w + _x;
|
|
||||||
var _ny = get_y(_data[i], _y, curve_h, y_max, y_range);
|
|
||||||
|
|
||||||
draw_set_color(COLORS.widget_curve_outline);
|
|
||||||
draw_circle(_nx, _ny, 3, false);
|
|
||||||
|
|
||||||
if(hover && point_in_circle(_m[0], _m[1], _nx, _ny, 6)) {
|
|
||||||
draw_circle(_nx, _ny, 5, false);
|
|
||||||
node_hovering = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(mouse_press(mb_left, active)) {
|
|
||||||
if(node_hovering != -1) {
|
|
||||||
node_dragging = node_hovering;
|
|
||||||
drag_range = y_range;
|
|
||||||
drag_max = y_max;
|
|
||||||
}
|
|
||||||
} else if(mouse_press(mb_right, active)) {
|
|
||||||
switch(node_hovering) {
|
|
||||||
case 0 : _data[0] = 0; break;
|
|
||||||
case 1 : _data[1] = 0; break;
|
|
||||||
case 2 : _data[2] = 1; break;
|
|
||||||
case 3 : _data[3] = 1; break;
|
|
||||||
}
|
|
||||||
onModify(_data);
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
if(node_dragging == 0 || node_dragging == 3) {
|
||||||
|
var targ = node_dragging == 0? 0 : 5;
|
||||||
|
var _my = -((_m[1] - _y) / curve_h * drag_range - drag_max);
|
||||||
|
_my = clamp(_my, 0, 1);
|
||||||
|
|
||||||
|
_data[targ] = _my;
|
||||||
|
|
||||||
|
if(mouse_release(mb_left)) {
|
||||||
|
onModify(_data);
|
||||||
|
node_dragging = -1;
|
||||||
|
}
|
||||||
|
} else if(node_dragging != -1) {
|
||||||
|
var _mx = (_m[0] - _x) / _w;
|
||||||
|
_mx = clamp(_mx, 0, 1);
|
||||||
|
|
||||||
|
var _my = -((_m[1] - _y) / curve_h * drag_range - drag_max);
|
||||||
|
_my = clamp(_my, 0, 1);
|
||||||
|
|
||||||
|
_data[1 + (node_dragging - 1) * 2 + 0] = _mx;
|
||||||
|
_data[1 + (node_dragging - 1) * 2 + 1] = _my;
|
||||||
|
|
||||||
|
if(mouse_release(mb_left)) {
|
||||||
|
onModify(_data);
|
||||||
|
node_dragging = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var node_hovering = -1;
|
||||||
|
var points = [ [0, _data[0]], [_data[1], _data[2]], [_data[3], _data[4]], [1, _data[5]] ];
|
||||||
|
|
||||||
|
var _sx = _x + points[0][0] * _w
|
||||||
|
var _sy = get_y(points[0][1], _y, curve_h, y_max, y_range);
|
||||||
|
var _ex = _x + points[3][0] * _w
|
||||||
|
var _ey = get_y(points[3][1], _y, curve_h, y_max, y_range);
|
||||||
|
|
||||||
|
draw_set_color(COLORS.widget_curve_line);
|
||||||
|
|
||||||
|
for(var i = 0; i < 4; i++) {
|
||||||
|
var _nx = _x + points[i][0] * _w;
|
||||||
|
var _ny = get_y(points[i][1], _y, curve_h, y_max, y_range);
|
||||||
|
|
||||||
|
if(i == 1)
|
||||||
|
draw_line(_sx, _sy, _nx, _ny);
|
||||||
|
else if(i == 2)
|
||||||
|
draw_line(_nx, _ny, _ex, _ey);
|
||||||
|
|
||||||
|
draw_circle(_nx, _ny, 3, false);
|
||||||
|
|
||||||
|
if(hover && point_in_circle(_m[0], _m[1], _nx, _ny, 6)) {
|
||||||
|
draw_circle(_nx, _ny, 5, false);
|
||||||
|
node_hovering = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var _dy = _y + (y_max - 1) / y_range * curve_h;
|
||||||
|
var _dh = -curve_h / y_range;
|
||||||
|
|
||||||
|
draw_set_color(COLORS._main_accent);
|
||||||
|
draw_line_bezier_cubic(_x, _dy, _w, _dh, _data);
|
||||||
|
|
||||||
|
if(mouse_press(mb_left, active) && node_hovering != -1) {
|
||||||
|
node_dragging = node_hovering;
|
||||||
|
drag_range = y_range;
|
||||||
|
drag_max = y_max;
|
||||||
|
}
|
||||||
|
|
||||||
active = false;
|
active = false;
|
||||||
hover = false;
|
hover = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,95 @@
|
||||||
function draw_line_bezier_cubic(x0, y0, _w, _h, c0, c1, c2, c3) {
|
#macro CURVE_DEF_01 [0, 1/3, 1/3, 2/3, 2/3, 1]
|
||||||
|
#macro CURVE_DEF_11 [1, 1/3, 1, 2/3, 1, 1]
|
||||||
|
|
||||||
|
function draw_line_bezier_cubic(x0, y0, _w, _h, _bz) {
|
||||||
static SAMPLE = 32;
|
static SAMPLE = 32;
|
||||||
|
|
||||||
var _oy;
|
var _ox, _oy;
|
||||||
|
|
||||||
for(var i = 0; i <= SAMPLE; i++) {
|
for(var i = 0; i <= SAMPLE; i++) {
|
||||||
var t = i / SAMPLE;
|
var t = i / SAMPLE;
|
||||||
var _ry = eval_bezier_cubic(t, c0, c1, c2, c3);
|
var _r = eval_bezier_cubic(t, _bz);
|
||||||
|
var _rx = _r[0], _ry = _r[1];
|
||||||
|
|
||||||
|
var _nx = _rx * _w + x0;
|
||||||
var _ny = (_h? _ry : 1 - _ry) * abs(_h) + y0;
|
var _ny = (_h? _ry : 1 - _ry) * abs(_h) + y0;
|
||||||
|
|
||||||
if(i) draw_line((i - 1) / SAMPLE * _w + x0, _oy, t * _w + x0, _ny);
|
if(i)
|
||||||
|
draw_line(_ox, _oy, _nx, _ny);
|
||||||
|
|
||||||
|
_ox = _nx;
|
||||||
_oy = _ny;
|
_oy = _ny;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function eval_bezier_cubic(t, c0, c1, c2, c3) {
|
function eval_bezier_cubic(t, _bz) {
|
||||||
return power(1 - t, 3) * c0 + 3 * power(1 - t, 2) * t * c1 + 3 * (1 - t) * power(t, 2) * c2 + power(t, 3) * c3;
|
return [
|
||||||
|
power(1 - t, 3) * 0
|
||||||
|
+ 3 * power(1 - t, 2) * t * _bz[1]
|
||||||
|
+ 3 * (1 - t) * power(t, 2) * _bz[3]
|
||||||
|
+ power(t, 3) * 1,
|
||||||
|
|
||||||
|
power(1 - t, 3) * _bz[0]
|
||||||
|
+ 3 * power(1 - t, 2) * t * _bz[2]
|
||||||
|
+ 3 * (1 - t) * power(t, 2) * _bz[4]
|
||||||
|
+ power(t, 3) * _bz[5]
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
function eval_curve_bezier_cubic(curve, t) {
|
function eval_curve_bezier_cubic_x(_bz, _x, _prec = 0.00001) {
|
||||||
return eval_bezier_cubic(t, curve[0], curve[1], curve[2], curve[3]);
|
var st = 0;
|
||||||
|
var ed = 1;
|
||||||
|
|
||||||
|
var _xt = _x;
|
||||||
|
var _binRep = 5;
|
||||||
|
|
||||||
|
repeat(_binRep) {
|
||||||
|
var _ftx = power(1 - _xt, 3) * 0
|
||||||
|
+ 3 * power(1 - _xt, 2) * _xt * _bz[1]
|
||||||
|
+ 3 * (1 - _xt) * power(_xt, 2) * _bz[3]
|
||||||
|
+ power(_xt, 3) * 1;
|
||||||
|
|
||||||
|
if(abs(_ftx - _x) < _prec)
|
||||||
|
return eval_curve_bezier_cubic_t(_bz, _xt);
|
||||||
|
|
||||||
|
if(_xt < _x)
|
||||||
|
st = _xt;
|
||||||
|
else
|
||||||
|
ed = _xt;
|
||||||
|
|
||||||
|
_xt = (st + ed) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
var _newRep = 8;
|
||||||
|
|
||||||
|
repeat(_newRep) {
|
||||||
|
var slope = (9 * _bz[1] - 9 * _bz[3] + 3) * _xt * _xt
|
||||||
|
+ (-12 * _bz[1] + 6 * _bz[3]) * _xt
|
||||||
|
+ 3 * _bz[1];
|
||||||
|
var _ftx = power(1 - _xt, 3) * 0
|
||||||
|
+ 3 * power(1 - _xt, 2) * _xt * _bz[1]
|
||||||
|
+ 3 * (1 - _xt) * power(_xt, 2) * _bz[3]
|
||||||
|
+ power(_xt, 3) * 1
|
||||||
|
- _x;
|
||||||
|
|
||||||
|
_xt -= _ftx / slope;
|
||||||
|
|
||||||
|
if(abs(_ftx) < _prec)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return eval_curve_bezier_cubic_t(_bz, _xt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function bezier_range(c0, c1, c2, c3) {
|
function eval_curve_bezier_cubic_t(_bz, t) {
|
||||||
return [ min(c0, c1, c2, c3), max(c0, c1, c2, c3) ];
|
return power(1 - t, 3) * _bz[0]
|
||||||
|
+ 3 * power(1 - t, 2) * t * _bz[2]
|
||||||
|
+ 3 * (1 - t) * power(t, 2) * _bz[4]
|
||||||
|
+ power(t, 3) * _bz[5];
|
||||||
|
}
|
||||||
|
|
||||||
|
function bezier_range(bz) {
|
||||||
|
return [ min(bz[0], bz[2], bz[4], bz[5]), max(bz[0], bz[2], bz[4], bz[5]) ];
|
||||||
}
|
}
|
||||||
|
|
||||||
function bezier_interpol_x(a, b, t, iteration = 10) {
|
function bezier_interpol_x(a, b, t, iteration = 10) {
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
function draw_line_power(x0, y0, _w, _h, c0, c1, c2, c3) {
|
|
||||||
static SAMPLE = 32;
|
|
||||||
|
|
||||||
var _oy;
|
|
||||||
for(var i = 0; i <= SAMPLE; i++) {
|
|
||||||
var t = i / SAMPLE;
|
|
||||||
var _ry = eval_bezier_cubic(t, c0, c1, c2, c3);
|
|
||||||
var _ny = (_h? _ry : 1 - _ry) * abs(_h) + y0;
|
|
||||||
|
|
||||||
if(i) draw_line((i - 1) / SAMPLE * _w + x0, _oy, t * _w + x0, _ny);
|
|
||||||
_oy = _ny;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function ease_power_in(rat, pow) {
|
|
||||||
return power(rat, pow);
|
|
||||||
}
|
|
||||||
function ease_power_out(rat, pow) {
|
|
||||||
return 1 - power(1 - rat, pow);
|
|
||||||
}
|
|
||||||
function ease_power_inout(rat, pow) {
|
|
||||||
return rat < 0.5 ? ease_power_in(2 * rat, pow) / 2 : (ease_power_out(2 * rat - 1, pow) + 1) / 2;
|
|
||||||
}
|
|
|
@ -10,16 +10,16 @@ function draw_line_width2(x0, y0, x1, y1, w0, w1, cap = false) {
|
||||||
var _y3 = y1 + lengthdir_y(w1 / 2, aa + 180);
|
var _y3 = y1 + lengthdir_y(w1 / 2, aa + 180);
|
||||||
|
|
||||||
draw_primitive_begin(pr_trianglestrip);
|
draw_primitive_begin(pr_trianglestrip);
|
||||||
draw_vertex(round(_x0), round(_y0));
|
draw_vertex(_x0, _y0);
|
||||||
draw_vertex(round(_x1), round(_y1));
|
draw_vertex(_x1, _y1);
|
||||||
draw_vertex(round(_x2), round(_y2));
|
draw_vertex(_x2, _y2);
|
||||||
draw_vertex(round(_x3), round(_y3));
|
draw_vertex(_x3, _y3);
|
||||||
draw_primitive_end();
|
draw_primitive_end();
|
||||||
|
|
||||||
if(cap && w0 / 2 - 1 > 0) {
|
if(cap && w0 / 2 - 1 > 0) {
|
||||||
//draw_set_color(c_red);
|
//draw_set_color(c_red);
|
||||||
draw_circle(round(x0) - 1, round(y0) - 1, w0 / 2 - 1, 0);
|
draw_circle(x0 - 1, y0 - 1, w0 / 2 - 1, 0);
|
||||||
draw_circle(round(x1) - 1, round(y1) - 1, w1 / 2 - 1, 0);
|
draw_circle(x1 - 1, y1 - 1, w1 / 2 - 1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,10 +30,10 @@ function draw_line_width2_angle(x0, y0, x1, y1, w0, w1, a0 = 0, a1 = 0) {
|
||||||
var _y1 = y1 + lengthdir_y(w1 / 2, a1);
|
var _y1 = y1 + lengthdir_y(w1 / 2, a1);
|
||||||
|
|
||||||
draw_primitive_begin(pr_trianglestrip);
|
draw_primitive_begin(pr_trianglestrip);
|
||||||
draw_vertex(round(x0), round(y0));
|
draw_vertex( x0, y0);
|
||||||
draw_vertex(round(x1), round(y1));
|
draw_vertex( x1, y1);
|
||||||
draw_vertex(round(_x0), round(_y0));
|
draw_vertex(_x0, _y0);
|
||||||
draw_vertex(round(_x1), round(_y1));
|
draw_vertex(_x1, _y1);
|
||||||
draw_primitive_end();
|
draw_primitive_end();
|
||||||
|
|
||||||
var _x0 = x0 + lengthdir_x(w0 / 2, a0 + 180);
|
var _x0 = x0 + lengthdir_x(w0 / 2, a0 + 180);
|
||||||
|
@ -42,9 +42,9 @@ function draw_line_width2_angle(x0, y0, x1, y1, w0, w1, a0 = 0, a1 = 0) {
|
||||||
var _y1 = y1 + lengthdir_y(w1 / 2, a1 + 180);
|
var _y1 = y1 + lengthdir_y(w1 / 2, a1 + 180);
|
||||||
|
|
||||||
draw_primitive_begin(pr_trianglestrip);
|
draw_primitive_begin(pr_trianglestrip);
|
||||||
draw_vertex(round(x0), round(y0));
|
draw_vertex( x0, y0);
|
||||||
draw_vertex(round(x1), round(y1));
|
draw_vertex( x1, y1);
|
||||||
draw_vertex(round(_x0), round(_y0));
|
draw_vertex(_x0, _y0);
|
||||||
draw_vertex(round(_x1), round(_y1));
|
draw_vertex(_x1, _y1);
|
||||||
draw_primitive_end();
|
draw_primitive_end();
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
function draw_sprite_fit(spr, ind, xx, yy, w, h) {
|
function draw_sprite_fit(spr, ind, xx, yy, w, h) {
|
||||||
var ss = min(w / sprite_get_width(spr), h / sprite_get_height(spr));
|
var ss = min(w / sprite_get_width(spr), h / sprite_get_height(spr));
|
||||||
draw_sprite_ext(spr, ind, xx, yy, w, h, 0, c_white, 1);
|
draw_sprite_ext(spr, ind, xx, yy, ss, ss, 0, c_white, 1);
|
||||||
}
|
}
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING;
|
globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING;
|
||||||
VERSION = 1090;
|
VERSION = 1090;
|
||||||
SAVEFILE_VERSION = 1080;
|
SAVEFILE_VERSION = 1090;
|
||||||
VERSION_STRING = "1.0.9";
|
VERSION_STRING = "1.0.9";
|
||||||
|
|
||||||
globalvar NODES, NODE_MAP, APPEND_MAP, HOTKEYS, HOTKEY_CONTEXT;
|
globalvar NODES, NODE_MAP, APPEND_MAP, HOTKEYS, HOTKEY_CONTEXT;
|
||||||
|
@ -51,11 +51,10 @@
|
||||||
TEXTBOX_ACTIVE = noone;
|
TEXTBOX_ACTIVE = noone;
|
||||||
DIALOG_CLICK = true;
|
DIALOG_CLICK = true;
|
||||||
|
|
||||||
globalvar ADD_NODE_PAGE, ADD_NODE_W, ADD_NODE_H, ADD_NODE_MODE;
|
globalvar ADD_NODE_PAGE, ADD_NODE_W, ADD_NODE_H;
|
||||||
ADD_NODE_PAGE = 0;
|
ADD_NODE_PAGE = 0;
|
||||||
ADD_NODE_W = -1;
|
ADD_NODE_W = -1;
|
||||||
ADD_NODE_H = -1;
|
ADD_NODE_H = -1;
|
||||||
ADD_NODE_MODE = 0;
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region macro
|
#region macro
|
||||||
|
|
|
@ -120,8 +120,6 @@ function LOAD_PATH(path, readonly = false) {
|
||||||
create_list[| i].preConnect();
|
create_list[| i].preConnect();
|
||||||
for(var i = 0; i < ds_list_size(create_list); i++)
|
for(var i = 0; i < ds_list_size(create_list); i++)
|
||||||
create_list[| i].connect();
|
create_list[| i].connect();
|
||||||
for(var i = 0; i < ds_list_size(create_list); i++)
|
|
||||||
create_list[| i].postConnect();
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
log_warning("LOAD, connect", exception_print(e));
|
log_warning("LOAD, connect", exception_print(e));
|
||||||
}
|
}
|
||||||
|
@ -154,6 +152,13 @@ function LOAD_PATH(path, readonly = false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
for(var i = 0; i < ds_list_size(create_list); i++)
|
||||||
|
create_list[| i].postConnect();
|
||||||
|
} catch(e) {
|
||||||
|
log_warning("LOAD, connect", exception_print(e));
|
||||||
|
}
|
||||||
|
|
||||||
UPDATE = RENDER_TYPE.full;
|
UPDATE = RENDER_TYPE.full;
|
||||||
|
|
||||||
LOADING = false;
|
LOADING = false;
|
||||||
|
|
|
@ -48,6 +48,8 @@ function draw_code(_x, _y, str) {
|
||||||
|
|
||||||
for( var i = 0; i < amo; i++ ) {
|
for( var i = 0; i < amo; i++ ) {
|
||||||
var _w = stringSplice[i];
|
var _w = stringSplice[i];
|
||||||
|
_w = string_trim_end(_w);
|
||||||
|
|
||||||
isStr = !isStr;
|
isStr = !isStr;
|
||||||
|
|
||||||
if(isStr) {
|
if(isStr) {
|
||||||
|
|
|
@ -52,12 +52,15 @@ function Node_2D_light(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
inputs[| 13] = nodeValue(13, "Radial start", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 13] = nodeValue(13, "Radial start", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.rotation);
|
.setDisplay(VALUE_DISPLAY.rotation);
|
||||||
|
|
||||||
|
inputs[| 14] = nodeValue(14, "Radial band ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
outputs[| 1] = nodeValue(1, "Light only", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 1] = nodeValue(1, "Light only", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
input_display_list = [ 0,
|
input_display_list = [ 0,
|
||||||
["Shape", false], 1, 2, 6, 7, 8, 9,
|
["Shape", false], 1, 2, 6, 7, 8, 9,
|
||||||
["Light", false], 3, 4, 5, 12, 13,
|
["Light", false], 3, 4, 5, 12, 13, 14,
|
||||||
["Render", false], 11, 10
|
["Render", false], 11, 10
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -97,6 +100,7 @@ function Node_2D_light(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
|
|
||||||
inputs[| 12].setVisible(true);
|
inputs[| 12].setVisible(true);
|
||||||
inputs[| 13].setVisible(true);
|
inputs[| 13].setVisible(true);
|
||||||
|
inputs[| 14].setVisible(true);
|
||||||
break;
|
break;
|
||||||
case LIGHT_SHAPE_2D.line :
|
case LIGHT_SHAPE_2D.line :
|
||||||
case LIGHT_SHAPE_2D.line_asym :
|
case LIGHT_SHAPE_2D.line_asym :
|
||||||
|
@ -109,6 +113,7 @@ function Node_2D_light(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
|
|
||||||
inputs[| 12].setVisible(false);
|
inputs[| 12].setVisible(false);
|
||||||
inputs[| 13].setVisible(false);
|
inputs[| 13].setVisible(false);
|
||||||
|
inputs[| 14].setVisible(false);
|
||||||
break;
|
break;
|
||||||
case LIGHT_SHAPE_2D.spot :
|
case LIGHT_SHAPE_2D.spot :
|
||||||
inputs[| 2].setVisible(false);
|
inputs[| 2].setVisible(false);
|
||||||
|
@ -120,6 +125,7 @@ function Node_2D_light(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
|
|
||||||
inputs[| 12].setVisible(false);
|
inputs[| 12].setVisible(false);
|
||||||
inputs[| 13].setVisible(false);
|
inputs[| 13].setVisible(false);
|
||||||
|
inputs[| 14].setVisible(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,14 +160,15 @@ function Node_2D_light(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
|
|
||||||
switch(_shape) {
|
switch(_shape) {
|
||||||
case LIGHT_SHAPE_2D.point :
|
case LIGHT_SHAPE_2D.point :
|
||||||
var _rbnd = _data[12];
|
var _rbnd = _data[12];
|
||||||
var _rbns = _data[13];
|
var _rbns = _data[13];
|
||||||
|
var _rbnr = _data[14];
|
||||||
|
|
||||||
if(_rbnd < 2)
|
if(_rbnd < 2)
|
||||||
draw_circle_color(_pos[0], _pos[1], _range, c_white, c_black, 0);
|
draw_circle_color(_pos[0], _pos[1], _range, c_white, c_black, 0);
|
||||||
else {
|
else {
|
||||||
_rbnd *= 2;
|
_rbnd *= 2;
|
||||||
var bnd_amo = ceil(64 / _rbnd);
|
var bnd_amo = ceil(64 / _rbnd); //band radial per step
|
||||||
var step = bnd_amo * _rbnd;
|
var step = bnd_amo * _rbnd;
|
||||||
var astp = 360 / step;
|
var astp = 360 / step;
|
||||||
var ox, oy, nx, ny;
|
var ox, oy, nx, ny;
|
||||||
|
@ -169,12 +176,12 @@ function Node_2D_light(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
|
|
||||||
draw_primitive_begin(pr_trianglelist);
|
draw_primitive_begin(pr_trianglelist);
|
||||||
|
|
||||||
for( var i = 0; i < step; i++ ) {
|
for( var i = 0; i <= step; i++ ) {
|
||||||
var dir = _rbns + i * astp;
|
var dir = _rbns + i * astp;
|
||||||
nx = _pos[0] + lengthdir_x(_range, dir);
|
nx = _pos[0] + lengthdir_x(_range, dir);
|
||||||
ny = _pos[1] + lengthdir_y(_range, dir);
|
ny = _pos[1] + lengthdir_y(_range, dir);
|
||||||
|
|
||||||
if(floor(i / bnd_amo) % 2 && i) {
|
if((i % bnd_amo) / bnd_amo < _rbnr && i) {
|
||||||
draw_vertex_color(_pos[0], _pos[1], c_white, 1);
|
draw_vertex_color(_pos[0], _pos[1], c_white, 1);
|
||||||
draw_vertex_color(ox, oy, c_black, 1);
|
draw_vertex_color(ox, oy, c_black, 1);
|
||||||
draw_vertex_color(nx, ny, c_black, 1);
|
draw_vertex_color(nx, ny, c_black, 1);
|
||||||
|
|
|
@ -55,10 +55,16 @@ function Node_3D_Obj(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
|
||||||
inputs[| 14] = nodeValue(14, "Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
inputs[| 14] = nodeValue(14, "Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 15] = nodeValue(15, "Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]);
|
||||||
|
|
||||||
|
inputs[| 16] = nodeValue(16, "Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]);
|
||||||
|
|
||||||
input_display_list = [ 2,
|
input_display_list = [ 2,
|
||||||
["Geometry", false], 0, 1,
|
["Geometry", false], 0, 1,
|
||||||
["Object transform", false], 14, 13, 11,
|
["Object transform", false], 14, 13, 11,
|
||||||
["Render", false], 3, 5,
|
["Camera", false], 15, 16, 3, 5,
|
||||||
["Light", false], 6, 7, 8, 9, 10,
|
["Light", false], 6, 7, 8, 9, 10,
|
||||||
["Textures", true], 12,
|
["Textures", true], 12,
|
||||||
];
|
];
|
||||||
|
@ -66,8 +72,15 @@ function Node_3D_Obj(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
|
||||||
input_display_len = array_length(input_display_list);
|
input_display_len = array_length(input_display_list);
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
||||||
|
|
||||||
|
outputs[| 2] = nodeValue(2, "Normal pass", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
output_display_list = [
|
||||||
|
0, 2, 1
|
||||||
|
]
|
||||||
|
|
||||||
_3d_node_init(2, /*Transform*/ 3, 13, 5);
|
_3d_node_init(2, /*Transform*/ 3, 13, 5);
|
||||||
|
|
||||||
function reset_tex() {
|
function reset_tex() {
|
||||||
|
@ -144,7 +157,7 @@ function Node_3D_Obj(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
|
||||||
do_reset_material = false;
|
do_reset_material = false;
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny, true);
|
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static submit_vertex = function() {
|
static submit_vertex = function() {
|
||||||
|
@ -197,11 +210,25 @@ function Node_3D_Obj(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
|
||||||
var _lrot = inputs[| 13].getValue();
|
var _lrot = inputs[| 13].getValue();
|
||||||
var _lsca = inputs[| 11].getValue();
|
var _lsca = inputs[| 11].getValue();
|
||||||
|
|
||||||
var _outSurf = outputs[| 0].getValue();
|
var _proj = inputs[| 15].getValue();
|
||||||
outputs[| 0].setValue(_outSurf);
|
var _fov = inputs[| 16].getValue();
|
||||||
|
|
||||||
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, false);
|
inputs[| 16].setVisible(_proj);
|
||||||
submit_vertex();
|
|
||||||
_3d_post_setup();
|
for( var i = 0; i < array_length(output_display_list) - 1; i++ ) {
|
||||||
|
var ind = output_display_list[i];
|
||||||
|
var _outSurf = outputs[| ind].getValue();
|
||||||
|
outputs[| ind].setValue(surface_verify(_outSurf, _dim[0], _dim[1]));
|
||||||
|
|
||||||
|
var pass = "diff";
|
||||||
|
switch(ind) {
|
||||||
|
case 0 : pass = "diff" break;
|
||||||
|
case 2 : pass = "norm" break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _proj, _fov, pass, false);
|
||||||
|
submit_vertex();
|
||||||
|
_3d_post_setup();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -33,18 +33,33 @@ function Node_3D_Combine(_x, _y, _group = -1) : Node(_x, _y, _group) constructor
|
||||||
|
|
||||||
inputs[| 10] = nodeValue(10, "Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey);
|
inputs[| 10] = nodeValue(10, "Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey);
|
||||||
|
|
||||||
|
inputs[| 11] = nodeValue(11, "Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]);
|
||||||
|
|
||||||
|
inputs[| 12] = nodeValue(12, "Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]);
|
||||||
|
|
||||||
input_display_list = [ 0,
|
input_display_list = [ 0,
|
||||||
["Object transform", false], 1, 2, 3,
|
["Object transform", false], 1, 2, 3,
|
||||||
["Render", false], 4, 5,
|
["Camera", false], 11, 12, 4, 5,
|
||||||
["Light", false], 6, 7, 8, 9, 10,
|
["Light", false], 6, 7, 8, 9, 10,
|
||||||
["Objects", true],
|
["Objects", true],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
data_length = 1;
|
||||||
input_fix_len = ds_list_size(inputs);
|
input_fix_len = ds_list_size(inputs);
|
||||||
input_display_len = array_length(input_display_list);
|
input_display_len = array_length(input_display_list);
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
outputs[| 1] = nodeValue(1, "3D objects", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
outputs[| 1] = nodeValue(1, "3D objects", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
||||||
|
|
||||||
|
outputs[| 2] = nodeValue(2, "Normal pass", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
output_display_list = [
|
||||||
|
0, 2, 1
|
||||||
|
]
|
||||||
|
|
||||||
_3d_node_init(1, /*Transform*/ 4, 2, 5);
|
_3d_node_init(1, /*Transform*/ 4, 2, 5);
|
||||||
|
|
||||||
static createNewInput = function() {
|
static createNewInput = function() {
|
||||||
|
@ -56,10 +71,7 @@ function Node_3D_Combine(_x, _y, _group = -1) : Node(_x, _y, _group) constructor
|
||||||
}
|
}
|
||||||
if(!LOADING && !APPENDING) createNewInput();
|
if(!LOADING && !APPENDING) createNewInput();
|
||||||
|
|
||||||
static updateValueFrom = function(index) {
|
static refreshDynamicInput = function() {
|
||||||
if(index < input_fix_len) return;
|
|
||||||
if(LOADING || APPENDING) return;
|
|
||||||
|
|
||||||
var _l = ds_list_create();
|
var _l = ds_list_create();
|
||||||
for( var i = 0; i < ds_list_size(inputs); i++ ) {
|
for( var i = 0; i < ds_list_size(inputs); i++ ) {
|
||||||
if(i < input_fix_len || inputs[| i].value_from)
|
if(i < input_fix_len || inputs[| i].value_from)
|
||||||
|
@ -86,6 +98,13 @@ function Node_3D_Combine(_x, _y, _group = -1) : Node(_x, _y, _group) constructor
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static onValueFromUpdate = function(index) {
|
||||||
|
if(index < input_fix_len) return;
|
||||||
|
if(LOADING || APPENDING) return;
|
||||||
|
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
}
|
}
|
||||||
|
@ -127,11 +146,32 @@ function Node_3D_Combine(_x, _y, _group = -1) : Node(_x, _y, _group) constructor
|
||||||
var _lclr = inputs[| 9].getValue();
|
var _lclr = inputs[| 9].getValue();
|
||||||
var _aclr = inputs[| 10].getValue();
|
var _aclr = inputs[| 10].getValue();
|
||||||
|
|
||||||
var _outSurf = outputs[| 0].getValue();
|
var _proj = inputs[| 11].getValue();
|
||||||
outputs[| 0].setValue(surface_verify(_outSurf, _dim[0], _dim[1]));
|
var _fov = inputs[| 12].getValue();
|
||||||
|
|
||||||
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, false);
|
inputs[| 12].setVisible(_proj);
|
||||||
submit_vertex();
|
|
||||||
_3d_post_setup();
|
for( var i = 0; i < array_length(output_display_list) - 1; i++ ) {
|
||||||
|
var ind = output_display_list[i];
|
||||||
|
var _outSurf = outputs[| ind].getValue();
|
||||||
|
outputs[| ind].setValue(surface_verify(_outSurf, _dim[0], _dim[1]));
|
||||||
|
|
||||||
|
var pass = "diff";
|
||||||
|
switch(ind) {
|
||||||
|
case 0 : pass = "diff" break;
|
||||||
|
case 2 : pass = "norm" break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _proj, _fov, pass, false);
|
||||||
|
submit_vertex();
|
||||||
|
_3d_post_setup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static postDeserialize = function() {
|
||||||
|
var _inputs = load_map[? "inputs"];
|
||||||
|
|
||||||
|
for(var i = input_fix_len; i < ds_list_size(_inputs); i += data_length)
|
||||||
|
createNewInput();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -9,7 +9,7 @@ function Node_3D_Extrude(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c
|
||||||
inputs[| 2] = nodeValue(2, "Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
inputs[| 2] = nodeValue(2, "Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 3] = nodeValue(3, "Object rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
inputs[| 3] = nodeValue(3, "Object rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 180, 0 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 4] = nodeValue(4, "Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 0.1 ])
|
inputs[| 4] = nodeValue(4, "Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 0.1 ])
|
||||||
|
@ -47,10 +47,16 @@ function Node_3D_Extrude(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c
|
||||||
|
|
||||||
inputs[| 15] = nodeValue(15, "Always update", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
inputs[| 15] = nodeValue(15, "Always update", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
|
inputs[| 16] = nodeValue(16, "Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]);
|
||||||
|
|
||||||
|
inputs[| 17] = nodeValue(17, "Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]);
|
||||||
|
|
||||||
input_display_list = [1,
|
input_display_list = [1,
|
||||||
["Geometry", false], 0, 12, 8, 14,
|
["Geometry", false], 0, 8, 14,
|
||||||
["Object transform", false], 2, 3, 4,
|
["Object transform", false], 2, 3, 4,
|
||||||
["Render", false], 5, 7, 15,
|
["Camera", false], 16, 17, 5, 7, 15,
|
||||||
["Light", false], 9, 10, 11, 12, 13,
|
["Light", false], 9, 10, 11, 12, 13,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -58,14 +64,20 @@ function Node_3D_Extrude(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c
|
||||||
|
|
||||||
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function(index) { return submit_vertex(index); });
|
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function(index) { return submit_vertex(index); });
|
||||||
|
|
||||||
|
outputs[| 2] = nodeValue(2, "Normal pass", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
output_display_list = [
|
||||||
|
0, 2, 1
|
||||||
|
]
|
||||||
|
|
||||||
_3d_node_init(1, /*Transform*/ 5, 3, 7);
|
_3d_node_init(1, /*Transform*/ 5, 3, 7);
|
||||||
|
|
||||||
VB = [];
|
VB = [];
|
||||||
VB[0] = vertex_create_buffer();
|
VB[0] = vertex_create_buffer();
|
||||||
vertex_begin(VB[0], FORMAT_PT);
|
vertex_begin(VB[0], FORMAT_PNT);
|
||||||
vertex_end(VB[0]);
|
vertex_end(VB[0]);
|
||||||
|
|
||||||
static onValueUpdateFrom = function(index) {
|
static onValueFromUpdate = function(index) {
|
||||||
if(index == 0 || index == 14)
|
if(index == 0 || index == 14)
|
||||||
generateMesh();
|
generateMesh();
|
||||||
}
|
}
|
||||||
|
@ -84,14 +96,15 @@ function Node_3D_Extrude(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c
|
||||||
var _ins = inputs[| 0].getValue();
|
var _ins = inputs[| 0].getValue();
|
||||||
if(!is_array(_ins)) _ins = [ _ins ];
|
if(!is_array(_ins)) _ins = [ _ins ];
|
||||||
|
|
||||||
for( var i = 0; i < array_length(_ins); i++ ) {
|
for( var i = 0; i < array_length(_ins); i++ )
|
||||||
VB[i] = generateMeshIndex(i);
|
VB[i] = generateMeshIndex(i);
|
||||||
}
|
|
||||||
|
UPDATE |= RENDER_TYPE.full;
|
||||||
}
|
}
|
||||||
|
|
||||||
static generateMeshIndex = function(index) {
|
static generateMeshIndex = function(index) {
|
||||||
var _ins = getSingleValue( 0, index);
|
var _ins = getSingleValue( 0, index);
|
||||||
var _hei = getSingleValue(12, index);
|
var _hei = getSingleValue(14, index);
|
||||||
if(!is_surface(_ins)) return;
|
if(!is_surface(_ins)) return;
|
||||||
|
|
||||||
var ww = surface_get_width(_ins);
|
var ww = surface_get_width(_ins);
|
||||||
|
@ -216,9 +229,10 @@ function Node_3D_Extrude(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c
|
||||||
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
}
|
}
|
||||||
|
|
||||||
static submit_vertex = function(index) {
|
static submit_vertex = function(index = 0) {
|
||||||
var _ins = getSingleValue(0, index);
|
var _ins = getSingleValue(0, index);
|
||||||
if(!is_surface(_ins)) return;
|
if(!is_surface(_ins)) return;
|
||||||
|
if(index >= array_length(VB)) return;
|
||||||
|
|
||||||
var _lpos = getSingleValue(2, index);
|
var _lpos = getSingleValue(2, index);
|
||||||
var _lrot = getSingleValue(3, index);
|
var _lrot = getSingleValue(3, index);
|
||||||
|
@ -247,16 +261,31 @@ function Node_3D_Extrude(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c
|
||||||
|
|
||||||
var _upda = _data[15];
|
var _upda = _data[15];
|
||||||
|
|
||||||
surface_verify(_outSurf, _dim[0], _dim[1]);
|
var _proj = _data[16];
|
||||||
|
var _fov = _data[17];
|
||||||
|
|
||||||
|
inputs[| 17].setVisible(_proj);
|
||||||
|
|
||||||
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
||||||
if(!is_surface(_ins)) return _outSurf;
|
if(!is_surface(_ins)) return _outSurf;
|
||||||
|
|
||||||
|
var pass = "diff";
|
||||||
|
switch(_output_index) {
|
||||||
|
case 0 : pass = "diff" break;
|
||||||
|
case 2 : pass = "norm" break;
|
||||||
|
}
|
||||||
|
|
||||||
if(_upda && ANIMATOR.frame_progress)
|
if(_upda && ANIMATOR.frame_progress)
|
||||||
generateMesh();
|
generateMesh();
|
||||||
|
|
||||||
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, false);
|
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _proj, _fov, pass, false);
|
||||||
submit_vertex(_array_index);
|
submit_vertex(_array_index);
|
||||||
_3d_post_setup();
|
_3d_post_setup();
|
||||||
|
|
||||||
return _outSurf;
|
return _outSurf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static postConnect = function() {
|
||||||
|
generateMesh();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -36,15 +36,28 @@ function Node_3D_Transform(_x, _y, _group = -1) : Node(_x, _y, _group) construct
|
||||||
inputs[| 11] = nodeValue(11, "3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone)
|
inputs[| 11] = nodeValue(11, "3D object", self, JUNCTION_CONNECT.input, VALUE_TYPE.d3object, noone)
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
|
inputs[| 12] = nodeValue(12, "Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]);
|
||||||
|
|
||||||
|
inputs[| 13] = nodeValue(13, "Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]);
|
||||||
|
|
||||||
input_display_list = [ 0, 11,
|
input_display_list = [ 0, 11,
|
||||||
["Object transform", false], 1, 2, 3,
|
["Object transform", false], 1, 2, 3,
|
||||||
["Render", false], 4, 5,
|
["Camera", false], 12, 13, 4, 5,
|
||||||
["Light", true], 6, 7, 8, 9, 10,
|
["Light", true], 6, 7, 8, 9, 10,
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
||||||
|
|
||||||
|
outputs[| 2] = nodeValue(2, "Normal pass", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
output_display_list = [
|
||||||
|
0, 2, 1
|
||||||
|
]
|
||||||
|
|
||||||
_3d_node_init(1, /*Transform*/ 4, 2, 5);
|
_3d_node_init(1, /*Transform*/ 4, 2, 5);
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
@ -85,11 +98,25 @@ function Node_3D_Transform(_x, _y, _group = -1) : Node(_x, _y, _group) construct
|
||||||
var _lclr = inputs[| 9].getValue();
|
var _lclr = inputs[| 9].getValue();
|
||||||
var _aclr = inputs[| 10].getValue();
|
var _aclr = inputs[| 10].getValue();
|
||||||
|
|
||||||
var _outSurf = outputs[| 0].getValue();
|
var _proj = inputs[| 12].getValue();
|
||||||
outputs[| 0].setValue(surface_verify(_outSurf, _dim[0], _dim[1]));
|
var _fov = inputs[| 13].getValue();
|
||||||
|
|
||||||
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, false);
|
inputs[| 13].setVisible(_proj);
|
||||||
submit_vertex();
|
|
||||||
_3d_post_setup();
|
for( var i = 0; i < array_length(output_display_list) - 1; i++ ) {
|
||||||
|
var ind = output_display_list[i];
|
||||||
|
var _outSurf = outputs[| ind].getValue();
|
||||||
|
outputs[| ind].setValue(surface_verify(_outSurf, _dim[0], _dim[1]));
|
||||||
|
|
||||||
|
var pass = "diff";
|
||||||
|
switch(ind) {
|
||||||
|
case 0 : pass = "diff" break;
|
||||||
|
case 2 : pass = "norm" break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _proj, _fov, pass, false);
|
||||||
|
submit_vertex();
|
||||||
|
_3d_post_setup();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -25,15 +25,33 @@ function Node_3D_Plane(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
inputs[| 7] = nodeValue(7, "Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ])
|
inputs[| 7] = nodeValue(7, "Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 8] = nodeValue(8, "Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]);
|
||||||
|
|
||||||
|
inputs[| 9] = nodeValue(9, "Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]);
|
||||||
|
|
||||||
|
inputs[| 10] = nodeValue(10, "Texture scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 11] = nodeValue(11, "Texture shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
input_display_list = [0,
|
input_display_list = [0,
|
||||||
["Outputs", true], 4, 5,
|
["Outputs", true], 4, 5,
|
||||||
["Object transform", false], 6, 2, 7,
|
["Object transform", false], 6, 2, 7,
|
||||||
["Render", false], 1, 3,
|
["Camera", false], 8, 9, 1, 3,
|
||||||
|
["Texture", false], 10, 11,
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
||||||
|
|
||||||
|
output_display_list = [
|
||||||
|
0, 1
|
||||||
|
]
|
||||||
|
|
||||||
_3d_node_init(0, /*Transform*/ 1, 2, 3);
|
_3d_node_init(0, /*Transform*/ 1, 2, 3);
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
@ -42,7 +60,7 @@ function Node_3D_Plane(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
var _out = outputs[| 0].getValue();
|
var _out = outputs[| 0].getValue();
|
||||||
if(!is_surface(_out) || !surface_exists(_out)) return;
|
if(!is_surface(_out) || !surface_exists(_out)) return;
|
||||||
|
|
||||||
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny,, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static submit_vertex = function(index = 0) {
|
static submit_vertex = function(index = 0) {
|
||||||
|
@ -95,18 +113,48 @@ function Node_3D_Plane(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
var _lrot = _data[2];
|
var _lrot = _data[2];
|
||||||
var _lsca = _data[7];
|
var _lsca = _data[7];
|
||||||
|
|
||||||
var cam_proj = matrix_build_projection_ortho(_ww, _hh, 1, 100);
|
var _proj = _data[8];
|
||||||
camera_set_view_mat(cam, cam_proj);
|
var _fov = _data[9];
|
||||||
camera_set_view_size(cam, _ww, _hh);
|
|
||||||
|
var _uvSca = _data[10];
|
||||||
|
var _uvShf = _data[11];
|
||||||
|
|
||||||
|
inputs[| 9].setVisible(_proj);
|
||||||
|
|
||||||
surface_set_target(_outSurf);
|
surface_set_target(_outSurf);
|
||||||
draw_clear_alpha(0, 0);
|
draw_clear_alpha(0, 0);
|
||||||
BLEND_OVER
|
BLEND_OVER
|
||||||
|
|
||||||
shader_set(sh_vertex_pt);
|
shader = sh_vertex_pt;
|
||||||
|
shader_set(shader);
|
||||||
|
|
||||||
|
uniUVscale = shader_get_uniform(shader, "UVscale");
|
||||||
|
uniUVshift = shader_get_uniform(shader, "UVshift");
|
||||||
|
|
||||||
|
shader_set_uniform_f_array(uniUVscale, _uvSca);
|
||||||
|
shader_set_uniform_f_array(uniUVshift, _uvShf);
|
||||||
|
|
||||||
|
var cam_view, cam_proj;
|
||||||
|
if(_proj == CAMERA_PROJ.ortho) {
|
||||||
|
cam_view = matrix_build_lookat(0, 0, 128, 0, 0, 0, 0, 1, 0);
|
||||||
|
cam_proj = matrix_build_projection_ortho(_ww, _hh, 0.1, 256);
|
||||||
|
} else {
|
||||||
|
var dist = _ww / 2 * dtan(90 - _fov);
|
||||||
|
cam_view = matrix_build_lookat(0, 0, 1 + dist, 0, 0, 0, 0, 1, 0);
|
||||||
|
cam_proj = matrix_build_projection_perspective(_ww, _hh, dist, dist + 128);
|
||||||
|
}
|
||||||
|
|
||||||
|
var cam = camera_get_active();
|
||||||
|
camera_set_view_size(cam, _ww, _hh);
|
||||||
|
camera_set_view_mat(cam, cam_view);
|
||||||
|
camera_set_proj_mat(cam, cam_proj);
|
||||||
camera_apply(cam);
|
camera_apply(cam);
|
||||||
|
|
||||||
matrix_stack_push(matrix_build(_pos[0], _pos[1], 0, 0, 0, 0, _ww * _sca[0], _hh * _sca[1], 1));
|
if(_proj == CAMERA_PROJ.ortho)
|
||||||
|
matrix_stack_push(matrix_build(_ww / 2 - _pos[0], _pos[1] - _hh / 2, 0, 0, 0, 0, _ww * _sca[0], -_hh * _sca[1], 1));
|
||||||
|
else
|
||||||
|
matrix_stack_push(matrix_build(_ww / 2 - _pos[0], _pos[1] - _hh / 2, 0, 0, 0, 0, _ww * _sca[0], -_hh * _sca[1], 1));
|
||||||
|
|
||||||
matrix_stack_push(matrix_build(_lpos[0], _lpos[1], _lpos[2], 0, 0, 0, 1, 1, 1));
|
matrix_stack_push(matrix_build(_lpos[0], _lpos[1], _lpos[2], 0, 0, 0, 1, 1, 1));
|
||||||
matrix_stack_push(matrix_build(0, 0, 0, _lrot[0], _lrot[1], _lrot[2], 1, 1, 1));
|
matrix_stack_push(matrix_build(0, 0, 0, _lrot[0], _lrot[1], _lrot[2], 1, 1, 1));
|
||||||
matrix_stack_push(matrix_build(0, 0, 0, 0, 0, 0, _lsca[0], _lsca[1], _lsca[2]));
|
matrix_stack_push(matrix_build(0, 0, 0, 0, 0, 0, _lsca[0], _lsca[1], _lsca[2]));
|
||||||
|
|
181
scripts/node_3d_prim_cone/node_3d_prim_cone.gml
Normal file
181
scripts/node_3d_prim_cone/node_3d_prim_cone.gml
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
function Node_3D_Cone(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "3D Cone";
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue(0, "Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2)
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue(1, "Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size / 2, def_surf_size / 2 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue(2, "Render rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 3] = nodeValue(3, "Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 4] = nodeValue(4, "Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 5] = nodeValue(5, "Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.rotation);
|
||||||
|
|
||||||
|
inputs[| 6] = nodeValue(6, "Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]);
|
||||||
|
|
||||||
|
inputs[| 7] = nodeValue(7, "Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||||
|
|
||||||
|
inputs[| 8] = nodeValue(8, "Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
|
||||||
|
inputs[| 9] = nodeValue(9, "Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey);
|
||||||
|
|
||||||
|
inputs[| 10] = nodeValue(10, "Object rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 11] = nodeValue(11, "Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 12] = nodeValue(12, "Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]);
|
||||||
|
|
||||||
|
inputs[| 13] = nodeValue(13, "Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]);
|
||||||
|
|
||||||
|
inputs[| 14] = nodeValue(14, "Sides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 16);
|
||||||
|
|
||||||
|
inputs[| 15] = nodeValue(15, "Textures base", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||||
|
|
||||||
|
inputs[| 16] = nodeValue(16, "Textures side", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||||
|
|
||||||
|
input_display_list = [0,
|
||||||
|
["Geometry", false], 14,
|
||||||
|
["Object transform", false], 11, 10, 4,
|
||||||
|
["Camera", false], 12, 13, 1, 3,
|
||||||
|
["Texture", true], 15, 16,
|
||||||
|
["Light", false], 5, 6, 7, 8, 9,
|
||||||
|
];
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
||||||
|
|
||||||
|
outputs[| 2] = nodeValue(2, "Normal pass", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
output_display_list = [
|
||||||
|
0, 2, 1
|
||||||
|
]
|
||||||
|
|
||||||
|
_3d_node_init(0, /*Transform*/ 1, 10, 3);
|
||||||
|
|
||||||
|
sides = 16;
|
||||||
|
VB_top = vertex_create_buffer();
|
||||||
|
VB_sid = vertex_create_buffer();
|
||||||
|
|
||||||
|
static generate_vb = function() {
|
||||||
|
var _ox, _oy, _nx, _ny, _ou, _nu;
|
||||||
|
|
||||||
|
vertex_begin(VB_top, FORMAT_PNT);
|
||||||
|
for(var i = 0; i <= sides; i++) {
|
||||||
|
_nx = lengthdir_x(0.5, i * 360 / sides);
|
||||||
|
_ny = lengthdir_y(0.5, i * 360 / sides);
|
||||||
|
|
||||||
|
if(i) {
|
||||||
|
vertex_add_pnt(VB_top, [ 0, 0.5, 0], [0, 1, 0], [ 0 + 0.5, 0 + 0.5]);
|
||||||
|
vertex_add_pnt(VB_top, [_ox, 0.5, _oy], [0, 1, 0], [_ox + 0.5, _oy + 0.5]);
|
||||||
|
vertex_add_pnt(VB_top, [_nx, 0.5, _ny], [0, 1, 0], [_nx + 0.5, _ny + 0.5]);
|
||||||
|
}
|
||||||
|
|
||||||
|
_ox = _nx;
|
||||||
|
_oy = _ny;
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex_end(VB_top);
|
||||||
|
|
||||||
|
vertex_begin(VB_sid, FORMAT_PNT);
|
||||||
|
for(var i = 0; i <= sides; i++) {
|
||||||
|
_nx = lengthdir_x(0.5, i * 360 / sides);
|
||||||
|
_ny = lengthdir_y(0.5, i * 360 / sides);
|
||||||
|
_nu = i / sides;
|
||||||
|
|
||||||
|
if(i) {
|
||||||
|
vertex_add_pnt(VB_sid, [ 0, -0.5, 0], [_nx, -0.5, _ny], [_nu, 1]);
|
||||||
|
vertex_add_pnt(VB_sid, [_nx, 0.5, _ny], [_nx, -0.5, _ny], [_nu, 0]);
|
||||||
|
vertex_add_pnt(VB_sid, [_ox, 0.5, _oy], [_nx, -0.5, _ny], [_ou, 0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
_ox = _nx;
|
||||||
|
_oy = _ny;
|
||||||
|
_ou = _nu;
|
||||||
|
}
|
||||||
|
vertex_end(VB_sid);
|
||||||
|
}
|
||||||
|
generate_vb();
|
||||||
|
|
||||||
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
|
}
|
||||||
|
|
||||||
|
static submit_vertex = function(index = 0) {
|
||||||
|
var _lpos = getSingleValue(11, index);
|
||||||
|
var _lrot = getSingleValue(10, index);
|
||||||
|
var _lsca = getSingleValue( 4, index);
|
||||||
|
|
||||||
|
var face_bas = getSingleValue(15, index);
|
||||||
|
var face_sid = getSingleValue(16, index);
|
||||||
|
|
||||||
|
_3d_local_transform(_lpos, _lrot, _lsca);
|
||||||
|
|
||||||
|
matrix_set(matrix_world, matrix_stack_top());
|
||||||
|
vertex_submit(VB_top, pr_trianglelist, surface_get_texture(face_bas));
|
||||||
|
vertex_submit(VB_sid, pr_trianglelist, surface_get_texture(face_sid));
|
||||||
|
|
||||||
|
_3d_clear_local_transform();
|
||||||
|
}
|
||||||
|
|
||||||
|
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||||
|
var _sides = _data[14];
|
||||||
|
|
||||||
|
if(_sides != sides) {
|
||||||
|
sides = _sides;
|
||||||
|
generate_vb();
|
||||||
|
}
|
||||||
|
|
||||||
|
var _dim = _data[0];
|
||||||
|
var _pos = _data[1];
|
||||||
|
var _sca = _data[3];
|
||||||
|
|
||||||
|
var face_bas = _data[15];
|
||||||
|
var face_sid = _data[16];
|
||||||
|
|
||||||
|
var _lpos = _data[11];
|
||||||
|
var _lrot = _data[10];
|
||||||
|
var _lsca = _data[ 4];
|
||||||
|
|
||||||
|
var _ldir = _data[5];
|
||||||
|
var _lhgt = _data[6];
|
||||||
|
var _lint = _data[7];
|
||||||
|
var _lclr = _data[8];
|
||||||
|
var _aclr = _data[9];
|
||||||
|
|
||||||
|
var _proj = _data[12];
|
||||||
|
var _fov = _data[13];
|
||||||
|
|
||||||
|
inputs[| 13].setVisible(_proj);
|
||||||
|
|
||||||
|
var pass = "diff";
|
||||||
|
switch(_output_index) {
|
||||||
|
case 0 : pass = "diff" break;
|
||||||
|
case 2 : pass = "norm" break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _proj, _fov, pass);
|
||||||
|
|
||||||
|
matrix_set(matrix_world, matrix_stack_top());
|
||||||
|
vertex_submit(VB_top, pr_trianglelist, surface_get_texture(face_bas));
|
||||||
|
vertex_submit(VB_sid, pr_trianglelist, surface_get_texture(face_sid));
|
||||||
|
|
||||||
|
_3d_post_setup();
|
||||||
|
|
||||||
|
return _outSurf;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"resourceType": "GMScript",
|
"resourceType": "GMScript",
|
||||||
"resourceVersion": "1.0",
|
"resourceVersion": "1.0",
|
||||||
"name": "curve_power_function",
|
"name": "node_3d_prim_cone",
|
||||||
"isDnD": false,
|
"isDnD": false,
|
||||||
"isCompatibility": false,
|
"isCompatibility": false,
|
||||||
"parent": {
|
"parent": {
|
||||||
"name": "curve",
|
"name": "3D",
|
||||||
"path": "folders/functions/curve.yy",
|
"path": "folders/nodes/data/3D.yy",
|
||||||
},
|
},
|
||||||
}
|
}
|
12
scripts/node_3d_prim_cone/node_3d_prim_cube.yy
Normal file
12
scripts/node_3d_prim_cone/node_3d_prim_cube.yy
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "3D",
|
||||||
|
"path": "folders/nodes/data/3D.yy",
|
||||||
|
},
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_3d_prim_cube",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
|
@ -48,16 +48,29 @@ function Node_3D_Cube(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) cons
|
||||||
inputs[| 19] = nodeValue(19, "Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
inputs[| 19] = nodeValue(19, "Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 20] = nodeValue(20, "Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]);
|
||||||
|
|
||||||
|
inputs[| 21] = nodeValue(21, "Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]);
|
||||||
|
|
||||||
input_display_list = [1,
|
input_display_list = [1,
|
||||||
["Object transform",false], 19, 18, 12,
|
["Object transform",false], 19, 18, 12,
|
||||||
["Render", false], 2, 4,
|
["Camera", false], 20, 21, 2, 4,
|
||||||
["Texture", true], 0, 5, 6, 7, 8, 9, 10, 11,
|
["Texture", true], 0, 5, 6, 7, 8, 9, 10, 11,
|
||||||
["Light", false], 13, 14, 15, 16, 17,
|
["Light", false], 13, 14, 15, 16, 17,
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function(index) { return submit_vertex(index); });
|
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function(index) { return submit_vertex(index); });
|
||||||
|
|
||||||
|
outputs[| 2] = nodeValue(2, "Normal pass", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
output_display_list = [
|
||||||
|
0, 2, 1
|
||||||
|
]
|
||||||
|
|
||||||
_3d_node_init(1, /*Transform*/ 2, 18, 4);
|
_3d_node_init(1, /*Transform*/ 2, 18, 4);
|
||||||
|
|
||||||
cube_faces = [
|
cube_faces = [
|
||||||
|
@ -115,10 +128,21 @@ function Node_3D_Cube(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) cons
|
||||||
|
|
||||||
var _usetex = _data[5];
|
var _usetex = _data[5];
|
||||||
|
|
||||||
|
var _proj = _data[20];
|
||||||
|
var _fov = _data[21];
|
||||||
|
|
||||||
|
inputs[| 21].setVisible(_proj);
|
||||||
|
|
||||||
for(var i = 6; i <= 11; i++) inputs[| i].setVisible(true, _usetex);
|
for(var i = 6; i <= 11; i++) inputs[| i].setVisible(true, _usetex);
|
||||||
inputs[| 0].setVisible(true, !_usetex);
|
inputs[| 0].setVisible(true, !_usetex);
|
||||||
|
|
||||||
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca);
|
var pass = "diff";
|
||||||
|
switch(_output_index) {
|
||||||
|
case 0 : pass = "diff" break;
|
||||||
|
case 2 : pass = "norm" break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _proj, _fov, pass);
|
||||||
|
|
||||||
if(_usetex) {
|
if(_usetex) {
|
||||||
for(var i = 0; i < 6; i++) {
|
for(var i = 0; i < 6; i++) {
|
||||||
|
|
|
@ -44,20 +44,37 @@ function Node_3D_Cylinder(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
|
||||||
inputs[| 16] = nodeValue(16, "Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
inputs[| 16] = nodeValue(16, "Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 17] = nodeValue(17, "Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]);
|
||||||
|
|
||||||
|
inputs[| 18] = nodeValue(18, "Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]);
|
||||||
|
|
||||||
|
inputs[| 19] = nodeValue(19, "Taper", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]);
|
||||||
|
|
||||||
input_display_list = [2,
|
input_display_list = [2,
|
||||||
["Geometry", false], 0, 1,
|
["Geometry", false], 0, 1, 19,
|
||||||
["Object transform", false], 16, 15, 9,
|
["Object transform", false], 16, 15, 9,
|
||||||
["Render", false], 3, 5,
|
["Camera", false], 17, 18, 3, 5,
|
||||||
["Texture", true], 6, 7, 8,
|
["Texture", true], 6, 7, 8,
|
||||||
["Light", false], 10, 11, 12, 13, 14,
|
["Light", false], 10, 11, 12, 13, 14,
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
||||||
|
|
||||||
|
outputs[| 2] = nodeValue(2, "Normal pass", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
output_display_list = [
|
||||||
|
0, 2, 1
|
||||||
|
]
|
||||||
|
|
||||||
_3d_node_init(2, /*Transform*/ 3, 15, 5);
|
_3d_node_init(2, /*Transform*/ 3, 15, 5);
|
||||||
|
|
||||||
sides = 16;
|
sides = 16;
|
||||||
|
taper = 1;
|
||||||
thick = 0.5;
|
thick = 0.5;
|
||||||
VB_top = vertex_create_buffer();
|
VB_top = vertex_create_buffer();
|
||||||
VB_sid = vertex_create_buffer();
|
VB_sid = vertex_create_buffer();
|
||||||
|
@ -88,14 +105,16 @@ function Node_3D_Cylinder(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
|
||||||
_ny = lengthdir_y(0.5, i * 360 / sides);
|
_ny = lengthdir_y(0.5, i * 360 / sides);
|
||||||
_nu = i / sides;
|
_nu = i / sides;
|
||||||
|
|
||||||
if(i) {
|
var nrm_y = 1 - taper;
|
||||||
vertex_add_pnt(VB_sid, [_ox, -thick / 2, _oy], [_nx, 0, _ny], [_ou, 0]);
|
|
||||||
vertex_add_pnt(VB_sid, [_ox, thick / 2, _oy], [_nx, 0, _ny], [_ou, 1]);
|
|
||||||
vertex_add_pnt(VB_sid, [_nx, thick / 2, _ny], [_nx, 0, _ny], [_nu, 1]);
|
|
||||||
|
|
||||||
vertex_add_pnt(VB_sid, [_nx, thick / 2, _ny], [_nx, 0, _ny], [_nu, 1]);
|
if(i) {
|
||||||
vertex_add_pnt(VB_sid, [_nx, -thick / 2, _ny], [_nx, 0, _ny], [_nu, 0]);
|
vertex_add_pnt(VB_sid, [_ox * taper, -thick / 2, _oy * taper], [_nx, nrm_y, _ny], [_ou, 0]);
|
||||||
vertex_add_pnt(VB_sid, [_ox, -thick / 2, _oy], [_nx, 0, _ny], [_ou, 0]);
|
vertex_add_pnt(VB_sid, [_ox, thick / 2, _oy ], [_nx, nrm_y, _ny], [_ou, 1]);
|
||||||
|
vertex_add_pnt(VB_sid, [_nx, thick / 2, _ny ], [_nx, nrm_y, _ny], [_nu, 1]);
|
||||||
|
|
||||||
|
vertex_add_pnt(VB_sid, [_nx, thick / 2, _ny ], [_nx, nrm_y, _ny], [_nu, 1]);
|
||||||
|
vertex_add_pnt(VB_sid, [_nx * taper, -thick / 2, _ny * taper], [_nx, nrm_y, _ny], [_nu, 0]);
|
||||||
|
vertex_add_pnt(VB_sid, [_ox * taper, -thick / 2, _oy * taper], [_nx, nrm_y, _ny], [_ou, 0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ox = _nx;
|
_ox = _nx;
|
||||||
|
@ -124,7 +143,7 @@ function Node_3D_Cylinder(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
|
||||||
matrix_set(matrix_world, matrix_stack_top());
|
matrix_set(matrix_world, matrix_stack_top());
|
||||||
vertex_submit(VB_top, pr_trianglelist, surface_get_texture(face_top));
|
vertex_submit(VB_top, pr_trianglelist, surface_get_texture(face_top));
|
||||||
|
|
||||||
matrix_stack_push(matrix_build(0, -thick, 0, 0, 0, 0, 1, 1, 1));
|
matrix_stack_push(matrix_build(0, -thick, 0, 0, 0, 0, taper, 1, taper));
|
||||||
matrix_set(matrix_world, matrix_stack_top());
|
matrix_set(matrix_world, matrix_stack_top());
|
||||||
vertex_submit(VB_top, pr_trianglelist, surface_get_texture(face_bot));
|
vertex_submit(VB_top, pr_trianglelist, surface_get_texture(face_bot));
|
||||||
matrix_stack_pop();
|
matrix_stack_pop();
|
||||||
|
@ -138,10 +157,12 @@ function Node_3D_Cylinder(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
|
||||||
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||||
var _sides = _data[0];
|
var _sides = _data[0];
|
||||||
var _thick = _data[1];
|
var _thick = _data[1];
|
||||||
|
var _taper = _data[19];
|
||||||
|
|
||||||
if(_sides != sides || _thick != thick) {
|
if(_sides != sides || _thick != thick || _taper != taper) {
|
||||||
sides = _sides;
|
sides = _sides;
|
||||||
thick = _thick;
|
thick = _thick;
|
||||||
|
taper = _taper;
|
||||||
generate_vb();
|
generate_vb();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,12 +184,23 @@ function Node_3D_Cylinder(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
|
||||||
var _lclr = _data[13];
|
var _lclr = _data[13];
|
||||||
var _aclr = _data[14];
|
var _aclr = _data[14];
|
||||||
|
|
||||||
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca);
|
var _proj = _data[17];
|
||||||
|
var _fov = _data[18];
|
||||||
|
|
||||||
|
inputs[| 18].setVisible(_proj);
|
||||||
|
|
||||||
|
var pass = "diff";
|
||||||
|
switch(_output_index) {
|
||||||
|
case 0 : pass = "diff" break;
|
||||||
|
case 2 : pass = "norm" break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _proj, _fov, pass);
|
||||||
|
|
||||||
matrix_set(matrix_world, matrix_stack_top());
|
matrix_set(matrix_world, matrix_stack_top());
|
||||||
vertex_submit(VB_top, pr_trianglelist, surface_get_texture(face_top));
|
vertex_submit(VB_top, pr_trianglelist, surface_get_texture(face_top));
|
||||||
|
|
||||||
matrix_stack_push(matrix_build(0, -thick, 0, 0, 0, 0, 1, 1, 1));
|
matrix_stack_push(matrix_build(0, -thick, 0, 0, 0, 0, taper, 1, taper));
|
||||||
matrix_set(matrix_world, matrix_stack_top());
|
matrix_set(matrix_world, matrix_stack_top());
|
||||||
vertex_submit(VB_top, pr_trianglelist, surface_get_texture(face_bot));
|
vertex_submit(VB_top, pr_trianglelist, surface_get_texture(face_bot));
|
||||||
matrix_stack_pop();
|
matrix_stack_pop();
|
||||||
|
|
12
scripts/node_3d_prim_sphere/node_3d_prim_cube.yy
Normal file
12
scripts/node_3d_prim_sphere/node_3d_prim_cube.yy
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "3D",
|
||||||
|
"path": "folders/nodes/data/3D.yy",
|
||||||
|
},
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_3d_prim_cube",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
191
scripts/node_3d_prim_sphere/node_3d_prim_sphere.gml
Normal file
191
scripts/node_3d_prim_sphere/node_3d_prim_sphere.gml
Normal file
|
@ -0,0 +1,191 @@
|
||||||
|
function Node_3D_Sphere(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "3D Sphere";
|
||||||
|
dimension_index = 1;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue(0, "Subdivisions", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [8, 4])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue(1, "Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2)
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue(2, "Render position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size / 2, def_surf_size / 2 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
inputs[| 3] = nodeValue(3, "Render rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 4] = nodeValue(4, "Render scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 5] = nodeValue(5, "Textures", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||||
|
|
||||||
|
inputs[| 6] = nodeValue(6, "Object scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1, 1 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 7] = nodeValue(7, "Light direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.rotation);
|
||||||
|
|
||||||
|
inputs[| 8] = nodeValue(8, "Light height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [-1, 1, 0.01]);
|
||||||
|
|
||||||
|
inputs[| 9] = nodeValue(9, "Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||||
|
|
||||||
|
inputs[| 10] = nodeValue(10, "Light color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
|
||||||
|
inputs[| 11] = nodeValue(11, "Ambient color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_grey);
|
||||||
|
|
||||||
|
inputs[| 12] = nodeValue(12, "Object rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 13] = nodeValue(13, "Object position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 14] = nodeValue(14, "Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]);
|
||||||
|
|
||||||
|
inputs[| 15] = nodeValue(15, "Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]);
|
||||||
|
|
||||||
|
input_display_list = [1,
|
||||||
|
["Geometry", false], 0,
|
||||||
|
["Object transform", false], 13, 12, 6,
|
||||||
|
["Camera", false], 14, 15, 2, 4,
|
||||||
|
["Texture", true], 5,
|
||||||
|
["Light", false], 7, 8, 9, 10, 11,
|
||||||
|
];
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
outputs[| 1] = nodeValue(1, "3D object", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
||||||
|
|
||||||
|
outputs[| 2] = nodeValue(2, "Normal pass", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
output_display_list = [
|
||||||
|
0, 2, 1
|
||||||
|
]
|
||||||
|
|
||||||
|
_3d_node_init(1, /*Transform*/ 2, 12, 4);
|
||||||
|
|
||||||
|
subd = [0, 0];
|
||||||
|
VB = vertex_create_buffer();
|
||||||
|
|
||||||
|
static generate_vb = function() {
|
||||||
|
var _ox, _oy, _nx, _ny, _ou, _nu;
|
||||||
|
|
||||||
|
vertex_begin(VB, FORMAT_PNT);
|
||||||
|
|
||||||
|
for( var i = 0; i < subd[0]; i++ )
|
||||||
|
for( var j = 0; j < subd[1]; j++ ) {
|
||||||
|
var ha0 = (i + 0) / subd[0] * 360;
|
||||||
|
var ha1 = (i + 1) / subd[0] * 360;
|
||||||
|
var va0 = 90 - (j + 0) / subd[1] * 180;
|
||||||
|
var va1 = 90 - (j + 1) / subd[1] * 180;
|
||||||
|
|
||||||
|
var h0 = dsin(va0) * 0.5;
|
||||||
|
var h1 = dsin(va1) * 0.5;
|
||||||
|
var r0 = dcos(va0) * 0.5;
|
||||||
|
var r1 = dcos(va1) * 0.5;
|
||||||
|
|
||||||
|
var hx0 = dcos(ha0) * r0;
|
||||||
|
var hy0 = dsin(ha0) * r0;
|
||||||
|
var hz0 = h0;
|
||||||
|
|
||||||
|
var hx1 = dcos(ha1) * r0;
|
||||||
|
var hy1 = dsin(ha1) * r0;
|
||||||
|
var hz1 = h0;
|
||||||
|
|
||||||
|
var hx2 = dcos(ha0) * r1;
|
||||||
|
var hy2 = dsin(ha0) * r1;
|
||||||
|
var hz2 = h1;
|
||||||
|
|
||||||
|
var hx3 = dcos(ha1) * r1;
|
||||||
|
var hy3 = dsin(ha1) * r1;
|
||||||
|
var hz3 = h1;
|
||||||
|
|
||||||
|
var u0 = ha0 / 360;
|
||||||
|
var v0 = 0.5 + 0.5 * dsin(va0);
|
||||||
|
|
||||||
|
var u1 = ha1 / 360;
|
||||||
|
var v1 = 0.5 + 0.5 * dsin(va0);
|
||||||
|
|
||||||
|
var u2 = ha0 / 360;
|
||||||
|
var v2 = 0.5 + 0.5 * dsin(va1);
|
||||||
|
|
||||||
|
var u3 = ha1 / 360;
|
||||||
|
var v3 = 0.5 + 0.5 * dsin(va1);
|
||||||
|
|
||||||
|
vertex_add_pnt(VB, [hx0, hz0, hy0], [hx0, hz0, hy0], [u0, v0]);
|
||||||
|
vertex_add_pnt(VB, [hx1, hz1, hy1], [hx1, hz1, hy1], [u1, v1]);
|
||||||
|
vertex_add_pnt(VB, [hx2, hz2, hy2], [hx2, hz2, hy2], [u2, v2]);
|
||||||
|
|
||||||
|
vertex_add_pnt(VB, [hx1, hz1, hy1], [hx1, hz1, hy1], [u1, v1]);
|
||||||
|
vertex_add_pnt(VB, [hx2, hz2, hy2], [hx2, hz2, hy2], [u2, v2]);
|
||||||
|
vertex_add_pnt(VB, [hx3, hz3, hy3], [hx3, hz3, hy3], [u3, v3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex_end(VB);
|
||||||
|
}
|
||||||
|
generate_vb();
|
||||||
|
|
||||||
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
_3d_gizmo(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
|
}
|
||||||
|
|
||||||
|
static submit_vertex = function(index = 0) {
|
||||||
|
var _lpos = getSingleValue(13, index);
|
||||||
|
var _lrot = getSingleValue(12, index);
|
||||||
|
var _lsca = getSingleValue( 6, index);
|
||||||
|
|
||||||
|
var texture = getSingleValue(5, index);
|
||||||
|
_3d_local_transform(_lpos, _lrot, _lsca);
|
||||||
|
|
||||||
|
matrix_set(matrix_world, matrix_stack_top());
|
||||||
|
vertex_submit(VB, pr_trianglelist, surface_get_texture(texture));
|
||||||
|
|
||||||
|
_3d_clear_local_transform();
|
||||||
|
}
|
||||||
|
|
||||||
|
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||||
|
var _subd = _data[0];
|
||||||
|
|
||||||
|
if(_subd[0] != subd[0] || _subd[1] != subd[1]) {
|
||||||
|
subd[0] = _subd[0];
|
||||||
|
subd[1] = _subd[1];
|
||||||
|
generate_vb();
|
||||||
|
}
|
||||||
|
|
||||||
|
var _dim = _data[1];
|
||||||
|
var _pos = _data[2];
|
||||||
|
//var _rot = _data[3];
|
||||||
|
var _sca = _data[4];
|
||||||
|
var texture = _data[5];
|
||||||
|
|
||||||
|
var _lpos = _data[13];
|
||||||
|
var _lrot = _data[12];
|
||||||
|
var _lsca = _data[ 6];
|
||||||
|
|
||||||
|
var _ldir = _data[ 7];
|
||||||
|
var _lhgt = _data[ 8];
|
||||||
|
var _lint = _data[ 9];
|
||||||
|
var _lclr = _data[10];
|
||||||
|
var _aclr = _data[11];
|
||||||
|
|
||||||
|
var _proj = _data[14];
|
||||||
|
var _fov = _data[15];
|
||||||
|
|
||||||
|
inputs[| 15].setVisible(_proj);
|
||||||
|
|
||||||
|
var pass = "diff";
|
||||||
|
switch(_output_index) {
|
||||||
|
case 0 : pass = "diff" break;
|
||||||
|
case 2 : pass = "norm" break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _proj, _fov, pass);
|
||||||
|
vertex_submit(VB, pr_trianglelist, surface_get_texture(texture));
|
||||||
|
_3d_post_setup();
|
||||||
|
|
||||||
|
return _outSurf;
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_3d_prim_sphere/node_3d_prim_sphere.yy
Normal file
11
scripts/node_3d_prim_sphere/node_3d_prim_sphere.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_3d_prim_sphere",
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "3D",
|
||||||
|
"path": "folders/nodes/data/3D.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -58,17 +58,30 @@ function Node_3D_Repeat(_x, _y, _group = -1) : Node(_x, _y, _group) constructor
|
||||||
inputs[| 19] = nodeValue(19, "Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 360 ])
|
inputs[| 19] = nodeValue(19, "Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 360 ])
|
||||||
.setDisplay(VALUE_DISPLAY.rotation_range);
|
.setDisplay(VALUE_DISPLAY.rotation_range);
|
||||||
|
|
||||||
|
inputs[| 20] = nodeValue(20, "Projection", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Orthographic", "Perspective" ]);
|
||||||
|
|
||||||
|
inputs[| 21] = nodeValue(21, "Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 90, 1 ]);
|
||||||
|
|
||||||
input_display_list = [ 0, 11,
|
input_display_list = [ 0, 11,
|
||||||
["Object transform", true], 1, 2, 3,
|
["Object transform", true], 1, 2, 3,
|
||||||
["Render", true], 4, 5,
|
["Camera", true], 20, 21, 4, 5,
|
||||||
["Light", true], 6, 7, 8, 9, 10,
|
["Light", true], 6, 7, 8, 9, 10,
|
||||||
["Repeat", false], 12, 16, 13, 14, 15, 17, 18, 19
|
["Repeat", false], 12, 16, 13, 14, 15, 17, 18, 19
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
outputs[| 1] = nodeValue(1, "3D objects", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
outputs[| 1] = nodeValue(1, "3D objects", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3object, function() { return submit_vertex(); });
|
||||||
|
|
||||||
|
outputs[| 2] = nodeValue(2, "Normal pass", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
output_display_list = [
|
||||||
|
0, 2, 1
|
||||||
|
]
|
||||||
|
|
||||||
_3d_node_init(1, /*Transform*/ 4, 2, 5);
|
_3d_node_init(1, /*Transform*/ 4, 2, 5);
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
@ -154,18 +167,31 @@ function Node_3D_Repeat(_x, _y, _group = -1) : Node(_x, _y, _group) constructor
|
||||||
var _lclr = inputs[| 9].getValue();
|
var _lclr = inputs[| 9].getValue();
|
||||||
var _aclr = inputs[| 10].getValue();
|
var _aclr = inputs[| 10].getValue();
|
||||||
|
|
||||||
|
var _proj = inputs[| 20].getValue();
|
||||||
|
var _fov = inputs[| 21].getValue();
|
||||||
|
|
||||||
var _patt = inputs[| 16].getValue();
|
var _patt = inputs[| 16].getValue();
|
||||||
inputs[| 13].setVisible(_patt == 0);
|
inputs[| 13].setVisible(_patt == 0);
|
||||||
|
|
||||||
inputs[| 17].setVisible(_patt == 1);
|
inputs[| 17].setVisible(_patt == 1);
|
||||||
inputs[| 18].setVisible(_patt == 1);
|
inputs[| 18].setVisible(_patt == 1);
|
||||||
inputs[| 19].setVisible(_patt == 1);
|
inputs[| 19].setVisible(_patt == 1);
|
||||||
|
inputs[| 21].setVisible(_proj);
|
||||||
|
|
||||||
var _outSurf = outputs[| 0].getValue();
|
for( var i = 0; i < array_length(output_display_list) - 1; i++ ) {
|
||||||
outputs[| 0].setValue(surface_verify(_outSurf, _dim[0], _dim[1]));
|
var ind = output_display_list[i];
|
||||||
|
var _outSurf = outputs[| ind].getValue();
|
||||||
|
outputs[| ind].setValue(surface_verify(_outSurf, _dim[0], _dim[1]));
|
||||||
|
|
||||||
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, false);
|
var pass = "diff";
|
||||||
submit_vertex();
|
switch(ind) {
|
||||||
_3d_post_setup();
|
case 0 : pass = "diff" break;
|
||||||
|
case 2 : pass = "norm" break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_3d_pre_setup(_outSurf, _dim, _pos, _sca, _ldir, _lhgt, _lint, _lclr, _aclr, _lpos, _lrot, _lsca, _proj, _fov, pass, false);
|
||||||
|
submit_vertex();
|
||||||
|
_3d_post_setup();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -20,7 +20,7 @@ function Node_9Slice(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) const
|
||||||
drag_my = 0;
|
drag_my = 0;
|
||||||
drag_sv = 0;
|
drag_sv = 0;
|
||||||
|
|
||||||
static updateValueFrom = function(index) {
|
static onValueFromUpdate = function(index) {
|
||||||
if(index == 0) {
|
if(index == 0) {
|
||||||
var s = inputs[| 0].getValue();
|
var s = inputs[| 0].getValue();
|
||||||
if(is_array(s)) s = s[0];
|
if(is_array(s)) s = s[0];
|
||||||
|
|
|
@ -13,7 +13,7 @@ function Node_VFX_effector(_x, _y, _group = -1) : Node(_x, _y, _group) construct
|
||||||
inputs[| 1] = nodeValue(1, "Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16, 4, 4, AREA_SHAPE.rectangle ])
|
inputs[| 1] = nodeValue(1, "Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16, 4, 4, AREA_SHAPE.rectangle ])
|
||||||
.setDisplay(VALUE_DISPLAY.area);
|
.setDisplay(VALUE_DISPLAY.area);
|
||||||
|
|
||||||
inputs[| 2] = nodeValue(2, "Falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, [0, 0, 1, 1] )
|
inputs[| 2] = nodeValue(2, "Falloff", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01 )
|
||||||
.setDisplay(VALUE_DISPLAY.curve);
|
.setDisplay(VALUE_DISPLAY.curve);
|
||||||
|
|
||||||
inputs[| 3] = nodeValue(3, "Falloff distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 );
|
inputs[| 3] = nodeValue(3, "Falloff distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 );
|
||||||
|
|
|
@ -9,7 +9,8 @@ function Node_VFX_Renderer(_x, _y, _group = -1) : Node(_x, _y, _group) construct
|
||||||
inputs[| 2] = nodeValue(2, "Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
|
inputs[| 2] = nodeValue(2, "Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Normal", "Additive" ]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Normal", "Additive" ]);
|
||||||
|
|
||||||
input_index = ds_list_size(inputs);
|
data_length = 1;
|
||||||
|
input_fix_len = ds_list_size(inputs);
|
||||||
|
|
||||||
static createNewInput = function() {
|
static createNewInput = function() {
|
||||||
var index = ds_list_size(inputs);
|
var index = ds_list_size(inputs);
|
||||||
|
@ -20,13 +21,10 @@ function Node_VFX_Renderer(_x, _y, _group = -1) : Node(_x, _y, _group) construct
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
static updateValueFrom = function(index) {
|
static refreshDynamicInput = function() {
|
||||||
if(index < input_index) return;
|
|
||||||
if(LOADING || APPENDING) return;
|
|
||||||
|
|
||||||
var _l = ds_list_create();
|
var _l = ds_list_create();
|
||||||
for( var i = 0; i < ds_list_size(inputs); i++ ) {
|
for( var i = 0; i < ds_list_size(inputs); i++ ) {
|
||||||
if(i < input_index || inputs[| i].value_from)
|
if(i < input_fix_len || inputs[| i].value_from)
|
||||||
ds_list_add(_l, inputs[| i]);
|
ds_list_add(_l, inputs[| i]);
|
||||||
else
|
else
|
||||||
delete inputs[| i];
|
delete inputs[| i];
|
||||||
|
@ -41,6 +39,13 @@ function Node_VFX_Renderer(_x, _y, _group = -1) : Node(_x, _y, _group) construct
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static onValueFromUpdate = function(index) {
|
||||||
|
if(index < input_fix_len) return;
|
||||||
|
if(LOADING || APPENDING) return;
|
||||||
|
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
|
|
||||||
function update(_time = ANIMATOR.current_frame) {
|
function update(_time = ANIMATOR.current_frame) {
|
||||||
var _dim = inputs[| 0].getValue(_time);
|
var _dim = inputs[| 0].getValue(_time);
|
||||||
var _exact = inputs[| 1].getValue(_time);
|
var _exact = inputs[| 1].getValue(_time);
|
||||||
|
@ -59,7 +64,7 @@ function Node_VFX_Renderer(_x, _y, _group = -1) : Node(_x, _y, _group) construct
|
||||||
case PARTICLE_BLEND_MODE.additive : gpu_set_blendmode(bm_add); break;
|
case PARTICLE_BLEND_MODE.additive : gpu_set_blendmode(bm_add); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for( var i = input_index; i < ds_list_size(inputs) - 1; i++ ) {
|
for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) {
|
||||||
var parts = inputs[| i].getValue(_time);
|
var parts = inputs[| i].getValue(_time);
|
||||||
if(!ds_exists(parts, ds_type_list)) continue;
|
if(!ds_exists(parts, ds_type_list)) continue;
|
||||||
|
|
||||||
|
@ -78,7 +83,7 @@ function Node_VFX_Renderer(_x, _y, _group = -1) : Node(_x, _y, _group) construct
|
||||||
static postDeserialize = function() {
|
static postDeserialize = function() {
|
||||||
var _inputs = load_map[? "inputs"];
|
var _inputs = load_map[? "inputs"];
|
||||||
|
|
||||||
for(var i = input_index; i < ds_list_size(_inputs); i++)
|
for(var i = input_fix_len; i < ds_list_size(_inputs); i += data_length)
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,7 +6,7 @@ function Node_Anim_Curve(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c
|
||||||
w = 96;
|
w = 96;
|
||||||
min_h = 0;
|
min_h = 0;
|
||||||
|
|
||||||
inputs[| 0] = nodeValue(0, "Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, [0, 0, 1, 1]);
|
inputs[| 0] = nodeValue(0, "Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_01);
|
||||||
inputs[| 1] = nodeValue(1, "Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
inputs[| 1] = nodeValue(1, "Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ function Node_Anim_Curve(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c
|
||||||
var time = _data[1];
|
var time = _data[1];
|
||||||
var _min = _data[2];
|
var _min = _data[2];
|
||||||
var _max = _data[3];
|
var _max = _data[3];
|
||||||
var val = eval_curve_bezier_cubic(curve, time) * (_max - _min) + _min;
|
var val = eval_curve_bezier_cubic_x(curve, time) * (_max - _min) + _min;
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,11 +12,12 @@ function Node_Array(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
|
||||||
}
|
}
|
||||||
if(!LOADING && !APPENDING) createNewInput();
|
if(!LOADING && !APPENDING) createNewInput();
|
||||||
|
|
||||||
|
input_fix_len = 0;
|
||||||
|
data_length = 1;
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, []);
|
outputs[| 0] = nodeValue(0, "Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, []);
|
||||||
|
|
||||||
static updateValueFrom = function(index) {
|
static refreshDynamicInput = function() {
|
||||||
if(LOADING || APPENDING) return;
|
|
||||||
|
|
||||||
var _l = ds_list_create();
|
var _l = ds_list_create();
|
||||||
for( var i = 0; i < ds_list_size(inputs); i++ ) {
|
for( var i = 0; i < ds_list_size(inputs); i++ ) {
|
||||||
if(inputs[| i].value_from)
|
if(inputs[| i].value_from)
|
||||||
|
@ -34,6 +35,12 @@ function Node_Array(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static onValueFromUpdate = function(index) {
|
||||||
|
if(LOADING || APPENDING) return;
|
||||||
|
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
|
|
||||||
static update = function() {
|
static update = function() {
|
||||||
var res = array_create(ds_list_size(inputs) - 1);
|
var res = array_create(ds_list_size(inputs) - 1);
|
||||||
|
|
||||||
|
@ -51,7 +58,7 @@ function Node_Array(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
|
||||||
static postDeserialize = function() {
|
static postDeserialize = function() {
|
||||||
var _inputs = load_map[? "inputs"];
|
var _inputs = load_map[? "inputs"];
|
||||||
|
|
||||||
for(var i = 0; i < ds_list_size(_inputs); i++)
|
for(var i = input_fix_len; i < ds_list_size(_inputs); i += data_length)
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
}
|
}
|
26
scripts/node_boolean/node_boolean.gml
Normal file
26
scripts/node_boolean/node_boolean.gml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
function Node_Boolean(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
|
||||||
|
name = "Boolean";
|
||||||
|
color = COLORS.node_blend_number;
|
||||||
|
previewable = false;
|
||||||
|
|
||||||
|
w = 96;
|
||||||
|
min_h = 32 + 24 * 1;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue(0, "Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false)
|
||||||
|
.setVisible(true, true);
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue(0, "Boolean", self, JUNCTION_CONNECT.output, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
|
function process_data(_output, _data, index = 0) {
|
||||||
|
return _data[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
static onDrawNode = function(xx, yy, _mx, _my, _s) {
|
||||||
|
draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text);
|
||||||
|
var str = outputs[| 0].getValue()? "True" : "False";
|
||||||
|
|
||||||
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
var ss = string_scale(str, bbox.w, bbox.h);
|
||||||
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_boolean/node_boolean.yy
Normal file
11
scripts/node_boolean/node_boolean.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_boolean",
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "value",
|
||||||
|
"path": "folders/nodes/data/value.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,21 +1,24 @@
|
||||||
function Node_Color_replace(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor {
|
function Node_Color_replace(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor {
|
||||||
name = "Color replace";
|
name = "Color replace";
|
||||||
|
|
||||||
shader = sh_color_replace;
|
shader = sh_palette_replace;
|
||||||
uniform_from = shader_get_uniform(shader, "colorFrom");
|
uniform_from = shader_get_uniform(shader, "colorFrom");
|
||||||
uniform_from_count = shader_get_uniform(shader, "colorFrom_amo");
|
uniform_from_count = shader_get_uniform(shader, "colorFrom_amo");
|
||||||
|
|
||||||
uniform_to = shader_get_uniform(shader, "colorTo");
|
uniform_to = shader_get_uniform(shader, "colorTo");
|
||||||
|
uniform_to_count = shader_get_uniform(shader, "colorTo_amo");
|
||||||
|
|
||||||
uniform_ter = shader_get_uniform(shader, "treshold");
|
uniform_ter = shader_get_uniform(shader, "treshold");
|
||||||
uniform_alp = shader_get_uniform(shader, "alphacmp");
|
uniform_alp = shader_get_uniform(shader, "alphacmp");
|
||||||
uniform_inv = shader_get_uniform(shader, "inverted");
|
uniform_inv = shader_get_uniform(shader, "inverted");
|
||||||
uniform_hrd = shader_get_uniform(shader, "hardReplace");
|
uniform_hrd = shader_get_uniform(shader, "hardReplace");
|
||||||
|
|
||||||
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||||
inputs[| 1] = nodeValue(1, "Color from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, [ c_black ])
|
inputs[| 1] = nodeValue(1, "Palette from", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, [ c_black ])
|
||||||
.setDisplay(VALUE_DISPLAY.palette);
|
.setDisplay(VALUE_DISPLAY.palette);
|
||||||
|
|
||||||
inputs[| 2] = nodeValue(2, "Color to", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
|
inputs[| 2] = nodeValue(2, "Palette to", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, [ c_white ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.palette);
|
||||||
|
|
||||||
inputs[| 3] = nodeValue(3, "Treshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1)
|
inputs[| 3] = nodeValue(3, "Treshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1)
|
||||||
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||||
|
@ -27,7 +30,7 @@ function Node_Color_replace(_x, _y, _group = -1) : Node_Processor(_x, _y, _group
|
||||||
inputs[| 6] = nodeValue(6, "Hard replace", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
inputs[| 6] = nodeValue(6, "Hard replace", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
input_display_list = [0,
|
input_display_list = [0,
|
||||||
["Color", false], 1, 2,
|
["Palette", false], 1, 2,
|
||||||
["Comparison", false], 3, 5,
|
["Comparison", false], 3, 5,
|
||||||
["Render", false], 4, 6
|
["Render", false], 4, 6
|
||||||
];
|
];
|
||||||
|
@ -42,12 +45,20 @@ function Node_Color_replace(_x, _y, _group = -1) : Node_Processor(_x, _y, _group
|
||||||
var alp = _data[5];
|
var alp = _data[5];
|
||||||
var hrd = _data[6];
|
var hrd = _data[6];
|
||||||
|
|
||||||
var _colors = array_create(array_length(fr) * 4);
|
var _colorFrom = array_create(array_length(fr) * 4);
|
||||||
for(var i = 0; i < array_length(fr); i++) {
|
for(var i = 0; i < array_length(fr); i++) {
|
||||||
_colors[i * 4 + 0] = color_get_red(fr[i]) / 255;
|
_colorFrom[i * 4 + 0] = color_get_red(fr[i]) / 255;
|
||||||
_colors[i * 4 + 1] = color_get_green(fr[i]) / 255;
|
_colorFrom[i * 4 + 1] = color_get_green(fr[i]) / 255;
|
||||||
_colors[i * 4 + 2] = color_get_blue(fr[i]) / 255;
|
_colorFrom[i * 4 + 2] = color_get_blue(fr[i]) / 255;
|
||||||
_colors[i * 4 + 3] = 1;
|
_colorFrom[i * 4 + 3] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
var _colorTo = array_create(array_length(to) * 4);
|
||||||
|
for(var i = 0; i < array_length(to); i++) {
|
||||||
|
_colorTo[i * 4 + 0] = color_get_red(to[i]) / 255;
|
||||||
|
_colorTo[i * 4 + 1] = color_get_green(to[i]) / 255;
|
||||||
|
_colorTo[i * 4 + 2] = color_get_blue(to[i]) / 255;
|
||||||
|
_colorTo[i * 4 + 3] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
surface_set_target(_outSurf);
|
surface_set_target(_outSurf);
|
||||||
|
@ -55,12 +66,13 @@ function Node_Color_replace(_x, _y, _group = -1) : Node_Processor(_x, _y, _group
|
||||||
BLEND_OVER
|
BLEND_OVER
|
||||||
|
|
||||||
shader_set(shader);
|
shader_set(shader);
|
||||||
shader_set_uniform_f_array(uniform_from, _colors);
|
shader_set_uniform_f_array(uniform_from, _colorFrom);
|
||||||
shader_set_uniform_i(uniform_from_count, array_length(fr));
|
shader_set_uniform_i(uniform_from_count, array_length(fr));
|
||||||
shader_set_uniform_i(uniform_alp, alp);
|
shader_set_uniform_i(uniform_alp, alp);
|
||||||
shader_set_uniform_i(uniform_hrd, hrd);
|
shader_set_uniform_i(uniform_hrd, hrd);
|
||||||
|
|
||||||
shader_set_uniform_f_array(uniform_to, [ color_get_red(to) / 255, color_get_green(to) / 255, color_get_blue(to) / 255, 1.0 ] );
|
shader_set_uniform_f_array(uniform_to, _colorTo);
|
||||||
|
shader_set_uniform_i(uniform_to_count, array_length(to));
|
||||||
shader_set_uniform_f(uniform_ter, tr);
|
shader_set_uniform_f(uniform_ter, tr);
|
||||||
shader_set_uniform_i(uniform_inv, in);
|
shader_set_uniform_i(uniform_inv, in);
|
||||||
|
|
||||||
|
|
|
@ -6,30 +6,87 @@ function Node_Sampler(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) cons
|
||||||
|
|
||||||
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector)
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
.setUnitRef(function(index) { return getDimension(index); });
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue(2, "Sampling size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [1, 3, 1]);
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white);
|
outputs[| 0] = nodeValue(0, "Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white);
|
||||||
|
|
||||||
static getPreviewValue = function() { return inputs[| 0]; }
|
static getPreviewValue = function() { return inputs[| 0]; }
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
|
|
||||||
|
var _suf = current_data[0];
|
||||||
|
if(!is_surface(_suf)) return;
|
||||||
|
var ww = surface_get_width(_suf);
|
||||||
|
var hh = surface_get_height(_suf);
|
||||||
|
|
||||||
|
var _pos = current_data[1];
|
||||||
|
var _sam = 1 + (current_data[2] - 1) * 2;
|
||||||
|
|
||||||
|
var x0 = _pos[0] + 0.5 - _sam / 2;
|
||||||
|
var x1 = _pos[0] + 0.5 + _sam / 2;
|
||||||
|
var y0 = _pos[1] + 0.5 - _sam / 2;
|
||||||
|
var y1 = _pos[1] + 0.5 + _sam / 2;
|
||||||
|
|
||||||
|
x0 = clamp(x0, 0, ww);
|
||||||
|
x1 = clamp(x1, 0, ww);
|
||||||
|
y0 = clamp(y0, 0, hh);
|
||||||
|
y1 = clamp(y1, 0, hh);
|
||||||
|
|
||||||
|
x0 = _x + x0 * _s;
|
||||||
|
x1 = _x + x1 * _s;
|
||||||
|
y0 = _y + y0 * _s;
|
||||||
|
y1 = _y + y1 * _s;
|
||||||
|
|
||||||
|
draw_set_color(COLORS._main_accent);
|
||||||
|
draw_rectangle(x0, y0, x1, y1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function process_data(_output, _data, index = 0) {
|
function process_data(_output, _data, index = 0) {
|
||||||
var _surf = _data[0];
|
var _surf = _data[0];
|
||||||
var _pos = _data[1];
|
var _pos = _data[1];
|
||||||
|
var _sam = _data[2];
|
||||||
if(!is_surface(_surf)) return c_black;
|
if(!is_surface(_surf)) return c_black;
|
||||||
|
|
||||||
return surface_getpixel(_surf, _pos[0], _pos[1]);
|
var ww = surface_get_width(_surf);
|
||||||
|
var hh = surface_get_height(_surf);
|
||||||
|
|
||||||
|
var r = 0, g = 0, b = 0, amo = 0;
|
||||||
|
|
||||||
|
_sam -= 1;
|
||||||
|
for( var i = -_sam; i <= _sam; i++ )
|
||||||
|
for( var j = -_sam; j <= _sam; j++ ) {
|
||||||
|
var px = _pos[0] + i;
|
||||||
|
var py = _pos[1] + j;
|
||||||
|
if(px < 0) continue;
|
||||||
|
if(py < 0) continue;
|
||||||
|
if(px >= ww) continue;
|
||||||
|
if(py >= hh) continue;
|
||||||
|
|
||||||
|
var cc = surface_getpixel(_surf, px, py);
|
||||||
|
|
||||||
|
r += color_get_red(cc);
|
||||||
|
g += color_get_green(cc);
|
||||||
|
b += color_get_blue(cc);
|
||||||
|
amo++;
|
||||||
|
}
|
||||||
|
|
||||||
|
r /= amo;
|
||||||
|
g /= amo;
|
||||||
|
b /= amo;
|
||||||
|
|
||||||
|
return make_color_rgb(r, g, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static onDrawNode = function(xx, yy, _mx, _my, _s) {
|
static onDrawNode = function(xx, yy, _mx, _my, _s) {
|
||||||
var bbox = drawGetBbox(xx, yy, _s);
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
|
||||||
if(y1 <= y0) return;
|
if(bbox.h <= 0) return;
|
||||||
|
|
||||||
var c = outputs[| 0].getValue();
|
var c = outputs[| 0].getValue();
|
||||||
if(is_array(c)) c = c[0];
|
if(is_array(c)) c = c[0];
|
||||||
|
|
|
@ -153,6 +153,8 @@ function Node_Composite(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
|
||||||
}
|
}
|
||||||
layer_dragging = noone;
|
layer_dragging = noone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return _h;
|
||||||
});
|
});
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
|
@ -223,7 +225,7 @@ function Node_Composite(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
|
||||||
overlay_w = 0;
|
overlay_w = 0;
|
||||||
overlay_h = 0;
|
overlay_h = 0;
|
||||||
|
|
||||||
static updateValueFrom = function(index) {
|
static onValueFromUpdate = function(index) {
|
||||||
if(LOADING || APPENDING) return;
|
if(LOADING || APPENDING) return;
|
||||||
|
|
||||||
if(index + data_length >= ds_list_size(inputs))
|
if(index + data_length >= ds_list_size(inputs))
|
||||||
|
|
|
@ -5,7 +5,7 @@ function Node_create_CSV_File_Read(_x, _y, _group = -1) {
|
||||||
if(path == "") return noone;
|
if(path == "") return noone;
|
||||||
}
|
}
|
||||||
|
|
||||||
var node = new Node_Text_File_Read(_x, _y, _group);
|
var node = new Node_CSV_File_Read(_x, _y, _group);
|
||||||
node.inputs[| 0].setValue(path);
|
node.inputs[| 0].setValue(path);
|
||||||
node.doUpdate();
|
node.doUpdate();
|
||||||
|
|
||||||
|
|
62
scripts/node_csv_file_write/node_csv_file_write.gml
Normal file
62
scripts/node_csv_file_write/node_csv_file_write.gml
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
function Node_create_CSV_File_Write(_x, _y, _group = -1) {
|
||||||
|
var path = "";
|
||||||
|
|
||||||
|
var node = new Node_CSV_File_Write(_x, _y, _group);
|
||||||
|
node.inputs[| 0].setValue(path);
|
||||||
|
node.doUpdate();
|
||||||
|
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Node_CSV_File_Write(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
|
||||||
|
name = "CSV out";
|
||||||
|
color = COLORS.node_blend_input;
|
||||||
|
previewable = false;
|
||||||
|
|
||||||
|
w = 128;
|
||||||
|
min_h = 0;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue(0, "Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
||||||
|
.setDisplay(VALUE_DISPLAY.path_save, ["*.csv", ""]);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue(1, "Content", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, "")
|
||||||
|
.setDisplay(true);
|
||||||
|
|
||||||
|
static update = function() {
|
||||||
|
var path = inputs[| 0].getValue();
|
||||||
|
if(path == "") return;
|
||||||
|
if(filename_ext(path) != ".csv")
|
||||||
|
path += ".csv";
|
||||||
|
|
||||||
|
var _val = inputs[| 1].getValue();
|
||||||
|
var str = "";
|
||||||
|
|
||||||
|
if(is_array(_val)) {
|
||||||
|
for( var i = 0; i < array_length(_val); i++ ) {
|
||||||
|
if(is_array(_val[i])) {
|
||||||
|
for( var j = 0; j < array_length(_val[i]); j++ )
|
||||||
|
str += (j? ", " : "") + string(_val[i][j])
|
||||||
|
str += "\n";
|
||||||
|
} else
|
||||||
|
str += (i? ", " : "") + string(_val[i])
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
str = string(_val);
|
||||||
|
|
||||||
|
var f = file_text_open_write(path);
|
||||||
|
file_text_write_string(f, str);
|
||||||
|
file_text_close(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onDrawNode(xx, yy, _mx, _my, _s) {
|
||||||
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
|
||||||
|
var str = filename_name(inputs[| 0].getValue());
|
||||||
|
if(filename_ext(str) != ".csv")
|
||||||
|
str += ".csv";
|
||||||
|
|
||||||
|
draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text);
|
||||||
|
var ss = string_scale(str, bbox.w, bbox.h);
|
||||||
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_csv_file_write/node_csv_file_write.yy
Normal file
11
scripts/node_csv_file_write/node_csv_file_write.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_csv_file_write",
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "IO",
|
||||||
|
"path": "folders/nodes/data/IO.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -165,6 +165,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
static onValueUpdate = function(index) {}
|
static onValueUpdate = function(index) {}
|
||||||
|
static onValueFromUpdate = function(index) {}
|
||||||
|
|
||||||
static isUpdateReady = function() {
|
static isUpdateReady = function() {
|
||||||
//if(rendered) return false;
|
//if(rendered) return false;
|
||||||
|
@ -181,9 +182,6 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor {
|
||||||
|
|
||||||
static update = function() {}
|
static update = function() {}
|
||||||
|
|
||||||
static updateValue = function(index) {}
|
|
||||||
static updateValueFrom = function(index) {}
|
|
||||||
|
|
||||||
static triggerRender = function() {
|
static triggerRender = function() {
|
||||||
setRenderStatus(false);
|
setRenderStatus(false);
|
||||||
UPDATE |= RENDER_TYPE.partial;
|
UPDATE |= RENDER_TYPE.partial;
|
||||||
|
@ -273,7 +271,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor {
|
||||||
static drawNodeName = function(xx, yy, _s) {
|
static drawNodeName = function(xx, yy, _s) {
|
||||||
draw_name = false;
|
draw_name = false;
|
||||||
if(name == "") return;
|
if(name == "") return;
|
||||||
if(_s < 0.5) return;
|
if(_s < 0.6) return;
|
||||||
draw_name = true;
|
draw_name = true;
|
||||||
|
|
||||||
draw_sprite_stretched_ext(THEME.node_bg_name, 0, xx, yy, w * _s, ui(20), color, 0.75);
|
draw_sprite_stretched_ext(THEME.node_bg_name, 0, xx, yy, w * _s, ui(20), color, 0.75);
|
||||||
|
@ -802,8 +800,12 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor {
|
||||||
inputs[| i].applyDeserialize(_inputs[| i], load_scale);
|
inputs[| i].applyDeserialize(_inputs[| i], load_scale);
|
||||||
|
|
||||||
printIf(TESTING, " > Applying deserialize to node " + name + " completed");
|
printIf(TESTING, " > Applying deserialize to node " + name + " completed");
|
||||||
|
|
||||||
|
doApplyDeserialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static doApplyDeserialize = function() {}
|
||||||
|
|
||||||
static loadGroup = function() {
|
static loadGroup = function() {
|
||||||
if(_group == -1) {
|
if(_group == -1) {
|
||||||
var c = PANEL_GRAPH.getCurrentContext();
|
var c = PANEL_GRAPH.getCurrentContext();
|
||||||
|
|
136
scripts/node_equation/node_equation.gml
Normal file
136
scripts/node_equation/node_equation.gml
Normal file
|
@ -0,0 +1,136 @@
|
||||||
|
function Node_Equation(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "Equation";
|
||||||
|
color = COLORS.node_blend_number;
|
||||||
|
previewable = false;
|
||||||
|
|
||||||
|
w = 96;
|
||||||
|
min_h = 0;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue(1, "Equation", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "");
|
||||||
|
|
||||||
|
static createNewInput = function() {
|
||||||
|
var index = ds_list_size(inputs);
|
||||||
|
inputs[| index + 0] = nodeValue( index + 0, "Argument name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" );
|
||||||
|
|
||||||
|
inputs[| index + 1] = nodeValue( index + 1, "Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 )
|
||||||
|
.setVisible(true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue(0, "Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0);
|
||||||
|
|
||||||
|
argument_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
|
||||||
|
var tx = _x + ui(8);
|
||||||
|
var ty = _y + ui(8);
|
||||||
|
var hh = ui(8);
|
||||||
|
var _th = TEXTBOX_HEIGHT;
|
||||||
|
|
||||||
|
for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) {
|
||||||
|
var _h = 0;
|
||||||
|
|
||||||
|
var _jName = inputs[| i + 0];
|
||||||
|
_jName.editWidget.hover = _hover;
|
||||||
|
_jName.editWidget.active = _focus;
|
||||||
|
_jName.editWidget.draw(tx, ty, ui(128), _th, _jName.showValue(), _m, _jName.display_type);
|
||||||
|
|
||||||
|
draw_set_text(f_p1, fa_center, fa_top, COLORS._main_text_sub);
|
||||||
|
draw_text_add(tx + ui(128 + 12), ty + ui(6), "=");
|
||||||
|
|
||||||
|
var _jValue = inputs[| i + 1];
|
||||||
|
_jValue.editWidget.hover = _hover;
|
||||||
|
_jValue.editWidget.active = _focus;
|
||||||
|
_jValue.editWidget.draw(tx + ui(128 + 24), ty, _w - ui(128 + 24 + 16), _th, _jValue.showValue(), _m);
|
||||||
|
|
||||||
|
_h += _th + ui(6);
|
||||||
|
hh += _h;
|
||||||
|
ty += _h;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hh;
|
||||||
|
});
|
||||||
|
|
||||||
|
input_display_list = [
|
||||||
|
["Function", false], 0,
|
||||||
|
["Arguments", false], argument_renderer,
|
||||||
|
["Inputs", true],
|
||||||
|
]
|
||||||
|
|
||||||
|
input_fix_len = ds_list_size(inputs);
|
||||||
|
input_display_len = array_length(input_display_list);
|
||||||
|
data_length = 2;
|
||||||
|
|
||||||
|
if(!LOADING && !APPENDING) createNewInput();
|
||||||
|
|
||||||
|
static refreshDynamicInput = function() {
|
||||||
|
var _in = ds_list_create();
|
||||||
|
|
||||||
|
for( var i = 0; i < input_fix_len; i++ )
|
||||||
|
ds_list_add(_in, inputs[| i]);
|
||||||
|
|
||||||
|
array_resize(input_display_list, input_display_len);
|
||||||
|
|
||||||
|
for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) {
|
||||||
|
if(inputs[| i].getValue() != "") {
|
||||||
|
ds_list_add(_in, inputs[| i + 0]);
|
||||||
|
ds_list_add(_in, inputs[| i + 1]);
|
||||||
|
|
||||||
|
array_push(input_display_list, i + 1);
|
||||||
|
} else {
|
||||||
|
delete inputs[| i + 0];
|
||||||
|
delete inputs[| i + 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for( var i = 0; i < ds_list_size(_in); i++ )
|
||||||
|
_in[| i].index = i;
|
||||||
|
|
||||||
|
ds_list_destroy(inputs);
|
||||||
|
inputs = _in;
|
||||||
|
|
||||||
|
createNewInput();
|
||||||
|
}
|
||||||
|
|
||||||
|
static onValueUpdate = function(index) {
|
||||||
|
if(index < input_fix_len) return;
|
||||||
|
if(LOADING || APPENDING) return;
|
||||||
|
|
||||||
|
if((index - input_fix_len) % data_length == 0) { //Variable name
|
||||||
|
inputs[| index + 1].name = inputs[| index].getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
|
|
||||||
|
function process_data(_output, _data, index = 0) {
|
||||||
|
var eq = _data[0];
|
||||||
|
var params = {};
|
||||||
|
|
||||||
|
for( var i = input_fix_len; i < array_length(_data); i += data_length ) {
|
||||||
|
var _pName = _data[i + 0];
|
||||||
|
var _pVal = _data[i + 1];
|
||||||
|
|
||||||
|
variable_struct_set(params, _pName, _pVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
return evaluateFunction(eq, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onDrawNode(xx, yy, _mx, _my, _s) {
|
||||||
|
draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text);
|
||||||
|
var str = inputs[| 0].getValue();
|
||||||
|
|
||||||
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
var ss = string_scale(str, bbox.w, bbox.h);
|
||||||
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static postDeserialize = function() {
|
||||||
|
var _inputs = load_map[? "inputs"];
|
||||||
|
|
||||||
|
for(var i = input_fix_len; i < ds_list_size(_inputs); i += data_length)
|
||||||
|
createNewInput();
|
||||||
|
}
|
||||||
|
|
||||||
|
static doApplyDeserialize = function() {
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_equation/node_equation.yy
Normal file
11
scripts/node_equation/node_equation.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_equation",
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "value",
|
||||||
|
"path": "folders/nodes/data/value.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -8,6 +8,9 @@ function Node_Grid_Hex(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
uniform_rot = shader_get_uniform(shader, "angle");
|
uniform_rot = shader_get_uniform(shader, "angle");
|
||||||
uniform_thk = shader_get_uniform(shader, "thick");
|
uniform_thk = shader_get_uniform(shader, "thick");
|
||||||
|
|
||||||
|
uniform_clr0 = shader_get_uniform(shader, "color0");
|
||||||
|
uniform_clr1 = shader_get_uniform(shader, "color1");
|
||||||
|
|
||||||
inputs[| 0] = nodeValue(0, "Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2 )
|
inputs[| 0] = nodeValue(0, "Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2 )
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
@ -24,9 +27,14 @@ function Node_Grid_Hex(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
inputs[| 4] = nodeValue(4, "Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1)
|
inputs[| 4] = nodeValue(4, "Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1)
|
||||||
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||||
|
|
||||||
|
inputs[| 5] = nodeValue(5, "Color 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
|
||||||
|
|
||||||
|
inputs[| 6] = nodeValue(6, "Color 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black);
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
["Output", false], 0,
|
["Output", false], 0,
|
||||||
["Pattern", false], 1, 2, 3, 4
|
["Pattern", false], 1, 2, 3, 4,
|
||||||
|
["Render", false], 5, 6,
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
@ -42,6 +50,9 @@ function Node_Grid_Hex(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
var _rot = _data[3];
|
var _rot = _data[3];
|
||||||
var _thk = _data[4];
|
var _thk = _data[4];
|
||||||
|
|
||||||
|
var _clr0 = _data[5];
|
||||||
|
var _clr1 = _data[6];
|
||||||
|
|
||||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
||||||
|
|
||||||
surface_set_target(_outSurf);
|
surface_set_target(_outSurf);
|
||||||
|
@ -53,6 +64,9 @@ function Node_Grid_Hex(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
shader_set_uniform_f(uniform_rot, degtorad(_rot));
|
shader_set_uniform_f(uniform_rot, degtorad(_rot));
|
||||||
shader_set_uniform_f(uniform_thk, _thk);
|
shader_set_uniform_f(uniform_thk, _thk);
|
||||||
|
|
||||||
|
shader_set_uniform_f_array(uniform_clr0, colToVec4(_clr0));
|
||||||
|
shader_set_uniform_f_array(uniform_clr1, colToVec4(_clr1));
|
||||||
|
|
||||||
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();
|
shader_reset();
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
|
|
|
@ -8,6 +8,9 @@ function Node_Grid_Tri(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
uniform_rot = shader_get_uniform(shader, "angle");
|
uniform_rot = shader_get_uniform(shader, "angle");
|
||||||
uniform_thk = shader_get_uniform(shader, "thick");
|
uniform_thk = shader_get_uniform(shader, "thick");
|
||||||
|
|
||||||
|
uniform_clr0 = shader_get_uniform(shader, "color0");
|
||||||
|
uniform_clr1 = shader_get_uniform(shader, "color1");
|
||||||
|
|
||||||
inputs[| 0] = nodeValue(0, "Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2 )
|
inputs[| 0] = nodeValue(0, "Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2 )
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
@ -24,9 +27,14 @@ function Node_Grid_Tri(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
inputs[| 4] = nodeValue(4, "Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1)
|
inputs[| 4] = nodeValue(4, "Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1)
|
||||||
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||||
|
|
||||||
|
inputs[| 5] = nodeValue(5, "Color 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
|
||||||
|
|
||||||
|
inputs[| 6] = nodeValue(6, "Color 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black);
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
["Output", false], 0,
|
["Output", false], 0,
|
||||||
["Pattern", false], 1, 2, 3, 4
|
["Pattern", false], 1, 2, 3, 4,
|
||||||
|
["Render", false], 5, 6,
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
@ -42,6 +50,9 @@ function Node_Grid_Tri(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
var _rot = _data[3];
|
var _rot = _data[3];
|
||||||
var _thk = _data[4];
|
var _thk = _data[4];
|
||||||
|
|
||||||
|
var _clr0 = _data[5];
|
||||||
|
var _clr1 = _data[6];
|
||||||
|
|
||||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
||||||
|
|
||||||
surface_set_target(_outSurf);
|
surface_set_target(_outSurf);
|
||||||
|
@ -53,6 +64,9 @@ function Node_Grid_Tri(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
|
||||||
shader_set_uniform_f(uniform_rot, degtorad(_rot));
|
shader_set_uniform_f(uniform_rot, degtorad(_rot));
|
||||||
shader_set_uniform_f(uniform_thk, _thk);
|
shader_set_uniform_f(uniform_thk, _thk);
|
||||||
|
|
||||||
|
shader_set_uniform_f_array(uniform_clr0, colToVec4(_clr0));
|
||||||
|
shader_set_uniform_f_array(uniform_clr1, colToVec4(_clr1));
|
||||||
|
|
||||||
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();
|
shader_reset();
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
|
|
|
@ -58,7 +58,9 @@ function Node_Iterate(_x, _y, _group = -1) : Node_Collection(_x, _y, _group) con
|
||||||
}
|
}
|
||||||
|
|
||||||
if(iter) {
|
if(iter) {
|
||||||
if(++iterated == inputs[| 0].getValue()) {
|
iterated++;
|
||||||
|
|
||||||
|
if(iterated == inputs[| 0].getValue()) {
|
||||||
render_time = get_timer() - loop_start_time;
|
render_time = get_timer() - loop_start_time;
|
||||||
return ITERATION_STATUS.complete;
|
return ITERATION_STATUS.complete;
|
||||||
} else if(iterated > inputs[| 0].getValue())
|
} else if(iterated > inputs[| 0].getValue())
|
||||||
|
|
|
@ -36,7 +36,8 @@ function Node_Json_File_Read(_x, _y, _group = -1) : Node(_x, _y, _group) constru
|
||||||
outputs[| 0] = nodeValue(0, "Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "")
|
outputs[| 0] = nodeValue(0, "Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "")
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
input_index = ds_list_size(inputs);
|
data_length = 1;
|
||||||
|
input_fix_len = ds_list_size(inputs);
|
||||||
|
|
||||||
static createNewInput = function() {
|
static createNewInput = function() {
|
||||||
var index = ds_list_size(inputs);
|
var index = ds_list_size(inputs);
|
||||||
|
@ -62,15 +63,12 @@ function Node_Json_File_Read(_x, _y, _group = -1) : Node(_x, _y, _group) constru
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static updateValue = function(index) {
|
static refreshDynamicInput = function() {
|
||||||
if(index < input_index) return;
|
|
||||||
if(LOADING || APPENDING) return;
|
|
||||||
|
|
||||||
var _in = ds_list_create();
|
var _in = ds_list_create();
|
||||||
var _ot = ds_list_create();
|
var _ot = ds_list_create();
|
||||||
|
|
||||||
for( var i = 0; i < ds_list_size(inputs); i++ ) {
|
for( var i = 0; i < ds_list_size(inputs); i++ ) {
|
||||||
if(i < input_index || inputs[| i].getValue() != "") {
|
if(i < input_fix_len || inputs[| i].getValue() != "") {
|
||||||
ds_list_add(_in, inputs[| i]);
|
ds_list_add(_in, inputs[| i]);
|
||||||
ds_list_add(_ot, outputs[| i]);
|
ds_list_add(_ot, outputs[| i]);
|
||||||
} else {
|
} else {
|
||||||
|
@ -93,6 +91,13 @@ function Node_Json_File_Read(_x, _y, _group = -1) : Node(_x, _y, _group) constru
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static onValueUpdate = function(index) {
|
||||||
|
if(index < input_fix_len) return;
|
||||||
|
if(LOADING || APPENDING) return;
|
||||||
|
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
|
|
||||||
function updatePaths(path) {
|
function updatePaths(path) {
|
||||||
if(path_current == path) return false;
|
if(path_current == path) return false;
|
||||||
|
|
||||||
|
@ -120,7 +125,7 @@ function Node_Json_File_Read(_x, _y, _group = -1) : Node(_x, _y, _group) constru
|
||||||
if(path == "") return;
|
if(path == "") return;
|
||||||
updatePaths(path);
|
updatePaths(path);
|
||||||
|
|
||||||
for( var i = 1; i < ds_list_size(inputs) - 1; i++ ) {
|
for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) {
|
||||||
var key = inputs[| i].getValue();
|
var key = inputs[| i].getValue();
|
||||||
|
|
||||||
outputs[| i].name = key;
|
outputs[| i].name = key;
|
||||||
|
@ -150,7 +155,11 @@ function Node_Json_File_Read(_x, _y, _group = -1) : Node(_x, _y, _group) constru
|
||||||
static postDeserialize = function() {
|
static postDeserialize = function() {
|
||||||
var _inputs = load_map[? "inputs"];
|
var _inputs = load_map[? "inputs"];
|
||||||
|
|
||||||
for(var i = input_index; i < ds_list_size(_inputs); i++)
|
for(var i = input_fix_len; i < ds_list_size(_inputs); i += data_length)
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static doApplyDeserialize = function() {
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -30,14 +30,7 @@ function Node_Json_File_Write(_x, _y, _group = -1) : Node(_x, _y, _group) constr
|
||||||
|
|
||||||
if(!LOADING && !APPENDING) createNewInput();
|
if(!LOADING && !APPENDING) createNewInput();
|
||||||
|
|
||||||
static updateValue = function(index) {
|
static refreshDynamicInput = function() {
|
||||||
if(index < input_fix_len) return;
|
|
||||||
if(LOADING || APPENDING) return;
|
|
||||||
|
|
||||||
if((index - input_fix_len) % data_length == 0) { //Variable name
|
|
||||||
inputs[| index + 1].name = inputs[| index].getValue() + " value";
|
|
||||||
}
|
|
||||||
|
|
||||||
var _in = ds_list_create();
|
var _in = ds_list_create();
|
||||||
|
|
||||||
for( var i = 0; i < input_fix_len; i++ )
|
for( var i = 0; i < input_fix_len; i++ )
|
||||||
|
@ -67,6 +60,17 @@ function Node_Json_File_Write(_x, _y, _group = -1) : Node(_x, _y, _group) constr
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static onValueUpdate = function(index) {
|
||||||
|
if(index < input_fix_len) return;
|
||||||
|
if(LOADING || APPENDING) return;
|
||||||
|
|
||||||
|
if((index - input_fix_len) % data_length == 0) { //Variable name
|
||||||
|
inputs[| index + 1].name = inputs[| index].getValue() + " value";
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
|
|
||||||
static update = function() {
|
static update = function() {
|
||||||
var path = inputs[| 0].getValue();
|
var path = inputs[| 0].getValue();
|
||||||
if(path == "") return;
|
if(path == "") return;
|
||||||
|
@ -97,4 +101,15 @@ function Node_Json_File_Write(_x, _y, _group = -1) : Node(_x, _y, _group) constr
|
||||||
var ss = string_scale(str, bbox.w, bbox.h);
|
var ss = string_scale(str, bbox.w, bbox.h);
|
||||||
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static postDeserialize = function() {
|
||||||
|
var _inputs = load_map[? "inputs"];
|
||||||
|
|
||||||
|
for(var i = input_fix_len; i < ds_list_size(_inputs); i += data_length)
|
||||||
|
createNewInput();
|
||||||
|
}
|
||||||
|
|
||||||
|
static doApplyDeserialize = function() {
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,23 +1,19 @@
|
||||||
enum CURVE_TYPE {
|
enum CURVE_TYPE {
|
||||||
|
none,
|
||||||
bezier,
|
bezier,
|
||||||
bounce,
|
|
||||||
damping
|
|
||||||
}
|
}
|
||||||
|
|
||||||
globalvar ON_END_NAME;
|
function valueKey(_time, _value, _anim = noone, _in = 0, _ot = 0) constructor {
|
||||||
ON_END_NAME = [ "Hold", "Loop", "Ping pong" ];
|
|
||||||
|
|
||||||
function valueKey(_time, _value, _anim = noone, _in = 0, _out = 0) constructor {
|
|
||||||
time = _time;
|
time = _time;
|
||||||
ratio = time / (ANIMATOR.frames_total - 1);
|
ratio = time / (ANIMATOR.frames_total - 1);
|
||||||
value = _value;
|
value = _value;
|
||||||
anim = _anim;
|
anim = _anim;
|
||||||
|
|
||||||
ease_in = _in;
|
ease_in = is_array(_in)? _in : [_in, 1];
|
||||||
ease_out = _out;
|
ease_out = is_array(_ot)? _ot : [_ot, 0];
|
||||||
|
|
||||||
ease_in_type = CURVE_TYPE.bezier;
|
ease_in_type = CURVE_TYPE.none;
|
||||||
ease_out_type = CURVE_TYPE.bezier;
|
ease_out_type = CURVE_TYPE.none;
|
||||||
|
|
||||||
static setTime = function(time) {
|
static setTime = function(time) {
|
||||||
self.time = time;
|
self.time = time;
|
||||||
|
@ -30,44 +26,84 @@ function valueAnimator(_val, _prop) constructor {
|
||||||
show_graph = false;
|
show_graph = false;
|
||||||
ds_list_add(values, new valueKey(0, _val, self));
|
ds_list_add(values, new valueKey(0, _val, self));
|
||||||
|
|
||||||
is_anim = false;
|
is_anim = false;
|
||||||
prop = _prop;
|
prop = _prop;
|
||||||
|
|
||||||
static interpolate = function(from, to, rat) {
|
static interpolate = function(from, to, rat) {
|
||||||
if(from.ease_out == 0 && to.ease_in == 0)
|
if(to.ease_in_type == CURVE_TYPE.none && from.ease_out_type == CURVE_TYPE.none)
|
||||||
|
return rat;
|
||||||
|
if(rat == 0 || rat == 1)
|
||||||
return rat;
|
return rat;
|
||||||
|
|
||||||
var eo = rat;
|
var eox = clamp(from.ease_out[0], 0, 0.9);
|
||||||
var ei = rat;
|
var eix = clamp(to.ease_in[0], 0, 0.9);
|
||||||
|
var eoy = from.ease_out[1];
|
||||||
|
var eiy = to.ease_in[1];
|
||||||
|
|
||||||
if(from.ease_out != 0) {
|
var bz = [0, eox, eoy, 1. - eix, eiy, 1];
|
||||||
switch(from.ease_out_type) {
|
return eval_curve_bezier_cubic_x(bz, rat);
|
||||||
case CURVE_TYPE.bezier :
|
|
||||||
eo = ease_cubic_in(rat);
|
//var eo = rat;
|
||||||
eo = lerp(rat, eo, from.ease_out);
|
//var ei = rat;
|
||||||
break;
|
|
||||||
case CURVE_TYPE.damping :
|
//if(from.ease_out != 0) {
|
||||||
eo = ease_damp_in(rat, 1 + from.ease_out * 10);
|
// switch(from.ease_out_type) {
|
||||||
break;
|
// case CURVE_TYPE.bezier :
|
||||||
|
// eo = ease_cubic_in(rat);
|
||||||
|
// eo = lerp(rat, eo, from.ease_out);
|
||||||
|
// break;
|
||||||
|
// case CURVE_TYPE.damping :
|
||||||
|
// eo = ease_damp_in(rat, 1 + from.ease_out * 10);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if(to.ease_in != 0) {
|
||||||
|
// switch(to.ease_in_type) {
|
||||||
|
// case CURVE_TYPE.bezier :
|
||||||
|
// ei = ease_cubic_out(rat);
|
||||||
|
// ei = lerp(rat, ei, to.ease_in);
|
||||||
|
// break;
|
||||||
|
// case CURVE_TYPE.damping :
|
||||||
|
// ei = ease_damp_out(rat, 1 + to.ease_in * 10);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if(from.ease_out_type == CURVE_TYPE.damping && to.ease_in_type == CURVE_TYPE.damping)
|
||||||
|
// return lerp(eo, ei, rat < 0.5 ? 4 * power(rat, 3) : 1 - power(-2 * rat + 2, 3) / 2);
|
||||||
|
|
||||||
|
//return lerp(eo, ei, rat);
|
||||||
|
}
|
||||||
|
|
||||||
|
static lerpValue = function(from, to, _lrp) {
|
||||||
|
if(prop.type == VALUE_TYPE.color) {
|
||||||
|
var _f = from.value;
|
||||||
|
var _t = to.value;
|
||||||
|
|
||||||
|
if(is_array(_f)) {
|
||||||
|
var amo = max(array_length(_f), array_length(_t));
|
||||||
|
var res = array_create(amo);
|
||||||
|
for( var i = 0; i < amo; i++ )
|
||||||
|
res[i] = merge_color(array_safe_get(_f, i, 0), array_safe_get(_t, i, 0), _lrp);
|
||||||
|
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return processType(merge_color(_f, _t, _lrp));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(to.ease_in != 0) {
|
if(typeArray(prop.display_type) && is_array(from.value)) {
|
||||||
switch(to.ease_in_type) {
|
var _vec = array_create(array_length(from.value));
|
||||||
case CURVE_TYPE.bezier :
|
for(var i = 0; i < array_length(_vec); i++)
|
||||||
ei = ease_cubic_out(rat);
|
_vec[i] = processType(lerp(from.value[i], to.value[i], _lrp));
|
||||||
ei = lerp(rat, ei, to.ease_in);
|
return _vec;
|
||||||
break;
|
|
||||||
case CURVE_TYPE.damping :
|
|
||||||
ei = ease_damp_out(rat, 1 + to.ease_in * 10);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(from.ease_out_type == CURVE_TYPE.damping && to.ease_in_type == CURVE_TYPE.damping)
|
if(prop.type == VALUE_TYPE.text)
|
||||||
return lerp(eo, ei, rat < 0.5 ? 4 * power(rat, 3) : 1 - power(-2 * rat + 2, 3) / 2);
|
return processType(from.value);
|
||||||
|
|
||||||
return lerp(eo, ei, rat);
|
return processType(lerp(from.value, to.value, _lrp));
|
||||||
}
|
}
|
||||||
|
|
||||||
static getValue = function(_time = ANIMATOR.current_frame) {
|
static getValue = function(_time = ANIMATOR.current_frame) {
|
||||||
|
@ -78,54 +114,66 @@ function valueAnimator(_val, _prop) constructor {
|
||||||
if(ds_list_size(values) == 1) return processType(values[| 0].value);
|
if(ds_list_size(values) == 1) return processType(values[| 0].value);
|
||||||
if(!is_anim) return processType(values[| 0].value);
|
if(!is_anim) return processType(values[| 0].value);
|
||||||
|
|
||||||
if(ds_list_size(values) > 1) {
|
var _time_first = values[| 0].time;
|
||||||
var _time_first = values[| 0].time;
|
var _time_last = values[| ds_list_size(values) - 1].time;
|
||||||
var _time_last = values[| ds_list_size(values) - 1].time;
|
var _time_dura = _time_last - _time_first;
|
||||||
var _time_dura = _time_last - _time_first;
|
|
||||||
|
|
||||||
if(_time > _time_last) {
|
if(_time > _time_last) {
|
||||||
switch(prop.on_end) {
|
switch(prop.on_end) {
|
||||||
case KEYFRAME_END.loop :
|
case KEYFRAME_END.loop :
|
||||||
_time = _time_first + safe_mod(_time - _time_last, _time_dura + 1);
|
_time = _time_first + safe_mod(_time - _time_last, _time_dura + 1);
|
||||||
break;
|
break;
|
||||||
case KEYFRAME_END.ping :
|
case KEYFRAME_END.ping :
|
||||||
var time_in_loop = safe_mod(_time - _time_first, _time_dura * 2);
|
var time_in_loop = safe_mod(_time - _time_first, _time_dura * 2);
|
||||||
if(time_in_loop < _time_dura)
|
if(time_in_loop < _time_dura)
|
||||||
_time = _time_first + time_in_loop;
|
_time = _time_first + time_in_loop;
|
||||||
else
|
else
|
||||||
_time = _time_first + _time_dura * 2 - time_in_loop;
|
_time = _time_first + _time_dura * 2 - time_in_loop;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var i = 0; i < ds_list_size(values); i++) {
|
if(_time < values[| 0].time) { //Wrap begin
|
||||||
|
if(prop.on_end == KEYFRAME_END.wrap) {
|
||||||
|
var from = values[| ds_list_size(values) - 1];
|
||||||
|
var to = values[| 0];
|
||||||
|
var prog = ANIMATOR.frames_total - from.time + _time;
|
||||||
|
var totl = ANIMATOR.frames_total - from.time + to.time;
|
||||||
|
|
||||||
|
var rat = prog / totl;
|
||||||
|
var _lrp = interpolate(from, to, rat);
|
||||||
|
|
||||||
|
return lerpValue(from, to, _lrp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return processType(values[| 0].value); //First frame
|
||||||
|
}
|
||||||
|
|
||||||
|
for(var i = 0; i < ds_list_size(values); i++) { //In between
|
||||||
var _key = values[| i];
|
var _key = values[| i];
|
||||||
if(_key.time > _time) {
|
if(_key.time <= _time) continue;
|
||||||
if(i == 0)
|
|
||||||
return processType(values[| 0].value);
|
|
||||||
else {
|
|
||||||
var rat = (_time - values[| i - 1].time) / (values[| i].time - values[| i - 1].time);
|
|
||||||
var from = values[| i - 1];
|
|
||||||
var to = values[| i];
|
|
||||||
var _lerp = interpolate(from, to, rat);
|
|
||||||
|
|
||||||
if(prop.type == VALUE_TYPE.color) {
|
var rat = (_time - values[| i - 1].time) / (values[| i].time - values[| i - 1].time);
|
||||||
return processType(merge_color(from.value, to.value, _lerp));
|
var from = values[| i - 1];
|
||||||
} else if(typeArray(prop.display_type) && is_array(from.value)) {
|
var to = values[| i];
|
||||||
var _vec = array_create(array_length(from.value));
|
var _lrp = interpolate(from, to, rat);
|
||||||
for(var i = 0; i < array_length(_vec); i++)
|
|
||||||
_vec[i] = processType(lerp(from.value[i], to.value[i], _lerp));
|
return lerpValue(from, to, _lrp);
|
||||||
return _vec;
|
|
||||||
} else if(prop.type == VALUE_TYPE.text) {
|
|
||||||
return processType(from.value);
|
|
||||||
} else {
|
|
||||||
return processType(lerp(from.value, to.value, _lerp));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return processType(values[| ds_list_size(values) - 1].value);
|
|
||||||
|
if(prop.on_end == KEYFRAME_END.wrap) { //Wrap end
|
||||||
|
var from = values[| ds_list_size(values) - 1];
|
||||||
|
var to = values[| 0];
|
||||||
|
var prog = _time - from.time;
|
||||||
|
var totl = ANIMATOR.frames_total - from.time + to.time;
|
||||||
|
|
||||||
|
var rat = prog / totl;
|
||||||
|
var _lrp = interpolate(from, to, rat);
|
||||||
|
|
||||||
|
return lerpValue(from, to, _lrp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return processType(values[| ds_list_size(values) - 1].value); //Last frame
|
||||||
}
|
}
|
||||||
|
|
||||||
static processType = function(_val) {
|
static processType = function(_val) {
|
||||||
|
@ -257,13 +305,15 @@ function valueAnimator(_val, _prop) constructor {
|
||||||
_value_list[| 1] = values[| i].value;
|
_value_list[| 1] = values[| i].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
_value_list[| 2] = values[| i].ease_in;
|
_value_list[| 2] = ds_list_create_from_array(values[| i].ease_in);
|
||||||
_value_list[| 3] = values[| i].ease_out;
|
ds_list_mark_as_list(_value_list, 2);
|
||||||
|
_value_list[| 3] = ds_list_create_from_array(values[| i].ease_out);
|
||||||
|
ds_list_mark_as_list(_value_list, 3);
|
||||||
|
|
||||||
_value_list[| 4] = values[| i].ease_in_type;
|
_value_list[| 4] = values[| i].ease_in_type;
|
||||||
_value_list[| 5] = values[| i].ease_out_type;
|
_value_list[| 5] = values[| i].ease_out_type;
|
||||||
|
|
||||||
ds_list_add(_list, _value_list);
|
ds_list_add_list(_list, _value_list);
|
||||||
ds_list_mark_as_list(_list, i);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return _list;
|
return _list;
|
||||||
|
@ -284,6 +334,11 @@ function valueAnimator(_val, _prop) constructor {
|
||||||
var value = ds_list_get(_key, 1);
|
var value = ds_list_get(_key, 1);
|
||||||
var ease_in = ds_list_get(_key, 2);
|
var ease_in = ds_list_get(_key, 2);
|
||||||
var ease_out = ds_list_get(_key, 3);
|
var ease_out = ds_list_get(_key, 3);
|
||||||
|
if(LOADING_VERSION >= 1090) {
|
||||||
|
ease_in = array_create_from_list(ease_in);
|
||||||
|
ease_out = array_create_from_list(ease_out);
|
||||||
|
}
|
||||||
|
|
||||||
var ease_in_type = ds_list_get(_key, 4, CURVE_TYPE.bezier);
|
var ease_in_type = ds_list_get(_key, 4, CURVE_TYPE.bezier);
|
||||||
var ease_out_type = ds_list_get(_key, 5, CURVE_TYPE.bezier);
|
var ease_out_type = ds_list_get(_key, 5, CURVE_TYPE.bezier);
|
||||||
var _val = _key[| 1];
|
var _val = _key[| 1];
|
||||||
|
|
|
@ -77,7 +77,7 @@ function Node_Level(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constr
|
||||||
histogramUpdate(current_data[0]);
|
histogramUpdate(current_data[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static onValueUpdateFrom = function(index) {
|
static onValueFromUpdate = function(index) {
|
||||||
if(index == 0) {
|
if(index == 0) {
|
||||||
update();
|
update();
|
||||||
if(array_length(current_data) > 0)
|
if(array_length(current_data) > 0)
|
||||||
|
|
|
@ -46,6 +46,8 @@ function Node_Level_Selector(_x, _y, _group = -1) : Node_Processor(_x, _y, _grou
|
||||||
|
|
||||||
draw_set_color(COLORS.node_level_outline);
|
draw_set_color(COLORS.node_level_outline);
|
||||||
draw_rectangle(x0, y0, x1, y1, true);
|
draw_rectangle(x0, y0, x1, y1, true);
|
||||||
|
|
||||||
|
return _h;
|
||||||
});
|
});
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
|
@ -59,7 +61,7 @@ function Node_Level_Selector(_x, _y, _group = -1) : Node_Processor(_x, _y, _grou
|
||||||
histogramUpdate(current_data[0]);
|
histogramUpdate(current_data[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static onValueUpdate = function(index) {
|
static onValueFromUpdate = function(index) {
|
||||||
if(index == 0) {
|
if(index == 0) {
|
||||||
update();
|
update();
|
||||||
if(array_length(current_data) > 0)
|
if(array_length(current_data) > 0)
|
||||||
|
|
|
@ -15,7 +15,7 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru
|
||||||
inputs[| 4] = nodeValue(4, "Wiggle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
inputs[| 4] = nodeValue(4, "Wiggle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.slider, [0, 16, 0.01]);
|
.setDisplay(VALUE_DISPLAY.slider, [0, 16, 0.01]);
|
||||||
|
|
||||||
inputs[| 5] = nodeValue(5, "Random seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
|
inputs[| 5] = nodeValue(5, "Random seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
|
||||||
|
|
||||||
inputs[| 6] = nodeValue(6, "Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 6] = nodeValue(6, "Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.rotation);
|
.setDisplay(VALUE_DISPLAY.rotation);
|
||||||
|
@ -32,7 +32,7 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru
|
||||||
inputs[| 10] = nodeValue(10, "Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white)
|
inputs[| 10] = nodeValue(10, "Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white)
|
||||||
.setDisplay(VALUE_DISPLAY.gradient);
|
.setDisplay(VALUE_DISPLAY.gradient);
|
||||||
|
|
||||||
inputs[| 11] = nodeValue(11, "Width over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, [1, 1, 1, 1]);
|
inputs[| 11] = nodeValue(11, "Width over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11);
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
["Output", true], 0, 1,
|
["Output", true], 0, 1,
|
||||||
|
@ -69,6 +69,7 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru
|
||||||
inputs[| 6].setVisible(!_use_path);
|
inputs[| 6].setVisible(!_use_path);
|
||||||
|
|
||||||
random_set_seed(_sed);
|
random_set_seed(_sed);
|
||||||
|
var _sedIndex = 0;
|
||||||
|
|
||||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
||||||
|
|
||||||
|
@ -97,12 +98,15 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru
|
||||||
|
|
||||||
if(_total < _rtLen) {
|
if(_total < _rtLen) {
|
||||||
var _d = point_direction(_ox, _oy, _nx, _ny);
|
var _d = point_direction(_ox, _oy, _nx, _ny);
|
||||||
_nx += lengthdir_x(random(_wig) * choose(-1, 1), _d + 90);
|
_nx += lengthdir_x(random1D(_sed + _sedIndex, -_wig, _wig), _d + 90);
|
||||||
_ny += lengthdir_y(random(_wig) * choose(-1, 1), _d + 90);
|
_sedIndex++;
|
||||||
|
|
||||||
|
_ny += lengthdir_y(random1D(_sed + _sedIndex, -_wig, _wig), _d + 90);
|
||||||
|
_sedIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
_nw = random_range(_wid[0], _wid[1]);
|
_nw = random_range(_wid[0], _wid[1]);
|
||||||
_nw *= eval_bezier_cubic(1 - _prog_curr, _widc[0], _widc[1], _widc[2], _widc[3]);
|
_nw *= eval_curve_bezier_cubic_x(_widc, _prog_curr);
|
||||||
|
|
||||||
if(_total <= _prog_curr - _prog) {
|
if(_total <= _prog_curr - _prog) {
|
||||||
_na = point_direction(_ox, _oy, _nx, _ny) + 90;
|
_na = point_direction(_ox, _oy, _nx, _ny) + 90;
|
||||||
|
@ -156,11 +160,14 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru
|
||||||
_nx = x0 + lengthdir_x(_l * _prog_curr, _d);
|
_nx = x0 + lengthdir_x(_l * _prog_curr, _d);
|
||||||
_ny = y0 + lengthdir_y(_l * _prog_curr, _d);
|
_ny = y0 + lengthdir_y(_l * _prog_curr, _d);
|
||||||
|
|
||||||
_nx += lengthdir_x(random(_wig) * choose(-1, 1), _d + 90);
|
_nx += lengthdir_x(random1D(_sed + _sedIndex, -_wig, _wig), _d + 90);
|
||||||
_ny += lengthdir_y(random(_wig) * choose(-1, 1), _d + 90);
|
_sedIndex++;
|
||||||
|
|
||||||
|
_ny += lengthdir_y(random1D(_sed + _sedIndex, -_wig, _wig), _d + 90);
|
||||||
|
_sedIndex++;
|
||||||
|
|
||||||
_nw = random_range(_wid[0], _wid[1]);
|
_nw = random_range(_wid[0], _wid[1]);
|
||||||
_nw *= eval_bezier_cubic(1 - _prog_curr, _widc[0], _widc[1], _widc[2], _widc[3]);
|
_nw *= eval_curve_bezier_cubic_x(_widc, _prog_curr);
|
||||||
|
|
||||||
if(_prog_curr > _prog) {
|
if(_prog_curr > _prog) {
|
||||||
draw_set_color(gradient_eval(_color, _prog_eli / _rtLen, ds_list_get(_col_data, 0)));
|
draw_set_color(gradient_eval(_color, _prog_eli / _rtLen, ds_list_get(_col_data, 0)));
|
||||||
|
|
|
@ -7,7 +7,7 @@ function Node_Lua_Compute(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
|
|
||||||
inputs[| 0] = nodeValue(0, "Function name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "render" + string(irandom_range(100000, 999999)));
|
inputs[| 0] = nodeValue(0, "Function name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "render" + string(irandom_range(100000, 999999)));
|
||||||
|
|
||||||
inputs[| 1] = nodeValue(1, "Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 1] = nodeValue(1, "Return type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "String" ]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "String" ]);
|
||||||
|
|
||||||
inputs[| 2] = nodeValue(2, "Lua code", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "")
|
inputs[| 2] = nodeValue(2, "Lua code", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "")
|
||||||
|
@ -33,11 +33,12 @@ function Node_Lua_Compute(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
|
|
||||||
luaArgumentRenderer();
|
luaArgumentRenderer();
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [ 3,
|
||||||
["Main", false], 0, 3, 1, 2,
|
["Function", false], 0, 1,
|
||||||
["Arguments", false], argument_renderer,
|
["Arguments", false], argument_renderer,
|
||||||
|
["Script", false], 2,
|
||||||
["Inputs", true],
|
["Inputs", true],
|
||||||
]
|
];
|
||||||
|
|
||||||
input_fix_len = ds_list_size(inputs);
|
input_fix_len = ds_list_size(inputs);
|
||||||
input_display_len = array_length(input_display_list);
|
input_display_len = array_length(input_display_list);
|
||||||
|
@ -76,37 +77,7 @@ function Node_Lua_Compute(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
return inputs[| 3].value_from.node.getState();
|
return inputs[| 3].value_from.node.getState();
|
||||||
}
|
}
|
||||||
|
|
||||||
static updateValueFrom = function(index) {
|
static refreshDynamicInput = function() {
|
||||||
compiled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static updateValue = function(index) {
|
|
||||||
compiled = false;
|
|
||||||
|
|
||||||
if(index == 4) {
|
|
||||||
for( var i = 0; i < ds_list_size(outputs[| 0].value_to); i++ ) {
|
|
||||||
var _j = outputs[| 0].value_to[| i];
|
|
||||||
if(_j.value_from != outputs[| 0]) continue;
|
|
||||||
_j.node.compiled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(index < input_fix_len) return;
|
|
||||||
if(LOADING || APPENDING) return;
|
|
||||||
|
|
||||||
if((index - input_fix_len) % data_length == 0) { //Variable name
|
|
||||||
inputs[| index + 2].name = inputs[| index].getValue();
|
|
||||||
} else if((index - input_fix_len) % data_length == 1) { //Variable type
|
|
||||||
var type = inputs[| index].getValue();
|
|
||||||
switch(type) {
|
|
||||||
case 0 : inputs[| index + 1].type = VALUE_TYPE.float; break;
|
|
||||||
case 1 : inputs[| index + 1].type = VALUE_TYPE.text; break;
|
|
||||||
case 2 : inputs[| index + 1].type = VALUE_TYPE.surface; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
inputs[| index + 1].setDisplay(VALUE_DISPLAY._default);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _in = ds_list_create();
|
var _in = ds_list_create();
|
||||||
|
|
||||||
for( var i = 0; i < input_fix_len; i++ )
|
for( var i = 0; i < input_fix_len; i++ )
|
||||||
|
@ -137,6 +108,43 @@ function Node_Lua_Compute(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static onValueFromUpdate = function(index) {
|
||||||
|
if(index == 0 || index == 2) compiled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static onValueUpdate = function(index) {
|
||||||
|
if(index == 0 || index == 2) compiled = false;
|
||||||
|
|
||||||
|
if(index == 3) {
|
||||||
|
for( var i = 0; i < ds_list_size(outputs[| 0].value_to); i++ ) {
|
||||||
|
var _j = outputs[| 0].value_to[| i];
|
||||||
|
if(_j.value_from != outputs[| 0]) continue;
|
||||||
|
_j.node.compiled = false;
|
||||||
|
}
|
||||||
|
compiled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(index < input_fix_len) return;
|
||||||
|
if(LOADING || APPENDING) return;
|
||||||
|
|
||||||
|
if((index - input_fix_len) % data_length == 0) { //Variable name
|
||||||
|
inputs[| index + 2].name = inputs[| index].getValue();
|
||||||
|
compiled = false;
|
||||||
|
} else if((index - input_fix_len) % data_length == 1) { //Variable type
|
||||||
|
var type = inputs[| index].getValue();
|
||||||
|
switch(type) {
|
||||||
|
case 0 : inputs[| index + 1].type = VALUE_TYPE.float; break;
|
||||||
|
case 1 : inputs[| index + 1].type = VALUE_TYPE.text; break;
|
||||||
|
case 2 : inputs[| index + 1].type = VALUE_TYPE.surface; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputs[| index + 1].setDisplay(VALUE_DISPLAY._default);
|
||||||
|
compiled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
|
|
||||||
static update = function() {
|
static update = function() {
|
||||||
if(!compiled) return;
|
if(!compiled) return;
|
||||||
|
|
||||||
|
@ -192,7 +200,11 @@ function Node_Lua_Compute(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
static postDeserialize = function() {
|
static postDeserialize = function() {
|
||||||
var _inputs = load_map[? "inputs"];
|
var _inputs = load_map[? "inputs"];
|
||||||
|
|
||||||
for(var i = input_index; i < ds_list_size(_inputs); i += data_length)
|
for(var i = input_fix_len; i < ds_list_size(_inputs); i += data_length)
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static doApplyDeserialize = function() {
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -5,20 +5,20 @@ function Node_Lua_Global(_x, _y, _group = -1) : Node(_x, _y, _group) constructor
|
||||||
|
|
||||||
min_h = 0;
|
min_h = 0;
|
||||||
|
|
||||||
inputs[| 0] = nodeValue(2, "Lua code", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "")
|
inputs[| 0] = nodeValue(0, "Lua code", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "")
|
||||||
.setDisplay(VALUE_DISPLAY.code);
|
.setDisplay(VALUE_DISPLAY.code);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue(3, "Run order", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 1] = nodeValue(1, "Run order", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "On start", "Every frame" ]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "On start", "Every frame" ]);
|
||||||
|
|
||||||
inputs[| 2] = nodeValue(4, "Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone)
|
inputs[| 2] = nodeValue(2, "Execution thread", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, noone)
|
||||||
.setVisible(false, true);
|
.setVisible(false, true);
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Execution thread", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, noone );
|
outputs[| 0] = nodeValue(0, "Execution thread", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, noone );
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
["Main", false], 2, 1, 0,
|
["Main", false], 2, 1, 0,
|
||||||
]
|
];
|
||||||
|
|
||||||
lua_state = lua_create();
|
lua_state = lua_create();
|
||||||
|
|
||||||
|
@ -44,12 +44,12 @@ function Node_Lua_Global(_x, _y, _group = -1) : Node(_x, _y, _group) constructor
|
||||||
return inputs[| 2].value_from.node.getState();
|
return inputs[| 2].value_from.node.getState();
|
||||||
}
|
}
|
||||||
|
|
||||||
static updateValueFrom = function(index) {
|
static onValueFromUpdate = function(index) {
|
||||||
compiled = false;
|
if(index == 0 || index == 2) compiled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static updateValue = function(index) {
|
static onValueUpdate = function(index) {
|
||||||
compiled = false;
|
if(index == 0 || index == 2) compiled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static update = function() {
|
static update = function() {
|
||||||
|
|
|
@ -30,11 +30,12 @@ function Node_Lua_Surface(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
|
|
||||||
luaArgumentRenderer();
|
luaArgumentRenderer();
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [ 3,
|
||||||
["Main", false], 0, 3, 1, 2,
|
["Function", false], 0, 1,
|
||||||
["Arguments", false], argument_renderer,
|
["Arguments", false], argument_renderer,
|
||||||
|
["Script", false], 2,
|
||||||
["Inputs", true],
|
["Inputs", true],
|
||||||
]
|
];
|
||||||
|
|
||||||
input_fix_len = ds_list_size(inputs);
|
input_fix_len = ds_list_size(inputs);
|
||||||
input_display_len = array_length(input_display_list);
|
input_display_len = array_length(input_display_list);
|
||||||
|
@ -67,37 +68,7 @@ function Node_Lua_Surface(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
return inputs[| 3].value_from.node.getState();
|
return inputs[| 3].value_from.node.getState();
|
||||||
}
|
}
|
||||||
|
|
||||||
static updateValueFrom = function(index) {
|
static refreshDynamicInput = function() {
|
||||||
compiled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static updateValue = function(index) {
|
|
||||||
compiled = false;
|
|
||||||
|
|
||||||
if(index == 4) {
|
|
||||||
for( var i = 0; i < ds_list_size(outputs[| 0].value_to); i++ ) {
|
|
||||||
var _j = outputs[| 0].value_to[| i];
|
|
||||||
if(_j.value_from != outputs[| 0]) continue;
|
|
||||||
_j.node.compiled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(index < input_fix_len) return;
|
|
||||||
if(LOADING || APPENDING) return;
|
|
||||||
|
|
||||||
if((index - input_fix_len) % data_length == 0) { //Variable name
|
|
||||||
inputs[| index + 2].name = inputs[| index].getValue();
|
|
||||||
} else if((index - input_fix_len) % data_length == 1) { //Variable type
|
|
||||||
var type = inputs[| index].getValue();
|
|
||||||
switch(type) {
|
|
||||||
case 0 : inputs[| index + 1].type = VALUE_TYPE.float; break;
|
|
||||||
case 1 : inputs[| index + 1].type = VALUE_TYPE.text; break;
|
|
||||||
case 2 : inputs[| index + 1].type = VALUE_TYPE.surface; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
inputs[| index + 1].setDisplay(VALUE_DISPLAY._default);
|
|
||||||
}
|
|
||||||
|
|
||||||
var _in = ds_list_create();
|
var _in = ds_list_create();
|
||||||
|
|
||||||
for( var i = 0; i < input_fix_len; i++ )
|
for( var i = 0; i < input_fix_len; i++ )
|
||||||
|
@ -111,6 +82,17 @@ function Node_Lua_Surface(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
ds_list_add(_in, inputs[| i + 1]);
|
ds_list_add(_in, inputs[| i + 1]);
|
||||||
ds_list_add(_in, inputs[| i + 2]);
|
ds_list_add(_in, inputs[| i + 2]);
|
||||||
|
|
||||||
|
if(LOADING || APPENDING) {
|
||||||
|
var type = inputs[| i + 1].getValue();
|
||||||
|
switch(type) {
|
||||||
|
case 0 : inputs[| i + 2].type = VALUE_TYPE.float; break;
|
||||||
|
case 1 : inputs[| i + 2].type = VALUE_TYPE.text; break;
|
||||||
|
case 2 : inputs[| i + 2].type = VALUE_TYPE.surface; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputs[| i + 2].setDisplay(VALUE_DISPLAY._default);
|
||||||
|
}
|
||||||
|
|
||||||
array_push(input_display_list, i + 2);
|
array_push(input_display_list, i + 2);
|
||||||
} else {
|
} else {
|
||||||
delete inputs[| i + 0];
|
delete inputs[| i + 0];
|
||||||
|
@ -128,6 +110,43 @@ function Node_Lua_Surface(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static onValueFromUpdate = function(index) {
|
||||||
|
if(index == 0 || index == 2) compiled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static onValueUpdate = function(index) {
|
||||||
|
if(index == 0 || index == 2) compiled = false;
|
||||||
|
|
||||||
|
if(index == 3) {
|
||||||
|
for( var i = 0; i < ds_list_size(outputs[| 0].value_to); i++ ) {
|
||||||
|
var _j = outputs[| 0].value_to[| i];
|
||||||
|
if(_j.value_from != outputs[| 0]) continue;
|
||||||
|
_j.node.compiled = false;
|
||||||
|
}
|
||||||
|
compiled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(index < input_fix_len) return;
|
||||||
|
if(LOADING || APPENDING) return;
|
||||||
|
|
||||||
|
if((index - input_fix_len) % data_length == 0) { //Variable name
|
||||||
|
inputs[| index + 2].name = inputs[| index].getValue();
|
||||||
|
compiled = false;
|
||||||
|
} else if((index - input_fix_len) % data_length == 1) { //Variable type
|
||||||
|
var type = inputs[| index].getValue();
|
||||||
|
switch(type) {
|
||||||
|
case 0 : inputs[| index + 1].type = VALUE_TYPE.float; break;
|
||||||
|
case 1 : inputs[| index + 1].type = VALUE_TYPE.text; break;
|
||||||
|
case 2 : inputs[| index + 1].type = VALUE_TYPE.surface; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputs[| index + 1].setDisplay(VALUE_DISPLAY._default);
|
||||||
|
compiled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
|
|
||||||
static update = function() {
|
static update = function() {
|
||||||
if(!compiled) return;
|
if(!compiled) return;
|
||||||
|
|
||||||
|
@ -140,7 +159,7 @@ function Node_Lua_Surface(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
}
|
}
|
||||||
|
|
||||||
var _outSurf = outputs[| 1].getValue();
|
var _outSurf = outputs[| 1].getValue();
|
||||||
surface_verify(_outSurf, _dimm[0], _dimm[1]);
|
_outSurf = surface_verify(_outSurf, _dimm[0], _dimm[1]);
|
||||||
|
|
||||||
surface_set_target(_outSurf);
|
surface_set_target(_outSurf);
|
||||||
try {
|
try {
|
||||||
|
@ -167,9 +186,9 @@ function Node_Lua_Surface(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
if(i) lua_code += ", "
|
if(i) lua_code += ", "
|
||||||
lua_code += argument_name[i];
|
lua_code += argument_name[i];
|
||||||
}
|
}
|
||||||
lua_code += ")";
|
lua_code += ")\n";
|
||||||
lua_code += _code;
|
lua_code += _code;
|
||||||
lua_code += "end";
|
lua_code += "\nend";
|
||||||
|
|
||||||
lua_add_code(getState(), lua_code);
|
lua_add_code(getState(), lua_code);
|
||||||
|
|
||||||
|
@ -187,7 +206,11 @@ function Node_Lua_Surface(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
|
||||||
static postDeserialize = function() {
|
static postDeserialize = function() {
|
||||||
var _inputs = load_map[? "inputs"];
|
var _inputs = load_map[? "inputs"];
|
||||||
|
|
||||||
for(var i = input_index; i < ds_list_size(_inputs); i += data_length)
|
for(var i = input_fix_len; i < ds_list_size(_inputs); i += data_length)
|
||||||
createNewInput();
|
createNewInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static doApplyDeserialize = function() {
|
||||||
|
refreshDynamicInput();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -7,7 +7,7 @@ function Node_Noise(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constr
|
||||||
inputs[| 0] = nodeValue(0, "Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2 )
|
inputs[| 0] = nodeValue(0, "Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2 )
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue(1, "Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom(99999));
|
inputs[| 1] = nodeValue(1, "Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(99999));
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
["Output", false], 0,
|
["Output", false], 0,
|
||||||
|
|
|
@ -13,7 +13,7 @@ function Node_Noise_Aniso(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
|
||||||
inputs[| 1] = nodeValue(1, "Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 2, 16 ])
|
inputs[| 1] = nodeValue(1, "Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 2, 16 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector);
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
inputs[| 2] = nodeValue(2, "Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom(9999999));
|
inputs[| 2] = nodeValue(2, "Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(9999999));
|
||||||
|
|
||||||
inputs[| 3] = nodeValue(3, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
inputs[| 3] = nodeValue(3, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
||||||
.setDisplay(VALUE_DISPLAY.vector)
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
|
|
@ -63,9 +63,8 @@ function Node_Grid_Noise(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c
|
||||||
shader_set_uniform_i(uniform_sam, is_surface(_sam));
|
shader_set_uniform_i(uniform_sam, is_surface(_sam));
|
||||||
shader_set_uniform_f(uniform_shf, _shf);
|
shader_set_uniform_f(uniform_shf, _shf);
|
||||||
shader_set_uniform_i(uniform_shfax, _shfAx);
|
shader_set_uniform_i(uniform_shfax, _shfAx);
|
||||||
|
shader_set_uniform_f(uniform_sed, _sed);
|
||||||
|
|
||||||
random_set_seed(_sed);
|
|
||||||
shader_set_uniform_f(uniform_sed, random_range(1.0, 100.0));
|
|
||||||
if(is_surface(_sam))
|
if(is_surface(_sam))
|
||||||
draw_surface_stretched(_sam, 0, 0, _dim[0], _dim[1]);
|
draw_surface_stretched(_sam, 0, 0, _dim[0], _dim[1]);
|
||||||
else
|
else
|
||||||
|
|
12
scripts/node_noise_grid_hex/node_gradient.yy
Normal file
12
scripts/node_noise_grid_hex/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_noise_grid_hex/node_noise_grid_hex.gml
Normal file
64
scripts/node_noise_grid_hex/node_noise_grid_hex.gml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
function Node_Noise_Hex(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "Hexagonal noise";
|
||||||
|
|
||||||
|
shader = sh_noise_grid_hex;
|
||||||
|
uniform_dim = shader_get_uniform(shader, "dimension");
|
||||||
|
uniform_sed = shader_get_uniform(shader, "seed");
|
||||||
|
uniform_pos = shader_get_uniform(shader, "position");
|
||||||
|
uniform_sca = shader_get_uniform(shader, "scale");
|
||||||
|
uniform_ang = shader_get_uniform(shader, "angle");
|
||||||
|
|
||||||
|
uniform_sam = shader_get_uniform(shader, "useSampler");
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue(0, "Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2 )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue(1, "Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(99999));
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue(2, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 3] = nodeValue(3, "Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 8, 8 ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 4] = nodeValue(4, "Texture sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||||
|
|
||||||
|
input_display_list = [
|
||||||
|
["Output", false], 0,
|
||||||
|
["Noise", false], 1, 2, 3,
|
||||||
|
["Texture", false], 4,
|
||||||
|
];
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
|
||||||
|
|
||||||
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
|
}
|
||||||
|
|
||||||
|
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||||
|
var _dim = _data[0];
|
||||||
|
var _sed = _data[1];
|
||||||
|
var _pos = _data[2];
|
||||||
|
var _sca = _data[3];
|
||||||
|
var _sam = _data[4];
|
||||||
|
|
||||||
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
||||||
|
|
||||||
|
surface_set_target(_outSurf);
|
||||||
|
shader_set(shader);
|
||||||
|
shader_set_uniform_f_array(uniform_dim, [_dim[0], _dim[1]]);
|
||||||
|
shader_set_uniform_f(uniform_sed, _sed);
|
||||||
|
shader_set_uniform_f_array(uniform_pos, _pos);
|
||||||
|
shader_set_uniform_f_array(uniform_sca, _sca);
|
||||||
|
shader_set_uniform_i(uniform_sam, is_surface(_sam));
|
||||||
|
|
||||||
|
if(is_surface(_sam))
|
||||||
|
draw_surface_stretched(_sam, 0, 0, _dim[0], _dim[1]);
|
||||||
|
else
|
||||||
|
draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1);
|
||||||
|
shader_reset();
|
||||||
|
surface_reset_target();
|
||||||
|
|
||||||
|
return _outSurf;
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_noise_grid_hex/node_noise_grid_hex.yy
Normal file
11
scripts/node_noise_grid_hex/node_noise_grid_hex.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_noise_grid_hex",
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "generator",
|
||||||
|
"path": "folders/nodes/data/generator.yy",
|
||||||
|
},
|
||||||
|
}
|
12
scripts/node_noise_grid_hex/node_perlin.yy
Normal file
12
scripts/node_noise_grid_hex/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",
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue