Convert 3D nodes to array processor

This commit is contained in:
Tanasart 2023-08-17 16:56:54 +02:00
parent 34b594f482
commit bf0eabc189
250 changed files with 832 additions and 524 deletions

View file

@ -21,7 +21,6 @@
{"name":"widget","order":9,"path":"folders/dialog/widget.yy",}, {"name":"widget","order":9,"path":"folders/dialog/widget.yy",},
{"name":"font","order":7,"path":"folders/font.yy",}, {"name":"font","order":7,"path":"folders/font.yy",},
{"name":"functions","order":6,"path":"folders/functions.yy",}, {"name":"functions","order":6,"path":"folders/functions.yy",},
{"name":"misc","order":1,"path":"folders/functions/3d/misc.yy",},
{"name":"action","order":40,"path":"folders/functions/action.yy",}, {"name":"action","order":40,"path":"folders/functions/action.yy",},
{"name":"animation","order":19,"path":"folders/functions/animation.yy",}, {"name":"animation","order":19,"path":"folders/functions/animation.yy",},
{"name":"async","order":36,"path":"folders/functions/async.yy",}, {"name":"async","order":36,"path":"folders/functions/async.yy",},
@ -187,6 +186,10 @@
{"name":"biterator","order":2,"path":"folders/VCT/biterator.yy",}, {"name":"biterator","order":2,"path":"folders/VCT/biterator.yy",},
{"name":"widget","order":3,"path":"folders/VCT/widget.yy",}, {"name":"widget","order":3,"path":"folders/VCT/widget.yy",},
{"name":"widgets","order":5,"path":"folders/widgets.yy",}, {"name":"widgets","order":5,"path":"folders/widgets.yy",},
{"name":"util","order":17,"path":"folders/functions/3d/util.yy",},
{"name":"light","order":18,"path":"folders/functions/3d/light.yy",},
{"name":"camera","order":19,"path":"folders/functions/3d/camera.yy",},
{"name":"mesh","order":20,"path":"folders/functions/3d/mesh.yy",},
], ],
"ResourceOrderSettings": [ "ResourceOrderSettings": [
{"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",}, {"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",},
@ -197,7 +200,7 @@
{"name":"sh_normal_light","order":1,"path":"shaders/sh_normal_light/sh_normal_light.yy",}, {"name":"sh_normal_light","order":1,"path":"shaders/sh_normal_light/sh_normal_light.yy",},
{"name":"node_tool","order":9,"path":"scripts/node_tool/node_tool.yy",}, {"name":"node_tool","order":9,"path":"scripts/node_tool/node_tool.yy",},
{"name":"sh_find_pixel","order":3,"path":"shaders/sh_find_pixel/sh_find_pixel.yy",}, {"name":"sh_find_pixel","order":3,"path":"shaders/sh_find_pixel/sh_find_pixel.yy",},
{"name":"d3d_light_point","order":16,"path":"scripts/d3d_light_point/d3d_light_point.yy",}, {"name":"d3d_light_point","order":2,"path":"scripts/d3d_light_point/d3d_light_point.yy",},
{"name":"node_3d_camera","order":10,"path":"scripts/node_3d_camera/node_3d_camera.yy",}, {"name":"node_3d_camera","order":10,"path":"scripts/node_3d_camera/node_3d_camera.yy",},
{"name":"panel_preview_window","order":1,"path":"scripts/panel_preview_window/panel_preview_window.yy",}, {"name":"panel_preview_window","order":1,"path":"scripts/panel_preview_window/panel_preview_window.yy",},
{"name":"sh_scale3x","order":29,"path":"shaders/sh_scale3x/sh_scale3x.yy",}, {"name":"sh_scale3x","order":29,"path":"shaders/sh_scale3x/sh_scale3x.yy",},
@ -209,6 +212,7 @@
{"name":"node_pixel_sort","order":12,"path":"scripts/node_pixel_sort/node_pixel_sort.yy",}, {"name":"node_pixel_sort","order":12,"path":"scripts/node_pixel_sort/node_pixel_sort.yy",},
{"name":"sh_dither","order":28,"path":"shaders/sh_dither/sh_dither.yy",}, {"name":"sh_dither","order":28,"path":"shaders/sh_dither/sh_dither.yy",},
{"name":"node_region_fill","order":20,"path":"scripts/node_region_fill/node_region_fill.yy",}, {"name":"node_region_fill","order":20,"path":"scripts/node_region_fill/node_region_fill.yy",},
{"name":"sh_d3d_normal","order":18,"path":"shaders/sh_d3d_normal/sh_d3d_normal.yy",},
{"name":"s_node_text_file_read","order":13,"path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",}, {"name":"s_node_text_file_read","order":13,"path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},
{"name":"s_node_text_trim","order":7,"path":"sprites/s_node_text_trim/s_node_text_trim.yy",}, {"name":"s_node_text_trim","order":7,"path":"sprites/s_node_text_trim/s_node_text_trim.yy",},
{"name":"s_node_pb_fx_shading","order":3,"path":"sprites/s_node_pb_fx_shading/s_node_pb_fx_shading.yy",}, {"name":"s_node_pb_fx_shading","order":3,"path":"sprites/s_node_pb_fx_shading/s_node_pb_fx_shading.yy",},
@ -238,7 +242,6 @@
{"name":"s_node_tunnel_out","order":22,"path":"sprites/s_node_tunnel_out/s_node_tunnel_out.yy",}, {"name":"s_node_tunnel_out","order":22,"path":"sprites/s_node_tunnel_out/s_node_tunnel_out.yy",},
{"name":"__background_set_element","order":3,"path":"scripts/__background_set_element/__background_set_element.yy",}, {"name":"__background_set_element","order":3,"path":"scripts/__background_set_element/__background_set_element.yy",},
{"name":"s_node_3d_obj","order":3,"path":"sprites/s_node_3d_obj/s_node_3d_obj.yy",}, {"name":"s_node_3d_obj","order":3,"path":"sprites/s_node_3d_obj/s_node_3d_obj.yy",},
{"name":"d3d_camera","order":13,"path":"scripts/d3d_camera/d3d_camera.yy",},
{"name":"ds_list_queue","order":6,"path":"scripts/ds_list_queue/ds_list_queue.yy",}, {"name":"ds_list_queue","order":6,"path":"scripts/ds_list_queue/ds_list_queue.yy",},
{"name":"s_node_scale","order":6,"path":"sprites/s_node_scale/s_node_scale.yy",}, {"name":"s_node_scale","order":6,"path":"sprites/s_node_scale/s_node_scale.yy",},
{"name":"sh_color_picker_value","order":1,"path":"shaders/sh_color_picker_value/sh_color_picker_value.yy",}, {"name":"sh_color_picker_value","order":1,"path":"shaders/sh_color_picker_value/sh_color_picker_value.yy",},
@ -356,7 +359,7 @@
{"name":"node_pb_fx_strip","order":11,"path":"scripts/node_pb_fx_strip/node_pb_fx_strip.yy",}, {"name":"node_pb_fx_strip","order":11,"path":"scripts/node_pb_fx_strip/node_pb_fx_strip.yy",},
{"name":"node_stripe","order":4,"path":"scripts/node_stripe/node_stripe.yy",}, {"name":"node_stripe","order":4,"path":"scripts/node_stripe/node_stripe.yy",},
{"name":"sh_texture_atlas","order":39,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",}, {"name":"sh_texture_atlas","order":39,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",},
{"name":"d3d_vec4","order":12,"path":"scripts/d3d_vec4/d3d_vec4.yy",}, {"name":"d3d_vec4","order":5,"path":"scripts/d3d_vec4/d3d_vec4.yy",},
{"name":"s_node_fluidSim_domain","order":6,"path":"sprites/s_node_fluidSim_domain/s_node_fluidSim_domain.yy",}, {"name":"s_node_fluidSim_domain","order":6,"path":"sprites/s_node_fluidSim_domain/s_node_fluidSim_domain.yy",},
{"name":"s_node_displace","order":20,"path":"sprites/s_node_displace/s_node_displace.yy",}, {"name":"s_node_displace","order":20,"path":"sprites/s_node_displace/s_node_displace.yy",},
{"name":"sh_polar","order":1,"path":"shaders/sh_polar/sh_polar.yy",}, {"name":"sh_polar","order":1,"path":"shaders/sh_polar/sh_polar.yy",},
@ -475,7 +478,7 @@
{"name":"sh_fd_calculate_pressure_jacobi_glsl","order":8,"path":"shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.yy",}, {"name":"sh_fd_calculate_pressure_jacobi_glsl","order":8,"path":"shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.yy",},
{"name":"node_color_from_rgb","order":7,"path":"scripts/node_color_from_rgb/node_color_from_rgb.yy",}, {"name":"node_color_from_rgb","order":7,"path":"scripts/node_color_from_rgb/node_color_from_rgb.yy",},
{"name":"node_struct_get","order":1,"path":"scripts/node_struct_get/node_struct_get.yy",}, {"name":"node_struct_get","order":1,"path":"scripts/node_struct_get/node_struct_get.yy",},
{"name":"d3d_plane","order":14,"path":"scripts/d3d_plane/d3d_plane.yy",}, {"name":"d3d_plane","order":2,"path":"scripts/d3d_plane/d3d_plane.yy",},
{"name":"curveBox","order":8,"path":"scripts/curveBox/curveBox.yy",}, {"name":"curveBox","order":8,"path":"scripts/curveBox/curveBox.yy",},
{"name":"s_node_iterator_length","order":24,"path":"sprites/s_node_iterator_length/s_node_iterator_length.yy",}, {"name":"s_node_iterator_length","order":24,"path":"sprites/s_node_iterator_length/s_node_iterator_length.yy",},
{"name":"preview_overlay_vector","order":2,"path":"scripts/preview_overlay_vector/preview_overlay_vector.yy",}, {"name":"preview_overlay_vector","order":2,"path":"scripts/preview_overlay_vector/preview_overlay_vector.yy",},
@ -568,7 +571,7 @@
{"name":"node_strand_gravity","order":4,"path":"scripts/node_strand_gravity/node_strand_gravity.yy",}, {"name":"node_strand_gravity","order":4,"path":"scripts/node_strand_gravity/node_strand_gravity.yy",},
{"name":"load_palette","order":3,"path":"scripts/load_palette/load_palette.yy",}, {"name":"load_palette","order":3,"path":"scripts/load_palette/load_palette.yy",},
{"name":"luaHighlight","order":1,"path":"scripts/luaHighlight/luaHighlight.yy",}, {"name":"luaHighlight","order":1,"path":"scripts/luaHighlight/luaHighlight.yy",},
{"name":"d3d_rot3","order":8,"path":"scripts/d3d_rot3/d3d_rot3.yy",}, {"name":"d3d_rot3","order":3,"path":"scripts/d3d_rot3/d3d_rot3.yy",},
{"name":"sh_sample_points","order":26,"path":"shaders/sh_sample_points/sh_sample_points.yy",}, {"name":"sh_sample_points","order":26,"path":"shaders/sh_sample_points/sh_sample_points.yy",},
{"name":"node_combine_rgb","order":1,"path":"scripts/node_combine_rgb/node_combine_rgb.yy",}, {"name":"node_combine_rgb","order":1,"path":"scripts/node_combine_rgb/node_combine_rgb.yy",},
{"name":"fd_rectangle_draw_part","order":10,"path":"scripts/fd_rectangle_draw_part/fd_rectangle_draw_part.yy",}, {"name":"fd_rectangle_draw_part","order":10,"path":"scripts/fd_rectangle_draw_part/fd_rectangle_draw_part.yy",},
@ -602,6 +605,7 @@
{"name":"s_node_surface_from_buffer","order":1,"path":"sprites/s_node_surface_from_buffer/s_node_surface_from_buffer.yy",}, {"name":"s_node_surface_from_buffer","order":1,"path":"sprites/s_node_surface_from_buffer/s_node_surface_from_buffer.yy",},
{"name":"node_iterator_filter_output","order":2,"path":"scripts/node_iterator_filter_output/node_iterator_filter_output.yy",}, {"name":"node_iterator_filter_output","order":2,"path":"scripts/node_iterator_filter_output/node_iterator_filter_output.yy",},
{"name":"color_function","order":9,"path":"scripts/color_function/color_function.yy",}, {"name":"color_function","order":9,"path":"scripts/color_function/color_function.yy",},
{"name":"d3d_cube_faces","order":1,"path":"scripts/d3d_cube_faces/d3d_cube_faces.yy",},
{"name":"fd_rectangle_set_pressure_size","order":11,"path":"scripts/fd_rectangle_set_pressure_size/fd_rectangle_set_pressure_size.yy",}, {"name":"fd_rectangle_set_pressure_size","order":11,"path":"scripts/fd_rectangle_set_pressure_size/fd_rectangle_set_pressure_size.yy",},
{"name":"node_color_data","order":6,"path":"scripts/node_color_data/node_color_data.yy",}, {"name":"node_color_data","order":6,"path":"scripts/node_color_data/node_color_data.yy",},
{"name":"node_array_shift","order":24,"path":"scripts/node_array_shift/node_array_shift.yy",}, {"name":"node_array_shift","order":24,"path":"scripts/node_array_shift/node_array_shift.yy",},
@ -712,7 +716,7 @@
{"name":"s_node_lua_surface","order":18,"path":"sprites/s_node_lua_surface/s_node_lua_surface.yy",}, {"name":"s_node_lua_surface","order":18,"path":"sprites/s_node_lua_surface/s_node_lua_surface.yy",},
{"name":"node_data","order":1,"path":"scripts/node_data/node_data.yy",}, {"name":"node_data","order":1,"path":"scripts/node_data/node_data.yy",},
{"name":"node_wiggler","order":2,"path":"scripts/node_wiggler/node_wiggler.yy",}, {"name":"node_wiggler","order":2,"path":"scripts/node_wiggler/node_wiggler.yy",},
{"name":"d3d_matrix4","order":11,"path":"scripts/d3d_matrix4/d3d_matrix4.yy",}, {"name":"d3d_matrix4","order":1,"path":"scripts/d3d_matrix4/d3d_matrix4.yy",},
{"name":"fd_GUIDE","order":5,"path":"scripts/fd_GUIDE/fd_GUIDE.yy",}, {"name":"fd_GUIDE","order":5,"path":"scripts/fd_GUIDE/fd_GUIDE.yy",},
{"name":"node_fluid_update","order":3,"path":"scripts/node_fluid_update/node_fluid_update.yy",}, {"name":"node_fluid_update","order":3,"path":"scripts/node_fluid_update/node_fluid_update.yy",},
{"name":"s_node_grid_noise","order":5,"path":"sprites/s_node_grid_noise/s_node_grid_noise.yy",}, {"name":"s_node_grid_noise","order":5,"path":"sprites/s_node_grid_noise/s_node_grid_noise.yy",},
@ -816,6 +820,7 @@
{"name":"__global_object_depths","order":7,"path":"scripts/__global_object_depths/__global_object_depths.yy",}, {"name":"__global_object_depths","order":7,"path":"scripts/__global_object_depths/__global_object_depths.yy",},
{"name":"s_node_filter_array","order":28,"path":"sprites/s_node_filter_array/s_node_filter_array.yy",}, {"name":"s_node_filter_array","order":28,"path":"sprites/s_node_filter_array/s_node_filter_array.yy",},
{"name":"node_noise_grid_hex","order":5,"path":"scripts/node_noise_grid_hex/node_noise_grid_hex.yy",}, {"name":"node_noise_grid_hex","order":5,"path":"scripts/node_noise_grid_hex/node_noise_grid_hex.yy",},
{"name":"_3d_rotation","order":6,"path":"scripts/_3d_rotation/_3d_rotation.yy",},
{"name":"node_lua_global","order":1,"path":"scripts/node_lua_global/node_lua_global.yy",}, {"name":"node_lua_global","order":1,"path":"scripts/node_lua_global/node_lua_global.yy",},
{"name":"o_dialog_preset","order":1,"path":"objects/o_dialog_preset/o_dialog_preset.yy",}, {"name":"o_dialog_preset","order":1,"path":"objects/o_dialog_preset/o_dialog_preset.yy",},
{"name":"s_node_mesh_transform","order":1,"path":"sprites/s_node_mesh_transform/s_node_mesh_transform.yy",}, {"name":"s_node_mesh_transform","order":1,"path":"sprites/s_node_mesh_transform/s_node_mesh_transform.yy",},
@ -920,7 +925,7 @@
{"name":"s_node_compare","order":1,"path":"sprites/s_node_compare/s_node_compare.yy",}, {"name":"s_node_compare","order":1,"path":"sprites/s_node_compare/s_node_compare.yy",},
{"name":"s_node_fluidSim_domain_queue","order":9,"path":"sprites/s_node_fluidSim_domain_queue/s_node_fluidSim_domain_queue.yy",}, {"name":"s_node_fluidSim_domain_queue","order":9,"path":"sprites/s_node_fluidSim_domain_queue/s_node_fluidSim_domain_queue.yy",},
{"name":"s_node_vfx_spawn","order":2,"path":"sprites/s_node_vfx_spawn/s_node_vfx_spawn.yy",}, {"name":"s_node_vfx_spawn","order":2,"path":"sprites/s_node_vfx_spawn/s_node_vfx_spawn.yy",},
{"name":"d3d_vec3","order":9,"path":"scripts/d3d_vec3/d3d_vec3.yy",}, {"name":"d3d_vec3","order":4,"path":"scripts/d3d_vec3/d3d_vec3.yy",},
{"name":"texture_set_repeat","order":1,"path":"scripts/texture_set_repeat/texture_set_repeat.yy",}, {"name":"texture_set_repeat","order":1,"path":"scripts/texture_set_repeat/texture_set_repeat.yy",},
{"name":"o_dialog_color_quick_pick","order":5,"path":"objects/o_dialog_color_quick_pick/o_dialog_color_quick_pick.yy",}, {"name":"o_dialog_color_quick_pick","order":5,"path":"objects/o_dialog_color_quick_pick/o_dialog_color_quick_pick.yy",},
{"name":"fd_rectangle_update_velocity","order":22,"path":"scripts/fd_rectangle_update_velocity/fd_rectangle_update_velocity.yy",}, {"name":"fd_rectangle_update_velocity","order":22,"path":"scripts/fd_rectangle_update_velocity/fd_rectangle_update_velocity.yy",},
@ -1116,7 +1121,7 @@
{"name":"s_node_atlas","order":5,"path":"sprites/s_node_atlas/s_node_atlas.yy",}, {"name":"s_node_atlas","order":5,"path":"sprites/s_node_atlas/s_node_atlas.yy",},
{"name":"node_fluid_add","order":4,"path":"scripts/node_fluid_add/node_fluid_add.yy",}, {"name":"node_fluid_add","order":4,"path":"scripts/node_fluid_add/node_fluid_add.yy",},
{"name":"BBMOD_Quaternion","order":3,"path":"scripts/BBMOD_Quaternion/BBMOD_Quaternion.yy",}, {"name":"BBMOD_Quaternion","order":3,"path":"scripts/BBMOD_Quaternion/BBMOD_Quaternion.yy",},
{"name":"d3d_cube","order":7,"path":"scripts/d3d_cube/d3d_cube.yy",}, {"name":"d3d_group","order":21,"path":"scripts/d3d_group/d3d_group.yy",},
{"name":"o_dialog_output_visibility","order":2,"path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",}, {"name":"o_dialog_output_visibility","order":2,"path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",},
{"name":"node_normal","order":1,"path":"scripts/node_normal/node_normal.yy",}, {"name":"node_normal","order":1,"path":"scripts/node_normal/node_normal.yy",},
{"name":"s_node_glow","order":24,"path":"sprites/s_node_glow/s_node_glow.yy",}, {"name":"s_node_glow","order":24,"path":"sprites/s_node_glow/s_node_glow.yy",},
@ -1133,7 +1138,7 @@
{"name":"vct_slider","order":1,"path":"scripts/vct_slider/vct_slider.yy",}, {"name":"vct_slider","order":1,"path":"scripts/vct_slider/vct_slider.yy",},
{"name":"panel_node_align","order":3,"path":"scripts/panel_node_align/panel_node_align.yy",}, {"name":"panel_node_align","order":3,"path":"scripts/panel_node_align/panel_node_align.yy",},
{"name":"sh_blur_alpha","order":1,"path":"shaders/sh_blur_alpha/sh_blur_alpha.yy",}, {"name":"sh_blur_alpha","order":1,"path":"shaders/sh_blur_alpha/sh_blur_alpha.yy",},
{"name":"d3d_light_directional","order":5,"path":"scripts/d3d_light_directional/d3d_light_directional.yy",}, {"name":"d3d_light_directional","order":1,"path":"scripts/d3d_light_directional/d3d_light_directional.yy",},
{"name":"value_snap","order":10,"path":"scripts/value_snap/value_snap.yy",}, {"name":"value_snap","order":10,"path":"scripts/value_snap/value_snap.yy",},
{"name":"file_dropper","order":1,"path":"extensions/file_dropper/file_dropper.yy",}, {"name":"file_dropper","order":1,"path":"extensions/file_dropper/file_dropper.yy",},
{"name":"s_biterator_b_shape_idle","order":3,"path":"sprites/s_biterator_b_shape_idle/s_biterator_b_shape_idle.yy",}, {"name":"s_biterator_b_shape_idle","order":3,"path":"sprites/s_biterator_b_shape_idle/s_biterator_b_shape_idle.yy",},
@ -1152,7 +1157,7 @@
{"name":"node_blur_contrast","order":1,"path":"scripts/node_blur_contrast/node_blur_contrast.yy",}, {"name":"node_blur_contrast","order":1,"path":"scripts/node_blur_contrast/node_blur_contrast.yy",},
{"name":"sh_trail_filler","order":50,"path":"shaders/sh_trail_filler/sh_trail_filler.yy",}, {"name":"sh_trail_filler","order":50,"path":"shaders/sh_trail_filler/sh_trail_filler.yy",},
{"name":"s_node_border","order":12,"path":"sprites/s_node_border/s_node_border.yy",}, {"name":"s_node_border","order":12,"path":"sprites/s_node_border/s_node_border.yy",},
{"name":"d3_vector","order":1,"path":"scripts/d3_vector/d3_vector.yy",}, {"name":"d3_vector","order":7,"path":"scripts/d3_vector/d3_vector.yy",},
{"name":"s_node_pin","order":2,"path":"sprites/s_node_pin/s_node_pin.yy",}, {"name":"s_node_pin","order":2,"path":"sprites/s_node_pin/s_node_pin.yy",},
{"name":"node_local_analyze","order":17,"path":"scripts/node_local_analyze/node_local_analyze.yy",}, {"name":"node_local_analyze","order":17,"path":"scripts/node_local_analyze/node_local_analyze.yy",},
{"name":"s_node_blur_contrast","order":10,"path":"sprites/s_node_blur_contrast/s_node_blur_contrast.yy",}, {"name":"s_node_blur_contrast","order":10,"path":"sprites/s_node_blur_contrast/s_node_blur_contrast.yy",},
@ -1262,7 +1267,7 @@
{"name":"s_node_array_reverse","order":8,"path":"sprites/s_node_array_reverse/s_node_array_reverse.yy",}, {"name":"s_node_array_reverse","order":8,"path":"sprites/s_node_array_reverse/s_node_array_reverse.yy",},
{"name":"o_process_handler","order":3,"path":"objects/o_process_handler/o_process_handler.yy",}, {"name":"o_process_handler","order":3,"path":"objects/o_process_handler/o_process_handler.yy",},
{"name":"sh_ani_noise","order":8,"path":"shaders/sh_ani_noise/sh_ani_noise.yy",}, {"name":"sh_ani_noise","order":8,"path":"shaders/sh_ani_noise/sh_ani_noise.yy",},
{"name":"d3d_camera_object","order":3,"path":"scripts/d3d_camera_object/d3d_camera_object.yy",}, {"name":"d3d_camera_object","order":1,"path":"scripts/d3d_camera_object/d3d_camera_object.yy",},
{"name":"sh_level","order":14,"path":"shaders/sh_level/sh_level.yy",}, {"name":"sh_level","order":14,"path":"shaders/sh_level/sh_level.yy",},
{"name":"sh_grid_tri","order":3,"path":"shaders/sh_grid_tri/sh_grid_tri.yy",}, {"name":"sh_grid_tri","order":3,"path":"shaders/sh_grid_tri/sh_grid_tri.yy",},
{"name":"s_node_text","order":1,"path":"sprites/s_node_text/s_node_text.yy",}, {"name":"s_node_text","order":1,"path":"sprites/s_node_text/s_node_text.yy",},
@ -1274,7 +1279,6 @@
{"name":"sh_blend_normal_dim","order":10,"path":"shaders/sh_blend_normal_dim/sh_blend_normal_dim.yy",}, {"name":"sh_blend_normal_dim","order":10,"path":"shaders/sh_blend_normal_dim/sh_blend_normal_dim.yy",},
{"name":"node_skew","order":11,"path":"scripts/node_skew/node_skew.yy",}, {"name":"node_skew","order":11,"path":"scripts/node_skew/node_skew.yy",},
{"name":"s_node_dot_product","order":13,"path":"sprites/s_node_dot_product/s_node_dot_product.yy",}, {"name":"s_node_dot_product","order":13,"path":"sprites/s_node_dot_product/s_node_dot_product.yy",},
{"name":"d3d_light","order":10,"path":"scripts/d3d_light/d3d_light.yy",},
{"name":"sh_downsample","order":1,"path":"shaders/sh_downsample/sh_downsample.yy",}, {"name":"sh_downsample","order":1,"path":"shaders/sh_downsample/sh_downsample.yy",},
{"name":"sh_remove_black","order":33,"path":"shaders/sh_remove_black/sh_remove_black.yy",}, {"name":"sh_remove_black","order":33,"path":"shaders/sh_remove_black/sh_remove_black.yy",},
{"name":"path_parser","order":3,"path":"scripts/path_parser/path_parser.yy",}, {"name":"path_parser","order":3,"path":"scripts/path_parser/path_parser.yy",},
@ -1389,7 +1393,6 @@
{"name":"__node_value_processor","order":6,"path":"scripts/__node_value_processor/__node_value_processor.yy",}, {"name":"__node_value_processor","order":6,"path":"scripts/__node_value_processor/__node_value_processor.yy",},
{"name":"s_node_group_input","order":16,"path":"sprites/s_node_group_input/s_node_group_input.yy",}, {"name":"s_node_group_input","order":16,"path":"sprites/s_node_group_input/s_node_group_input.yy",},
{"name":"sample_projects","order":6,"path":"scripts/sample_projects/sample_projects.yy",}, {"name":"sample_projects","order":6,"path":"scripts/sample_projects/sample_projects.yy",},
{"name":"d3d_matrix3","order":6,"path":"scripts/d3d_matrix3/d3d_matrix3.yy",},
{"name":"draw_fit","order":12,"path":"scripts/draw_fit/draw_fit.yy",}, {"name":"draw_fit","order":12,"path":"scripts/draw_fit/draw_fit.yy",},
{"name":"node_armature_sample","order":5,"path":"scripts/node_armature_sample/node_armature_sample.yy",}, {"name":"node_armature_sample","order":5,"path":"scripts/node_armature_sample/node_armature_sample.yy",},
{"name":"sh_pb_shade","order":3,"path":"shaders/sh_pb_shade/sh_pb_shade.yy",}, {"name":"sh_pb_shade","order":3,"path":"shaders/sh_pb_shade/sh_pb_shade.yy",},

View file

@ -42,7 +42,6 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"font","folderPath":"folders/font.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"font","folderPath":"folders/font.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"functions","folderPath":"folders/functions.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"functions","folderPath":"folders/functions.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"3d","folderPath":"folders/functions/3d.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"3d","folderPath":"folders/functions/3d.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"misc","folderPath":"folders/functions/3d/misc.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"action","folderPath":"folders/functions/action.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"action","folderPath":"folders/functions/action.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/functions/animation.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/functions/animation.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"async","folderPath":"folders/functions/async.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"async","folderPath":"folders/functions/async.yy",},
@ -225,6 +224,10 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"biterator","folderPath":"folders/VCT/biterator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"biterator","folderPath":"folders/VCT/biterator.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"widget","folderPath":"folders/VCT/widget.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widget","folderPath":"folders/VCT/widget.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"util","folderPath":"folders/functions/3d/util.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"light","folderPath":"folders/functions/3d/light.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"camera","folderPath":"folders/functions/3d/camera.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"mesh","folderPath":"folders/functions/3d/mesh.yy",},
], ],
"IncludedFiles": [ "IncludedFiles": [
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",},
@ -721,6 +724,7 @@
{"id":{"name":"sh_dither","path":"shaders/sh_dither/sh_dither.yy",},}, {"id":{"name":"sh_dither","path":"shaders/sh_dither/sh_dither.yy",},},
{"id":{"name":"control_function","path":"scripts/control_function/control_function.yy",},}, {"id":{"name":"control_function","path":"scripts/control_function/control_function.yy",},},
{"id":{"name":"node_region_fill","path":"scripts/node_region_fill/node_region_fill.yy",},}, {"id":{"name":"node_region_fill","path":"scripts/node_region_fill/node_region_fill.yy",},},
{"id":{"name":"sh_d3d_normal","path":"shaders/sh_d3d_normal/sh_d3d_normal.yy",},},
{"id":{"name":"panel_data","path":"scripts/panel_data/panel_data.yy",},}, {"id":{"name":"panel_data","path":"scripts/panel_data/panel_data.yy",},},
{"id":{"name":"s_node_text_file_read","path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},}, {"id":{"name":"s_node_text_file_read","path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},},
{"id":{"name":"s_node_text_trim","path":"sprites/s_node_text_trim/s_node_text_trim.yy",},}, {"id":{"name":"s_node_text_trim","path":"sprites/s_node_text_trim/s_node_text_trim.yy",},},
@ -1176,6 +1180,7 @@
{"id":{"name":"s_node_surface_from_buffer","path":"sprites/s_node_surface_from_buffer/s_node_surface_from_buffer.yy",},}, {"id":{"name":"s_node_surface_from_buffer","path":"sprites/s_node_surface_from_buffer/s_node_surface_from_buffer.yy",},},
{"id":{"name":"node_iterator_filter_output","path":"scripts/node_iterator_filter_output/node_iterator_filter_output.yy",},}, {"id":{"name":"node_iterator_filter_output","path":"scripts/node_iterator_filter_output/node_iterator_filter_output.yy",},},
{"id":{"name":"color_function","path":"scripts/color_function/color_function.yy",},}, {"id":{"name":"color_function","path":"scripts/color_function/color_function.yy",},},
{"id":{"name":"d3d_cube_faces","path":"scripts/d3d_cube_faces/d3d_cube_faces.yy",},},
{"id":{"name":"fd_rectangle_set_pressure_size","path":"scripts/fd_rectangle_set_pressure_size/fd_rectangle_set_pressure_size.yy",},}, {"id":{"name":"fd_rectangle_set_pressure_size","path":"scripts/fd_rectangle_set_pressure_size/fd_rectangle_set_pressure_size.yy",},},
{"id":{"name":"node_color_data","path":"scripts/node_color_data/node_color_data.yy",},}, {"id":{"name":"node_color_data","path":"scripts/node_color_data/node_color_data.yy",},},
{"id":{"name":"node_array_shift","path":"scripts/node_array_shift/node_array_shift.yy",},}, {"id":{"name":"node_array_shift","path":"scripts/node_array_shift/node_array_shift.yy",},},
@ -1753,6 +1758,7 @@
{"id":{"name":"node_fluid_add","path":"scripts/node_fluid_add/node_fluid_add.yy",},}, {"id":{"name":"node_fluid_add","path":"scripts/node_fluid_add/node_fluid_add.yy",},},
{"id":{"name":"BBMOD_Quaternion","path":"scripts/BBMOD_Quaternion/BBMOD_Quaternion.yy",},}, {"id":{"name":"BBMOD_Quaternion","path":"scripts/BBMOD_Quaternion/BBMOD_Quaternion.yy",},},
{"id":{"name":"d3d_cube","path":"scripts/d3d_cube/d3d_cube.yy",},}, {"id":{"name":"d3d_cube","path":"scripts/d3d_cube/d3d_cube.yy",},},
{"id":{"name":"d3d_group","path":"scripts/d3d_group/d3d_group.yy",},},
{"id":{"name":"o_dialog_output_visibility","path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",},}, {"id":{"name":"o_dialog_output_visibility","path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",},},
{"id":{"name":"node_normal","path":"scripts/node_normal/node_normal.yy",},}, {"id":{"name":"node_normal","path":"scripts/node_normal/node_normal.yy",},},
{"id":{"name":"s_node_glow","path":"sprites/s_node_glow/s_node_glow.yy",},}, {"id":{"name":"s_node_glow","path":"sprites/s_node_glow/s_node_glow.yy",},},

Binary file not shown.

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "misc", "name": "util",
"path": "folders/functions/3d/misc.yy", "path": "folders/functions/3d/util.yy",
}, },
} }

View file

@ -1,18 +1,29 @@
function Node_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_3D(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "3D"; name = "3D";
is_3D = true; is_3D = true;
//inputs[| 0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [])
// .setVisible(true, true);
//outputs[| 0] = nodeValue("Shuffled array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, []);
static drawOverlay3D = function(active, params, _mx, _my, _snx, _sny, _panel) {} static drawOverlay3D = function(active, params, _mx, _my, _snx, _sny, _panel) {}
static submit = function(params = {}, shader = noone) {} static processData = function(_outSurf, _data, _output_index, _array_index) {}
static submitUI = function(params = {}, shader = noone) {} static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {}
static update = function(frame = PROJECT.animator.current_frame) {} static getPreviewObject = function() {
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {} if(ds_list_empty(outputs)) return [];
switch(outputs[| preview_channel].type) {
case VALUE_TYPE.d3Mesh :
case VALUE_TYPE.d3Light :
case VALUE_TYPE.d3Camera :
case VALUE_TYPE.d3Scene : break;
default : return [];
}
var _obj = outputs[| 0].getValue();
if(is_array(_obj))
_obj = array_safe_get(_obj, preview_index, noone);
return [ _obj ];
}
static getPreviewObjectOutline = function() { return getPreviewObject() }
} }

View file

@ -1,10 +1,8 @@
function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) constructor { function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) constructor {
name = "3D Light"; name = "3D Light";
object = new __3dLight();
if(!LOADING && !APPENDING) { if(!LOADING && !APPENDING)
inputs[| 0].setValue([ 0, 0, 1 ]); inputs[| 0].setValue([ 0, 0, 1 ]);
}
inputs[| input_d3d_index + 0] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); inputs[| input_d3d_index + 0] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
@ -13,23 +11,27 @@ function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group)
input_light_index = ds_list_size(inputs); input_light_index = ds_list_size(inputs);
outputs[| 0] = nodeValue("Light", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Light, object); outputs[| 0] = nodeValue("Light", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Light, noone);
#macro __d3d_input_list_light ["Light", false], input_d3d_index + 0, input_d3d_index + 1 #macro __d3d_input_list_light ["Light", false], input_d3d_index + 0, input_d3d_index + 1
static setLight = function() { static setLight = function(light, _data) {
var _col = inputs[| input_d3d_index + 0].getValue(); var _col = _data[input_d3d_index + 0];
var _int = inputs[| input_d3d_index + 1].getValue(); var _int = _data[input_d3d_index + 1];
object.color = _col; light.color = _col;
object.intensity = _int; light.intensity = _int;
outputs[| 0].setValue(object); return light;
} }
static update = function(frame = PROJECT.animator.current_frame) { static processData = function(_output, _data, _output_index, _array_index = 0) {
setTransform(); var object = new __3dLight();
setLight();
setTransform(object, _data);
setLight(object, _data);
return object;
} }
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {

View file

@ -7,9 +7,7 @@ function Node_3D_Mesh(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) c
#macro __d3d_input_list_mesh ["Mesh", false] #macro __d3d_input_list_mesh ["Mesh", false]
static update = function(frame = PROJECT.animator.current_frame) { static processData = function(_output, _data, _output_index, _array_index = 0) {}
setTransform();
}
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {

View file

@ -1,7 +1,7 @@
function Node_3D_Mesh_Modifier(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor { function Node_3D_Mesh_Modifier(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor {
name = "3D Mesh Modifier"; name = "3D Mesh Modifier";
static update = function(frame = PROJECT.animator.current_frame) { static processData = function(_output, _data, _output_index, _array_index = 0) {
} }

View file

@ -3,7 +3,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr
h = 64; h = 64;
min_h = h; min_h = h;
object = new __3dObject(); preview_channel = 0;
inputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) inputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector); .setDisplay(VALUE_DISPLAY.vector);
@ -460,21 +460,14 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr
} }
} #endregion } #endregion
static setTransform = function() { static setTransform = function(object, _data) { #region
var _pos = inputs[| 0].getValue(); var _pos = _data[0];
var _rot = inputs[| 1].getValue(); var _rot = _data[1];
var _sca = inputs[| 2].getValue(); var _sca = _data[2];
object.position.set(_pos[0], _pos[1], _pos[2]); object.position.set(_pos[0], _pos[1], _pos[2]);
object.rotation.set(_rot[0], _rot[1], _rot[2], _rot[3]); object.rotation.set(_rot[0], _rot[1], _rot[2], _rot[3]);
object.scale.set(_sca[0], _sca[1], _sca[2]); object.scale.set(_sca[0], _sca[1], _sca[2]);
return object;
outputs[| 0].setValue(object); } #endregion
}
static submitShader = function(params = {}, shader = noone) { object.submitShader(params, shader); }
static submitUI = function(params = {}, shader = noone) { object.submitUI(params, shader); }
static submit = function(params = {}, shader = noone) { object.submit(params, shader); }
static submitSel = function(params = {}, shader = noone) { object.submitSel(params, shader); }
} }

View file

@ -4,13 +4,13 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct
process_amount = 0; process_amount = 0;
inputs_data = []; inputs_data = [];
static process_data = function(_output, _data, _index) { return noone; } static processData = function(_output, _data, _index) { return noone; }
function preProcess(_outindex) { function preProcess(_outindex) {
var _out = outputs[| _outindex].getValue(); var _out = outputs[| _outindex].getValue();
if(process_amount == 0) //render single data if(process_amount == 0) //render single data
return process_data(_out, inputs_data, _outindex); return processData(_out, inputs_data, _outindex);
if(!is_array(_out)) if(!is_array(_out))
_out = array_create(process_amount); _out = array_create(process_amount);
@ -39,7 +39,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct
_data[i] = _in[_index]; _data[i] = _in[_index];
} }
_out[l] = process_data(_out[l], _data, _outindex); _out[l] = processData(_out[l], _data, _outindex);
} }
return _out; return _out;

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "misc", "name": "util",
"path": "folders/functions/3d/misc.yy", "path": "folders/functions/3d/util.yy",
}, },
} }

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "camera",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/camera.yy",
}, },
} }

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "camera",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/camera.yy",
}, },
} }

View file

@ -45,6 +45,26 @@ function __3dCube() : __3dObject() constructor {
[0, -1, 0], [0, -1, 0], [0, -1, 0] [0, -1, 0], [0, -1, 0], [0, -1, 0]
]; ];
uv = [
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1],
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1],
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1],
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1],
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1],
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1]
];
VB = build(); VB = build();
} initModel(1); } initModel(1);
} }

View file

@ -0,0 +1,91 @@
function __3dCubeFaces() : __3dObject() constructor {
VF = global.VF_POS_NORM_TEX_COL;
render_type = pr_trianglelist;
static initModel = function(size) {
size /= 2;
vertex = [
[
[-size, -size, size], [size, -size, size], [size, size, size],
[-size, -size, size], [size, size, size], [-size, size, size],
],
[
[-size, -size, -size], [size, -size, -size], [size, size, -size],
[-size, -size, -size], [size, size, -size], [-size, size, -size],
],
[
[-size, -size, size], [-size, size, size], [-size, size, -size],
[-size, -size, size], [-size, size, -size], [-size, -size, -size],
],
[
[size, -size, size], [size, size, size], [size, size, -size],
[size, -size, size], [size, size, -size], [size, -size, -size],
],
[
[-size, size, size], [size, size, size], [size, size, -size],
[-size, size, size], [size, size, -size], [-size, size, -size],
],
[
[-size, -size, size], [size, -size, size], [size, -size, -size],
[-size, -size, size], [size, -size, -size], [-size, -size, -size]
]
];
normals = [
[
[0, 0, 1], [0, 0, 1], [0, 0, 1],
[0, 0, 1], [0, 0, 1], [0, 0, 1],
],
[
[0, 0, -1], [0, 0, -1], [0, 0, -1],
[0, 0, -1], [0, 0, -1], [0, 0, -1],
],
[
[-1, 0, 0], [-1, 0, 0], [-1, 0, 0],
[-1, 0, 0], [-1, 0, 0], [-1, 0, 0],
],
[
[1, 0, 0], [1, 0, 0], [1, 0, 0],
[1, 0, 0], [1, 0, 0], [1, 0, 0],
],
[
[0, 1, 0], [0, 1, 0], [0, 1, 0],
[0, 1, 0], [0, 1, 0], [0, 1, 0],
],
[
[0, -1, 0], [0, -1, 0], [0, -1, 0],
[0, -1, 0], [0, -1, 0], [0, -1, 0]
]
];
uv = [
[
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1],
],
[
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1],
],
[
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1],
],
[
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1],
],
[
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1],
],
[
[0, 0], [1, 0], [1, 1],
[0, 0], [1, 1], [0, 1]
]
];
VB = build();
} initModel(1);
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "d3d_cube_faces",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "mesh",
"path": "folders/functions/3d/mesh.yy",
},
}

View file

@ -0,0 +1,13 @@
function __3dGroup() constructor {
objects = [];
static _submit = function(callback, params = {}, shader = noone) {
for( var i = 0, n = array_length(objects); i < n; i++ )
callback(objects[i], params, shader);
}
static submitShader = function(params = {}) { _submit(function(_obj, params) { _obj.submitShader(params); }, params); }
static submitSel = function(params = {}) { _submit(function(_obj, params) { _obj.submitSel(params); }, params); }
static submitUI = function(params = {}, shader = noone) { _submit(function(_obj, params, shader) { _obj.submitUI(params, shader); }, params); }
static submit = function(params = {}, shader = noone) { _submit(function(_obj, params, shader) { _obj.submit(params, shader); }, params); }
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "d3d_group",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "3d",
"path": "folders/functions/3d.yy",
},
}

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "light",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/light.yy",
}, },
} }

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "light",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/light.yy",
}, },
} }

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "light",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/light.yy",
}, },
} }

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "util",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/util.yy",
}, },
} }

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "util",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/util.yy",
}, },
} }

View file

@ -26,10 +26,10 @@ function __3dObject() constructor {
rotation = new BBMOD_Quaternion(); rotation = new BBMOD_Quaternion();
scale = new __vec3(1, 1, 1); scale = new __vec3(1, 1, 1);
static build = function(_buffer = VB, _vertex = vertex, _normal = normals) { #region texture = -1;
if(_buffer != noone) vertex_delete_buffer(_buffer);
_buffer = vertex_create_buffer(); static buildVertex = function(_vertex, _normal, _uv) {
var _buffer = vertex_create_buffer();
vertex_begin(_buffer, VF); vertex_begin(_buffer, VF);
for( var i = 0, n = array_length(_vertex); i < n; i++ ) { for( var i = 0, n = array_length(_vertex); i < n; i++ ) {
var v = _vertex[i]; var v = _vertex[i];
@ -44,12 +44,13 @@ function __3dObject() constructor {
break; break;
case global.VF_POS_NORM_TEX_COL : case global.VF_POS_NORM_TEX_COL :
var nor = _normal[i]; var nor = _normal[i];
var cc = array_length(v) > 3? v[3] : c_white; var uuv = array_safe_get(_uv, i, [ 0, 0 ]);
var aa = array_length(v) > 4? v[4] : 1; var cc = array_length(v) > 3? v[3] : c_white;
var aa = array_length(v) > 4? v[4] : 1;
vertex_position_3d(_buffer, v[0], v[1], v[2]); vertex_position_3d(_buffer, v[0], v[1], v[2]);
vertex_normal(_buffer, nor[0], nor[1], nor[2]); vertex_normal(_buffer, nor[0], nor[1], nor[2]);
vertex_texcoord(_buffer, 0, 0); vertex_texcoord(_buffer, uuv[0], uuv[1]);
vertex_color(_buffer, cc, aa); vertex_color(_buffer, cc, aa);
break; break;
} }
@ -57,6 +58,24 @@ function __3dObject() constructor {
vertex_end(_buffer); vertex_end(_buffer);
return _buffer; return _buffer;
}
static build = function(_buffer = VB, _vertex = vertex, _normal = normals, _uv = uv) { #region
if(is_array(_buffer)) {
for( var i = 0, n = array_length(_buffer); i < n; i++ )
vertex_delete_buffer(_buffer[i])
} else if(_buffer != noone) vertex_delete_buffer(_buffer);
if(array_empty(_vertex)) return noone;
var _buffer_count = is_array(_vertex[0][0])? array_length(_vertex) : 0;
if(_buffer_count == 0) return buildVertex(_vertex, _normal, _uv);
var _res = array_create(_buffer_count);
for( var i = 0; i < _buffer_count; i++ )
_res[i] = buildVertex(_vertex[i], _normal[i], _uv[i]);
return _res;
} #endregion } #endregion
static preSubmitVertex = function(params = {}) {} static preSubmitVertex = function(params = {}) {}
@ -97,7 +116,11 @@ function __3dObject() constructor {
matrix_stack_push(sca); matrix_stack_push(sca);
matrix_set(matrix_world, matrix_stack_top()); matrix_set(matrix_world, matrix_stack_top());
vertex_submit(VB, render_type, -1); if(is_array(VB)) {
for( var i = 0, n = array_length(VB); i < n; i++ )
vertex_submit(VB[i], render_type, array_safe_get(texture, i, -1));
} else
vertex_submit(VB, render_type, texture);
matrix_stack_clear(); matrix_stack_clear();
matrix_set(matrix_world, matrix_build_identity()); matrix_set(matrix_world, matrix_build_identity());

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "util",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/util.yy",
}, },
} }

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "util",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/util.yy",
}, },
} }

View file

@ -157,6 +157,13 @@ function __vec3(_x = 0, _y = 0, _z = 0) constructor {
z = lerp(z, to.z, speed); z = lerp(z, to.z, speed);
} }
static _lerp_float = function(to, speed = 5, pre = 0.01) {
gml_pragma("forceinline");
x = lerp_float(x, to.x, speed, pre);
y = lerp_float(y, to.y, speed, pre);
z = lerp_float(z, to.z, speed, pre);
}
static equal = function(to) { static equal = function(to) {
gml_pragma("forceinline"); gml_pragma("forceinline");
return x == to.x && y == to.y && z == to.z; return x == to.x && y == to.y && z == to.z;

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "util",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/util.yy",
}, },
} }

View file

@ -153,6 +153,14 @@ function __vec4(_x = 0, _y = 0, _z = 0, _w = 0) constructor {
w = lerp(w, to.w, speed); w = lerp(w, to.w, speed);
} }
static _lerp_float = function(to, speed = 5, pre = 0.01) {
gml_pragma("forceinline");
x = lerp_float(x, to.x, speed, pre);
y = lerp_float(y, to.y, speed, pre);
z = lerp_float(z, to.z, speed, pre);
w = lerp_float(w, to.w, speed, pre);
}
static equal = function(to) { static equal = function(to) {
gml_pragma("forceinline"); gml_pragma("forceinline");
return x == to.x && y == to.y && z == to.z && w == to.w; return x == to.x && y == to.y && z == to.z && w == to.w;

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "3d", "name": "util",
"path": "folders/functions/3d.yy", "path": "folders/functions/3d/util.yy",
}, },
} }

View file

@ -1,23 +1,13 @@
/// @description lerp_float function lerp_float(from, to, speed, pre = 0.01) {
/// @param from
/// @param to
/// @param speed
/// @param *precision
function lerp_float(from, to, speed) {
if(fps < 15) return to; if(fps < 15) return to;
var pre = argument_count > 3? argument[3] : 0.01;
if(abs(from - to) < pre) if(abs(from - to) < pre) return to;
return to; return from + (to - from) * (1 - power(1 - 1 / speed, delta_time / 1000000 * game_get_speed(gamespeed_fps)));
else
return from + (to - from) * (1 - power(1 - 1 / speed, delta_time / 1000000 * game_get_speed(gamespeed_fps)));
} }
function lerp_linear(from, to, speed) { function lerp_linear(from, to, speed) {
if(abs(from - to) < speed) if(abs(from - to) < speed) return to;
return to; return from + sign(to - from) * speed;
else
return from + sign(to - from) * speed;
} }
function lerp_angle_direct(from, to, speed) { function lerp_angle_direct(from, to, speed) {
@ -38,3 +28,8 @@ function lerp_angle_linear(from, to, speed) {
function lerp_float_angle(from, to, ratio) { function lerp_float_angle(from, to, ratio) {
return from + angle_difference(to, from) * ratio; return from + angle_difference(to, from) * ratio;
} }
function lerp_color(from, to, ratio) {
if(abs(from - to) < 1) return to;
return merge_color(from, to, ratio);
}

View file

@ -92,7 +92,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
} }
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _shape = _data[1]; var _shape = _data[1];
switch(_shape) { switch(_shape) {

View file

@ -44,25 +44,25 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group)
static step = function() { static step = function() {
var _proj = inputs[| input_d3d_index + 3].getValue(); var _proj = inputs[| input_d3d_index + 3].getValue();
inputs[| input_d3d_index + 0].setVisible(_proj == 0);
inputs[| input_d3d_index + 8].setVisible(_proj == 1); inputs[| input_d3d_index + 8].setVisible(_proj == 1);
} }
static update = function(frame = PROJECT.animator.current_frame) { static processData = function(_output, _data, _output_index, _array_index = 0) { #region
setTransform(); var _pos = _data[0];
var _rot = _data[1];
var _pos = inputs[| 0].getValue(); var _fov = _data[input_d3d_index + 0];
var _rot = inputs[| 1].getValue(); var _clip = _data[input_d3d_index + 1];
var _dim = _data[input_d3d_index + 2];
var _fov = inputs[| input_d3d_index + 0].getValue(); var _proj = _data[input_d3d_index + 3];
var _clip = inputs[| input_d3d_index + 1].getValue(); var _scne = _data[input_d3d_index + 4];
var _dim = inputs[| input_d3d_index + 2].getValue(); var _ambt = _data[input_d3d_index + 5];
var _proj = inputs[| input_d3d_index + 3].getValue(); var _dbg = _data[input_d3d_index + 6];
var _scne = inputs[| input_d3d_index + 4].getValue(); var _back = _data[input_d3d_index + 7];
var _ambt = inputs[| input_d3d_index + 5].getValue(); var _orts = _data[input_d3d_index + 8];
var _dbg = inputs[| input_d3d_index + 6].getValue();
var _back = inputs[| input_d3d_index + 7].getValue();
var _orts = inputs[| input_d3d_index + 8].getValue();
setTransform(object, _data);
if(_scne == noone) return; if(_scne == noone) return;
camera.position.set(_pos[0], _pos[1], _pos[2]); camera.position.set(_pos[0], _pos[1], _pos[2]);
@ -71,17 +71,15 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group)
camera.setViewFov(_fov, _clip[0], _clip[1]); camera.setViewFov(_fov, _clip[0], _clip[1]);
if(_proj == 0) camera.setViewSize(_dim[0], _dim[1]); if(_proj == 0) camera.setViewSize(_dim[0], _dim[1]);
else if(_proj == 1) camera.setViewSize(_dim[0] / _orts, _dim[1] / _orts); else if(_proj == 1) camera.setViewSize(1 / _orts, _dim[0] / _dim[1] / _orts);
scene.lightAmbient = _ambt; scene.lightAmbient = _ambt;
var _outSurf = outputs[| 0].getValue(); _output = surface_verify(_output, _dim[0], _dim[1]);
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
outputs[| 0].setValue(_outSurf);
camera.setMatrix(); camera.setMatrix();
surface_set_target(_outSurf); surface_set_target(_output);
if(_dbg) draw_clear(_ambt); if(_dbg) draw_clear(_ambt);
else DRAW_CLEAR else DRAW_CLEAR
@ -99,40 +97,21 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group)
_scne.submit(scene); //////////////// SUBMIT //////////////// _scne.submit(scene); //////////////// SUBMIT ////////////////
surface_reset_target(); surface_reset_target();
gpu_set_cullmode(cull_noculling); gpu_set_cullmode(cull_noculling);
}
return _output;
} #endregion
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
} }
static submitShader = function(params = {}, shader = noone) { static getPreviewObject = function() {
object.submitShader(params, shader); var _scene = array_safe_get(all_inputs, input_d3d_index + 4, []);
_scene = array_safe_get(_scene, preview_index);
var _scne = inputs[| input_d3d_index + 4].getValue(); return [ object, _scene ];
if(_scne == noone) return;
_scne.submitShader(params, shader);
}
static submitUI = function(params = {}, shader = noone) {
object.submitUI(params, shader);
var _scne = inputs[| input_d3d_index + 4].getValue();
if(_scne == noone) return;
_scne.submitUI(params, shader);
}
static submit = function(params = {}, shader = noone) {
object.submit(params, shader);
var _scne = inputs[| input_d3d_index + 4].getValue();
if(_scne == noone) return;
_scne.submit(params, shader);
}
static submitSel = function(params = {}, shader = noone) {
object.submitSel(params, shader);
} }
static getPreviewObjectOutline = function() { return [ object ]; }
} }

View file

@ -18,7 +18,7 @@ function Node_3D_Depth(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
attribute_surface_depth(); attribute_surface_depth();
attribute_interpolation(); attribute_interpolation();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _tex = _data[0]; var _tex = _data[0];
var _dep = _data[1]; var _dep = _data[1];
var _rot = _data[2]; var _rot = _data[2];

View file

@ -102,7 +102,7 @@ function Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
inputs[| 13].setVisible(_proj); inputs[| 13].setVisible(_proj);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(_output_index == 1) return undefined; if(_output_index == 1) return undefined;
if(_output_index == 3) return vertexObjects; if(_output_index == 3) return vertexObjects;

View file

@ -434,7 +434,7 @@ function Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
textures = []; textures = [];
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(mesh_generating) return; if(mesh_generating) return;
if(_output_index == 3) return vertexObjects; if(_output_index == 3) return vertexObjects;

View file

@ -1,17 +1,20 @@
function Node_3D_Light_Directional(_x, _y, _group = noone) : Node_3D_Light(_x, _y, _group) constructor { function Node_3D_Light_Directional(_x, _y, _group = noone) : Node_3D_Light(_x, _y, _group) constructor {
name = "Directional Light"; name = "Directional Light";
object = new __3dLightDirectional();
input_display_list = [ input_display_list = [
["Transform", false], 0, ["Transform", false], 0,
__d3d_input_list_light, __d3d_input_list_light,
] ]
static update = function(frame = PROJECT.animator.current_frame) { static processData = function(_output, _data, _output_index, _array_index = 0) {
setTransform(); var object = new __3dLightDirectional();
setLight();
setTransform(object, _data);
setLight(object, _data);
var _rot = new __rot3().lookAt(object.position, new __vec3()); var _rot = new __rot3().lookAt(object.position, new __vec3());
object.rotation.FromEuler(_rot.x, _rot.y, _rot.z); object.rotation.FromEuler(_rot.x, _rot.y, _rot.z);
return object;
} }
} }

View file

@ -1,6 +1,5 @@
function Node_3D_Light_Point(_x, _y, _group = noone) : Node_3D_Light(_x, _y, _group) constructor { function Node_3D_Light_Point(_x, _y, _group = noone) : Node_3D_Light(_x, _y, _group) constructor {
name = "Point Light"; name = "Point Light";
object = new __3dLightPoint();
inputs[| input_light_index + 0] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4) inputs[| input_light_index + 0] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4)
@ -9,11 +8,15 @@ function Node_3D_Light_Point(_x, _y, _group = noone) : Node_3D_Light(_x, _y, _gr
__d3d_input_list_light, input_light_index, __d3d_input_list_light, input_light_index,
] ]
static update = function(frame = PROJECT.animator.current_frame) { static processData = function(_output, _data, _output_index, _array_index = 0) {
setTransform(); var object = new __3dLightPoint();
setLight();
setTransform(object, _data);
setLight(object, _data);
var _rad = inputs[| input_light_index + 0].getValue(); var _rad = inputs[| input_light_index + 0].getValue();
object.radius = _rad; object.radius = _rad;
return object;
} }
} }

View file

@ -1,9 +1,63 @@
function Node_3D_Mesh_Cube(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) constructor { function Node_3D_Mesh_Cube(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) constructor {
name = "3D Cube"; name = "3D Cube";
object = new __3dCube();
inputs[| input_mesh_index + 0] = nodeValue("Texture per side", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false );
inputs[| input_mesh_index + 1] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
inputs[| input_mesh_index + 2] = nodeValue("Texture 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
inputs[| input_mesh_index + 3] = nodeValue("Texture 3", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
inputs[| input_mesh_index + 4] = nodeValue("Texture 4", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
inputs[| input_mesh_index + 5] = nodeValue("Texture 5", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
inputs[| input_mesh_index + 6] = nodeValue("Texture 6", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
input_display_list = [ input_display_list = [
__d3d_input_list_mesh, __d3d_input_list_mesh,
__d3d_input_list_transform, __d3d_input_list_transform,
["Texture", false], input_mesh_index + 0, input_mesh_index + 1, input_mesh_index + 2, input_mesh_index + 3,
input_mesh_index + 4, input_mesh_index + 5, input_mesh_index + 6,
] ]
static step = function() { #region
var _tex_side = inputs[| input_mesh_index + 0].getValue();
inputs[| input_mesh_index + 1].name = _tex_side? "Texture 1" : "Texture";
inputs[| input_mesh_index + 1].setVisible(true, true);
inputs[| input_mesh_index + 2].setVisible(_tex_side, _tex_side);
inputs[| input_mesh_index + 3].setVisible(_tex_side, _tex_side);
inputs[| input_mesh_index + 4].setVisible(_tex_side, _tex_side);
inputs[| input_mesh_index + 5].setVisible(_tex_side, _tex_side);
inputs[| input_mesh_index + 6].setVisible(_tex_side, _tex_side);
} #endregion
static processData = function(_output, _data, _output_index, _array_index = 0) { #region
var _tex_side = _data[input_mesh_index + 0];
var _tex_1 = _data[input_mesh_index + 1];
var _tex_2 = _data[input_mesh_index + 2];
var _tex_3 = _data[input_mesh_index + 3];
var _tex_4 = _data[input_mesh_index + 4];
var _tex_5 = _data[input_mesh_index + 5];
var _tex_6 = _data[input_mesh_index + 6];
var object;
if(_tex_side) {
object = new __3dCubeFaces();
object.texture = [ surface_texture(_tex_1), surface_texture(_tex_2),
surface_texture(_tex_3), surface_texture(_tex_4),
surface_texture(_tex_5), surface_texture(_tex_6) ];
} else {
object = new __3dCube();
object.texture = surface_texture(_tex_1);
}
setTransform(object, _data);
return object;
} #endregion
static getPreviewValues = function() { return array_safe_get(all_inputs, input_mesh_index + 1, noone); }
} }

View file

@ -140,7 +140,7 @@ function Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
_3d_clear_local_transform(); _3d_clear_local_transform();
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(_output_index == 2) return vertexObjects; if(_output_index == 2) return vertexObjects;
if(!is_surface(_data[0])) return _outSurf; if(!is_surface(_data[0])) return _outSurf;

View file

@ -145,7 +145,7 @@ function Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
_3d_clear_local_transform(); _3d_clear_local_transform();
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(_output_index == 3) return vertexObjects; if(_output_index == 3) return vertexObjects;
var _sides = _data[14]; var _sides = _data[14];

View file

@ -102,7 +102,7 @@ function Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
_3d_clear_local_transform(); _3d_clear_local_transform();
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(_output_index == 1) return undefined; if(_output_index == 1) return undefined;
if(_output_index == 3) return vertexObjects; if(_output_index == 3) return vertexObjects;

View file

@ -166,7 +166,7 @@ function Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
_3d_clear_local_transform(); _3d_clear_local_transform();
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(_output_index == 3) return vertexObjects; if(_output_index == 3) return vertexObjects;
var _sides = _data[0]; var _sides = _data[0];

View file

@ -157,7 +157,7 @@ function Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
_3d_clear_local_transform(); _3d_clear_local_transform();
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(_output_index == 3) return vertexObjects; if(_output_index == 3) return vertexObjects;
var _subd = _data[0]; var _subd = _data[0];

View file

@ -1,10 +1,7 @@
function Node_3D_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor { function Node_3D_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor {
name = "3D Scene"; name = "3D Scene";
//inputs[| 0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, []) outputs[| 0] = nodeValue("Scene", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Scene, noone);
// .setVisible(true, true);
outputs[| 0] = nodeValue("Scene", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Scene, self);
setIsDynamicInput(1); setIsDynamicInput(1);
@ -42,26 +39,18 @@ function Node_3D_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constru
refreshDynamicInput(); refreshDynamicInput();
} }
static update = function(frame = PROJECT.animator.current_frame) { static processData = function(_output, _data, _output_index, _array_index = 0) {
object_lists = []; var _scene = new __3dGroup();
for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i += data_length ) { for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i += data_length ) {
var _obj = inputs[| i].getValue(); var _obj = _data[i];
if(_obj == noone) continue; if(_obj == noone) continue;
array_push(object_lists, _obj); array_push(_scene.objects, _obj);
} }
}
static _submit = function(callback, params = {}, shader = noone) { return _scene;
for( var i = 0, n = array_length(object_lists); i < n; i++ )
callback(object_lists[i], params, shader);
} }
static submitShader = function(params = {}) { _submit(function(_obj, params) { _obj.submitShader(params); }, params); }
static submitSel = function(params = {}) { _submit(function(_obj, params) { _obj.submitSel(params); }, params); }
static submitUI = function(params = {}, shader = noone) { _submit(function(_obj, params, shader) { _obj.submitUI(params, shader); }, params); }
static submit = function(params = {}, shader = noone) { _submit(function(_obj, params, shader) { _obj.submit(params, shader); }, params); }
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {} static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {}
} }

View file

@ -90,7 +90,7 @@ function Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
inputs[| 13].setVisible(_proj); inputs[| 13].setVisible(_proj);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(_output_index == 1) return undefined; if(_output_index == 1) return undefined;
var _dim = _data[0]; var _dim = _data[0];

View file

@ -110,7 +110,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
} }
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _inSurf = _data[0]; var _inSurf = _data[0];
var _dim = _data[1]; var _dim = _data[1];
var _splice = _data[2]; var _splice = _data[2];

View file

@ -16,7 +16,7 @@ function Node_FFT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const
outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, []) outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [])
.setArrayDepth(1); .setArrayDepth(1);
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _dat = _data[0]; var _dat = _data[0];
var _pre = _data[1]; var _pre = _data[1];
var _cmp = []; var _cmp = [];

View file

@ -15,7 +15,7 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
surface_set_shader(_outSurf, sh_FXAA); surface_set_shader(_outSurf, sh_FXAA);
gpu_set_tex_filter(true); gpu_set_tex_filter(true);
shader_set_f("dimension", surface_get_width(_data[0]), surface_get_height(_data[0])); shader_set_f("dimension", surface_get_width(_data[0]), surface_get_height(_data[0]));

View file

@ -31,7 +31,7 @@ function Node_VCT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const
array_append(input_display_list, [ index ]); array_append(input_display_list, [ index ]);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
for( var i = 1; i < array_length(_data); i++ ) for( var i = 1; i < array_length(_data); i++ )
vct[$ inputs[| i].extra_data.key].setDirect(_data[i]); vct[$ inputs[| i].extra_data.key].setDirect(_data[i]);

View file

@ -23,7 +23,7 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;

View file

@ -20,7 +20,7 @@ function Node_Alpha_Hash(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;

View file

@ -14,7 +14,7 @@ function Node_Alpha_Grey(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;

View file

@ -14,7 +14,7 @@ function Node_Anim_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
outputs[| 0] = nodeValue("Curve", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, []); outputs[| 0] = nodeValue("Curve", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, []);
static process_data = function(_output, _data, _output_index, _array_index = 0) { static processData = function(_output, _data, _output_index, _array_index = 0) {
var curve = _data[0]; var curve = _data[0];
var time = _data[1]; var time = _data[1];
var _min = _data[2]; var _min = _data[2];

View file

@ -42,7 +42,7 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny);
} }
static process_data = function(_output, _data, _output_index, _array_index = 0) { static processData = function(_output, _data, _output_index, _array_index = 0) {
return [_data[0][0], _data[0][1], _data[1][0], _data[1][1], _data[2]]; return [_data[0][0], _data[0][1], _data[1][0], _data[1][1], _data[2]];
} }

View file

@ -770,7 +770,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
} }
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(_output_index == 1) return atlas_data; if(_output_index == 1) return atlas_data;
if(_output_index == 2) return bind_data; if(_output_index == 2) return bind_data;
if(_output_index == 0 && _array_index == 0) { if(_output_index == 0 && _array_index == 0) {

View file

@ -14,7 +14,7 @@ function Node_Atlas(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;

View file

@ -26,7 +26,7 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
colors = []; colors = [];
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var inSurf = _data[0]; var inSurf = _data[0];
if(!is_surface(inSurf)) return _outSurf; if(!is_surface(inSurf)) return _outSurf;

View file

@ -14,7 +14,7 @@ function Node_Base_Convert(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "");
static process_data = function(_output, _data, _output_index, _array_index = 0) { static processData = function(_output, _data, _output_index, _array_index = 0) {
var val = _data[0]; var val = _data[0];
var bFrom = max(2, _data[1]); var bFrom = max(2, _data[1]);
var bTo = max(2, _data[2]); var bTo = max(2, _data[2]);

View file

@ -55,7 +55,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
inputs[| 2].drawOverlay(active, _x + _pw, _y + _ph, _s, _mx, _my, _snx, _sny); inputs[| 2].drawOverlay(active, _x + _pw, _y + _ph, _s, _mx, _my, _snx, _sny);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _hei = _data[1]; var _hei = _data[1];
var _shf = _data[2]; var _shf = _data[2];
var _sca = _data[3]; var _sca = _data[3];

View file

@ -50,7 +50,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
temp_surface = [ surface_create(1, 1) ]; temp_surface = [ surface_create(1, 1) ];
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _back = _data[0]; var _back = _data[0];
var _fore = _data[1]; var _fore = _data[1];
var _type = _data[2]; var _type = _data[2];

View file

@ -28,7 +28,7 @@ function Node_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
temp_surface = [ surface_create( 1, 1 ) ]; temp_surface = [ surface_create( 1, 1 ) ];
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
//var _surf = _data[0]; //var _surf = _data[0];
//var _mask = _data[1]; //var _mask = _data[1];
//var _seed = _data[2]; //var _seed = _data[2];

View file

@ -39,7 +39,7 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
surface_blur_init(); surface_blur_init();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _size = _data[1]; var _size = _data[1];
var _tole = _data[2]; var _tole = _data[2];
var _stre = _data[3]; var _stre = _data[3];

View file

@ -31,7 +31,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
attribute_oversample(); attribute_oversample();
surface_blur_init(); surface_blur_init();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _size = _data[1]; var _size = _data[1];
var _clamp = struct_try_get(attributes, "oversample"); var _clamp = struct_try_get(attributes, "oversample");
var _isovr = _data[3]; var _isovr = _data[3];

View file

@ -27,7 +27,7 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _str = _data[1]; var _str = _data[1];
var _mask = _data[2]; var _mask = _data[2];
var _mix = _data[3]; var _mix = _data[3];

View file

@ -34,7 +34,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _surf = _data[0]; var _surf = _data[0];
var _size = _data[1]; var _size = _data[1];
var _tres = _data[2]; var _tres = _data[2];

View file

@ -40,7 +40,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y,
inputs[| 2].drawOverlay(active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny); inputs[| 2].drawOverlay(active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _str = _data[1]; var _str = _data[1];
var _dir = _data[2]; var _dir = _data[2];
var _mask = _data[3]; var _mask = _data[3];

View file

@ -41,7 +41,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
inputs[| 2].drawOverlay(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) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _str = _data[1]; var _str = _data[1];
var _cen = _data[2]; var _cen = _data[2];
var _mask = _data[4]; var _mask = _data[4];

View file

@ -42,7 +42,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
attribute_oversample(); attribute_oversample();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(!is_surface(_data[0])) return _outSurf; if(!is_surface(_data[0])) return _outSurf;
var _size = _data[1]; var _size = _data[1];
var _samp = struct_try_get(attributes, "oversample"); var _samp = struct_try_get(attributes, "oversample");

View file

@ -44,7 +44,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
inputs[| 2].drawOverlay(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) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _str = _data[1]; var _str = _data[1];
var _cen = _data[2]; var _cen = _data[2];
var _sam = struct_try_get(attributes, "oversample"); var _sam = struct_try_get(attributes, "oversample");

View file

@ -25,7 +25,7 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
["Display", false], 1, 2, ["Display", false], 1, 2,
] ]
static process_data = function(_output, _data, _output_index, _array_index = 0) { static processData = function(_output, _data, _output_index, _array_index = 0) {
return _data[0]; return _data[0];
} }

View file

@ -30,7 +30,7 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _exp = _data[1]; var _exp = _data[1];
var _con = _data[2]; var _con = _data[2];
surface_set_target(_outSurf); surface_set_target(_outSurf);

View file

@ -93,7 +93,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
refreshDynamicInput(); refreshDynamicInput();
} }
static getPreviewValue = function() { return inputs[| 0]; } static getPreviewValues = function() { return inputs[| 0].getValue(); }
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
if(array_length(current_data) == 0) return; if(array_length(current_data) == 0) return;
@ -117,7 +117,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
draw_rectangle_dashed(x0, y0, x1, y1); draw_rectangle_dashed(x0, y0, x1, y1);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(!is_surface(_data[0])) return; if(!is_surface(_data[0])) return;
var _area = _data[1]; var _area = _data[1];
var _zoom = _data[2]; var _zoom = _data[2];

View file

@ -408,8 +408,6 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
mouse_holding = false; mouse_holding = false;
//static getPreviewValue = function() { return key_mod_press(ALT)? outputs[| 0] : noone; }
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
mouse_cur_x = round((_mx - _x) / _s - 0.5); mouse_cur_x = round((_mx - _x) / _s - 0.5);
mouse_cur_y = round((_my - _y) / _s - 0.5); mouse_cur_y = round((_my - _y) / _s - 0.5);

View file

@ -15,7 +15,7 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, output_index) { static processData = function(_outSurf, _data, output_index) {
var _out = _data[1]; var _out = _data[1];
var _alp = _data[2]; var _alp = _data[2];

View file

@ -13,7 +13,7 @@ function Node_HSV_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, output_index) { static processData = function(_outSurf, _data, output_index) {
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;

View file

@ -45,7 +45,7 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _dim = _data[0]; var _dim = _data[0];
var _amo = _data[1]; var _amo = _data[1];
var _ang = _data[2]; var _ang = _data[2];

View file

@ -31,7 +31,7 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x,
inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var center = _data[1]; var center = _data[1];
var stren = _data[2]; var stren = _data[2];

View file

@ -7,7 +7,7 @@ function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white); outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white);
static process_data = function(_output, _data, _output_index, _array_index = 0) { static processData = function(_output, _data, _output_index, _array_index = 0) {
return _data[0]; return _data[0];
} }

View file

@ -82,7 +82,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
outputs[| 1].setVisible(type == 1, type == 1); outputs[| 1].setVisible(type == 1, type == 1);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _bri = _data[1]; var _bri = _data[1];
var _con = _data[2]; var _con = _data[2];
var _hue = _data[3]; var _hue = _data[3];

View file

@ -19,7 +19,7 @@ function Node_Color_Data(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
outputs[| 6] = nodeValue("Brightness", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); outputs[| 6] = nodeValue("Brightness", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0);
static process_data = function(_output, _data, _output_index, _array_index = 0) { static processData = function(_output, _data, _output_index, _array_index = 0) {
var _c = _data[0]; var _c = _data[0];
var _n = _data[1]; var _n = _data[1];

View file

@ -22,7 +22,7 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
input_display_list = [ 3, 0, 1, 2 ]; input_display_list = [ 3, 0, 1, 2 ];
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var nor = _data[3]; var nor = _data[3];
return make_color_hsv( return make_color_hsv(

View file

@ -48,7 +48,7 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
} }
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var nor = _data[3]; var nor = _data[3];
if(!is_real(_data[0])) return 0; if(!is_real(_data[0])) return 0;
if(!is_real(_data[1])) return 0; if(!is_real(_data[1])) return 0;

View file

@ -18,7 +18,7 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
input_display_list = [ 3, 0, 1, 2 ]; input_display_list = [ 3, 0, 1, 2 ];
static process_data = function(_output, _data, _output_index, _array_index = 0) { static processData = function(_output, _data, _output_index, _array_index = 0) {
switch(_data[3]) { switch(_data[3]) {
case 0 : return merge_color(_data[0], _data[1], _data[2]); case 0 : return merge_color(_data[0], _data[1], _data[2]);
case 1 : case 1 :

View file

@ -48,7 +48,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var fr = _data[1]; var fr = _data[1];
var to = _data[2]; var to = _data[2];
var tr = _data[3]; var tr = _data[3];

View file

@ -35,7 +35,7 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var frm = _data[1]; var frm = _data[1];
var thr = _data[2]; var thr = _data[2];
var inv = _data[6]; var inv = _data[6];

View file

@ -166,7 +166,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
inputs[| 2].setValue(palette); inputs[| 2].setValue(palette);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var fr = _data[1]; var fr = _data[1];
var to = _data[2]; var to = _data[2];
var tr = _data[3]; var tr = _data[3];

View file

@ -13,7 +13,7 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white); outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white);
static getPreviewValue = function() { return inputs[| 0]; } static getPreviewValues = function() { return inputs[| 0].getValue(); }
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);
@ -45,7 +45,7 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
draw_rectangle(x0, y0, x1, y1, true); draw_rectangle(x0, y0, x1, y1, true);
} }
static process_data = function(_output, _data, _output_index, _array_index = 0) { static processData = function(_output, _data, _output_index, _array_index = 0) {
var _surf = _data[0]; var _surf = _data[0];
var _pos = _data[1]; var _pos = _data[1];
var _sam = _data[2]; var _sam = _data[2];

View file

@ -35,7 +35,7 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _gra = _data[1]; var _gra = _data[1];
var _gra_shift = _data[2]; var _gra_shift = _data[2];
var _alpha = _data[6]; var _alpha = _data[6];

View file

@ -14,7 +14,7 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _h = _data[0]; var _h = _data[0];
var _s = _data[1]; var _s = _data[1];
var _v = _data[2]; var _v = _data[2];

View file

@ -27,7 +27,7 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _r = _data[0]; var _r = _data[0];
var _g = _data[1]; var _g = _data[1];
var _b = _data[2]; var _b = _data[2];

View file

@ -743,7 +743,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
inputs[| 2].setVisible(_dim_type == COMPOSE_OUTPUT_SCALING.constant); inputs[| 2].setVisible(_dim_type == COMPOSE_OUTPUT_SCALING.constant);
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
if(_output_index == 1) return atlas_data; if(_output_index == 1) return atlas_data;
if(_output_index == 0 && _array_index == 0) atlas_data = []; if(_output_index == 0 && _array_index == 0) atlas_data = [];

View file

@ -32,7 +32,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
attribute_oversample(); attribute_oversample();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _ker = _data[1]; var _ker = _data[1];
var _sam = struct_try_get(attributes, "oversample"); var _sam = struct_try_get(attributes, "oversample");

View file

@ -29,7 +29,7 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var wd = _data[1]; var wd = _data[1];
var temp = surface_create_valid(surface_get_width(_data[0]), surface_get_height(_data[0]), attrDepth()); var temp = surface_create_valid(surface_get_width(_data[0]), surface_get_height(_data[0]), attrDepth());

View file

@ -26,7 +26,7 @@ function Node_Counter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
inputs[| 0].setVisible(mode == 0); inputs[| 0].setVisible(mode == 0);
} }
static process_data = function(_output, _data, _output_index, _array_index = 0) { static processData = function(_output, _data, _output_index, _array_index = 0) {
var time = PROJECT.animator.current_frame; var time = PROJECT.animator.current_frame;
var mode = _data[2]; var mode = _data[2];
var val = 0; var val = 0;

View file

@ -24,7 +24,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
drag_my = 0; drag_my = 0;
drag_sv = 0; drag_sv = 0;
static getPreviewValue = function() { return inputs[| 0]; } static getPreviewValues = function() { return inputs[| 0].getValue(); }
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
if(array_length(current_data) < 2) return; if(array_length(current_data) < 2) return;
@ -107,7 +107,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
} }
} }
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _inSurf = _data[0]; var _inSurf = _data[0];
var _crop = _data[1]; var _crop = _data[1];
var _dim = [ surface_get_width(_inSurf) - _crop[0] - _crop[2], surface_get_height(_inSurf) - _crop[1] - _crop[3] ]; var _dim = [ surface_get_width(_inSurf) - _crop[0] - _crop[2], surface_get_height(_inSurf) - _crop[1] - _crop[3] ];

View file

@ -41,7 +41,7 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _wcur = _data[1]; var _wcur = _data[1];
var _rcur = _data[2]; var _rcur = _data[2];
var _gcur = _data[3]; var _gcur = _data[3];

View file

@ -1261,17 +1261,13 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
} }
} #endregion } #endregion
static getPreviewValue = function() { #region static getPreviewValues = function() { #region
if(preview_channel > ds_list_size(outputs)) return noone; if(preview_channel > ds_list_size(outputs)) return noone;
return outputs[| preview_channel]; return outputs[| preview_channel].getValue();
} #endregion } #endregion
static getPreviewBoundingBox = function() { #region static getPreviewBoundingBox = function() { #region
var _node = getPreviewValue(); var _surf = getPreviewValues();
if(_node == undefined) return noone;
if(_node.type != VALUE_TYPE.surface) return noone;
var _surf = _node.getValue();
if(is_array(_surf)) if(is_array(_surf))
_surf = array_safe_get(_surf, preview_index, noone); _surf = array_safe_get(_surf, preview_index, noone);
if(!is_surface(_surf)) return noone; if(!is_surface(_surf)) return noone;

View file

@ -17,7 +17,7 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
surface_set_shader(_outSurf, sh_de_corner); surface_set_shader(_outSurf, sh_de_corner);
shader_set_f("dimension", [ surface_get_width(_data[0]), surface_get_height(_data[0]) ]); shader_set_f("dimension", [ surface_get_width(_data[0]), surface_get_height(_data[0]) ]);
shader_set_f("tolerance", _data[2]); shader_set_f("tolerance", _data[2]);

View file

@ -17,7 +17,7 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
attribute_surface_depth(); attribute_surface_depth();
static process_data = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
surface_set_shader(_outSurf, sh_de_stray); surface_set_shader(_outSurf, sh_de_stray);
shader_set_dim("dimension", _data[0]); shader_set_dim("dimension", _data[0]);
shader_set_f("tolerance", _data[1]); shader_set_f("tolerance", _data[1]);

Some files were not shown because too many files have changed in this diff Show more