Array sort, Custom addon

This commit is contained in:
Tanasart 2023-04-23 16:47:33 +02:00
parent 830b60eed1
commit 1e69f88a70
506 changed files with 46791 additions and 53 deletions

10
.gitignore vendored
View file

@ -3,3 +3,13 @@ datafiles/data/themes/default
options
options/extensions
options/mac
datafiles/data/BBMOD
scripts/BBMOD*
scripts/bbmod*
scripts/__bbmod*
shaders/BBMOD*
shaders/__BBMOD*
sprites/BBMOD*

View file

@ -1,6 +1,9 @@
{
"FolderOrderSettings": [
{"name":"_Extensions","order":9,"path":"folders/_Extensions.yy",},
{"name":"MAC","order":7,"path":"folders/_Extensions/MAC.yy",},
{"name":"addons","order":11,"path":"folders/addons.yy",},
{"name":"custom","order":4,"path":"folders/addons/custom.yy",},
{"name":"key displayer","order":2,"path":"folders/addons/key displayer.yy",},
{"name":"animation_curve","order":10,"path":"folders/animation_curve.yy",},
{"name":"dialog","order":4,"path":"folders/dialog.yy",},
@ -12,8 +15,6 @@
{"name":"menu","order":10,"path":"folders/dialog/menu.yy",},
{"name":"preview","order":7,"path":"folders/dialog/preview.yy",},
{"name":"widget","order":9,"path":"folders/dialog/widget.yy",},
{"name":"_Extensions","order":9,"path":"folders/_Extensions.yy",},
{"name":"MAC","order":7,"path":"folders/_Extensions/MAC.yy",},
{"name":"font","order":7,"path":"folders/font.yy",},
{"name":"functions","order":6,"path":"folders/functions.yy",},
{"name":"animation","order":19,"path":"folders/functions/animation.yy",},
@ -143,9 +144,58 @@
{"name":"sprites","order":12,"path":"folders/sprites.yy",},
{"name":"gameframe","order":2,"path":"folders/sprites/gameframe.yy",},
{"name":"widgets","order":5,"path":"folders/widgets.yy",},
{"name":"custom","order":4,"path":"folders/addons/custom.yy",},
{"name":"for sort","order":5,"path":"folders/nodes/data/iterate/for sort.yy",},
{"name":"BBMOD","order":9,"path":"folders/_Extensions/BBMOD.yy",},
{"name":"ColMesh","order":1,"path":"folders/_Extensions/BBMOD/ColMesh.yy",},
{"name":"Core","order":2,"path":"folders/_Extensions/BBMOD/Core.yy",},
{"name":"Animation","order":1,"path":"folders/_Extensions/BBMOD/Core/Animation.yy",},
{"name":"Batching","order":2,"path":"folders/_Extensions/BBMOD/Core/Batching.yy",},
{"name":"Camera","order":3,"path":"folders/_Extensions/BBMOD/Core/Camera.yy",},
{"name":"Debug","order":4,"path":"folders/_Extensions/BBMOD/Core/Debug.yy",},
{"name":"DefaultRenderer","order":5,"path":"folders/_Extensions/BBMOD/Core/DefaultRenderer.yy",},
{"name":"Deprecated","order":1,"path":"folders/_Extensions/BBMOD/Core/DefaultRenderer/Deprecated.yy",},
{"name":"Shaders","order":2,"path":"folders/_Extensions/BBMOD/Core/DefaultRenderer/Shaders.yy",},
{"name":"Sprites","order":3,"path":"folders/_Extensions/BBMOD/Core/DefaultRenderer/Sprites.yy",},
{"name":"Exceptions","order":6,"path":"folders/_Extensions/BBMOD/Core/Exceptions.yy",},
{"name":"Interfaces","order":7,"path":"folders/_Extensions/BBMOD/Core/Interfaces.yy",},
{"name":"Lights","order":8,"path":"folders/_Extensions/BBMOD/Core/Lights.yy",},
{"name":"Math","order":9,"path":"folders/_Extensions/BBMOD/Core/Math.yy",},
{"name":"Model","order":10,"path":"folders/_Extensions/BBMOD/Core/Model.yy",},
{"name":"Properties","order":11,"path":"folders/_Extensions/BBMOD/Core/Properties.yy",},
{"name":"Rendering","order":12,"path":"folders/_Extensions/BBMOD/Core/Rendering.yy",},
{"name":"Utils","order":13,"path":"folders/_Extensions/BBMOD/Core/Utils.yy",},
{"name":"Gizmo","order":3,"path":"folders/_Extensions/BBMOD/Gizmo.yy",},
{"name":"OBJImporter","order":4,"path":"folders/_Extensions/BBMOD/OBJImporter.yy",},
{"name":"Particles","order":5,"path":"folders/_Extensions/BBMOD/Particles.yy",},
{"name":"Modules","order":1,"path":"folders/_Extensions/BBMOD/Particles/Modules.yy",},
{"name":"Collision","order":1,"path":"folders/_Extensions/BBMOD/Particles/Modules/Collision.yy",},
{"name":"Emission","order":2,"path":"folders/_Extensions/BBMOD/Particles/Modules/Emission.yy",},
{"name":"Shape","order":1,"path":"folders/_Extensions/BBMOD/Particles/Modules/Emission/Shape.yy",},
{"name":"Event","order":3,"path":"folders/_Extensions/BBMOD/Particles/Modules/Event.yy",},
{"name":"Kill","order":4,"path":"folders/_Extensions/BBMOD/Particles/Modules/Kill.yy",},
{"name":"Physics","order":5,"path":"folders/_Extensions/BBMOD/Particles/Modules/Physics.yy",},
{"name":"Rotation","order":6,"path":"folders/_Extensions/BBMOD/Particles/Modules/Rotation.yy",},
{"name":"Universal","order":7,"path":"folders/_Extensions/BBMOD/Particles/Modules/Universal.yy",},
{"name":"AddPropertyOnCollision","order":1,"path":"folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOnCollision.yy",},
{"name":"AddPropertyOverTime","order":2,"path":"folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOverTime.yy",},
{"name":"MixProperty","order":3,"path":"folders/_Extensions/BBMOD/Particles/Modules/Universal/MixProperty.yy",},
{"name":"MixPropertyFromHealth","order":4,"path":"folders/_Extensions/BBMOD/Particles/Modules/Universal/MixPropertyFromHealth.yy",},
{"name":"MixPropertyFromSpeed","order":5,"path":"folders/_Extensions/BBMOD/Particles/Modules/Universal/MixPropertyFromSpeed.yy",},
{"name":"MixPropertyOverTime","order":6,"path":"folders/_Extensions/BBMOD/Particles/Modules/Universal/MixPropertyOverTime.yy",},
{"name":"SetProperty","order":7,"path":"folders/_Extensions/BBMOD/Particles/Modules/Universal/SetProperty.yy",},
{"name":"Velocity","order":8,"path":"folders/_Extensions/BBMOD/Particles/Modules/Velocity.yy",},
{"name":"Raycasting","order":6,"path":"folders/_Extensions/BBMOD/Raycasting.yy",},
{"name":"Rendering","order":7,"path":"folders/_Extensions/BBMOD/Rendering.yy",},
{"name":"FXAA","order":1,"path":"folders/_Extensions/BBMOD/Rendering/FXAA.yy",},
{"name":"PostProcessing","order":2,"path":"folders/_Extensions/BBMOD/Rendering/PostProcessing.yy",},
{"name":"Sky","order":3,"path":"folders/_Extensions/BBMOD/Rendering/Sky.yy",},
{"name":"SSAO","order":4,"path":"folders/_Extensions/BBMOD/Rendering/SSAO.yy",},
{"name":"Save","order":8,"path":"folders/_Extensions/BBMOD/Save.yy",},
{"name":"StateMachine","order":9,"path":"folders/_Extensions/BBMOD/StateMachine.yy",},
{"name":"Terrain","order":10,"path":"folders/_Extensions/BBMOD/Terrain.yy",},
],
"ResourceOrderSettings": [
{"name":"__bbmod_path","order":4,"path":"scripts/__bbmod_path/__bbmod_path.yy",},
{"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",},
{"name":"sh_cell_noise_crystal","order":23,"path":"shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.yy",},
{"name":"panel_function","order":2,"path":"scripts/panel_function/panel_function.yy",},
@ -180,15 +230,19 @@
{"name":"s_node_fluidSim_turbulence","order":10,"path":"sprites/s_node_fluidSim_turbulence/s_node_fluidSim_turbulence.yy",},
{"name":"node_blur_radial","order":7,"path":"scripts/node_blur_radial/node_blur_radial.yy",},
{"name":"node_2d_light","order":1,"path":"scripts/node_2d_light/node_2d_light.yy",},
{"name":"BBMOD_SprDefaultSpecularColor","order":2,"path":"sprites/BBMOD_SprDefaultSpecularColor/BBMOD_SprDefaultSpecularColor.yy",},
{"name":"BBMOD_DefaultLightmapMaterial","order":5,"path":"scripts/BBMOD_DefaultLightmapMaterial/BBMOD_DefaultLightmapMaterial.yy",},
{"name":"node_rigid_activation","order":7,"path":"scripts/node_rigid_activation/node_rigid_activation.yy",},
{"name":"s_node_image_gif","order":7,"path":"sprites/s_node_image_gif/s_node_image_gif.yy",},
{"name":"node_VFX_effect_wind","order":5,"path":"scripts/node_VFX_effect_wind/node_VFX_effect_wind.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":"BBMOD_ShDefaultSprite","order":8,"path":"shaders/BBMOD_ShDefaultSprite/BBMOD_ShDefaultSprite.yy",},
{"name":"s_node_3d_obj","order":3,"path":"sprites/s_node_3d_obj/s_node_3d_obj.yy",},
{"name":"s_node_scale","order":6,"path":"sprites/s_node_scale/s_node_scale.yy",},
{"name":"sh_color_picker_value","order":32,"path":"shaders/sh_color_picker_value/sh_color_picker_value.yy",},
{"name":"textInput","order":24,"path":"scripts/textInput/textInput.yy",},
{"name":"BBMOD_Renderer","order":2,"path":"scripts/BBMOD_Renderer/BBMOD_Renderer.yy",},
{"name":"node_dither","order":7,"path":"scripts/node_dither/node_dither.yy",},
{"name":"sh_perlin_smear","order":7,"path":"shaders/sh_perlin_smear/sh_perlin_smear.yy",},
{"name":"node_path_blend","order":2,"path":"scripts/node_path_blend/node_path_blend.yy",},
@ -196,6 +250,7 @@
{"name":"sh_corner","order":20,"path":"shaders/sh_corner/sh_corner.yy",},
{"name":"node_array","order":8,"path":"scripts/node_array/node_array.yy",},
{"name":"pack_corner","order":3,"path":"scripts/pack_corner/pack_corner.yy",},
{"name":"BBMOD_SphereEmissionModule","order":1,"path":"scripts/BBMOD_SphereEmissionModule/BBMOD_SphereEmissionModule.yy",},
{"name":"sh_colorize","order":9,"path":"shaders/sh_colorize/sh_colorize.yy",},
{"name":"node_string","order":13,"path":"scripts/node_string/node_string.yy",},
{"name":"cross_product","order":3,"path":"scripts/cross_product/cross_product.yy",},
@ -205,10 +260,13 @@
{"name":"s_node_loop_input","order":14,"path":"sprites/s_node_loop_input/s_node_loop_input.yy",},
{"name":"node_strand_length_adjust","order":11,"path":"scripts/node_strand_length_adjust/node_strand_length_adjust.yy",},
{"name":"fd_rectangle_add_material_surface","order":25,"path":"scripts/fd_rectangle_add_material_surface/fd_rectangle_add_material_surface.yy",},
{"name":"BBMOD_ImageBasedLight","order":2,"path":"scripts/BBMOD_ImageBasedLight/BBMOD_ImageBasedLight.yy",},
{"name":"perlin_noise","order":5,"path":"scripts/perlin_noise/perlin_noise.yy",},
{"name":"fd_rectangle_replace_material","order":14,"path":"scripts/fd_rectangle_replace_material/fd_rectangle_replace_material.yy",},
{"name":"node_functions","order":2,"path":"scripts/node_functions/node_functions.yy",},
{"name":"node_math","order":1,"path":"scripts/node_math/node_math.yy",},
{"name":"BBMOD_MixQuaternionFromSpeedModule","order":1,"path":"scripts/BBMOD_MixQuaternionFromSpeedModule/BBMOD_MixQuaternionFromSpeedModule.yy",},
{"name":"BBMOD_SprWhite","order":22,"path":"sprites/BBMOD_SprWhite/BBMOD_SprWhite.yy",},
{"name":"fd_rectangle_replace_material_advanced","order":15,"path":"scripts/fd_rectangle_replace_material_advanced/fd_rectangle_replace_material_advanced.yy",},
{"name":"array_functions","order":2,"path":"scripts/array_functions/array_functions.yy",},
{"name":"sh_blur_final","order":2,"path":"shaders/sh_blur_final/sh_blur_final.yy",},
@ -216,8 +274,10 @@
{"name":"fd_rectangle_set_material_time_step","order":8,"path":"scripts/fd_rectangle_set_material_time_step/fd_rectangle_set_material_time_step.yy",},
{"name":"s_node_path_sample","order":3,"path":"sprites/s_node_path_sample/s_node_path_sample.yy",},
{"name":"s_node_colorize","order":15,"path":"sprites/s_node_colorize/s_node_colorize.yy",},
{"name":"BBMOD_ShInstanceHighlight","order":4,"path":"shaders/BBMOD_ShInstanceHighlight/BBMOD_ShInstanceHighlight.yy",},
{"name":"s_node_sepearte_shape","order":35,"path":"sprites/s_node_sepearte_shape/s_node_sepearte_shape.yy",},
{"name":"s_node_text_join","order":5,"path":"sprites/s_node_text_join/s_node_text_join.yy",},
{"name":"BBMOD_SprBlack","order":21,"path":"sprites/BBMOD_SprBlack/BBMOD_SprBlack.yy",},
{"name":"s_node_polar","order":5,"path":"sprites/s_node_polar/s_node_polar.yy",},
{"name":"draw_set_blend_mode_ext","order":2,"path":"scripts/draw_set_blend_mode_ext/draw_set_blend_mode_ext.yy",},
{"name":"s_node_noise_simplex","order":20,"path":"sprites/s_node_noise_simplex/s_node_noise_simplex.yy",},
@ -228,10 +288,13 @@
{"name":"sh_flip","order":7,"path":"shaders/sh_flip/sh_flip.yy",},
{"name":"libdlgmodule","order":3,"path":"extensions/libdlgmodule/libdlgmodule.yy",},
{"name":"s_node_alpha_grey","order":4,"path":"sprites/s_node_alpha_grey/s_node_alpha_grey.yy",},
{"name":"BBMOD_MixVec3OverTimeModule","order":4,"path":"scripts/BBMOD_MixVec3OverTimeModule/BBMOD_MixVec3OverTimeModule.yy",},
{"name":"fd_rectangle_set_pressure_iteration_type","order":10,"path":"scripts/fd_rectangle_set_pressure_iteration_type/fd_rectangle_set_pressure_iteration_type.yy",},
{"name":"s_node_sort_array","order":29,"path":"sprites/s_node_sort_array/s_node_sort_array.yy",},
{"name":"_f_h1","order":11,"path":"fonts/_f_h1/_f_h1.yy",},
{"name":"_f_h2","order":12,"path":"fonts/_f_h2/_f_h2.yy",},
{"name":"s_node_level","order":28,"path":"sprites/s_node_level/s_node_level.yy",},
{"name":"BBMOD_MixVec2OverTimeModule","order":3,"path":"scripts/BBMOD_MixVec2OverTimeModule/BBMOD_MixVec2OverTimeModule.yy",},
{"name":"node_scatter","order":3,"path":"scripts/node_scatter/node_scatter.yy",},
{"name":"s_node_bloom","order":8,"path":"sprites/s_node_bloom/s_node_bloom.yy",},
{"name":"node_atlas_set","order":2,"path":"scripts/node_atlas_set/node_atlas_set.yy",},
@ -239,9 +302,14 @@
{"name":"s_node_gradient_data","order":17,"path":"sprites/s_node_gradient_data/s_node_gradient_data.yy",},
{"name":"s_node_vfx_render","order":1,"path":"sprites/s_node_vfx_render/s_node_vfx_render.yy",},
{"name":"node_stack","order":2,"path":"scripts/node_stack/node_stack.yy",},
{"name":"BBMOD_DLL","order":17,"path":"scripts/BBMOD_DLL/BBMOD_DLL.yy",},
{"name":"BBMOD_CameraHTML5","order":2,"path":"extensions/BBMOD_CameraHTML5/BBMOD_CameraHTML5.yy",},
{"name":"s_node_rigidSim_object","order":3,"path":"sprites/s_node_rigidSim_object/s_node_rigidSim_object.yy",},
{"name":"sh_blend_max","order":8,"path":"shaders/sh_blend_max/sh_blend_max.yy",},
{"name":"s_node_color_out","order":6,"path":"sprites/s_node_color_out/s_node_color_out.yy",},
{"name":"__BBMOD_ShCheckVTF","order":5,"path":"shaders/__BBMOD_ShCheckVTF/__BBMOD_ShCheckVTF.yy",},
{"name":"bbmod_lerp_delta_time","order":1,"path":"scripts/bbmod_lerp_delta_time/bbmod_lerp_delta_time.yy",},
{"name":"BBMOD_StateMachine","order":3,"path":"scripts/BBMOD_StateMachine/BBMOD_StateMachine.yy",},
{"name":"_3D","order":6,"path":"scripts/_3D/_3D.yy",},
{"name":"node_vector_cross2D","order":29,"path":"scripts/node_vector_cross2D/node_vector_cross2D.yy",},
{"name":"sh_corner_erode","order":48,"path":"shaders/sh_corner_erode/sh_corner_erode.yy",},
@ -261,6 +329,7 @@
{"name":"o_dialog_panel","order":13,"path":"objects/o_dialog_panel/o_dialog_panel.yy",},
{"name":"s_node_vfx","order":9,"path":"sprites/s_node_vfx/s_node_vfx.yy",},
{"name":"fd_rectangle_get_velocity_maccormack_weight","order":23,"path":"scripts/fd_rectangle_get_velocity_maccormack_weight/fd_rectangle_get_velocity_maccormack_weight.yy",},
{"name":"BBMOD_SetRealModule","order":2,"path":"scripts/BBMOD_SetRealModule/BBMOD_SetRealModule.yy",},
{"name":"sh_fd_advect_material_rgba_8_glsl","order":5,"path":"shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.yy",},
{"name":"fd_rectangle_get_material_dissipation_type","order":8,"path":"scripts/fd_rectangle_get_material_dissipation_type/fd_rectangle_get_material_dissipation_type.yy",},
{"name":"draw_surface_blend","order":1,"path":"scripts/draw_surface_blend/draw_surface_blend.yy",},
@ -279,6 +348,7 @@
{"name":"sh_texture_atlas","order":39,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",},
{"name":"s_node_fluidSim_domain","order":6,"path":"sprites/s_node_fluidSim_domain/s_node_fluidSim_domain.yy",},
{"name":"s_node_displace","order":20,"path":"sprites/s_node_displace/s_node_displace.yy",},
{"name":"BBMOD_ParticleModule","order":6,"path":"scripts/BBMOD_ParticleModule/BBMOD_ParticleModule.yy",},
{"name":"sh_polar","order":1,"path":"shaders/sh_polar/sh_polar.yy",},
{"name":"s_node_warp_mesh","order":10,"path":"sprites/s_node_warp_mesh/s_node_warp_mesh.yy",},
{"name":"sh_pixel_cloud","order":13,"path":"shaders/sh_pixel_cloud/sh_pixel_cloud.yy",},
@ -302,6 +372,7 @@
{"name":"s_node_2d_light","order":2,"path":"sprites/s_node_2d_light/s_node_2d_light.yy",},
{"name":"s_node_trail","order":40,"path":"sprites/s_node_trail/s_node_trail.yy",},
{"name":"fd_rectangle_update_view","order":5,"path":"scripts/fd_rectangle_update_view/fd_rectangle_update_view.yy",},
{"name":"BBMOD_ShTerrainUnlit","order":3,"path":"shaders/BBMOD_ShTerrainUnlit/BBMOD_ShTerrainUnlit.yy",},
{"name":"s_node_rigidSim_renderer","order":1,"path":"sprites/s_node_rigidSim_renderer/s_node_rigidSim_renderer.yy",},
{"name":"__init_background","order":4,"path":"scripts/__init_background/__init_background.yy",},
{"name":"__node","order":9,"path":"scripts/__node/__node.yy",},
@ -332,6 +403,7 @@
{"name":"s_node_3d_cone","order":9,"path":"sprites/s_node_3d_cone/s_node_3d_cone.yy",},
{"name":"s_node_compose","order":1,"path":"sprites/s_node_compose/s_node_compose.yy",},
{"name":"s_node_switch","order":20,"path":"sprites/s_node_switch/s_node_switch.yy",},
{"name":"BBMOD_Gizmo","order":1,"path":"scripts/BBMOD_Gizmo/BBMOD_Gizmo.yy",},
{"name":"s_node_crop","order":2,"path":"sprites/s_node_crop/s_node_crop.yy",},
{"name":"__VFX","order":2,"path":"scripts/__VFX/__VFX.yy",},
{"name":"s_menu_black","order":2,"path":"sprites/s_menu_black/s_menu_black.yy",},
@ -341,9 +413,11 @@
{"name":"font_loader","order":8,"path":"scripts/font_loader/font_loader.yy",},
{"name":"node_iterator_filter_input","order":1,"path":"scripts/node_iterator_filter_input/node_iterator_filter_input.yy",},
{"name":"point_rotate","order":1,"path":"scripts/point_rotate/point_rotate.yy",},
{"name":"BBMOD_MixVec2FromHealthModule","order":3,"path":"scripts/BBMOD_MixVec2FromHealthModule/BBMOD_MixVec2FromHealthModule.yy",},
{"name":"s_node_vfx_variable","order":10,"path":"sprites/s_node_vfx_variable/s_node_vfx_variable.yy",},
{"name":"node_displacement","order":1,"path":"scripts/node_displacement/node_displacement.yy",},
{"name":"mask_function","order":1,"path":"scripts/mask_function/mask_function.yy",},
{"name":"BBMOD_AnimationPlayer","order":2,"path":"scripts/BBMOD_AnimationPlayer/BBMOD_AnimationPlayer.yy",},
{"name":"text_file","order":5,"path":"scripts/text_file/text_file.yy",},
{"name":"sh_trail_filler_pass1","order":49,"path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.yy",},
{"name":"s_node_vfx_wind","order":3,"path":"sprites/s_node_vfx_wind/s_node_vfx_wind.yy",},
@ -354,6 +428,7 @@
{"name":"s_node_image_sheet","order":10,"path":"sprites/s_node_image_sheet/s_node_image_sheet.yy",},
{"name":"locale_data","order":1,"path":"scripts/locale_data/locale_data.yy",},
{"name":"o_dialog_scrollbox","order":2,"path":"objects/o_dialog_scrollbox/o_dialog_scrollbox.yy",},
{"name":"__bbmod_particles","order":2,"path":"scripts/__bbmod_particles/__bbmod_particles.yy",},
{"name":"s_node_palette","order":10,"path":"sprites/s_node_palette/s_node_palette.yy",},
{"name":"curve_damping_function","order":2,"path":"scripts/curve_damping_function/curve_damping_function.yy",},
{"name":"fd_rectangle_get_collision_mask_surface","order":6,"path":"scripts/fd_rectangle_get_collision_mask_surface/fd_rectangle_get_collision_mask_surface.yy",},
@ -363,8 +438,10 @@
{"name":"fd_draw_surface_to_collision_mask_surface","order":2,"path":"scripts/fd_draw_surface_to_collision_mask_surface/fd_draw_surface_to_collision_mask_surface.yy",},
{"name":"sh_blur_box_contrast","order":3,"path":"shaders/sh_blur_box_contrast/sh_blur_box_contrast.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":"BBMOD_IRenderTarget","order":2,"path":"scripts/BBMOD_IRenderTarget/BBMOD_IRenderTarget.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":"BBMOD_Class","order":16,"path":"scripts/BBMOD_Class/BBMOD_Class.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":"preview_overlay_vector","order":2,"path":"scripts/preview_overlay_vector/preview_overlay_vector.yy",},
@ -377,13 +454,17 @@
{"name":"o_dialog_splash","order":9,"path":"objects/o_dialog_splash/o_dialog_splash.yy",},
{"name":"json_file","order":4,"path":"scripts/json_file/json_file.yy",},
{"name":"s_node_curve_edit","order":1,"path":"sprites/s_node_curve_edit/s_node_curve_edit.yy",},
{"name":"bbmod_vtf_is_supported","order":10,"path":"scripts/bbmod_vtf_is_supported/bbmod_vtf_is_supported.yy",},
{"name":"textBox","order":17,"path":"scripts/textBox/textBox.yy",},
{"name":"pathArrayBox","order":27,"path":"scripts/pathArrayBox/pathArrayBox.yy",},
{"name":"node_statistic","order":7,"path":"scripts/node_statistic/node_statistic.yy",},
{"name":"sh_draw_surface_part_tiled","order":1,"path":"shaders/sh_draw_surface_part_tiled/sh_draw_surface_part_tiled.yy",},
{"name":"o_dialog_add_node","order":1,"path":"objects/o_dialog_add_node/o_dialog_add_node.yy",},
{"name":"bbmod_cmp","order":1,"path":"scripts/bbmod_cmp/bbmod_cmp.yy",},
{"name":"BBMOD_ShDefaultUnlitBatched","order":11,"path":"shaders/BBMOD_ShDefaultUnlitBatched/BBMOD_ShDefaultUnlitBatched.yy",},
{"name":"s_node_path_reverse","order":8,"path":"sprites/s_node_path_reverse/s_node_path_reverse.yy",},
{"name":"fd_rectangle_get_pressure_width","order":18,"path":"scripts/fd_rectangle_get_pressure_width/fd_rectangle_get_pressure_width.yy",},
{"name":"BBMOD_Node","order":3,"path":"scripts/BBMOD_Node/BBMOD_Node.yy",},
{"name":"sh_blend_normal","order":1,"path":"shaders/sh_blend_normal/sh_blend_normal.yy",},
{"name":"node_feedback_output","order":2,"path":"scripts/node_feedback_output/node_feedback_output.yy",},
{"name":"node_lua_surface","order":2,"path":"scripts/node_lua_surface/node_lua_surface.yy",},
@ -402,13 +483,15 @@
{"name":"s_node_blur","order":9,"path":"sprites/s_node_blur/s_node_blur.yy",},
{"name":"textArea","order":20,"path":"scripts/textArea/textArea.yy",},
{"name":"s_node_gradient_4points","order":2,"path":"sprites/s_node_gradient_4points/s_node_gradient_4points.yy",},
{"name":"regEdit","order":9,"path":"extensions/regEdit/regEdit.yy",},
{"name":"BBMOD_PointLight","order":4,"path":"scripts/BBMOD_PointLight/BBMOD_PointLight.yy",},
{"name":"s_node_gradient_out","order":9,"path":"sprites/s_node_gradient_out/s_node_gradient_out.yy",},
{"name":"s_node_vec3","order":8,"path":"sprites/s_node_vec3/s_node_vec3.yy",},
{"name":"s_node_strandSim_create","order":2,"path":"sprites/s_node_strandSim_create/s_node_strandSim_create.yy",},
{"name":"__bbmod_render_pass","order":2,"path":"scripts/__bbmod_render_pass/__bbmod_render_pass.yy",},
{"name":"node_gradient_shift","order":10,"path":"scripts/node_gradient_shift/node_gradient_shift.yy",},
{"name":"sh_vertex_normal_pass","order":5,"path":"shaders/sh_vertex_normal_pass/sh_vertex_normal_pass.yy",},
{"name":"node_vector_cross3D","order":28,"path":"scripts/node_vector_cross3D/node_vector_cross3D.yy",},
{"name":"BBMOD_ShSSAO","order":1,"path":"shaders/BBMOD_ShSSAO/BBMOD_ShSSAO.yy",},
{"name":"s_node_pack_sprite","order":5,"path":"sprites/s_node_pack_sprite/s_node_pack_sprite.yy",},
{"name":"surface_valid","order":6,"path":"scripts/surface_valid/surface_valid.yy",},
{"name":"sh_blur_zoom","order":5,"path":"shaders/sh_blur_zoom/sh_blur_zoom.yy",},
@ -418,11 +501,14 @@
{"name":"s_node_invert","order":27,"path":"sprites/s_node_invert/s_node_invert.yy",},
{"name":"draw_text_delimiter","order":14,"path":"scripts/draw_text_delimiter/draw_text_delimiter.yy",},
{"name":"s_node_path_anchor","order":13,"path":"sprites/s_node_path_anchor/s_node_path_anchor.yy",},
{"name":"BBMOD_NotImplementedException","order":1,"path":"scripts/BBMOD_NotImplementedException/BBMOD_NotImplementedException.yy",},
{"name":"node_array_get","order":10,"path":"scripts/node_array_get/node_array_get.yy",},
{"name":"BBMOD_ShExtractSplatmapLayer","order":1,"path":"shaders/BBMOD_ShExtractSplatmapLayer/BBMOD_ShExtractSplatmapLayer.yy",},
{"name":"Apollo","order":6,"path":"extensions/Apollo/Apollo.yy",},
{"name":"sh_grid","order":14,"path":"shaders/sh_grid/sh_grid.yy",},
{"name":"sh_twirl","order":3,"path":"shaders/sh_twirl/sh_twirl.yy",},
{"name":"s_node_shape","order":14,"path":"sprites/s_node_shape/s_node_shape.yy",},
{"name":"BBMOD_MixEmissionModule","order":4,"path":"scripts/BBMOD_MixEmissionModule/BBMOD_MixEmissionModule.yy",},
{"name":"time_source","order":25,"path":"scripts/time_source/time_source.yy",},
{"name":"string_formatting","order":5,"path":"scripts/string_formatting/string_formatting.yy",},
{"name":"node_level_selector","order":8,"path":"scripts/node_level_selector/node_level_selector.yy",},
@ -432,6 +518,7 @@
{"name":"node_color_mix","order":14,"path":"scripts/node_color_mix/node_color_mix.yy",},
{"name":"s_node_array_range","order":6,"path":"sprites/s_node_array_range/s_node_array_range.yy",},
{"name":"sh_fd_advect_material_a_16_glsl","order":2,"path":"shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.yy",},
{"name":"BBMOD_MixVec3FromHealthModule","order":4,"path":"scripts/BBMOD_MixVec3FromHealthModule/BBMOD_MixVec3FromHealthModule.yy",},
{"name":"distribution_function","order":12,"path":"scripts/distribution_function/distribution_function.yy",},
{"name":"sh_blur_radial","order":9,"path":"shaders/sh_blur_radial/sh_blur_radial.yy",},
{"name":"node_iterator_each_input","order":1,"path":"scripts/node_iterator_each_input/node_iterator_each_input.yy",},
@ -440,10 +527,14 @@
{"name":"s_node_loop","order":5,"path":"sprites/s_node_loop/s_node_loop.yy",},
{"name":"node_zigzag","order":12,"path":"scripts/node_zigzag/node_zigzag.yy",},
{"name":"node_equation","order":18,"path":"scripts/node_equation/node_equation.yy",},
{"name":"BBMOD_ShGizmoSelect","order":3,"path":"shaders/BBMOD_ShGizmoSelect/BBMOD_ShGizmoSelect.yy",},
{"name":"BBMOD_ResourceManager","order":20,"path":"scripts/BBMOD_ResourceManager/BBMOD_ResourceManager.yy",},
{"name":"BBMOD_RaycastResult","order":6,"path":"scripts/BBMOD_RaycastResult/BBMOD_RaycastResult.yy",},
{"name":"fd_rectangle_get_visualization_shader","order":27,"path":"scripts/fd_rectangle_get_visualization_shader/fd_rectangle_get_visualization_shader.yy",},
{"name":"preset_data","order":8,"path":"scripts/preset_data/preset_data.yy",},
{"name":"_f_h5","order":2,"path":"fonts/_f_h5/_f_h5.yy",},
{"name":"node_string_split","order":14,"path":"scripts/node_string_split/node_string_split.yy",},
{"name":"BBMOD_PunctualLight","order":5,"path":"scripts/BBMOD_PunctualLight/BBMOD_PunctualLight.yy",},
{"name":"meta_data","order":12,"path":"scripts/meta_data/meta_data.yy",},
{"name":"node_find_pixel","order":1,"path":"scripts/node_find_pixel/node_find_pixel.yy",},
{"name":"node_scatter_points","order":24,"path":"scripts/node_scatter_points/node_scatter_points.yy",},
@ -457,7 +548,10 @@
{"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":"fd_rectangle_draw_part","order":10,"path":"scripts/fd_rectangle_draw_part/fd_rectangle_draw_part.yy",},
{"name":"BBMOD_SetVec3Module","order":4,"path":"scripts/BBMOD_SetVec3Module/BBMOD_SetVec3Module.yy",},
{"name":"BBMOD_SprParticle","order":12,"path":"sprites/BBMOD_SprParticle/BBMOD_SprParticle.yy",},
{"name":"checkbox","order":7,"path":"scripts/checkbox/checkbox.yy",},
{"name":"BBMOD_EmissionModule","order":2,"path":"scripts/BBMOD_EmissionModule/BBMOD_EmissionModule.yy",},
{"name":"node_string_regex_replace","order":24,"path":"scripts/node_string_regex_replace/node_string_regex_replace.yy",},
{"name":"s_node_particle","order":12,"path":"sprites/s_node_particle/s_node_particle.yy",},
{"name":"s_node_random","order":3,"path":"sprites/s_node_random/s_node_random.yy",},
@ -469,6 +563,7 @@
{"name":"node_path_anchor","order":13,"path":"scripts/node_path_anchor/node_path_anchor.yy",},
{"name":"s_node_path_wave","order":7,"path":"sprites/s_node_path_wave/s_node_path_wave.yy",},
{"name":"string_function","order":6,"path":"scripts/string_function/string_function.yy",},
{"name":"BBMOD_MixVec4Module","order":5,"path":"scripts/BBMOD_MixVec4Module/BBMOD_MixVec4Module.yy",},
{"name":"o_dialog_palette","order":2,"path":"objects/o_dialog_palette/o_dialog_palette.yy",},
{"name":"sh_blend_hue","order":17,"path":"shaders/sh_blend_hue/sh_blend_hue.yy",},
{"name":"s_node_threshold","order":47,"path":"sprites/s_node_threshold/s_node_threshold.yy",},
@ -493,6 +588,7 @@
{"name":"node_chromatic_aberration","order":4,"path":"scripts/node_chromatic_aberration/node_chromatic_aberration.yy",},
{"name":"draw_line_elbow_diag","order":18,"path":"scripts/draw_line_elbow_diag/draw_line_elbow_diag.yy",},
{"name":"node_pin","order":2,"path":"scripts/node_pin/node_pin.yy",},
{"name":"BBMOD_IRenderable","order":1,"path":"scripts/BBMOD_IRenderable/BBMOD_IRenderable.yy",},
{"name":"_node_fluid_nodes","order":7,"path":"scripts/_node_fluid_nodes/_node_fluid_nodes.yy",},
{"name":"sh_noise","order":16,"path":"shaders/sh_noise/sh_noise.yy",},
{"name":"sh_skew","order":6,"path":"shaders/sh_skew/sh_skew.yy",},
@ -506,6 +602,7 @@
{"name":"fd_rectangle_get_collision_mask_sprite_image","order":5,"path":"scripts/fd_rectangle_get_collision_mask_sprite_image/fd_rectangle_get_collision_mask_sprite_image.yy",},
{"name":"s_node_stripe","order":16,"path":"sprites/s_node_stripe/s_node_stripe.yy",},
{"name":"s_node_lua_global","order":19,"path":"sprites/s_node_lua_global/s_node_lua_global.yy",},
{"name":"BBMOD_MixVec4FromHealthModule","order":5,"path":"scripts/BBMOD_MixVec4FromHealthModule/BBMOD_MixVec4FromHealthModule.yy",},
{"name":"sh_grey_alpha","order":14,"path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},
{"name":"sh_normal","order":1,"path":"shaders/sh_normal/sh_normal.yy",},
{"name":"s_node_time_map","order":39,"path":"sprites/s_node_time_map/s_node_time_map.yy",},
@ -514,27 +611,35 @@
{"name":"s_node_lua_compute","order":17,"path":"sprites/s_node_lua_compute/s_node_lua_compute.yy",},
{"name":"buttonPalette","order":6,"path":"scripts/buttonPalette/buttonPalette.yy",},
{"name":"fd_rectangle_draw_stretched","order":11,"path":"scripts/fd_rectangle_draw_stretched/fd_rectangle_draw_stretched.yy",},
{"name":"__bbmod_fog","order":1,"path":"scripts/__bbmod_fog/__bbmod_fog.yy",},
{"name":"s_node_wiggler","order":2,"path":"sprites/s_node_wiggler/s_node_wiggler.yy",},
{"name":"sh_edge_detect","order":30,"path":"shaders/sh_edge_detect/sh_edge_detect.yy",},
{"name":"s_node_area","order":4,"path":"sprites/s_node_area/s_node_area.yy",},
{"name":"type_conversion","order":8,"path":"scripts/type_conversion/type_conversion.yy",},
{"name":"node_keyframe","order":4,"path":"scripts/node_keyframe/node_keyframe.yy",},
{"name":"sh_threshold","order":42,"path":"shaders/sh_threshold/sh_threshold.yy",},
{"name":"BBMOD_AnimationInstance","order":1,"path":"scripts/BBMOD_AnimationInstance/BBMOD_AnimationInstance.yy",},
{"name":"fd_rectangle_set_initial_value_pressure","order":3,"path":"scripts/fd_rectangle_set_initial_value_pressure/fd_rectangle_set_initial_value_pressure.yy",},
{"name":"o_dialog_drag_folder","order":2,"path":"objects/o_dialog_drag_folder/o_dialog_drag_folder.yy",},
{"name":"node_VFX_effect_repel","order":9,"path":"scripts/node_VFX_effect_repel/node_VFX_effect_repel.yy",},
{"name":"BBMOD_ShSky","order":1,"path":"shaders/BBMOD_ShSky/BBMOD_ShSky.yy",},
{"name":"s_node_alpha_cut","order":3,"path":"sprites/s_node_alpha_cut/s_node_alpha_cut.yy",},
{"name":"node_iterator_length","order":4,"path":"scripts/node_iterator_length/node_iterator_length.yy",},
{"name":"BBMOD_DefaultLightmapShader","order":6,"path":"scripts/BBMOD_DefaultLightmapShader/BBMOD_DefaultLightmapShader.yy",},
{"name":"node_VFX_effect_attract","order":8,"path":"scripts/node_VFX_effect_attract/node_VFX_effect_attract.yy",},
{"name":"s_node_text_splice","order":6,"path":"sprites/s_node_text_splice/s_node_text_splice.yy",},
{"name":"__atlas","order":6,"path":"scripts/__atlas/__atlas.yy",},
{"name":"node_3d_object_transform","order":11,"path":"scripts/node_3d_object_transform/node_3d_object_transform.yy",},
{"name":"BBMOD_PlaneCollider","order":4,"path":"scripts/BBMOD_PlaneCollider/BBMOD_PlaneCollider.yy",},
{"name":"sh_draw_single_channel","order":3,"path":"shaders/sh_draw_single_channel/sh_draw_single_channel.yy",},
{"name":"draw_sprite_ext_override","order":9,"path":"scripts/draw_sprite_ext_override/draw_sprite_ext_override.yy",},
{"name":"node_array_add","order":9,"path":"scripts/node_array_add/node_array_add.yy",},
{"name":"s_node_array_set","order":9,"path":"sprites/s_node_array_set/s_node_array_set.yy",},
{"name":"node_noise_cell","order":2,"path":"scripts/node_noise_cell/node_noise_cell.yy",},
{"name":"__background_get_internal","order":2,"path":"scripts/__background_get_internal/__background_get_internal.yy",},
{"name":"BBMOD_Light","order":3,"path":"scripts/BBMOD_Light/BBMOD_Light.yy",},
{"name":"BBMOD_ShPostProcess","order":2,"path":"shaders/BBMOD_ShPostProcess/BBMOD_ShPostProcess.yy",},
{"name":"BBMOD_Color","order":6,"path":"scripts/BBMOD_Color/BBMOD_Color.yy",},
{"name":"sh_combine_hsv","order":41,"path":"shaders/sh_combine_hsv/sh_combine_hsv.yy",},
{"name":"s_node_array_insert","order":4,"path":"sprites/s_node_array_insert/s_node_array_insert.yy",},
{"name":"addon_lua","order":1,"path":"scripts/addon_lua/addon_lua.yy",},
@ -549,31 +654,39 @@
{"name":"buttonColor","order":3,"path":"scripts/buttonColor/buttonColor.yy",},
{"name":"notification_system","order":7,"path":"scripts/notification_system/notification_system.yy",},
{"name":"node_color_from_hsv","order":8,"path":"scripts/node_color_from_hsv/node_color_from_hsv.yy",},
{"name":"BBMOD_SetVec4Module","order":5,"path":"scripts/BBMOD_SetVec4Module/BBMOD_SetVec4Module.yy",},
{"name":"s_node_image_copy","order":6,"path":"sprites/s_node_image_copy/s_node_image_copy.yy",},
{"name":"node_boolean","order":17,"path":"scripts/node_boolean/node_boolean.yy",},
{"name":"node_grid_tri","order":21,"path":"scripts/node_grid_tri/node_grid_tri.yy",},
{"name":"node_average","order":5,"path":"scripts/node_average/node_average.yy",},
{"name":"BBMOD_Model","order":2,"path":"scripts/BBMOD_Model/BBMOD_Model.yy",},
{"name":"node_mesh_transform","order":2,"path":"scripts/node_mesh_transform/node_mesh_transform.yy",},
{"name":"node_fluid_turbulence","order":10,"path":"scripts/node_fluid_turbulence/node_fluid_turbulence.yy",},
{"name":"sh_sdf","order":1,"path":"shaders/sh_sdf/sh_sdf.yy",},
{"name":"slider","order":15,"path":"scripts/slider/slider.yy",},
{"name":"s_node_convolution","order":48,"path":"sprites/s_node_convolution/s_node_convolution.yy",},
{"name":"BBMOD_DefaultRenderer","order":8,"path":"scripts/BBMOD_DefaultRenderer/BBMOD_DefaultRenderer.yy",},
{"name":"fd_rectangle_get_velocity_time_step","order":25,"path":"scripts/fd_rectangle_get_velocity_time_step/fd_rectangle_get_velocity_time_step.yy",},
{"name":"node_string_regex_match","order":25,"path":"scripts/node_string_regex_match/node_string_regex_match.yy",},
{"name":"node_9slice","order":5,"path":"scripts/node_9slice/node_9slice.yy",},
{"name":"fd_rectangle_add_velocity_surface","order":24,"path":"scripts/fd_rectangle_add_velocity_surface/fd_rectangle_add_velocity_surface.yy",},
{"name":"BBMOD_Vec2","order":4,"path":"scripts/BBMOD_Vec2/BBMOD_Vec2.yy",},
{"name":"sh_grid_hex","order":21,"path":"shaders/sh_grid_hex/sh_grid_hex.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_wiggler","order":2,"path":"scripts/node_wiggler/node_wiggler.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":"BBMOD_Collider","order":2,"path":"scripts/BBMOD_Collider/BBMOD_Collider.yy",},
{"name":"s_node_grid_noise","order":5,"path":"sprites/s_node_grid_noise/s_node_grid_noise.yy",},
{"name":"fd_rectangle_set_velocity_size","order":16,"path":"scripts/fd_rectangle_set_velocity_size/fd_rectangle_set_velocity_size.yy",},
{"name":"__bbmod_d3d11","order":2,"path":"scripts/__bbmod_d3d11/__bbmod_d3d11.yy",},
{"name":"node_image_gif","order":6,"path":"scripts/node_image_gif/node_image_gif.yy",},
{"name":"node_iterator_each_output","order":2,"path":"scripts/node_iterator_each_output/node_iterator_each_output.yy",},
{"name":"s_node_strandSim_render_texture","order":5,"path":"sprites/s_node_strandSim_render_texture/s_node_strandSim_render_texture.yy",},
{"name":"BBMOD_LightmapShader","order":1,"path":"scripts/BBMOD_LightmapShader/BBMOD_LightmapShader.yy",},
{"name":"sh_fd_advect_material_a_8_glsl","order":3,"path":"shaders/sh_fd_advect_material_a_8_glsl/sh_fd_advect_material_a_8_glsl.yy",},
{"name":"BBMOD_BaseShader","order":5,"path":"scripts/BBMOD_BaseShader/BBMOD_BaseShader.yy",},
{"name":"node_color_remove","order":2,"path":"scripts/node_color_remove/node_color_remove.yy",},
{"name":"spr_gameframe_pixel","order":3,"path":"sprites/spr_gameframe_pixel/spr_gameframe_pixel.yy",},
{"name":"s_node_radial","order":53,"path":"sprites/s_node_radial/s_node_radial.yy",},
@ -583,6 +696,7 @@
{"name":"node_feedback_input","order":1,"path":"scripts/node_feedback_input/node_feedback_input.yy",},
{"name":"s_node_base_conversion","order":10,"path":"sprites/s_node_base_conversion/s_node_base_conversion.yy",},
{"name":"s_node_loop_array","order":23,"path":"sprites/s_node_loop_array/s_node_loop_array.yy",},
{"name":"BBMOD_ShSSAOBlur","order":2,"path":"shaders/BBMOD_ShSSAOBlur/BBMOD_ShSSAOBlur.yy",},
{"name":"s_node_iterator_amount","order":26,"path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},
{"name":"sh_color_adjust","order":6,"path":"shaders/sh_color_adjust/sh_color_adjust.yy",},
{"name":"sh_fd_visualize_thick_smoke_glsl","order":17,"path":"shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.yy",},
@ -601,6 +715,7 @@
{"name":"o_dialog_gradient","order":1,"path":"objects/o_dialog_gradient/o_dialog_gradient.yy",},
{"name":"sh_channel_R_grey","order":7,"path":"shaders/sh_channel_R_grey/sh_channel_R_grey.yy",},
{"name":"sh_blend_subtract","order":5,"path":"shaders/sh_blend_subtract/sh_blend_subtract.yy",},
{"name":"BBMOD_Vec4","order":6,"path":"scripts/BBMOD_Vec4/BBMOD_Vec4.yy",},
{"name":"panel_animation","order":1,"path":"scripts/panel_animation/panel_animation.yy",},
{"name":"node_surface_replace","order":29,"path":"scripts/node_surface_replace/node_surface_replace.yy",},
{"name":"node_strand_create","order":1,"path":"scripts/node_strand_create/node_strand_create.yy",},
@ -614,12 +729,15 @@
{"name":"sh_clean_shape","order":37,"path":"shaders/sh_clean_shape/sh_clean_shape.yy",},
{"name":"fd_rectangle_update","order":20,"path":"scripts/fd_rectangle_update/fd_rectangle_update.yy",},
{"name":"sh_posterize","order":19,"path":"shaders/sh_posterize/sh_posterize.yy",},
{"name":"BBMOD_DirectionalLight","order":1,"path":"scripts/BBMOD_DirectionalLight/BBMOD_DirectionalLight.yy",},
{"name":"s_node_mirror","order":3,"path":"sprites/s_node_mirror/s_node_mirror.yy",},
{"name":"s_node_blur_simple","order":43,"path":"sprites/s_node_blur_simple/s_node_blur_simple.yy",},
{"name":"node_VFX_spawner","order":1,"path":"scripts/node_VFX_spawner/node_VFX_spawner.yy",},
{"name":"__bbmod_default_material","order":4,"path":"scripts/__bbmod_default_material/__bbmod_default_material.yy",},
{"name":"_draw_defines","order":21,"path":"scripts/_draw_defines/_draw_defines.yy",},
{"name":"sh_color_replace","order":8,"path":"shaders/sh_color_replace/sh_color_replace.yy",},
{"name":"__surface","order":8,"path":"scripts/__surface/__surface.yy",},
{"name":"BBMOD_AddVec4OverTimeModule","order":3,"path":"scripts/BBMOD_AddVec4OverTimeModule/BBMOD_AddVec4OverTimeModule.yy",},
{"name":"rotator","order":11,"path":"scripts/rotator/rotator.yy",},
{"name":"s_node_edge_detect","order":22,"path":"sprites/s_node_edge_detect/s_node_edge_detect.yy",},
{"name":"node_fluid_add_collider","order":6,"path":"scripts/node_fluid_add_collider/node_fluid_add_collider.yy",},
@ -630,11 +748,14 @@
{"name":"node_strand_render_texture","order":7,"path":"scripts/node_strand_render_texture/node_strand_render_texture.yy",},
{"name":"luaRenderer","order":2,"path":"scripts/luaRenderer/luaRenderer.yy",},
{"name":"node_blur_zoom","order":3,"path":"scripts/node_blur_zoom/node_blur_zoom.yy",},
{"name":"BBMOD_Ray","order":5,"path":"scripts/BBMOD_Ray/BBMOD_Ray.yy",},
{"name":"node_bloom","order":3,"path":"scripts/node_bloom/node_bloom.yy",},
{"name":"sh_bevel","order":3,"path":"shaders/sh_bevel/sh_bevel.yy",},
{"name":"sh_blend_overlay","order":15,"path":"shaders/sh_blend_overlay/sh_blend_overlay.yy",},
{"name":"node_sprite_stack","order":4,"path":"scripts/node_sprite_stack/node_sprite_stack.yy",},
{"name":"s_node_json_file_read","order":14,"path":"sprites/s_node_json_file_read/s_node_json_file_read.yy",},
{"name":"BBMOD_Vertex","order":4,"path":"scripts/BBMOD_Vertex/BBMOD_Vertex.yy",},
{"name":"BBMOD_OutOfRangeException","order":2,"path":"scripts/BBMOD_OutOfRangeException/BBMOD_OutOfRangeException.yy",},
{"name":"__strandSim","order":2,"path":"scripts/__strandSim/__strandSim.yy",},
{"name":"sh_shape","order":3,"path":"shaders/sh_shape/sh_shape.yy",},
{"name":"draw_line_width2","order":2,"path":"scripts/draw_line_width2/draw_line_width2.yy",},
@ -651,6 +772,7 @@
{"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":"o_dialog_tunnels","order":6,"path":"objects/o_dialog_tunnels/o_dialog_tunnels.yy",},
{"name":"BBMOD_ShParticleLit","order":10,"path":"shaders/BBMOD_ShParticleLit/BBMOD_ShParticleLit.yy",},
{"name":"s_node_erode","order":23,"path":"sprites/s_node_erode/s_node_erode.yy",},
{"name":"node_particle","order":14,"path":"scripts/node_particle/node_particle.yy",},
{"name":"histogram_drawer","order":2,"path":"scripts/histogram_drawer/histogram_drawer.yy",},
@ -665,6 +787,7 @@
{"name":"s_icon_64","order":2,"path":"sprites/s_icon_64/s_icon_64.yy",},
{"name":"s_node_gradient_replace","order":18,"path":"sprites/s_node_gradient_replace/s_node_gradient_replace.yy",},
{"name":"node_perlin_smear","order":6,"path":"scripts/node_perlin_smear/node_perlin_smear.yy",},
{"name":"BBMOD_MixQuaternionOverTimeModule","order":1,"path":"scripts/BBMOD_MixQuaternionOverTimeModule/BBMOD_MixQuaternionOverTimeModule.yy",},
{"name":"node_alpha_cutoff","order":10,"path":"scripts/node_alpha_cutoff/node_alpha_cutoff.yy",},
{"name":"sh_channel_R","order":4,"path":"shaders/sh_channel_R/sh_channel_R.yy",},
{"name":"draw_circle_border","order":3,"path":"scripts/draw_circle_border/draw_circle_border.yy",},
@ -672,33 +795,41 @@
{"name":"sliderRange","order":16,"path":"scripts/sliderRange/sliderRange.yy",},
{"name":"point_rect_overlap","order":2,"path":"scripts/point_rect_overlap/point_rect_overlap.yy",},
{"name":"s_node_bevel","order":6,"path":"sprites/s_node_bevel/s_node_bevel.yy",},
{"name":"BBMOD_MixVec2Module","order":3,"path":"scripts/BBMOD_MixVec2Module/BBMOD_MixVec2Module.yy",},
{"name":"color_selector","order":4,"path":"scripts/color_selector/color_selector.yy",},
{"name":"BBMOD_SprGizmo","order":9,"path":"sprites/BBMOD_SprGizmo/BBMOD_SprGizmo.yy",},
{"name":"node_trigger_bool","order":1,"path":"scripts/node_trigger_bool/node_trigger_bool.yy",},
{"name":"s_node_strandSim_gravity","order":4,"path":"sprites/s_node_strandSim_gravity/s_node_strandSim_gravity.yy",},
{"name":"node_VFX_effect_turbulence","order":11,"path":"scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.yy",},
{"name":"sh_surface_replace_replace","order":1,"path":"shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy",},
{"name":"node_ase_file_read","order":14,"path":"scripts/node_ase_file_read/node_ase_file_read.yy",},
{"name":"BBMOD_MixVec4OverTimeModule","order":5,"path":"scripts/BBMOD_MixVec4OverTimeModule/BBMOD_MixVec4OverTimeModule.yy",},
{"name":"sh_seperate_shape_counter","order":1,"path":"shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy",},
{"name":"s_node_stack","order":37,"path":"sprites/s_node_stack/s_node_stack.yy",},
{"name":"s_fade_up","order":3,"path":"sprites/s_fade_up/s_fade_up.yy",},
{"name":"panel_globalvar","order":4,"path":"scripts/panel_globalvar/panel_globalvar.yy",},
{"name":"node_guide","order":18,"path":"scripts/node_guide/node_guide.yy",},
{"name":"fd_rectangle_get_velocity_surface","order":24,"path":"scripts/fd_rectangle_get_velocity_surface/fd_rectangle_get_velocity_surface.yy",},
{"name":"BBMOD_DragModule","order":1,"path":"scripts/BBMOD_DragModule/BBMOD_DragModule.yy",},
{"name":"s_node_text_char_get","order":2,"path":"sprites/s_node_text_char_get/s_node_text_char_get.yy",},
{"name":"fd_rectangle_get_initial_value_pressure","order":7,"path":"scripts/fd_rectangle_get_initial_value_pressure/fd_rectangle_get_initial_value_pressure.yy",},
{"name":"node_timeline_preview","order":2,"path":"scripts/node_timeline_preview/node_timeline_preview.yy",},
{"name":"__polygon","order":2,"path":"scripts/__polygon/__polygon.yy",},
{"name":"BBMOD_DefaultMaterial","order":7,"path":"scripts/BBMOD_DefaultMaterial/BBMOD_DefaultMaterial.yy",},
{"name":"o_dialog_fontscrollbox","order":4,"path":"objects/o_dialog_fontscrollbox/o_dialog_fontscrollbox.yy",},
{"name":"s_node_vfx_output","order":11,"path":"sprites/s_node_vfx_output/s_node_vfx_output.yy",},
{"name":"sh_greyscale","order":10,"path":"shaders/sh_greyscale/sh_greyscale.yy",},
{"name":"gameframe_native","order":2,"path":"extensions/gameframe_native/gameframe_native.yy",},
{"name":"node_global","order":3,"path":"scripts/node_global/node_global.yy",},
{"name":"BBMOD_MixQuaternionFromHealthModule","order":1,"path":"scripts/BBMOD_MixQuaternionFromHealthModule/BBMOD_MixQuaternionFromHealthModule.yy",},
{"name":"spr_gameframe_buttons","order":1,"path":"sprites/spr_gameframe_buttons/spr_gameframe_buttons.yy",},
{"name":"s_node_draw_stack","order":4,"path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",},
{"name":"delaunay","order":1,"path":"scripts/delaunay/delaunay.yy",},
{"name":"s_node_noise_fbm","order":26,"path":"sprites/s_node_noise_fbm/s_node_noise_fbm.yy",},
{"name":"sh_color_select_content","order":1,"path":"shaders/sh_color_select_content/sh_color_select_content.yy",},
{"name":"sh_outline","order":18,"path":"shaders/sh_outline/sh_outline.yy",},
{"name":"BBMOD_Sprite","order":14,"path":"scripts/BBMOD_Sprite/BBMOD_Sprite.yy",},
{"name":"BBMOD_MixQuaternionModule","order":1,"path":"scripts/BBMOD_MixQuaternionModule/BBMOD_MixQuaternionModule.yy",},
{"name":"s_node_strandSim_break","order":8,"path":"sprites/s_node_strandSim_break/s_node_strandSim_break.yy",},
{"name":"s_node_scatter_point","order":4,"path":"sprites/s_node_scatter_point/s_node_scatter_point.yy",},
{"name":"node_checkerboard","order":13,"path":"scripts/node_checkerboard/node_checkerboard.yy",},
@ -707,9 +838,12 @@
{"name":"panel_workspace","order":1,"path":"scripts/panel_workspace/panel_workspace.yy",},
{"name":"fd_rectangle_assure_surfaces_exist","order":2,"path":"scripts/fd_rectangle_assure_surfaces_exist/fd_rectangle_assure_surfaces_exist.yy",},
{"name":"fd_rectangle_material_surface_was_created","order":13,"path":"scripts/fd_rectangle_material_surface_was_created/fd_rectangle_material_surface_was_created.yy",},
{"name":"bbmod_set_instance_id","order":12,"path":"scripts/bbmod_set_instance_id/bbmod_set_instance_id.yy",},
{"name":"s_node_fluidSim_apply_velocity","order":2,"path":"sprites/s_node_fluidSim_apply_velocity/s_node_fluidSim_apply_velocity.yy",},
{"name":"BBMOD_SetQuaternionModule","order":1,"path":"scripts/BBMOD_SetQuaternionModule/BBMOD_SetQuaternionModule.yy",},
{"name":"fd_rectangle_destroy","order":8,"path":"scripts/fd_rectangle_destroy/fd_rectangle_destroy.yy",},
{"name":"s_node_grey_alpha","order":25,"path":"sprites/s_node_grey_alpha/s_node_grey_alpha.yy",},
{"name":"BBMOD_ParticleMaterial","order":5,"path":"scripts/BBMOD_ParticleMaterial/BBMOD_ParticleMaterial.yy",},
{"name":"sh_bloom_pass","order":2,"path":"shaders/sh_bloom_pass/sh_bloom_pass.yy",},
{"name":"fd_rectangle_draw_view","order":4,"path":"scripts/fd_rectangle_draw_view/fd_rectangle_draw_view.yy",},
{"name":"fd_rectangle_set_material_type","order":9,"path":"scripts/fd_rectangle_set_material_type/fd_rectangle_set_material_type.yy",},
@ -725,6 +859,7 @@
{"name":"s_node_flood_fill","order":24,"path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",},
{"name":"node_rigid_force_apply","order":4,"path":"scripts/node_rigid_force_apply/node_rigid_force_apply.yy",},
{"name":"s_node_rigid_variable","order":8,"path":"sprites/s_node_rigid_variable/s_node_rigid_variable.yy",},
{"name":"BBMOD_MixVec4FromSpeedModule","order":5,"path":"scripts/BBMOD_MixVec4FromSpeedModule/BBMOD_MixVec4FromSpeedModule.yy",},
{"name":"safe_operation","order":6,"path":"scripts/safe_operation/safe_operation.yy",},
{"name":"s_node_rigid_override","order":9,"path":"sprites/s_node_rigid_override/s_node_rigid_override.yy",},
{"name":"s_node_array_get","order":3,"path":"sprites/s_node_array_get/s_node_array_get.yy",},
@ -736,19 +871,24 @@
{"name":"s_node_fluidSim_domain_queue","order":9,"path":"sprites/s_node_fluidSim_domain_queue/s_node_fluidSim_domain_queue.yy",},
{"name":"s_node_vfx_spawn","order":2,"path":"sprites/s_node_vfx_spawn/s_node_vfx_spawn.yy",},
{"name":"texture_set_repeat","order":1,"path":"scripts/texture_set_repeat/texture_set_repeat.yy",},
{"name":"BBMOD_DefaultSpriteShader","order":10,"path":"scripts/BBMOD_DefaultSpriteShader/BBMOD_DefaultSpriteShader.yy",},
{"name":"fd_rectangle_update_velocity","order":22,"path":"scripts/fd_rectangle_update_velocity/fd_rectangle_update_velocity.yy",},
{"name":"sh_draw_mapping","order":4,"path":"shaders/sh_draw_mapping/sh_draw_mapping.yy",},
{"name":"BBMOD_Cubemap","order":7,"path":"scripts/BBMOD_Cubemap/BBMOD_Cubemap.yy",},
{"name":"__bbox","order":5,"path":"scripts/__bbox/__bbox.yy",},
{"name":"node_shadow","order":14,"path":"scripts/node_shadow/node_shadow.yy",},
{"name":"s_node_color_data","order":3,"path":"sprites/s_node_color_data/s_node_color_data.yy",},
{"name":"fd_rectangle_set_repeat","order":12,"path":"scripts/fd_rectangle_set_repeat/fd_rectangle_set_repeat.yy",},
{"name":"sh_fd_calculate_velocity_divergence_glsl","order":10,"path":"shaders/sh_fd_calculate_velocity_divergence_glsl/sh_fd_calculate_velocity_divergence_glsl.yy",},
{"name":"node_simple_shape","order":4,"path":"scripts/node_simple_shape/node_simple_shape.yy",},
{"name":"BBMOD_ShParticleDepth","order":9,"path":"shaders/BBMOD_ShParticleDepth/BBMOD_ShParticleDepth.yy",},
{"name":"node_random","order":20,"path":"scripts/node_random/node_random.yy",},
{"name":"node_atlas","order":2,"path":"scripts/node_atlas/node_atlas.yy",},
{"name":"sh_blend_sat","order":18,"path":"shaders/sh_blend_sat/sh_blend_sat.yy",},
{"name":"s_node_feedback","order":3,"path":"sprites/s_node_feedback/s_node_feedback.yy",},
{"name":"BBMOD_RenderQueue","order":11,"path":"scripts/BBMOD_RenderQueue/BBMOD_RenderQueue.yy",},
{"name":"getGradientData","order":1,"path":"scripts/getGradientData/getGradientData.yy",},
{"name":"BBMOD_Terrain","order":4,"path":"scripts/BBMOD_Terrain/BBMOD_Terrain.yy",},
{"name":"node_glow","order":10,"path":"scripts/node_glow/node_glow.yy",},
{"name":"sh_blend_min","order":9,"path":"shaders/sh_blend_min/sh_blend_min.yy",},
{"name":"node_polar","order":4,"path":"scripts/node_polar/node_polar.yy",},
@ -759,6 +899,7 @@
{"name":"s_node_solid","order":15,"path":"sprites/s_node_solid/s_node_solid.yy",},
{"name":"s_node_fluidSim_vortex","order":8,"path":"sprites/s_node_fluidSim_vortex/s_node_fluidSim_vortex.yy",},
{"name":"string_hexadecimal","order":1,"path":"scripts/string_hexadecimal/string_hexadecimal.yy",},
{"name":"BBMOD_SprDefaultNormalW","order":1,"path":"sprites/BBMOD_SprDefaultNormalW/BBMOD_SprDefaultNormalW.yy",},
{"name":"s_node_camera","order":3,"path":"sprites/s_node_camera/s_node_camera.yy",},
{"name":"sh_find_boundary","order":2,"path":"shaders/sh_find_boundary/sh_find_boundary.yy",},
{"name":"_node_strand_affector","order":10,"path":"scripts/_node_strand_affector/_node_strand_affector.yy",},
@ -771,8 +912,10 @@
{"name":"s_node_repeat","order":23,"path":"sprites/s_node_repeat/s_node_repeat.yy",},
{"name":"s_node_array_length","order":5,"path":"sprites/s_node_array_length/s_node_array_length.yy",},
{"name":"string_splice","order":3,"path":"scripts/string_splice/string_splice.yy",},
{"name":"__bbmod_string","order":6,"path":"scripts/__bbmod_string/__bbmod_string.yy",},
{"name":"s_node_vfx_input","order":12,"path":"sprites/s_node_vfx_input/s_node_vfx_input.yy",},
{"name":"node_strand_force_apply","order":6,"path":"scripts/node_strand_force_apply/node_strand_force_apply.yy",},
{"name":"BBMOD_ShGizmo","order":2,"path":"shaders/BBMOD_ShGizmo/BBMOD_ShGizmo.yy",},
{"name":"sh_seperate_shape_ite","order":2,"path":"shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.yy",},
{"name":"o_main","order":1,"path":"objects/o_main/o_main.yy",},
{"name":"area_function","order":2,"path":"scripts/area_function/area_function.yy",},
@ -781,6 +924,7 @@
{"name":"number_function","order":14,"path":"scripts/number_function/number_function.yy",},
{"name":"s_node_array_shift","order":12,"path":"sprites/s_node_array_shift/s_node_array_shift.yy",},
{"name":"s_node_statistic","order":5,"path":"sprites/s_node_statistic/s_node_statistic.yy",},
{"name":"BBMOD_ParticleSystem","order":8,"path":"scripts/BBMOD_ParticleSystem/BBMOD_ParticleSystem.yy",},
{"name":"s_node_cache_array","order":25,"path":"sprites/s_node_cache_array/s_node_cache_array.yy",},
{"name":"sh_blend_alpha_addition","order":13,"path":"shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.yy",},
{"name":"widget","order":25,"path":"scripts/widget/widget.yy",},
@ -791,6 +935,7 @@
{"name":"s_node_noise","order":8,"path":"sprites/s_node_noise/s_node_noise.yy",},
{"name":"sh_erode","order":17,"path":"shaders/sh_erode/sh_erode.yy",},
{"name":"fd_rectangle_get_velocity_dissipation_value","order":21,"path":"scripts/fd_rectangle_get_velocity_dissipation_value/fd_rectangle_get_velocity_dissipation_value.yy",},
{"name":"BBMOD_MeshBuilder","order":1,"path":"scripts/BBMOD_MeshBuilder/BBMOD_MeshBuilder.yy",},
{"name":"node_pixel_cloud","order":15,"path":"scripts/node_pixel_cloud/node_pixel_cloud.yy",},
{"name":"s_node_crop_content","order":13,"path":"sprites/s_node_crop_content/s_node_crop_content.yy",},
{"name":"draw_line_zigzag","order":20,"path":"scripts/draw_line_zigzag/draw_line_zigzag.yy",},
@ -801,10 +946,12 @@
{"name":"s_node_3d_plane","order":6,"path":"sprites/s_node_3d_plane/s_node_3d_plane.yy",},
{"name":"Regex","order":8,"path":"extensions/Regex/Regex.yy",},
{"name":"s_node_path_shift","order":4,"path":"sprites/s_node_path_shift/s_node_path_shift.yy",},
{"name":"BBMOD_MixRealFromHealthModule","order":2,"path":"scripts/BBMOD_MixRealFromHealthModule/BBMOD_MixRealFromHealthModule.yy",},
{"name":"s_node_grid_tri","order":6,"path":"sprites/s_node_grid_tri/s_node_grid_tri.yy",},
{"name":"s_node_local_analyze","order":52,"path":"sprites/s_node_local_analyze/s_node_local_analyze.yy",},
{"name":"_f_p0b","order":5,"path":"fonts/_f_p0b/_f_p0b.yy",},
{"name":"o_dialog_keyframe_curve","order":2,"path":"objects/o_dialog_keyframe_curve/o_dialog_keyframe_curve.yy",},
{"name":"BBMOD_AnimationStateMachine","order":1,"path":"scripts/BBMOD_AnimationStateMachine/BBMOD_AnimationStateMachine.yy",},
{"name":"sh_fd_visualize_pressure_glsl","order":16,"path":"shaders/sh_fd_visualize_pressure_glsl/sh_fd_visualize_pressure_glsl.yy",},
{"name":"s_node_rigidSim_force","order":2,"path":"sprites/s_node_rigidSim_force/s_node_rigidSim_force.yy",},
{"name":"s_node_vec2","order":7,"path":"sprites/s_node_vec2/s_node_vec2.yy",},
@ -819,6 +966,7 @@
{"name":"sh_blend_add_alpha_adj","order":2,"path":"shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.yy",},
{"name":"preview_overlay_area","order":3,"path":"scripts/preview_overlay_area/preview_overlay_area.yy",},
{"name":"node_text","order":10,"path":"scripts/node_text/node_text.yy",},
{"name":"BBMOD_MixRealOverTimeModule","order":2,"path":"scripts/BBMOD_MixRealOverTimeModule/BBMOD_MixRealOverTimeModule.yy",},
{"name":"panel_collection","order":3,"path":"scripts/panel_collection/panel_collection.yy",},
{"name":"node_string_trim","order":15,"path":"scripts/node_string_trim/node_string_trim.yy",},
{"name":"lerp_float","order":1,"path":"scripts/lerp_float/lerp_float.yy",},
@ -826,9 +974,11 @@
{"name":"fd_rectangle_get_velocity_width","order":26,"path":"scripts/fd_rectangle_get_velocity_width/fd_rectangle_get_velocity_width.yy",},
{"name":"node_convolution","order":5,"path":"scripts/node_convolution/node_convolution.yy",},
{"name":"sh_outline_only","order":35,"path":"shaders/sh_outline_only/sh_outline_only.yy",},
{"name":"BBMOD_GravityModule","order":2,"path":"scripts/BBMOD_GravityModule/BBMOD_GravityModule.yy",},
{"name":"lcd_function","order":13,"path":"scripts/lcd_function/lcd_function.yy",},
{"name":"s_node_destray","order":18,"path":"sprites/s_node_destray/s_node_destray.yy",},
{"name":"node_color_sampler","order":3,"path":"scripts/node_color_sampler/node_color_sampler.yy",},
{"name":"node_iterator_sort_output","order":2,"path":"scripts/node_iterator_sort_output/node_iterator_sort_output.yy",},
{"name":"s_node_fluidSim_update","order":5,"path":"sprites/s_node_fluidSim_update/s_node_fluidSim_update.yy",},
{"name":"ase_reader","order":1,"path":"scripts/ase_reader/ase_reader.yy",},
{"name":"fd_rectangle_inherit_velocity","order":12,"path":"scripts/fd_rectangle_inherit_velocity/fd_rectangle_inherit_velocity.yy",},
@ -848,6 +998,7 @@
{"name":"fd_rectangle_set_velocity_maccormack_weight","order":15,"path":"scripts/fd_rectangle_set_velocity_maccormack_weight/fd_rectangle_set_velocity_maccormack_weight.yy",},
{"name":"s_node_array_sort","order":11,"path":"sprites/s_node_array_sort/s_node_array_sort.yy",},
{"name":"node_trail","order":16,"path":"scripts/node_trail/node_trail.yy",},
{"name":"BBMOD_AddVec3OnCollisionModule","order":2,"path":"scripts/BBMOD_AddVec3OnCollisionModule/BBMOD_AddVec3OnCollisionModule.yy",},
{"name":"json_prettify","order":7,"path":"scripts/json_prettify/json_prettify.yy",},
{"name":"s_node_loop_output","order":13,"path":"sprites/s_node_loop_output/s_node_loop_output.yy",},
{"name":"panel_notification","order":4,"path":"scripts/panel_notification/panel_notification.yy",},
@ -855,7 +1006,10 @@
{"name":"o_dialog_graph_view","order":4,"path":"objects/o_dialog_graph_view/o_dialog_graph_view.yy",},
{"name":"fd_rectangle_get_velocity_height","order":22,"path":"scripts/fd_rectangle_get_velocity_height/fd_rectangle_get_velocity_height.yy",},
{"name":"logger","order":1,"path":"scripts/logger/logger.yy",},
{"name":"BBMOD_ShDefaultDepth","order":3,"path":"shaders/BBMOD_ShDefaultDepth/BBMOD_ShDefaultDepth.yy",},
{"name":"BBMOD_ShTerrain","order":2,"path":"shaders/BBMOD_ShTerrain/BBMOD_ShTerrain.yy",},
{"name":"s_node_blur_directional","order":11,"path":"sprites/s_node_blur_directional/s_node_blur_directional.yy",},
{"name":"BBMOD_Camera","order":1,"path":"scripts/BBMOD_Camera/BBMOD_Camera.yy",},
{"name":"s_node_average","order":50,"path":"sprites/s_node_average/s_node_average.yy",},
{"name":"s_node_sprite_sheet","order":1,"path":"sprites/s_node_sprite_sheet/s_node_sprite_sheet.yy",},
{"name":"s_node_text_length","order":9,"path":"sprites/s_node_text_length/s_node_text_length.yy",},
@ -866,13 +1020,16 @@
{"name":"__background_get_element","order":1,"path":"scripts/__background_get_element/__background_get_element.yy",},
{"name":"window_functions","order":27,"path":"scripts/window_functions/window_functions.yy",},
{"name":"node_mesh_create_path","order":1,"path":"scripts/node_mesh_create_path/node_mesh_create_path.yy",},
{"name":"__bbmod_async","order":1,"path":"scripts/__bbmod_async/__bbmod_async.yy",},
{"name":"sh_fd_calculate_pressure_srj_glsl","order":9,"path":"shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.yy",},
{"name":"curve_bounce_function","order":1,"path":"scripts/curve_bounce_function/curve_bounce_function.yy",},
{"name":"fd_rectangle_replace_material_surface","order":23,"path":"scripts/fd_rectangle_replace_material_surface/fd_rectangle_replace_material_surface.yy",},
{"name":"pack_skyline","order":4,"path":"scripts/pack_skyline/pack_skyline.yy",},
{"name":"BBMOD_ShDefaultBatched","order":2,"path":"shaders/BBMOD_ShDefaultBatched/BBMOD_ShDefaultBatched.yy",},
{"name":"fd_x","order":4,"path":"scripts/fd_x/fd_x.yy",},
{"name":"s_node_number","order":2,"path":"sprites/s_node_number/s_node_number.yy",},
{"name":"gif_reader","order":4,"path":"scripts/gif_reader/gif_reader.yy",},
{"name":"BBMOD_ShDefaultAnimated","order":1,"path":"shaders/BBMOD_ShDefaultAnimated/BBMOD_ShDefaultAnimated.yy",},
{"name":"_f_p3","order":7,"path":"fonts/_f_p3/_f_p3.yy",},
{"name":"node_group_input","order":1,"path":"scripts/node_group_input/node_group_input.yy",},
{"name":"fd_rectangle_set_material_dissipation_type","order":4,"path":"scripts/fd_rectangle_set_material_dissipation_type/fd_rectangle_set_material_dissipation_type.yy",},
@ -882,6 +1039,7 @@
{"name":"draw_rect_border","order":6,"path":"scripts/draw_rect_border/draw_rect_border.yy",},
{"name":"node_composite","order":1,"path":"scripts/node_composite/node_composite.yy",},
{"name":"s_node_path_map","order":2,"path":"sprites/s_node_path_map/s_node_path_map.yy",},
{"name":"BBMOD_MixRealFromSpeedModule","order":2,"path":"scripts/BBMOD_MixRealFromSpeedModule/BBMOD_MixRealFromSpeedModule.yy",},
{"name":"s_node_greyscale","order":26,"path":"sprites/s_node_greyscale/s_node_greyscale.yy",},
{"name":"sh_dilate","order":4,"path":"shaders/sh_dilate/sh_dilate.yy",},
{"name":"node_image_sequence","order":1,"path":"scripts/node_image_sequence/node_image_sequence.yy",},
@ -892,6 +1050,7 @@
{"name":"node_iterator_input","order":1,"path":"scripts/node_iterator_input/node_iterator_input.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":"BBMOD_Quaternion","order":3,"path":"scripts/BBMOD_Quaternion/BBMOD_Quaternion.yy",},
{"name":"o_dialog_output_visibility","order":2,"path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",},
{"name":"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",},
@ -903,7 +1062,10 @@
{"name":"draw_circle_angle","order":15,"path":"scripts/draw_circle_angle/draw_circle_angle.yy",},
{"name":"node_wrap_mesh","order":6,"path":"scripts/node_wrap_mesh/node_wrap_mesh.yy",},
{"name":"sh_alpha_hash","order":43,"path":"shaders/sh_alpha_hash/sh_alpha_hash.yy",},
{"name":"BBMOD_MixVec3Module","order":4,"path":"scripts/BBMOD_MixVec3Module/BBMOD_MixVec3Module.yy",},
{"name":"sh_blur_alpha","order":1,"path":"shaders/sh_blur_alpha/sh_blur_alpha.yy",},
{"name":"BBMOD_Importer","order":18,"path":"scripts/BBMOD_Importer/BBMOD_Importer.yy",},
{"name":"BBMOD_ERenderCommand","order":8,"path":"scripts/BBMOD_ERenderCommand/BBMOD_ERenderCommand.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":"sh_mirror_mask","order":8,"path":"shaders/sh_mirror_mask/sh_mirror_mask.yy",},
@ -913,17 +1075,20 @@
{"name":"fd_rectangle_set_velocity_dissipation_type","order":13,"path":"scripts/fd_rectangle_set_velocity_dissipation_type/fd_rectangle_set_velocity_dissipation_type.yy",},
{"name":"node_color_replacement","order":3,"path":"scripts/node_color_replacement/node_color_replacement.yy",},
{"name":"path_reader","order":5,"path":"scripts/path_reader/path_reader.yy",},
{"name":"BBMOD_SetVec2Module","order":3,"path":"scripts/BBMOD_SetVec2Module/BBMOD_SetVec2Module.yy",},
{"name":"node_3d_repeat","order":12,"path":"scripts/node_3d_repeat/node_3d_repeat.yy",},
{"name":"point_direction_positive","order":4,"path":"scripts/point_direction_positive/point_direction_positive.yy",},
{"name":"s_node_fluidSim_add_fluid","order":3,"path":"sprites/s_node_fluidSim_add_fluid/s_node_fluidSim_add_fluid.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":"BBMOD_Resouce","order":19,"path":"scripts/BBMOD_Resouce/BBMOD_Resouce.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":"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":"s_node_blur_contrast","order":10,"path":"sprites/s_node_blur_contrast/s_node_blur_contrast.yy",},
{"name":"fd_y","order":5,"path":"scripts/fd_y/fd_y.yy",},
{"name":"bbmod_gpu_get_default_state","order":9,"path":"scripts/bbmod_gpu_get_default_state/bbmod_gpu_get_default_state.yy",},
{"name":"node_string_regex_search","order":23,"path":"scripts/node_string_regex_search/node_string_regex_search.yy",},
{"name":"s_node_text_render","order":17,"path":"sprites/s_node_text_render/s_node_text_render.yy",},
{"name":"__init_global","order":8,"path":"scripts/__init_global/__init_global.yy",},
@ -937,9 +1102,12 @@
{"name":"string_cut","order":2,"path":"scripts/string_cut/string_cut.yy",},
{"name":"node_3d_prim_cylinder","order":7,"path":"scripts/node_3d_prim_cylinder/node_3d_prim_cylinder.yy",},
{"name":"panel_nodes","order":2,"path":"scripts/panel_nodes/panel_nodes.yy",},
{"name":"__bbmod_init","order":15,"path":"scripts/__bbmod_init/__bbmod_init.yy",},
{"name":"sh_gradient_points","order":19,"path":"shaders/sh_gradient_points/sh_gradient_points.yy",},
{"name":"s_node_vfx_turb","order":5,"path":"sprites/s_node_vfx_turb/s_node_vfx_turb.yy",},
{"name":"BBMOD_ShDefaultUnlit","order":9,"path":"shaders/BBMOD_ShDefaultUnlit/BBMOD_ShDefaultUnlit.yy",},
{"name":"o_dialog_l_system","order":1,"path":"objects/o_dialog_l_system/o_dialog_l_system.yy",},
{"name":"__bbmod_defines","order":14,"path":"scripts/__bbmod_defines/__bbmod_defines.yy",},
{"name":"sh_shadow_cast_light_sep","order":1,"path":"shaders/sh_shadow_cast_light_sep/sh_shadow_cast_light_sep.yy",},
{"name":"node_grid","order":16,"path":"scripts/node_grid/node_grid.yy",},
{"name":"node_edge_detect","order":8,"path":"scripts/node_edge_detect/node_edge_detect.yy",},
@ -953,6 +1121,7 @@
{"name":"directory_object","order":3,"path":"scripts/directory_object/directory_object.yy",},
{"name":"fd_rectangle_get_acceleration_b","order":1,"path":"scripts/fd_rectangle_get_acceleration_b/fd_rectangle_get_acceleration_b.yy",},
{"name":"surface_draw_functions","order":7,"path":"scripts/surface_draw_functions/surface_draw_functions.yy",},
{"name":"BBMOD_Matrix","order":2,"path":"scripts/BBMOD_Matrix/BBMOD_Matrix.yy",},
{"name":"pack_shelf","order":1,"path":"scripts/pack_shelf/pack_shelf.yy",},
{"name":"s_node_path_trim","order":6,"path":"sprites/s_node_path_trim/s_node_path_trim.yy",},
{"name":"libfilesystem","order":4,"path":"extensions/libfilesystem/libfilesystem.yy",},
@ -963,6 +1132,7 @@
{"name":"sh_blend_contrast","order":16,"path":"shaders/sh_blend_contrast/sh_blend_contrast.yy",},
{"name":"node_3d_prim_cube","order":5,"path":"scripts/node_3d_prim_cube/node_3d_prim_cube.yy",},
{"name":"s_node_fluidSim_add_collider","order":1,"path":"sprites/s_node_fluidSim_add_collider/s_node_fluidSim_add_collider.yy",},
{"name":"BBMOD_ShDefaultUnlitAnimated","order":10,"path":"shaders/BBMOD_ShDefaultUnlitAnimated/BBMOD_ShDefaultUnlitAnimated.yy",},
{"name":"node_3d_plane","order":2,"path":"scripts/node_3d_plane/node_3d_plane.yy",},
{"name":"node_display_text","order":3,"path":"scripts/node_display_text/node_display_text.yy",},
{"name":"node_strand_update","order":3,"path":"scripts/node_strand_update/node_strand_update.yy",},
@ -973,11 +1143,14 @@
{"name":"panel_color","order":1,"path":"scripts/panel_color/panel_color.yy",},
{"name":"s_node_line","order":7,"path":"sprites/s_node_line/s_node_line.yy",},
{"name":"fd_rectangle_get_material_dissipation_value","order":9,"path":"scripts/fd_rectangle_get_material_dissipation_value/fd_rectangle_get_material_dissipation_value.yy",},
{"name":"BBMOD_MixVec2FromSpeedModule","order":3,"path":"scripts/BBMOD_MixVec2FromSpeedModule/BBMOD_MixVec2FromSpeedModule.yy",},
{"name":"node_counter","order":1,"path":"scripts/node_counter/node_counter.yy",},
{"name":"s_node_shape_polygon","order":25,"path":"sprites/s_node_shape_polygon/s_node_shape_polygon.yy",},
{"name":"sh_color_picker_hue","order":7,"path":"shaders/sh_color_picker_hue/sh_color_picker_hue.yy",},
{"name":"node_path_eval","order":4,"path":"scripts/node_path_eval/node_path_eval.yy",},
{"name":"BBMOD_StaticBatch","order":1,"path":"scripts/BBMOD_StaticBatch/BBMOD_StaticBatch.yy",},
{"name":"node_vector_dot","order":27,"path":"scripts/node_vector_dot/node_vector_dot.yy",},
{"name":"BBMOD_SprColorGradingLUT","order":3,"path":"sprites/BBMOD_SprColorGradingLUT/BBMOD_SprColorGradingLUT.yy",},
{"name":"node_path_map_area","order":1,"path":"scripts/node_path_map_area/node_path_map_area.yy",},
{"name":"s_node_timeline_preview","order":2,"path":"sprites/s_node_timeline_preview/s_node_timeline_preview.yy",},
{"name":"node_csv_file_read","order":9,"path":"scripts/node_csv_file_read/node_csv_file_read.yy",},
@ -990,7 +1163,9 @@
{"name":"node_fluid_apply_velo","order":5,"path":"scripts/node_fluid_apply_velo/node_fluid_apply_velo.yy",},
{"name":"s_node_path_transform","order":5,"path":"sprites/s_node_path_transform/s_node_path_transform.yy",},
{"name":"s_node_path_blend","order":1,"path":"sprites/s_node_path_blend/s_node_path_blend.yy",},
{"name":"BBMOD_ShDefaultDepthLightmap","order":6,"path":"shaders/BBMOD_ShDefaultDepthLightmap/BBMOD_ShDefaultDepthLightmap.yy",},
{"name":"s_node_3d_extrude","order":2,"path":"sprites/s_node_3d_extrude/s_node_3d_extrude.yy",},
{"name":"BBMOD_EParticle","order":3,"path":"scripts/BBMOD_EParticle/BBMOD_EParticle.yy",},
{"name":"buttonGradient","order":4,"path":"scripts/buttonGradient/buttonGradient.yy",},
{"name":"sh_draw_downsample","order":2,"path":"shaders/sh_draw_downsample/sh_draw_downsample.yy",},
{"name":"__view_get","order":1,"path":"scripts/__view_get/__view_get.yy",},
@ -998,26 +1173,37 @@
{"name":"fd_rectangle_create","order":7,"path":"scripts/fd_rectangle_create/fd_rectangle_create.yy",},
{"name":"s_node_level_selector","order":29,"path":"sprites/s_node_level_selector/s_node_level_selector.yy",},
{"name":"random_function","order":3,"path":"scripts/random_function/random_function.yy",},
{"name":"BBMOD_MixVec3FromSpeedModule","order":4,"path":"scripts/BBMOD_MixVec3FromSpeedModule/BBMOD_MixVec3FromSpeedModule.yy",},
{"name":"s_node_input","order":6,"path":"sprites/s_node_input/s_node_input.yy",},
{"name":"addon","order":1,"path":"objects/addon/addon.yy",},
{"name":"BBMOD_EmissionOverTimeModule","order":3,"path":"scripts/BBMOD_EmissionOverTimeModule/BBMOD_EmissionOverTimeModule.yy",},
{"name":"_f_h3","order":3,"path":"fonts/_f_h3/_f_h3.yy",},
{"name":"s_node_math","order":1,"path":"sprites/s_node_math/s_node_math.yy",},
{"name":"node_iterator_index","order":2,"path":"scripts/node_iterator_index/node_iterator_index.yy",},
{"name":"BBMOD_AddVec3OverTimeModule","order":2,"path":"scripts/BBMOD_AddVec3OverTimeModule/BBMOD_AddVec3OverTimeModule.yy",},
{"name":"s_node_palette_sort","order":14,"path":"sprites/s_node_palette_sort/s_node_palette_sort.yy",},
{"name":"BBMOD_ShDefaultDepthAnimated","order":4,"path":"shaders/BBMOD_ShDefaultDepthAnimated/BBMOD_ShDefaultDepthAnimated.yy",},
{"name":"BBMOD_BaseRenderer","order":4,"path":"scripts/BBMOD_BaseRenderer/BBMOD_BaseRenderer.yy",},
{"name":"node_greyscale","order":5,"path":"scripts/node_greyscale/node_greyscale.yy",},
{"name":"s_node_cross_product_3d","order":11,"path":"sprites/s_node_cross_product_3d/s_node_cross_product_3d.yy",},
{"name":"node_color_adjustment","order":1,"path":"scripts/node_color_adjustment/node_color_adjustment.yy",},
{"name":"s_node_strandSim_force","order":6,"path":"sprites/s_node_strandSim_force/s_node_strandSim_force.yy",},
{"name":"BBMOD_ParticleEmitter","order":4,"path":"scripts/BBMOD_ParticleEmitter/BBMOD_ParticleEmitter.yy",},
{"name":"s_node_array_reverse","order":8,"path":"sprites/s_node_array_reverse/s_node_array_reverse.yy",},
{"name":"BBMOD_Shader","order":13,"path":"scripts/BBMOD_Shader/BBMOD_Shader.yy",},
{"name":"sh_ani_noise","order":4,"path":"shaders/sh_ani_noise/sh_ani_noise.yy",},
{"name":"sh_level","order":11,"path":"shaders/sh_level/sh_level.yy",},
{"name":"sh_grid_tri","order":20,"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":"BBMOD_AddVec2OnCollisionModule","order":1,"path":"scripts/BBMOD_AddVec2OnCollisionModule/BBMOD_AddVec2OnCollisionModule.yy",},
{"name":"__bbmod_logging","order":3,"path":"scripts/__bbmod_logging/__bbmod_logging.yy",},
{"name":"s_node_ase_file","order":18,"path":"sprites/s_node_ase_file/s_node_ase_file.yy",},
{"name":"draw_line_round","order":4,"path":"scripts/draw_line_round/draw_line_round.yy",},
{"name":"vectorBox","order":18,"path":"scripts/vectorBox/vectorBox.yy",},
{"name":"sh_blend_normal_dim","order":10,"path":"shaders/sh_blend_normal_dim/sh_blend_normal_dim.yy",},
{"name":"BBMOD_AddVec4OnCollisionModule","order":3,"path":"scripts/BBMOD_AddVec4OnCollisionModule/BBMOD_AddVec4OnCollisionModule.yy",},
{"name":"node_skew","order":11,"path":"scripts/node_skew/node_skew.yy",},
{"name":"bbmod_surface_check","order":9,"path":"scripts/bbmod_surface_check/bbmod_surface_check.yy",},
{"name":"s_node_dot_product","order":13,"path":"sprites/s_node_dot_product/s_node_dot_product.yy",},
{"name":"s_node_canvas","order":3,"path":"sprites/s_node_canvas/s_node_canvas.yy",},
{"name":"sh_downsample","order":1,"path":"shaders/sh_downsample/sh_downsample.yy",},
@ -1034,23 +1220,29 @@
{"name":"s_node_array_add","order":1,"path":"sprites/s_node_array_add/s_node_array_add.yy",},
{"name":"s_node_image_sequence_to_anim","order":9,"path":"sprites/s_node_image_sequence_to_anim/s_node_image_sequence_to_anim.yy",},
{"name":"_node_VFX_spawner","order":13,"path":"scripts/_node_VFX_spawner/_node_VFX_spawner.yy",},
{"name":"BBMOD_ShDefaultLightmap","order":7,"path":"shaders/BBMOD_ShDefaultLightmap/BBMOD_ShDefaultLightmap.yy",},
{"name":"sh_channel_B_grey","order":9,"path":"shaders/sh_channel_B_grey/sh_channel_B_grey.yy",},
{"name":"draw_UI_scale","order":8,"path":"scripts/draw_UI_scale/draw_UI_scale.yy",},
{"name":"BBMOD_Material","order":10,"path":"scripts/BBMOD_Material/BBMOD_Material.yy",},
{"name":"s_node_strandSim_update","order":1,"path":"sprites/s_node_strandSim_update/s_node_strandSim_update.yy",},
{"name":"s_node_RGB_combine","order":45,"path":"sprites/s_node_RGB_combine/s_node_RGB_combine.yy",},
{"name":"s_node_shadow_cast","order":49,"path":"sprites/s_node_shadow_cast/s_node_shadow_cast.yy",},
{"name":"path_function","order":4,"path":"scripts/path_function/path_function.yy",},
{"name":"fd_rectangle_set_velocity_dissipation_value","order":14,"path":"scripts/fd_rectangle_set_velocity_dissipation_value/fd_rectangle_set_velocity_dissipation_value.yy",},
{"name":"BBMOD_ShDefaultDepthBatched","order":5,"path":"shaders/BBMOD_ShDefaultDepthBatched/BBMOD_ShDefaultDepthBatched.yy",},
{"name":"panel_history","order":2,"path":"scripts/panel_history/panel_history.yy",},
{"name":"sh_channel_H","order":3,"path":"shaders/sh_channel_H/sh_channel_H.yy",},
{"name":"s_node_RGB","order":34,"path":"sprites/s_node_RGB/s_node_RGB.yy",},
{"name":"fd_rectangle_draw","order":9,"path":"scripts/fd_rectangle_draw/fd_rectangle_draw.yy",},
{"name":"BBMOD_MixRealModule","order":2,"path":"scripts/BBMOD_MixRealModule/BBMOD_MixRealModule.yy",},
{"name":"BBMOD_ShInstanceIDAnimated","order":6,"path":"shaders/BBMOD_ShInstanceIDAnimated/BBMOD_ShInstanceIDAnimated.yy",},
{"name":"oRigidbody","order":2,"path":"objects/oRigidbody/oRigidbody.yy",},
{"name":"node_grey_to_alpha","order":4,"path":"scripts/node_grey_to_alpha/node_grey_to_alpha.yy",},
{"name":"sh_blend_add","order":7,"path":"shaders/sh_blend_add/sh_blend_add.yy",},
{"name":"node_de_stray","order":1,"path":"scripts/node_de_stray/node_de_stray.yy",},
{"name":"sh_channel_G","order":2,"path":"shaders/sh_channel_G/sh_channel_G.yy",},
{"name":"s_node_dilate","order":19,"path":"sprites/s_node_dilate/s_node_dilate.yy",},
{"name":"BBMOD_State","order":2,"path":"scripts/BBMOD_State/BBMOD_State.yy",},
{"name":"node_value","order":6,"path":"scripts/node_value/node_value.yy",},
{"name":"draw_line_curve","order":5,"path":"scripts/draw_line_curve/draw_line_curve.yy",},
{"name":"sh_blend_screen","order":3,"path":"shaders/sh_blend_screen/sh_blend_screen.yy",},
@ -1064,11 +1256,13 @@
{"name":"sh_warp_4points","order":9,"path":"shaders/sh_warp_4points/sh_warp_4points.yy",},
{"name":"_f_p2","order":4,"path":"fonts/_f_p2/_f_p2.yy",},
{"name":"fd_rectangle_get_pressure_iteration_type","order":17,"path":"scripts/fd_rectangle_get_pressure_iteration_type/fd_rectangle_get_pressure_iteration_type.yy",},
{"name":"BBMOD_PostProcessor","order":1,"path":"scripts/BBMOD_PostProcessor/BBMOD_PostProcessor.yy",},
{"name":"node_text_file_write","order":11,"path":"scripts/node_text_file_write/node_text_file_write.yy",},
{"name":"sh_lum2alpha","order":38,"path":"shaders/sh_lum2alpha/sh_lum2alpha.yy",},
{"name":"button","order":2,"path":"scripts/button/button.yy",},
{"name":"s_node_3d_sphere","order":8,"path":"sprites/s_node_3d_sphere/s_node_3d_sphere.yy",},
{"name":"fd_rectangle_replace_velocity","order":16,"path":"scripts/fd_rectangle_replace_velocity/fd_rectangle_replace_velocity.yy",},
{"name":"BBMOD_ShInstanceID","order":5,"path":"shaders/BBMOD_ShInstanceID/BBMOD_ShInstanceID.yy",},
{"name":"node_VFX_effector","order":6,"path":"scripts/node_VFX_effector/node_VFX_effector.yy",},
{"name":"node_path_shift","order":5,"path":"scripts/node_path_shift/node_path_shift.yy",},
{"name":"s_node_3d_cylinder","order":1,"path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",},
@ -1077,6 +1271,7 @@
{"name":"s_node_regex_replace","order":10,"path":"sprites/s_node_regex_replace/s_node_regex_replace.yy",},
{"name":"paddingBox","order":9,"path":"scripts/paddingBox/paddingBox.yy",},
{"name":"fd_rectangle_set_visualization_shader","order":18,"path":"scripts/fd_rectangle_set_visualization_shader/fd_rectangle_set_visualization_shader.yy",},
{"name":"BBMOD_ParticleShader","order":7,"path":"scripts/BBMOD_ParticleShader/BBMOD_ParticleShader.yy",},
{"name":"s_node_ase_layer","order":17,"path":"sprites/s_node_ase_layer/s_node_ase_layer.yy",},
{"name":"_f_p1","order":1,"path":"fonts/_f_p1/_f_p1.yy",},
{"name":"tuple_functions","order":5,"path":"scripts/tuple_functions/tuple_functions.yy",},
@ -1088,10 +1283,12 @@
{"name":"bin_function","order":11,"path":"scripts/bin_function/bin_function.yy",},
{"name":"s_node_feedback_output","order":9,"path":"sprites/s_node_feedback_output/s_node_feedback_output.yy",},
{"name":"sh_surface_replace_fast_find","order":2,"path":"shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.yy",},
{"name":"BBMOD_BaseMaterial","order":3,"path":"scripts/BBMOD_BaseMaterial/BBMOD_BaseMaterial.yy",},
{"name":"node_3d_combine","order":10,"path":"scripts/node_3d_combine/node_3d_combine.yy",},
{"name":"fd_rectangle_add_material","order":4,"path":"scripts/fd_rectangle_add_material/fd_rectangle_add_material.yy",},
{"name":"fd_rectangle_set_target","order":18,"path":"scripts/fd_rectangle_set_target/fd_rectangle_set_target.yy",},
{"name":"draw_line_dashed","order":7,"path":"scripts/draw_line_dashed/draw_line_dashed.yy",},
{"name":"BBMOD_SpotLight","order":6,"path":"scripts/BBMOD_SpotLight/BBMOD_SpotLight.yy",},
{"name":"pseudo_regex","order":7,"path":"scripts/pseudo_regex/pseudo_regex.yy",},
{"name":"node_invert","order":6,"path":"scripts/node_invert/node_invert.yy",},
{"name":"o_dialog_history","order":3,"path":"objects/o_dialog_history/o_dialog_history.yy",},
@ -1108,12 +1305,15 @@
{"name":"s_node_cache","order":27,"path":"sprites/s_node_cache/s_node_cache.yy",},
{"name":"node_repeat","order":26,"path":"scripts/node_repeat/node_repeat.yy",},
{"name":"sh_fd_advect_velocity_1_glsl","order":7,"path":"shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.yy",},
{"name":"BBMOD_SphereCollider","order":7,"path":"scripts/BBMOD_SphereCollider/BBMOD_SphereCollider.yy",},
{"name":"mac_window_step","order":1,"path":"scripts/mac_window_step/mac_window_step.yy",},
{"name":"s_node_image","order":4,"path":"sprites/s_node_image/s_node_image.yy",},
{"name":"__node_value_processor","order":7,"path":"scripts/__node_value_processor/__node_value_processor.yy",},
{"name":"BBMOD_ShParticleUnlit","order":11,"path":"shaders/BBMOD_ShParticleUnlit/BBMOD_ShParticleUnlit.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":"load_function","order":2,"path":"scripts/load_function/load_function.yy",},
{"name":"BBMOD_VertexFormat","order":5,"path":"scripts/BBMOD_VertexFormat/BBMOD_VertexFormat.yy",},
{"name":"draw_fit","order":12,"path":"scripts/draw_fit/draw_fit.yy",},
{"name":"s_node_morph_surface","order":56,"path":"sprites/s_node_morph_surface/s_node_morph_surface.yy",},
{"name":"fd_rectangle_get_velocity_dissipation_type","order":20,"path":"scripts/fd_rectangle_get_velocity_dissipation_type/fd_rectangle_get_velocity_dissipation_type.yy",},
@ -1124,6 +1324,7 @@
{"name":"node_path_array","order":11,"path":"scripts/node_path_array/node_path_array.yy",},
{"name":"node_scale","order":8,"path":"scripts/node_scale/node_scale.yy",},
{"name":"sh_displace","order":5,"path":"shaders/sh_displace/sh_displace.yy",},
{"name":"BBMOD_DefaultShader","order":9,"path":"scripts/BBMOD_DefaultShader/BBMOD_DefaultShader.yy",},
{"name":"fd_rectangle_get_material_height","order":10,"path":"scripts/fd_rectangle_get_material_height/fd_rectangle_get_material_height.yy",},
{"name":"rangeBox","order":10,"path":"scripts/rangeBox/rangeBox.yy",},
{"name":"node_VFX_effect_accelerate","order":7,"path":"scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.yy",},
@ -1133,6 +1334,7 @@
{"name":"sh_sdf_dist","order":4,"path":"shaders/sh_sdf_dist/sh_sdf_dist.yy",},
{"name":"node_path_plot","order":12,"path":"scripts/node_path_plot/node_path_plot.yy",},
{"name":"sh_de_corner","order":15,"path":"shaders/sh_de_corner/sh_de_corner.yy",},
{"name":"BBMOD_Vec3","order":5,"path":"scripts/BBMOD_Vec3/BBMOD_Vec3.yy",},
{"name":"node_rigid_object_spawner","order":6,"path":"scripts/node_rigid_object_spawner/node_rigid_object_spawner.yy",},
{"name":"o_dialog_graph_connection","order":5,"path":"objects/o_dialog_graph_connection/o_dialog_graph_connection.yy",},
{"name":"sh_fd_advect_velocity_0_glsl","order":6,"path":"shaders/sh_fd_advect_velocity_0_glsl/sh_fd_advect_velocity_0_glsl.yy",},
@ -1140,6 +1342,7 @@
{"name":"sprite_loader","order":11,"path":"scripts/sprite_loader/sprite_loader.yy",},
{"name":"fd_rectangle_get_material_surface","order":12,"path":"scripts/fd_rectangle_get_material_surface/fd_rectangle_get_material_surface.yy",},
{"name":"fd_rectangle_clear","order":6,"path":"scripts/fd_rectangle_clear/fd_rectangle_clear.yy",},
{"name":"bbmod_get_calling_function_name","order":7,"path":"scripts/bbmod_get_calling_function_name/bbmod_get_calling_function_name.yy",},
{"name":"__rectangle","order":7,"path":"scripts/__rectangle/__rectangle.yy",},
{"name":"s_node_iterator_index","order":8,"path":"sprites/s_node_iterator_index/s_node_iterator_index.yy",},
{"name":"preferences","order":5,"path":"scripts/preferences/preferences.yy",},
@ -1148,12 +1351,14 @@
{"name":"s_node_json_file_write","order":13,"path":"sprites/s_node_json_file_write/s_node_json_file_write.yy",},
{"name":"fd_rectangle_get_material_time_step","order":13,"path":"scripts/fd_rectangle_get_material_time_step/fd_rectangle_get_material_time_step.yy",},
{"name":"node_pack_sprites","order":4,"path":"scripts/node_pack_sprites/node_pack_sprites.yy",},
{"name":"BBMOD_AddVec2OverTimeModule","order":1,"path":"scripts/BBMOD_AddVec2OverTimeModule/BBMOD_AddVec2OverTimeModule.yy",},
{"name":"font_data","order":10,"path":"scripts/font_data/font_data.yy",},
{"name":"node_camera","order":3,"path":"scripts/node_camera/node_camera.yy",},
{"name":"s_node_color_replace","order":8,"path":"sprites/s_node_color_replace/s_node_color_replace.yy",},
{"name":"draw_surface_functions","order":4,"path":"scripts/draw_surface_functions/draw_surface_functions.yy",},
{"name":"node_rigid_variable","order":8,"path":"scripts/node_rigid_variable/node_rigid_variable.yy",},
{"name":"s_node_zoom","order":54,"path":"sprites/s_node_zoom/s_node_zoom.yy",},
{"name":"BBMOD_Property","order":1,"path":"scripts/BBMOD_Property/BBMOD_Property.yy",},
{"name":"node_noise_fbm","order":30,"path":"scripts/node_noise_fbm/node_noise_fbm.yy",},
{"name":"sh_channel_V","order":6,"path":"shaders/sh_channel_V/sh_channel_V.yy",},
{"name":"__shapes","order":3,"path":"scripts/__shapes/__shapes.yy",},
@ -1161,9 +1366,12 @@
{"name":"shell_helper","order":20,"path":"scripts/shell_helper/shell_helper.yy",},
{"name":"node_strand_collision","order":8,"path":"scripts/node_strand_collision/node_strand_collision.yy",},
{"name":"s_node_atlas_get","order":2,"path":"sprites/s_node_atlas_get/s_node_atlas_get.yy",},
{"name":"BBMOD_ShInstanceIDLightmap","order":8,"path":"shaders/BBMOD_ShInstanceIDLightmap/BBMOD_ShInstanceIDLightmap.yy",},
{"name":"sh_flood_fill_it","order":1,"path":"shaders/sh_flood_fill_it/sh_flood_fill_it.yy",},
{"name":"node_iterator_sort_input","order":1,"path":"scripts/node_iterator_sort_input/node_iterator_sort_input.yy",},
{"name":"draw_corner","order":19,"path":"scripts/draw_corner/draw_corner.yy",},
{"name":"o_dialog_preference","order":7,"path":"objects/o_dialog_preference/o_dialog_preference.yy",},
{"name":"BBMOD_ShInstanceIDBatched","order":7,"path":"shaders/BBMOD_ShInstanceIDBatched/BBMOD_ShInstanceIDBatched.yy",},
{"name":"node_wrap","order":2,"path":"scripts/node_wrap/node_wrap.yy",},
{"name":"node_3d_prim_sphere","order":13,"path":"scripts/node_3d_prim_sphere/node_3d_prim_sphere.yy",},
{"name":"dialog_management","order":2,"path":"scripts/dialog_management/dialog_management.yy",},
@ -1185,9 +1393,11 @@
{"name":"sh_fd_visualize_pixel_art_fiery_smoke_glsl","order":14,"path":"shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.yy",},
{"name":"node_ase_layer","order":15,"path":"scripts/node_ase_layer/node_ase_layer.yy",},
{"name":"sh_local_analyze","order":47,"path":"shaders/sh_local_analyze/sh_local_analyze.yy",},
{"name":"bbmod_json_load","order":8,"path":"scripts/bbmod_json_load/bbmod_json_load.yy",},
{"name":"s_node_array_zip","order":13,"path":"sprites/s_node_array_zip/s_node_array_zip.yy",},
{"name":"fd_rectangle_get_material_width","order":15,"path":"scripts/fd_rectangle_get_material_width/fd_rectangle_get_material_width.yy",},
{"name":"font_sprite_loader","order":10,"path":"scripts/font_sprite_loader/font_sprite_loader.yy",},
{"name":"BBMOD_FrustumCollider","order":3,"path":"scripts/BBMOD_FrustumCollider/BBMOD_FrustumCollider.yy",},
{"name":"s_node_noise_aniso","order":9,"path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",},
{"name":"s_node_gradient_palette","order":16,"path":"sprites/s_node_gradient_palette/s_node_gradient_palette.yy",},
{"name":"node_array_shuffle","order":22,"path":"scripts/node_array_shuffle/node_array_shuffle.yy",},

File diff suppressed because it is too large Load diff

BIN
datafiles/data/BBMOD/BBMOD Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,78 @@
Open Asset Import Library (assimp)
Copyright (c) 2006-2021, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the
following conditions are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
* Neither the name of the assimp team, nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission of the assimp team.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************
AN EXCEPTION applies to all files in the ./test/models-nonbsd folder.
These are 3d models for testing purposes, from various free sources
on the internet. They are - unless otherwise stated - copyright of
their respective creators, which may impose additional requirements
on the use of their work. For any of these models, see
<model-name>.source.txt for more legal information. Contact us if you
are a copyright holder and believe that we credited you inproperly or
if you don't want your files to appear in the repository.
******************************************************************************
Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
http://code.google.com/p/poly2tri/
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Poly2Tri nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -172,9 +172,12 @@
if(destroy_on_click_out && mouse_press(mb_any) && !point_in_rectangle(mouse_mx, mouse_my, x0, y0, x1, y1)) {
instance_destroy(self);
onDestroy();
DIALOG_CLICK = false;
}
}
function onDestroy() {}
#endregion
#region children

View file

@ -56,4 +56,9 @@ event_inherited();
content.onResize();
}
}
function onDestroy() {
if(!content) return;
content.onClose();
}
#endregion

View file

@ -47,9 +47,11 @@ if !ready exit;
draw_text_cut(dialog_x + ui(32), dialog_y + ui(8), content.title, dialog_w - ui(32 + 32));
if(instanceof(content) != "Panel_Menu")
if(buttonInstant(THEME.button_hide, dialog_x + dialog_w - ui(28), dialog_y + ui(8), ui(20), ui(20), mouse_ui, sFOCUS, sHOVER, "", THEME.window_exit) == 2)
if(buttonInstant(THEME.button_hide, dialog_x + dialog_w - ui(28), dialog_y + ui(8), ui(20), ui(20), mouse_ui, sFOCUS, sHOVER, "", THEME.window_exit) == 2) {
onDestroy();
instance_destroy();
}
}
var bx = content.showHeader? dialog_x + ui(8) : dialog_x + ui(24);
var by = content.showHeader? dialog_y + ui(8) : dialog_y + ui(18);

View file

@ -84,10 +84,13 @@
HOTKEY_MOD = 0;
#endregion
#region gif reader
globalvar GIF_READER;
#region Loader
globalvar GIF_READER, _BBMOD_DLL;
GIF_READER = ds_list_create();
gif_complete_st = ds_stack_create();
_BBMOD_DLL = new BBMOD_DLL();
#endregion
#region tunnel
@ -97,6 +100,23 @@
TUNNELS_OUT = ds_map_create();
#endregion
#region add on callback
globalvar ANIMATION_PRE, ANIMATION_POST;
ANIMATION_PRE = [];
ANIMATION_POST = [];
function __addon_preAnim() {
for( var i = 0; i < array_length(ANIMATION_PRE); i++ )
ANIMATION_PRE[i]();
}
function __addon_postAnim() {
for( var i = 0; i < array_length(ANIMATION_POST); i++ )
ANIMATION_POST[i]();
}
#endregion
#region file drop
if(OS == os_windows) {
file_dropper_init();

View file

@ -81,8 +81,11 @@
}
if(ANIMATOR.is_playing || ANIMATOR.rendering) {
if(ANIMATOR.frame_progress)
if(ANIMATOR.frame_progress) {
__addon_preAnim();
Render();
__addon_postAnim();
}
ANIMATOR.frame_progress = false;
} else {
if(UPDATE & RENDER_TYPE.full)

View file

@ -0,0 +1,296 @@
/// @func BBMOD_AABBCollider([_position[, _size]])
///
/// @extends BBMOD_Collider
///
/// @desc An axis-aligned bounding box (AABB) collider.
///
/// @param {Struct.BBMOD_Vec3} [_position] The position (center) of the AABB.
/// Defaults to `(0, 0, 0)`.
/// @param {Struct.BBMOD_Vec3} [_size] The size of the AABB on each
/// axis in both directions (e.g. `new BBMOD_Vec3(2)` would make a 4x4x4 box).
/// Defaults to `(0.5, 0.5, 0.5)`.
///
/// @see BBMOD_FrustumCollider
/// @see BBMOD_PlaneCollider
/// @see BBMOD_SphereCollider
function BBMOD_AABBCollider(
_position=new BBMOD_Vec3(),
_size=new BBMOD_Vec3(0.5)
) : BBMOD_Collider() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Struct.BBMOD_Vec3} The center position of the AABB.
Position = _position;
/// @var {Struct.BBMOD_Vec3} The size of the AABB on each axis in both
/// directions (e.g. `new BBMOD_Vec3(2)` would be a 4x4x4 box).
Size = _size;
/// @func FromMinMax(_min, _max)
///
/// @desc Initializes the AABB using its minimum and maximum coordinates.
///
/// @param {Struct.BBMOD_Vec3} _min The minimum coordinate of the AABB.
/// @param {Struct.BBMOD_Vec3} _max The maximum coordinate of the AABB.
///
/// @return {Struct.BBMOD_AABBCollider} Returns `self`.
// Source: https://github.com/gszauer/GamePhysicsCookbook/blob/a0b8ee0c39fed6d4b90bb6d2195004dfcf5a1115/Code/Geometry3D.cpp#L37
static FromMinMax = function (_min, _max) {
gml_pragma("forceinline");
Position = _min.Add(_max).Scale(0.5);
Size = _max.Sub(_min).Scale(0.5);
return self;
};
/// @func GetMin()
///
/// @desc Retrieves the minimum coordinate of the AABB.
///
/// @return {Struct.BBMOD_Vec3} The minimum coordinate.
// Source: https://github.com/gszauer/GamePhysicsCookbook/blob/a0b8ee0c39fed6d4b90bb6d2195004dfcf5a1115/Code/Geometry3D.cpp#L24
static GetMin = function () {
gml_pragma("forceinline");
var _p1 = Position.Add(Size);
var _p2 = Position.Sub(Size);
return _p1.Minimize(_p2);
};
/// @func GetMax()
///
/// @desc Retrieves the maximum coordinate of the AABB.
///
/// @return {Struct.BBMOD_Vec3} The maximum coordinate.
// Source: https://github.com/gszauer/GamePhysicsCookbook/blob/a0b8ee0c39fed6d4b90bb6d2195004dfcf5a1115/Code/Geometry3D.cpp#L30
static GetMax = function () {
gml_pragma("forceinline");
var _p1 = Position.Add(Size);
var _p2 = Position.Sub(Size);
return _p1.Maximize(_p2);
};
// Source: https://github.com/gszauer/GamePhysicsCookbook/blob/a0b8ee0c39fed6d4b90bb6d2195004dfcf5a1115/Code/Geometry3D.cpp#L149
static GetClosestPoint = function (_point) {
gml_pragma("forceinline");
return _point.Clamp(GetMin(), GetMax());
};
// Source: https://github.com/gszauer/GamePhysicsCookbook/blob/a0b8ee0c39fed6d4b90bb6d2195004dfcf5a1115/Code/Geometry3D.cpp#L340
static TestAABB = function (_aabb) {
gml_pragma("forceinline");
var _aMin = GetMin();
var _aMax = GetMax();
var _bMin = _aabb.GetMin();
var _bMax = _aabb.GetMax();
return ((_aMin.X <= _bMax.X && _aMax.X >= _bMin.X)
&& (_aMin.Y <= _bMax.Y && _aMax.Y >= _bMin.Y)
&& (_aMin.Z <= _bMax.Z && _aMax.Z >= _bMin.Z));
};
// Source: https://github.com/gszauer/GamePhysicsCookbook/blob/a0b8ee0c39fed6d4b90bb6d2195004dfcf5a1115/Code/Geometry3D.cpp#L482
static TestPlane = function (_plane) {
gml_pragma("forceinline");
var _pLen = (Size.X * abs(_plane.Normal.X)
+ Size.Y * abs(_plane.Normal.Y)
+ Size.Z * abs(_plane.Normal.Z));
var _dist = _plane.Normal.Dot(Position) - _plane.Distance;
return (abs(_dist) <= _pLen);
};
// Source: https://github.com/gszauer/GamePhysicsCookbook/blob/a0b8ee0c39fed6d4b90bb6d2195004dfcf5a1115/Code/Geometry3D.cpp#L108
static TestPoint = function (_point) {
gml_pragma("forceinline");
var _min = GetMin();
var _max = GetMax();
if (_point.X < _min.X || _point.Y < _min.Y || _point.Z < _min.Z)
{
return false;
}
if (_point.X > _max.X || _point.Y > _max.Y || _point.Z > _max.Z)
{
return false;
}
return true;
};
static TestSphere = function (_sphere) {
gml_pragma("forceinline");
return _sphere.TestAABB(self);
};
// Source: https://github.com/gszauer/GamePhysicsCookbook/blob/a0b8ee0c39fed6d4b90bb6d2195004dfcf5a1115/Code/Geometry3D.cpp#L707
static Raycast = function (_ray, _result=undefined) {
if (_result != undefined)
{
_result.Reset();
}
var _min = GetMin();
var _max = GetMax();
var _t1 = (_min.X - _ray.Origin.X)
/ (bbmod_cmp(_ray.Direction.X, 0.0) ? 0.00001 : _ray.Direction.X);
var _t2 = (_max.X - _ray.Origin.X)
/ (bbmod_cmp(_ray.Direction.X, 0.0) ? 0.00001 : _ray.Direction.X);
var _t3 = (_min.Y - _ray.Origin.Y)
/ (bbmod_cmp(_ray.Direction.Y, 0.0) ? 0.00001 : _ray.Direction.Y);
var _t4 = (_max.Y - _ray.Origin.Y)
/ (bbmod_cmp(_ray.Direction.Y, 0.0) ? 0.00001 : _ray.Direction.Y);
var _t5 = (_min.Z - _ray.Origin.Z)
/ (bbmod_cmp(_ray.Direction.Z, 0.0) ? 0.00001 : _ray.Direction.Z);
var _t6 = (_max.Z - _ray.Origin.Z)
/ (bbmod_cmp(_ray.Direction.Z, 0.0) ? 0.00001 : _ray.Direction.Z);
var _tmin = max(max(min(_t1, _t2), min(_t3, _t4)), min(_t5, _t6));
var _tmax = min(min(max(_t1, _t2), max(_t3, _t4)), max(_t5, _t6));
if (_tmax < 0.0)
{
return false;
}
if (_tmin > _tmax)
{
return false;
}
if (_result != undefined)
{
var _tResult = (_tmin < 0.0) ? _tmax : _tmin;
_result.Distance = _tResult;
_result.Point = _ray.Origin.Add(_ray.Direction.Scale(_tResult));
for (var i = 0; i < 6; ++i)
{
var _ti;
switch (i)
{
case 0:
_ti = _t1;
break;
case 1:
_ti = _t2;
break;
case 2:
_ti = _t3;
break;
case 3:
_ti = _t4;
break;
case 4:
_ti = _t5;
break;
case 5:
_ti = _t6;
break;
}
if (bbmod_cmp(_tResult, _ti))
{
switch (i)
{
case 0:
_result.Normal = new BBMOD_Vec3(-1.0, 0.0, 0.0);
break;
case 1:
_result.Normal = new BBMOD_Vec3(1.0, 0.0, 0.0);
break;
case 2:
_result.Normal = new BBMOD_Vec3(0.0, -1.0, 0.0);
break;
case 3:
_result.Normal = new BBMOD_Vec3(0.0, 1.0, 0.0);
break;
case 4:
_result.Normal = new BBMOD_Vec3(0.0, 0.0, -1.0);
break;
case 5:
_result.Normal = new BBMOD_Vec3(0.0, 0.0, 1.0);
break;
}
}
}
}
return true;
};
static DrawDebug = function (_color=c_white, _alpha=1.0) {
var _vbuffer = global.__bbmodVBufferDebug;
var _x1 = Position.X - Size.X;
var _x2 = Position.X + Size.X;
var _y1 = Position.Y - Size.Y;
var _y2 = Position.Y + Size.Y;
var _z1 = Position.Z - Size.Z;
var _z2 = Position.Z + Size.Z;
vertex_begin(_vbuffer, BBMOD_VFORMAT_DEBUG.Raw);
// Bottom
// 1--2
// | |
// 4--3
vertex_position_3d(_vbuffer, _x1, _y1, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y1, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y1, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y2, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y2, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x1, _y2, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x1, _y2, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x1, _y1, _z1); vertex_color(_vbuffer, _color, _alpha);
// Top
// 1--2
// | |
// 4--3
vertex_position_3d(_vbuffer, _x1, _y1, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y1, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y1, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y2, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y2, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x1, _y2, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x1, _y2, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x1, _y1, _z2); vertex_color(_vbuffer, _color, _alpha);
// Sides
// 1--2
// | |
// 4--3
vertex_position_3d(_vbuffer, _x1, _y1, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x1, _y1, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y1, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y1, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y2, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x2, _y2, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x1, _y2, _z1); vertex_color(_vbuffer, _color, _alpha);
vertex_position_3d(_vbuffer, _x1, _y2, _z2); vertex_color(_vbuffer, _color, _alpha);
vertex_end(_vbuffer);
vertex_submit(_vbuffer, pr_linelist, -1);
return self;
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AABBCollider",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Raycasting",
"path": "folders/_Extensions/BBMOD/Raycasting.yy",
},
}

View file

@ -0,0 +1,46 @@
/// @func BBMOD_AABBEmissionModule([_min[, _max[, _inside]]])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A particle module that positions spawned particles into an AABB shape.
///
/// @param {Struct.BBMOD_Vec3} [_min] The minimum coordinate of the AABB.
/// Defaults to `(-0.5, -0.5, -0.5)`.
/// @param {Struct.BBMOD_Vec3} [_max] The maximum coordinate of the AABB.
/// Defaults to `(0.5, 0.5, 0.5)`.
/// @param {Bool} [_inside] If `true` then the particles can be spawned inside
/// of the AABB. Defaults to `true`.
///
/// @see BBMOD_EParticle.PositionX
/// @see BBMOD_EParticle.PositionY
/// @see BBMOD_EParticle.PositionZ
function BBMOD_AABBEmissionModule(
_min=new BBMOD_Vec3(-0.5),
_max=new BBMOD_Vec3(0.5),
_inside=true
) : BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Real} The minimum coordinate of the AABB. Default value is
/// to `(-0.5, -0.5, -0.5)`.
Min = _min;
/// @var {Real} The maximum coordinate of the AABB. Default value is
/// to `(0.5, 0.5, 0.5)`.
Max = _max;
/// @var {Bool} If `true` then the particles can be spawned inside of
/// the AABB. Default value is `true`.
Inside = _inside;
static on_particle_start = function (_emitter, _particleIndex) {
var _side = choose(0, 1, 2);
_emitter.Particles[# BBMOD_EParticle.PositionX, _particleIndex] +=
(Inside || _side != 0) ? random_range(Min.X, Max.X) : choose(Min.X, Max.X);
_emitter.Particles[# BBMOD_EParticle.PositionY, _particleIndex] +=
(Inside || _side != 1) ? random_range(Min.Y, Max.Y) : choose(Min.Y, Max.Y);
_emitter.Particles[# BBMOD_EParticle.PositionZ, _particleIndex] +=
(Inside || _side != 2) ? random_range(Min.Z, Max.Z) : choose(Min.Z, Max.Z);
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AABBEmissionModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Shape",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Emission/Shape.yy",
},
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AddRealOnCollisionModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "AddPropertyOnCollision",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOnCollision.yy",
},
}

View file

@ -0,0 +1,57 @@
/// @func BBMOD_AddRealOnCollisionModule([_property[, _change]])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A universal particle module that adds a value to particles' property
/// when they have a collision.
///
/// @param {Real} [_property] The property to add the value to. Use values from
/// {@link BBMOD_EParticle}. Defaults to `undefined`.
/// @param {Real} [_change] The value to add to particles' health. Defaults
/// to 1.0.
///
/// @see BBMOD_EParticle.HasCollided
function BBMOD_AddRealOnCollisionModule(_property=undefined, _change=1.0)
: BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Real} The property to add the value to. Use values from
/// {@link BBMOD_EParticle}. Default value is `undefined`.
Property = _property;
/// @var {Real} The value to add on collision. Default value is 1.0.
Change = _change;
static on_update = function (_emitter, _deltaTime) {
if (Property != undefined)
{
var _y2 = _emitter.ParticlesAlive - 1;
if (_y2 >= 0)
{
var _particles = _emitter.Particles;
var _gridCompute = _emitter.GridCompute;
ds_grid_set_region(
_gridCompute,
0, 0,
0, _y2,
Change);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
0, 0);
ds_grid_add_grid_region(
_particles,
_gridCompute,
0, 0,
0, _y2,
Property, 0);
}
}
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AddRealOverTimeModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "AddPropertyOverTime",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOverTime.yy",
},
}

View file

@ -0,0 +1,51 @@
/// @func BBMOD_AddRealOverTimeModule([_property[, _change[, _period]]])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A universal particle module that adds a value to particles' property
/// over time.
///
/// @param {Real} [_property] The property to add the value to. Use values from
/// {@link BBMOD_EParticle}. Defaults to `undefined`.
/// @param {Real} [_change] The value added over specified period. Defaults to
/// 1.0.
/// @param {Real} [_period] How long in seconds it takes to add the value to the
/// property. Defaults to 1.0.
///
/// @see BBMOD_EParticle.HealthLeft
function BBMOD_AddRealOverTimeModule(
_property=undefined,
_change=1.0,
_period=1.0
) : BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Real} The property to add the value to. Use values from
/// {@link BBMOD_EParticle} Default value is `undefined`.
Property = _property;
/// @var {Real} The value added over {@link BBMOD_AddRealOverTimeModule.Period}.
/// Default value is 1.0.
Change = _change;
/// @var {Real} How long in seconds it takes to add the value to the
/// property. Defaults to 1.0.
Period = _period;
static on_update = function (_emitter, _deltaTime) {
var _property = Property;
if (_property != undefined)
{
var _y2 = _emitter.ParticlesAlive - 1;
if (_y2 >= 0)
{
ds_grid_add_region(
_emitter.Particles,
_property, 0,
_property, _y2,
Change * ((_deltaTime * 0.000001) / Period));
}
}
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AddVec2OnCollisionModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "AddPropertyOnCollision",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOnCollision.yy",
},
}

View file

@ -0,0 +1,74 @@
/// @func BBMOD_AddVec2OnCollisionModule([_property[, _change]])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A universal particle module that adds a value to two consecutive
/// particle properties it has a collision.
///
/// @param {Real} [_property] The first of the two consecutive properties. Use
/// values from {@link BBMOD_EParticle}. Defaults to `undefined`.
/// @param {Struct.BBMOD_Vec2} [_change] The value to add to particles' health.
/// Defaults to `(1.0, 1.0)`.
///
/// @see BBMOD_EParticle.HasCollided
function BBMOD_AddVec2OnCollisionModule(
_property=undefined,
_change=new BBMOD_Vec2(1.0)
) : BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Real} The first of the two consecutive properties. Use values from
/// {@link BBMOD_EParticle}.Default value is `undefined`.
Property = _property;
/// @var {Struct.BBMOD_Vec2} The value to add on collision. Default value is
/// `(1.0, 1.0)`.
Change = _change;
static on_update = function (_emitter, _deltaTime) {
if (Property != undefined)
{
var _y2 = _emitter.ParticlesAlive - 1;
if (_y2 >= 0)
{
var _particles = _emitter.Particles;
var _gridCompute = _emitter.GridCompute;
var _change = Change;
ds_grid_set_region(
_gridCompute,
0, 0,
0, _y2,
_change.X);
ds_grid_set_region(
_gridCompute,
1, 0,
1, _y2,
_change.Y);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
0, 0);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
1, 0);
ds_grid_add_grid_region(
_particles,
_gridCompute,
0, 0,
1, _y2,
Property, 0);
}
}
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AddVec2OverTimeModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "AddPropertyOverTime",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOverTime.yy",
},
}

View file

@ -0,0 +1,53 @@
/// @func BBMOD_AddVec2OverTimeModule([_property[, _change[, _period]]])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A universal particle module that adds a value to two consecutive
/// particle properties over time.
///
/// @param {Real} [_property] The first of the two consecutive properties. Use
/// values from {@link BBMOD_EParticle}. Defaults to `undefined`.
/// @param {Struct.BBMOD_Vec2} [_change] The value added over specified period.
/// Defaults to `(1.0, 1.0)`.
/// @param {Real} [_period] How long in seconds it takes to add the value to the
/// properties. Defaults to 1.0.
///
/// @see BBMOD_EParticle.HealthLeft
function BBMOD_AddVec2OverTimeModule(
_property=undefined,
_change=new BBMOD_Vec2(1.0),
_period=1.0
) : BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Real} The first of the two consecutive properties. Use values from
/// {@link BBMOD_EParticle}. Default value is `undefined`.
Property = _property;
/// @var {Struct.BBMOD_Vec2} The value added over
/// {@link BBMOD_AddVec2OverTimeModule.Period}. Default value is
/// `(1.0, 1.0)`.
Change = _change;
/// @var {Real} How long in seconds it takes to add the value to the
/// properties. Defaults to 1.0.
Period = _period;
static on_update = function (_emitter, _deltaTime) {
var _property = Property;
if (_property != undefined)
{
var _y2 = _emitter.ParticlesAlive - 1;
if (_y2 >= 0)
{
var _factor = ((_deltaTime * 0.000001) / Period);
var _change = Change;
var _changeX = _change.X * _factor;
var _changeY = _change.Y * _factor;
ds_grid_add_region(_emitter.Particles, _property, 0, _property, _y2, _changeX);
ds_grid_add_region(_emitter.Particles, _property + 1, 0, _property + 1, _y2, _changeY);
}
}
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AddVec3OnCollisionModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "AddPropertyOnCollision",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOnCollision.yy",
},
}

View file

@ -0,0 +1,87 @@
/// @func BBMOD_AddVec3OnCollisionModule([_property[, _change]])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A universal particle module that adds a value to three consecutive
/// particle properties it has a collision.
///
/// @param {Real} [_property] The first of the three consecutive properties. Use
/// values from {@link BBMOD_EParticle}. Defaults to `undefined`.
/// @param {Struct.BBMOD_Vec3} [_change] The value to add to particles' health. Defaults
/// to `(1.0, 1.0, 1.0)`.
///
/// @see BBMOD_EParticle.HasCollided
function BBMOD_AddVec3OnCollisionModule(
_property=undefined,
_change=new BBMOD_Vec3(1.0)
): BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Real} The first of the three consecutive properties. Use values
/// from {@link BBMOD_EParticle}. Default value is `undefined`.
Property = _property;
/// @var {Struct.BBMOD_Vec3} The value to add on collision. Default value is
/// `(1.0, 1.0, 1.0)`.
Change = _change;
static on_update = function (_emitter, _deltaTime) {
if (Property != undefined)
{
var _y2 = _emitter.ParticlesAlive - 1;
if (_y2 >= 0)
{
var _particles = _emitter.Particles;
var _gridCompute = _emitter.GridCompute;
var _change = Change;
ds_grid_set_region(
_gridCompute,
0, 0,
0, _y2,
_change.X);
ds_grid_set_region(
_gridCompute,
1, 0,
1, _y2,
_change.Y);
ds_grid_set_region(
_gridCompute,
2, 0,
2, _y2,
_change.Z);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
0, 0);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
1, 0);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
2, 0);
ds_grid_add_grid_region(
_particles,
_gridCompute,
0, 0,
2, _y2,
Property, 0);
}
}
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AddVec3OverTimeModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "AddPropertyOverTime",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOverTime.yy",
},
}

View file

@ -0,0 +1,55 @@
/// @func BBMOD_AddVec3OverTimeModule([_property[, _change[, _period]]])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A universal particle module that adds a value to three consecutive
/// particle properties over time.
///
/// @param {Real} [_property] The first of the three consecutive properties. Use
/// values from {@link BBMOD_EParticle}. Defaults to `undefined`.
/// @param {Struct.BBMOD_Vec3} [_change] The value added over specified period.
/// Defaults to `(1.0, 1.0, 1.0)`.
/// @param {Real} [_period] How long in seconds it takes to add the value to the
/// properties. Defaults to 1.0.
///
/// @see BBMOD_EParticle.HealthLeft
function BBMOD_AddVec3OverTimeModule(
_property=undefined,
_change=new BBMOD_Vec3(1.0),
_period=1.0
) : BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Real} The first of the three consecutive properties. Use values
/// from {@link BBMOD_EParticle}. Default value is `undefined`.
Property = _property;
/// @var {Struct.BBMOD_Vec3} The value added over
/// {@link BBMOD_AddVec3OverTimeModule.Period}. Default value is
/// `(1.0, 1.0, 1.0)`.
Change = _change;
/// @var {Real} How long in seconds it takes to add the value to the
/// properties. Defaults to 1.0.
Period = _period;
static on_update = function (_emitter, _deltaTime) {
var _property = Property;
if (_property != undefined)
{
var _y2 = _emitter.ParticlesAlive - 1;
if (_y2 >= 0)
{
var _factor = ((_deltaTime * 0.000001) / Period);
var _change = Change;
var _changeX = _change.X * _factor;
var _changeY = _change.Y * _factor;
var _changeZ = _change.Z * _factor;
ds_grid_add_region(_emitter.Particles, _property, 0, _property, _y2, _changeX);
ds_grid_add_region(_emitter.Particles, _property + 1, 0, _property + 1, _y2, _changeY);
ds_grid_add_region(_emitter.Particles, _property + 2, 0, _property + 2, _y2, _changeZ);
}
}
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AddVec4OnCollisionModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "AddPropertyOnCollision",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOnCollision.yy",
},
}

View file

@ -0,0 +1,100 @@
/// @func BBMOD_AddVec4OnCollisionModule([_property[, _change]])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A universal particle module that adds a value to four consecutive
/// particle properties it has a collision.
///
/// @param {Real} [_property] The first of the four consecutive properties. Use
/// values from {@link BBMOD_EParticle}. Defaults to `undefined`.
/// @param {Struct.BBMOD_Vec4} [_change] The value to add to particles' health. Defaults
/// to `(1.0, 1.0, 1.0, 1.0)`.
///
/// @see BBMOD_EParticle.HasCollided
function BBMOD_AddVec4OnCollisionModule(
_property=undefined,
_change=new BBMOD_Vec4(1.0)
) : BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Real} The first of the four consecutive properties. Use values
/// from {@link BBMOD_EParticle}. Default value is `undefined`.
Property = _property;
/// @var {Struct.BBMOD_Vec4} The value to add on collision. Default value is
/// `(1.0, 1.0, 1.0, 1.0)`.
Change = _change;
static on_update = function (_emitter, _deltaTime) {
if (Property != undefined)
{
var _y2 = _emitter.ParticlesAlive - 1;
if (_y2 >= 0)
{
var _particles = _emitter.Particles;
var _gridCompute = _emitter.GridCompute;
var _change = Change;
ds_grid_set_region(
_gridCompute,
0, 0,
0, _y2,
_change.X);
ds_grid_set_region(
_gridCompute,
1, 0,
1, _y2,
_change.Y);
ds_grid_set_region(
_gridCompute,
2, 0,
2, _y2,
_change.Z);
ds_grid_set_region(
_gridCompute,
3, 0,
3, _y2,
_change.W);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
0, 0);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
1, 0);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
2, 0);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
3, 0);
ds_grid_add_grid_region(
_particles,
_gridCompute,
0, 0,
3, _y2,
Property, 0);
}
}
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AddVec4OverTimeModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "AddPropertyOverTime",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOverTime.yy",
},
}

View file

@ -0,0 +1,57 @@
/// @func BBMOD_AddVec4OverTimeModule([_property[, _change[, _period]]])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A universal particle module that adds a value to four consecutive
/// particle properties over time.
///
/// @param {Real} [_property] The first of the four consecutive properties. Use
/// values from {@link BBMOD_EParticle}. Defaults to `undefined`.
/// @param {Struct.BBMOD_Vec4} [_change] The value added over specified period.
/// Defaults to `(1.0, 1.0, 1.0, 1.0)`.
/// @param {Real} [_period] How long in seconds it takes to add the value to the
/// properties. Defaults to 1.0.
///
/// @see BBMOD_EParticle.HealthLeft
function BBMOD_AddVec4OverTimeModule(
_property=undefined,
_change=new BBMOD_Vec4(1.0),
_period=1.0
) : BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Real} The first of the four consecutive properties. Use values
/// from {@link BBMOD_EParticle}. Default value is `undefined`.
Property = _property;
/// @var {Struct.BBMOD_Vec4} The value added over
/// {@link BBMOD_AddVec4OverTimeModule.Period}. Default value is
/// `(1.0, 1.0, 1.0, 1.0)`.
Change = _change;
/// @var {Real} How long in seconds it takes to add the value to the
/// properties. Defaults to 1.0.
Period = _period;
static on_update = function (_emitter, _deltaTime) {
var _property = Property;
if (_property != undefined)
{
var _y2 = _emitter.ParticlesAlive - 1;
if (_y2 >= 0)
{
var _factor = ((_deltaTime * 0.000001) / Period);
var _change = Change;
var _changeX = _change.X * _factor;
var _changeY = _change.Y * _factor;
var _changeZ = _change.Z * _factor;
var _changeW = _change.W * _factor;
ds_grid_add_region(_emitter.Particles, _property, 0, _property, _y2, _changeX);
ds_grid_add_region(_emitter.Particles, _property + 1, 0, _property + 1, _y2, _changeY);
ds_grid_add_region(_emitter.Particles, _property + 2, 0, _property + 2, _y2, _changeZ);
ds_grid_add_region(_emitter.Particles, _property + 3, 0, _property + 3, _y2, _changeW);
}
}
};
}

View file

@ -0,0 +1,508 @@
#macro BBMOD_BONE_SPACE_PARENT (1 << 0)
#macro BBMOD_BONE_SPACE_WORLD (1 << 1)
#macro BBMOD_BONE_SPACE_BONE (1 << 2)
/// @func BBMOD_Animation([_file[, _sha1]])
///
/// @extends BBMOD_Resource
///
/// @desc An animation which can be played using {@link BBMOD_AnimationPlayer}.
///
/// @param {String} [_file] A "*.bbanim" animation file to load. If not
/// specified, then an empty animation is created.
/// @param {String} [_sha1] Expected SHA1 of the file. If the actual one does
/// not match with this, then the model will not be loaded.
///
/// @example
/// Following code loads an animation from a file `Walk.bbanim`:
///
/// ```gml
/// try
/// {
/// animWalk = new BBMOD_Animation("Walk.bbanim");
/// }
/// catch (_exception)
/// {
/// // The animation failed to load!
/// }
/// ```
///
/// You can also load animations from buffers like so:
///
/// ```gml
/// var _buffer = buffer_load("Walk.anim");
/// try
/// {
/// animWalk = new BBMOD_Animation().from_buffer(_buffer);
/// }
/// catch (_exception)
/// {
/// // Failed to load an animation from the buffer!
/// }
/// buffer_delete(_buffer);
/// ```
///
/// @throws {BBMOD_Exception} When the animation fails to load.
function BBMOD_Animation(_file=undefined, _sha1=undefined)
: BBMOD_Resource() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Bool} If `false` then the animation has not been loaded yet.
/// @readonly
IsLoaded = false;
/// @var {Real} The major version of the animation file.
VersionMajor = BBMOD_VERSION_MAJOR;
/// @var {Real} The minor version of the animation file.
VersionMinor = BBMOD_VERSION_MINOR;
/// @var {Real} The transformation spaces included in the animation file.
/// @private
__spaces = 0;
/// @var {Real} The duration of the animation (in tics).
/// @readonly
Duration = 0;
/// @var {Real} Number of animation tics per second.
/// @readonly
TicsPerSecond = 0;
/// @var {Real}
/// @private
__modelNodeCount = 0;
/// @var {Real}
/// @private
__modelBoneCount = 0;
/// @var {Array<Array<Real>>}
/// @private
__framesParent = [];
/// @var {Array<Array<Real>>}
/// @private
__framesWorld = [];
/// @var {Array<Array<Real>>}
/// @private
__framesBone = [];
/// @var {Bool}
/// @private
__isTransition = false;
/// @var {Real} Duration of transition into this animation (in seconds).
/// Must be a value greater or equal to 0!
TransitionIn = 0.1;
/// @var {Real} Duration of transition out of this animation (in seconds).
/// Must be a value greater or equal to 0!
TransitionOut = 0;
/// @var {Array} Custom animation events in form of `[frame, name, ...]`.
/// @private
__events = [];
/// @func add_event(_frame, _name)
///
/// @desc Adds a custom animation event.
///
/// @param {Real} _frame The frame at which should be the event triggered.
/// @param {String} _name The name of the event.
///
/// @return {Struct.BBMOD_Animation} Returns `self`.
///
/// @example
/// ```gml
/// animWalk = new BBMOD_Animation("Data/Character_Walk.bbanim");
/// animWalk.add_event(0, "Footstep")
/// .add_event(16, "Footstep");
/// animationPlayer.on_event("Footstep", method(self, function () {
/// // Play footstep sound...
/// }));
/// ```
static add_event = function (_frame, _name) {
gml_pragma("forceinline");
array_push(__events, _frame, _name);
return self;
};
/// @func supports_attachments()
///
/// @desc Checks whether the animation supports bone attachments.
///
/// @return {Bool} Returns true if the animation supports bone attachments.
static supports_attachments = function () {
gml_pragma("forceinline");
return ((__spaces & (BBMOD_BONE_SPACE_PARENT | BBMOD_BONE_SPACE_WORLD)) != 0);
};
/// @func supports_bone_transform()
///
/// @desc Checks whether the animation supports bone transformation through
/// code.
///
/// @return {Bool} Returns true if the animation supports bone
/// transformation through code.
static supports_bone_transform = function () {
gml_pragma("forceinline");
return ((__spaces & BBMOD_BONE_SPACE_PARENT) != 0);
};
/// @func supports_transitions()
///
/// @desc Checks whether the animation supports transitions.
///
/// @return {Bool} Returns true if the animation supports transitions.
static supports_transitions = function () {
gml_pragma("forceinline");
return ((__spaces & (BBMOD_BONE_SPACE_PARENT | BBMOD_BONE_SPACE_WORLD)) != 0);
};
/// @func get_animation_time(_timeInSeconds)
///
/// @desc Calculates animation time from current time in seconds.
///
/// @param {Real} _timeInSeconds The current time in seconds.
///
/// @return {Real} The animation time.
static get_animation_time = function (_timeInSeconds) {
gml_pragma("forceinline");
return round(_timeInSeconds * TicsPerSecond);
};
/// @func from_buffer(_buffer)
///
/// @desc Loads animation data from a buffer.
///
/// @param {Id.Buffer} _buffer The buffer to load the data from.
///
/// @return {Struct.BBMOD_Animation} Returns `self`.
///
/// @throws {BBMOD_Exception} If loading fails.
static from_buffer = function (_buffer) {
var _hasMinorVersion = false;
var _type = buffer_read(_buffer, buffer_string);
if (_type == "bbanim")
{
}
else if (_type == "BBANIM")
{
_hasMinorVersion = true;
}
else
{
throw new BBMOD_Exception("Buffer does not contain a BBANIM!");
}
VersionMajor = buffer_read(_buffer, buffer_u8);
if (VersionMajor != BBMOD_VERSION_MAJOR)
{
throw new BBMOD_Exception(
"Invalid BBANIM major version " + string(VersionMajor) + "!");
}
if (_hasMinorVersion)
{
VersionMinor = buffer_read(_buffer, buffer_u8);
if (VersionMinor > BBMOD_VERSION_MINOR)
{
throw new BBMOD_Exception(
"Invalid BBANIM minor version " + string(VersionMinor) + "!");
}
}
else
{
VersionMinor = 0;
}
__spaces = buffer_read(_buffer, buffer_u8);
Duration = buffer_read(_buffer, buffer_f64);
TicsPerSecond = buffer_read(_buffer, buffer_f64);
__modelNodeCount = buffer_read(_buffer, buffer_u32);
var _modelNodeSize = __modelNodeCount * 8;
__modelBoneCount = buffer_read(_buffer, buffer_u32);
var _modelBoneSize = __modelBoneCount * 8;
__framesParent = (__spaces & BBMOD_BONE_SPACE_PARENT) ? [] : undefined;
__framesWorld = (__spaces & BBMOD_BONE_SPACE_WORLD) ? [] : undefined;
__framesBone = (__spaces & BBMOD_BONE_SPACE_BONE) ? [] : undefined;
repeat (Duration)
{
if (__spaces & BBMOD_BONE_SPACE_PARENT)
{
array_push(__framesParent,
bbmod_array_from_buffer(_buffer, buffer_f32, _modelNodeSize));
}
if (__spaces & BBMOD_BONE_SPACE_WORLD)
{
array_push(__framesWorld,
bbmod_array_from_buffer(_buffer, buffer_f32, _modelNodeSize));
}
if (__spaces & BBMOD_BONE_SPACE_BONE)
{
array_push(__framesBone,
bbmod_array_from_buffer(_buffer, buffer_f32, _modelBoneSize));
}
}
if (VersionMinor >= 4)
{
var _eventCount = buffer_read(_buffer, buffer_u32);
repeat (_eventCount)
{
array_push(__events, buffer_read(_buffer, buffer_f64)); // Frame
array_push(__events, buffer_read(_buffer, buffer_string)); // Event name
}
}
IsLoaded = true;
return self;
};
/// @func to_buffer(_buffer)
///
/// @desc Writes animation data to a buffer.
///
/// @param {Id.Buffer} _buffer The buffer to write the data to.
///
/// @return {Struct.BBMOD_Animation} Returns `self`.
static to_buffer = function (_buffer) {
buffer_write(_buffer, buffer_string, "BBANIM");
buffer_write(_buffer, buffer_u8, VersionMajor);
buffer_write(_buffer, buffer_u8, VersionMinor);
buffer_write(_buffer, buffer_u8, __spaces);
buffer_write(_buffer, buffer_f64, Duration);
buffer_write(_buffer, buffer_f64, TicsPerSecond);
buffer_write(_buffer, buffer_u32, __modelNodeCount);
buffer_write(_buffer, buffer_u32, __modelBoneCount);
var d = 0;
repeat (Duration)
{
if (__spaces & BBMOD_BONE_SPACE_PARENT)
{
bbmod_array_to_buffer(__framesParent[d], _buffer, buffer_f32);
}
if (__spaces & BBMOD_BONE_SPACE_WORLD)
{
bbmod_array_to_buffer(__framesWorld[d], _buffer, buffer_f32);
}
if (__spaces & BBMOD_BONE_SPACE_BONE)
{
bbmod_array_to_buffer(__framesBone[d], _buffer, buffer_f32);
}
++d;
}
var _eventCount = array_length(__events) / 2;
buffer_write(_buffer, buffer_u32, _eventCount);
var i = 0;
repeat (_eventCount)
{
buffer_write(_buffer, buffer_f64, __events[i]);
buffer_write(_buffer, buffer_string, __events[i + 1]);
i += 2;
}
return self;
};
if (_file != undefined)
{
from_file(_file, _sha1);
}
/// @func create_transition(_timeFrom, _animTo, _timeTo)
///
/// @desc Creates a new animation transition.
///
/// @param {Real} _timeFrom Animation time of this animation that we are
/// transitioning from.
/// @param {Struct.BBMOD_Animation} _animTo The animation to transition to.
/// @param {Real} _timeTo Animation time of the target animation.
///
/// @return {Struct.BBMOD_Animation} The created transition or `undefined`
/// if the animations have different optimization levels or if they do not
/// support transitions.
static create_transition = function (_timeFrom, _animTo, _timeTo) {
if ((__spaces & (BBMOD_BONE_SPACE_PARENT | BBMOD_BONE_SPACE_WORLD)) == 0
|| __spaces != _animTo.__spaces)
{
return undefined;
}
var _transition = new BBMOD_Animation();
_transition.IsLoaded = true;
_transition.VersionMajor = VersionMajor;
_transition.VersionMinor = VersionMinor;
_transition.__spaces = (__spaces & BBMOD_BONE_SPACE_PARENT)
? BBMOD_BONE_SPACE_PARENT
: BBMOD_BONE_SPACE_WORLD;
_transition.Duration = round((TransitionOut + _animTo.TransitionIn)
* TicsPerSecond);
_transition.TicsPerSecond = TicsPerSecond;
_transition.__isTransition = true;
var _frameFrom, _frameTo, _framesDest;
if (__spaces & BBMOD_BONE_SPACE_PARENT)
{
_frameFrom = __framesParent[_timeFrom];
_frameTo = _animTo.__framesParent[_timeTo];
_framesDest = _transition.__framesParent;
}
else
{
_frameFrom = __framesWorld[_timeFrom];
_frameTo = _animTo.__framesWorld[_timeTo];
_framesDest = _transition.__framesWorld;
}
var _time = 0;
repeat (_transition.Duration)
{
var _frameSize = array_length(_frameFrom);
var _frame = array_create(_frameSize);
var i = 0;
repeat (_frameSize / 8)
{
var _factor = _time / _transition.Duration;
// First dual quaternion
var _dq10 = _frameFrom[i];
var _dq11 = _frameFrom[i + 1];
var _dq12 = _frameFrom[i + 2];
var _dq13 = _frameFrom[i + 3];
// (* 2 since we use this only in the translation reconstruction)
var _dq14 = _frameFrom[i + 4] * 2;
var _dq15 = _frameFrom[i + 5] * 2;
var _dq16 = _frameFrom[i + 6] * 2;
var _dq17 = _frameFrom[i + 7] * 2;
// Second dual quaternion
var _dq20 = _frameTo[i];
var _dq21 = _frameTo[i + 1];
var _dq22 = _frameTo[i + 2];
var _dq23 = _frameTo[i + 3];
// (* 2 since we use this only in the translation reconstruction)
var _dq24 = _frameTo[i + 4] * 2;
var _dq25 = _frameTo[i + 5] * 2;
var _dq26 = _frameTo[i + 6] * 2;
var _dq27 = _frameTo[i + 7] * 2;
// Lerp between reconstructed translations
var _pos0 = lerp(
_dq17 * (-_dq10) + _dq14 * _dq13 + _dq15 * (-_dq12) - _dq16 * (-_dq11),
_dq27 * (-_dq20) + _dq24 * _dq23 + _dq25 * (-_dq22) - _dq26 * (-_dq21),
_factor
);
var _pos1 = lerp(
_dq17 * (-_dq11) + _dq15 * _dq13 + _dq16 * (-_dq10) - _dq14 * (-_dq12),
_dq27 * (-_dq21) + _dq25 * _dq23 + _dq26 * (-_dq20) - _dq24 * (-_dq22),
_factor
);
var _pos2 = lerp(
_dq17 * (-_dq12) + _dq16 * _dq13 + _dq14 * (-_dq11) - _dq15 * (-_dq10),
_dq27 * (-_dq22) + _dq26 * _dq23 + _dq24 * (-_dq21) - _dq25 * (-_dq20),
_factor
);
// Slerp rotations and store result into _dq1
var _norm;
_norm = 1 / sqrt(_dq10 * _dq10
+ _dq11 * _dq11
+ _dq12 * _dq12
+ _dq13 * _dq13);
_dq10 *= _norm;
_dq11 *= _norm;
_dq12 *= _norm;
_dq13 *= _norm;
_norm = sqrt(_dq20 * _dq20
+ _dq21 * _dq21
+ _dq22 * _dq22
+ _dq23 * _dq23);
_dq20 *= _norm;
_dq21 *= _norm;
_dq22 *= _norm;
_dq23 *= _norm;
var _dot = _dq10 * _dq20
+ _dq11 * _dq21
+ _dq12 * _dq22
+ _dq13 * _dq23;
if (_dot < 0)
{
_dot = -_dot;
_dq20 *= -1;
_dq21 *= -1;
_dq22 *= -1;
_dq23 *= -1;
}
if (_dot > 0.9995)
{
_dq10 = lerp(_dq10, _dq20, _factor);
_dq11 = lerp(_dq11, _dq21, _factor);
_dq12 = lerp(_dq12, _dq22, _factor);
_dq13 = lerp(_dq13, _dq23, _factor);
}
else
{
var _theta0 = arccos(_dot);
var _theta = _theta0 * _factor;
var _sinTheta = sin(_theta);
var _sinTheta0 = sin(_theta0);
var _s2 = _sinTheta / _sinTheta0;
var _s1 = cos(_theta) - (_dot * _s2);
_dq10 = (_dq10 * _s1) + (_dq20 * _s2);
_dq11 = (_dq11 * _s1) + (_dq21 * _s2);
_dq12 = (_dq12 * _s1) + (_dq22 * _s2);
_dq13 = (_dq13 * _s1) + (_dq23 * _s2);
}
// Create new dual quaternion from translation and rotation and
// write it into the frame
_frame[@ i] = _dq10;
_frame[@ i + 1] = _dq11;
_frame[@ i + 2] = _dq12;
_frame[@ i + 3] = _dq13;
_frame[@ i + 4] = (+_pos0 * _dq13 + _pos1 * _dq12 - _pos2 * _dq11) * 0.5;
_frame[@ i + 5] = (+_pos1 * _dq13 + _pos2 * _dq10 - _pos0 * _dq12) * 0.5;
_frame[@ i + 6] = (+_pos2 * _dq13 + _pos0 * _dq11 - _pos1 * _dq10) * 0.5;
_frame[@ i + 7] = (-_pos0 * _dq10 - _pos1 * _dq11 - _pos2 * _dq12) * 0.5;
i += 8;
}
array_push(_framesDest, _frame);
++_time;
}
return _transition;
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_Animation",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Animation",
"path": "folders/_Extensions/BBMOD/Core/Animation.yy",
},
}

View file

@ -0,0 +1,27 @@
/// @func BBMOD_AnimationInstance(_animation)
///
/// @desc An instance of an animation. Used for animation playback.
///
/// @param {Struct.BBMOD_Animation} _animation An animation to create an
/// instance of.
///
/// @see BBMOD_Animation
function BBMOD_AnimationInstance(_animation) constructor
{
/// @var {Struct.BBMOD_Animation} The animation to be played.
/// @see BBMOD_Animation
/// @readonly
Animation = _animation;
/// @var {Bool} If `true` then the animation should be looped.
/// @readonly
Loop = false;
/// @var {Real} The last frame when animation events were executed.
/// @private
__eventExecuted = -1;
/// @var {Real}
/// @private
__animationTime = 0;
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AnimationInstance",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Animation",
"path": "folders/_Extensions/BBMOD/Core/Animation.yy",
},
}

View file

@ -0,0 +1,600 @@
/// @macro {Real} Maximum number of bones that a single model can have.
/// Equals to 128.
#macro BBMOD_MAX_BONES 128
/// @macro {String} An event triggered when an animation player changes to a
/// different animation. The event data will contain the previous animation.
/// You can retrieve the new animation using
/// {@link BBMOD_AnimationPlayer.Animation}.
/// @see BBMOD_AnimationPlayer.on_event
#macro BBMOD_EV_ANIMATION_CHANGE "bbmod_ev_animation_change"
/// @macro {String} An event triggered when an animation finishes playing. The
/// event data will contain the animation that ended.
/// @see BBMOD_AnimationPlayer.on_event
#macro BBMOD_EV_ANIMATION_END "bbmod_ev_animation_end"
/// @macro {String} An event triggered when an animation loops and continues
/// playing from the start. The event data will contain the animation that
/// looped.
/// @see BBMOD_AnimationPlayer.on_event
#macro BBMOD_EV_ANIMATION_LOOP "bbmod_ev_animation_loop"
#macro __BBMOD_EV_ALL "__bbmod_ev_all"
/// @func BBMOD_AnimationPlayer(_model[, _paused])
///
/// @extends BBMOD_Class
///
/// @implements {BBMOD_IEventListener}
/// @implements {BBMOD_IRenderable}
///
/// @desc An animation player. Each instance of an animated model should have
/// its own animation player.
///
/// @param {Struct.BBMOD_Model} _model A model that the animation player
/// animates.
/// @param {Bool} [_paused] If `true` then the animation player is created
/// as paused. Defaults to `false`.
///
/// @example
/// Following code shows how to load models and animations in a resource manager
/// object and then play animations in multiple instances of another object.
///
/// ```gml
/// /// @desc Create event of OResourceManager
/// modCharacter = new BBMOD_Model("character.bbmod");
/// animIdle = new BBMOD_Animation("idle.bbanim");
///
/// /// @desc Create event of OCharacter
/// model = OResourceManager.modCharacter;
/// animationPlayer = new BBMOD_AnimationPlayer(model);
/// animationPlayer.play(OResourceManager.animIdle, true);
///
/// /// @desc Step event of OCharacter
/// animationPlayer.update(delta_time);
///
/// /// @desc Draw event of OCharacter
/// bbmod_material_reset();
/// animationPlayer.render();
/// bbmod_material_reset();
/// ```
///
/// @see BBMOD_Animation
/// @see BBMOD_IEventListener
/// @see BBMOD_Model
function BBMOD_AnimationPlayer(_model, _paused=false)
: BBMOD_Class() constructor
{
BBMOD_CLASS_GENERATED_BODY;
implement(BBMOD_IEventListener);
static Class_destroy = destroy;
/// @var {Struct.BBMOD_Model} A model that the animation player animates.
/// @readonly
Model = _model;
/// @var {Id.DsList<Struct.BBMOD_Animation>} List of animations to play.
/// @private
__animations = ds_list_create();
/// @var {Struct.BBMOD_Animation} The currently playing animation or
/// `undefined`.
/// @readonly
Animation = undefined;
/// @var {Bool} If true then {@link BBMOD_AnimationPlayer.Animation} loops.
/// @readonly
AnimationLoops = false;
/// @var {Struct.BBMOD_Animation}
/// @private
__animationLast = undefined;
/// @var {Struct.BBMOD_AnimationInstance}
/// @private
__animationInstanceLast = undefined;
/// @var {Array<Struct.BBMOD_Vec3>} Array of node position overrides.
/// @private
__nodePositionOverride = array_create(BBMOD_MAX_BONES, undefined);
/// @var {Array<Struct.BBMOD_Quaternion>} Array of node rotation
/// overrides.
/// @private
__nodeRotationOverride = array_create(BBMOD_MAX_BONES, undefined);
/// @var {Array<Struct.BBMOD_Quaternion>} Array of node post-rotations.
/// @private
__nodeRotationPost = array_create(BBMOD_MAX_BONES, undefined);
/// @var {Bool} If `true`, then the animation playback is paused.
Paused = _paused;
/// @var {Real} The current animation playback time.
/// @readonly
Time = 0;
/// @var {Array<Real>}
/// @private
__frame = undefined;
/// @var {Real} Number of frames (calls to {@link BBMOD_AnimationPlayer.update})
/// to skip. Defaults to 0 (frame skipping is disabled). Increasing the
/// value increases performance. Use `infinity` to disable computing
/// animation frames entirely.
/// @note This does not affect animation events. These are still triggered
/// even if the frame is skipped.
Frameskip = 0;
/// @var {Real}
/// @private
__frameskipCurrent = 0;
/// @var {Real} Controls animation playback speed. Must be a positive
/// number!
PlaybackSpeed = 1;
/// @var {Array<Real>} An array of node transforms in world space.
/// Useful for attachments.
/// @see BBMOD_AnimationPlayer.get_node_transform
/// @private
__nodeTransform = array_create(BBMOD_MAX_BONES * 8, 0.0);
/// @var {Array<Real>} An array containing transforms of all bones.
/// Used to pass current model pose as a uniform to a vertex shader.
/// @see BBMOD_AnimationPlayer.get_transform
/// @private
__transformArray = array_create(BBMOD_MAX_BONES * 8, 0.0);
static animate = function (_animationInstance, _animationTime) {
var _model = Model;
var _animation = _animationInstance.Animation;
var _frame = _animation.__framesParent[_animationTime];
__frame = _frame;
var _transformArray = __transformArray;
var _offsetArray = _model.__offsetArray;
var _nodeTransform = __nodeTransform;
var _positionOverrides = __nodePositionOverride;
var _rotationOverrides = __nodeRotationOverride;
var _rotationPost = __nodeRotationPost;
static _animStack = [];
if (array_length(_animStack) < _model.NodeCount)
{
array_resize(_animStack, _model.NodeCount);
}
_animStack[@ 0] = _model.RootNode;
var _stackNext = 1;
repeat (_model.NodeCount)
{
if (_stackNext == 0)
{
break;
}
var _node = _animStack[--_stackNext];
// TODO: Separate skeleton from the rest of the nodes to save on
// iterations here.
var _nodeIndex = _node.Index;
var _nodeOffset = _nodeIndex * 8;
var _nodePositionOverride = _positionOverrides[_nodeIndex];
var _nodeRotationOverride = _rotationOverrides[_nodeIndex];
var _nodeRotationPost = _rotationPost[_nodeIndex];
var _nodeParent = _node.Parent;
var _parentIndex = (_nodeParent != undefined) ? _nodeParent.Index : -1;
if (_nodePositionOverride != undefined
|| _nodeRotationOverride != undefined
|| _nodeRotationPost != undefined)
{
var _dq = new BBMOD_DualQuaternion().FromArray(_frame, _nodeOffset);
var _position = (_nodePositionOverride != undefined)
? _nodePositionOverride
: _dq.GetTranslation();
var _rotation = (_nodeRotationOverride != undefined)
? _nodeRotationOverride
: _dq.GetRotation();
if (_nodeRotationPost != undefined)
{
_rotation = _nodeRotationPost.Mul(_rotation);
}
_dq.FromTranslationRotation(_position, _rotation);
if (_parentIndex != -1)
{
_dq = _dq.Mul(new BBMOD_DualQuaternion()
.FromArray(_nodeTransform, _parentIndex * 8));
}
_dq.ToArray(_nodeTransform, _nodeOffset);
}
else
{
if (_parentIndex == -1)
{
// No parent transform -> just copy the node transform
array_copy(_nodeTransform, _nodeOffset, _frame, _nodeOffset, 8);
}
else
{
// Multiply node transform with parent's transform
__bbmod_dual_quaternion_array_multiply(
_frame, _nodeOffset, _nodeTransform, _parentIndex * 8,
_nodeTransform, _nodeOffset);
}
}
if (_node.IsBone)
{
__bbmod_dual_quaternion_array_multiply(
_offsetArray, _nodeOffset,
_nodeTransform, _nodeOffset,
_transformArray, _nodeOffset);
}
var _children = _node.Children;
var i = 0;
repeat (array_length(_children))
{
_animStack[_stackNext++] = _children[i++];
}
}
}
/// @func update(_deltaTime)
///
/// @desc Updates the animation player. This should be called every frame in
/// the step event.
///
/// @param {Real} _deltaTime How much time has passed since the last frame
/// (in microseconds).
///
/// @return {Struct.BBMOD_AnimationPlayer} Returns `self`.
static update = function (_deltaTime) {
if (!Model.IsLoaded)
{
return self;
}
if (Paused)
{
return self;
}
Time += _deltaTime * 0.000001 * PlaybackSpeed;
repeat (ds_list_size(__animations))
{
var _animInst = __animations[| 0];
var _animation = _animInst.Animation;
if (!_animation.IsLoaded)
{
break;
}
var _animationTime = _animation.get_animation_time(Time);
if (_animationTime >= _animation.Duration)
{
if (_animInst.Loop)
{
Time %= (_animation.Duration / _animation.TicsPerSecond);
_animationTime %= _animation.Duration;
_animInst.__eventExecuted = -1;
trigger_event(BBMOD_EV_ANIMATION_LOOP, _animation);
}
else
{
Time = 0.0;
ds_list_delete(__animations, 0);
if (!_animation.__isTransition)
{
Animation = undefined;
trigger_event(BBMOD_EV_ANIMATION_END, _animation);
}
continue;
}
}
_animInst.__animationTime = _animationTime;
var _nodeSize = Model.NodeCount * 8;
if (array_length(__nodeTransform) < _nodeSize)
{
array_resize(__nodeTransform, _nodeSize);
}
var _boneSize = Model.BoneCount * 8;
if (array_length(__transformArray) != _boneSize)
{
array_resize(__transformArray, _boneSize);
}
var _animEvents = _animation.__events;
var _eventIndex = 0;
var _eventExecuted = _animInst.__eventExecuted;
repeat (array_length(_animEvents) / 2)
{
var _eventFrame = _animEvents[_eventIndex];
if (_eventFrame <= _animationTime && _eventExecuted < _eventFrame)
{
trigger_event(_animEvents[_eventIndex + 1], _animation);
}
_eventIndex += 2;
}
_animInst.__eventExecuted = _animationTime;
//static _iters = 0;
//static _sum = 0;
//var _t = get_timer();
if (__frameskipCurrent == 0)
{
if (_animation.__spaces & BBMOD_BONE_SPACE_BONE)
{
if (_animation.__spaces & BBMOD_BONE_SPACE_WORLD)
{
array_copy(__nodeTransform, 0,
_animation.__framesWorld[_animationTime], 0, _nodeSize);
}
// TODO: Just use the animation's array right away?
array_copy(__transformArray, 0,
_animation.__framesBone[_animationTime], 0, _boneSize);
}
else if (_animation.__spaces & BBMOD_BONE_SPACE_WORLD)
{
var _frame = _animation.__framesWorld[_animationTime];
var _transformArray = __transformArray;
var _offsetArray = Model.__offsetArray;
array_copy(__nodeTransform, 0, _frame, 0, _nodeSize);
array_copy(_transformArray, 0, _frame, 0, _boneSize);
var _index = 0;
repeat (Model.BoneCount)
{
__bbmod_dual_quaternion_array_multiply(
_offsetArray, _index,
_frame, _index,
_transformArray, _index);
_index += 8;
}
}
else if (_animation.__spaces & BBMOD_BONE_SPACE_PARENT)
{
animate(_animInst, _animationTime);
}
array_copy(__transformArray, _boneSize, __nodeTransform, _boneSize,
_nodeSize - _boneSize);
}
if (Frameskip == infinity)
{
__frameskipCurrent = -1;
}
else if (++__frameskipCurrent > Frameskip)
{
__frameskipCurrent = 0;
}
//var _current = get_timer() - _t;
//_sum += _current;
//++_iters;
//show_debug_message("Current: " + string(_current) + "μs");
//show_debug_message("Average: " + string(_sum / _iters) + "μs");
__animationInstanceLast = _animInst;
}
return self;
};
/// @func play(_animation[, _loop])
///
/// @desc Starts playing an animation from its start.
///
/// @param {Struct.BBMOD_Animation} _animation An animation to play.
/// @param {Bool} [_loop] If `true` then the animation will be looped.
/// Defaults to `false`.
///
/// @return {Struct.BBMOD_AnimationPlayer} Returns `self`.
static play = function (_animation, _loop=false) {
Animation = _animation;
AnimationLoops = _loop;
if (__animationLast != _animation)
{
trigger_event(BBMOD_EV_ANIMATION_CHANGE, Animation);
__animationLast = _animation;
}
Time = 0;
var _animationList = __animations;
var _animationLast = __animationInstanceLast;
ds_list_clear(_animationList);
if (_animationLast != undefined
&& _animationLast.Animation.TransitionOut + _animation.TransitionIn > 0)
{
var _transition = _animationLast.Animation.create_transition(
_animationLast.__animationTime,
_animation,
0);
if (_transition != undefined)
{
ds_list_add(_animationList, new BBMOD_AnimationInstance(_transition));
}
}
var _animationInstance = new BBMOD_AnimationInstance(_animation);
_animationInstance.Loop = AnimationLoops;
ds_list_add(_animationList, _animationInstance);
return self;
};
/// @func change(_animation[, _loop])
///
/// @desc Starts playing an animation from its start, only if it is a
/// different one that the last played animation.
///
/// @param {Struct.BBMOD_Animation} _animation The animation to change to,
/// @param {Bool} [_loop] If `true` then the animation will be looped.
/// Defaults to `false`.
///
/// @return {Struct.BBMOD_AnimationPlayer} Returns `self`.
///
/// @see BBMOD_AnimationPlayer.Animation
static change = function (_animation, _loop=false) {
gml_pragma("forceinline");
if (Animation != _animation)
{
play(_animation, _loop);
}
return self;
};
/// @func get_transform()
///
/// @desc Returns an array of current transformations of all bones. This
/// should be passed to a vertex shader.
///
/// @return {Array<Real>} The transformation array.
static get_transform = function () {
gml_pragma("forceinline");
return __transformArray;
};
/// @func get_node_transform(_nodeIndex)
///
/// @desc Returns a transformation (dual quaternion) of a node, which can be
/// used for example for attachments.
///
/// @param {Real} _nodeIndex An index of a node.
///
/// @return {Struct.BBMOD_DualQuaternion} The transformation.
///
/// @see BBMOD_Model.find_node_id
static get_node_transform = function (_nodeIndex) {
gml_pragma("forceinline");
return new BBMOD_DualQuaternion().FromArray(__nodeTransform, _nodeIndex * 8);
};
/// @func get_node_transform_from_frame(_nodeIndex)
///
/// @desc Returns a transformation (dual quaternion) of a node from the last
/// animation frame. This is useful if you want to add additional
/// transformations onto an animated bone, instead of competely replacing it.
///
/// @param {Real} _nodeIndex An index of a node.
///
/// @return {Struct.BBMOD_DualQuaternion} The transformation.
///
/// @see BBMOD_Model.find_node_id
/// @see BBMOD_AnimationPlayer.get_node_transform
static get_node_transform_from_frame = function (_nodeIndex) {
gml_pragma("forceinline");
if (__frame == undefined)
{
return new BBMOD_DualQuaternion();
}
return new BBMOD_DualQuaternion().FromArray(__frame, _nodeIndex * 8);
};
/// @func set_node_position(_nodeIndex, _position)
///
/// @desc Overrides a position of a node.
///
/// @param {Real} _nodeIndex An index of a node.
/// @param {Struct.BBMOD_Vec3} _position A new position of a node. Use
/// `undefined` to unset the position override.
///
/// @return {Struct.BBMOD_AnimationPlayer} Returns `self`.
static set_node_position = function (_nodeIndex, _position) {
gml_pragma("forceinline");
__nodePositionOverride[@ _nodeIndex] = _position;
return self;
};
/// @func set_node_rotation(_nodeIndex, _rotation)
///
/// @desc Overrides a rotation of a node.
///
/// @param {Real} _nodeIndex An index of a node.
/// @param {Struct.BBMOD_Quaternion} _rotation A new rotation of a node.
/// Use `undefined` to unset the rotation override.
///
/// @return {Struct.BBMOD_AnimationPlayer} Returns `self`.
static set_node_rotation = function (_nodeIndex, _rotation) {
gml_pragma("forceinline");
__nodeRotationOverride[@ _nodeIndex] = _rotation;
return self;
};
/// @func set_node_rotation_post(_nodeIndex, _rotation)
///
/// @desc Sets a post-rotation of a node.
///
/// @param {Real} _nodeIndex An index of a node.
/// @param {Struct.BBMOD_Quaternion} _rotation A rotation applied after the
/// node is rotated using frame data. Use `undefined` to unset the post-rotation.
///
/// @return {Struct.BBMOD_AnimationPlayer} Returns `self`.
static set_node_rotation_post = function (_nodeIndex, _rotation) {
gml_pragma("forceinline");
__nodeRotationPost[@ _nodeIndex] = _rotation;
return self;
};
/// @func submit([_materials])
///
/// @desc Immediately submits the animated model for rendering.
///
/// @param {Array<Struct.BBMOD_Material>} [_materials] An array of materials,
/// one for each material slot of the model. If not specified, then
/// {@link BBMOD_Model.Materials} is used. Defaults to `undefined`.
///
/// @return {Struct.BBMOD_AnimationPlayer} Returns `self`.
static submit = function (_materials=undefined) {
gml_pragma("forceinline");
Model.submit(_materials, get_transform());
return self;
};
/// @func render([_materials])
///
/// @desc Enqueues the animated model for rendering.
///
/// @param {Array<Struct.BBMOD_Material>} [_materials] An array of materials,
/// one for each material slot of the model. If not specified, then
/// {@link BBMOD_Model.Materials} is used. Defaults to `undefined`.
///
/// @return {Struct.BBMOD_AnimationPlayer} Returns `self`.
static render = function (_materials=undefined) {
gml_pragma("forceinline");
Model.render(_materials, get_transform());
return self;
};
static destroy = function () {
Class_destroy();
ds_list_destroy(__animations);
__nodePositionOverride = undefined;
__nodeRotationOverride = undefined;
__nodeRotationPost = undefined;
return undefined;
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AnimationPlayer",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Animation",
"path": "folders/_Extensions/BBMOD/Core/Animation.yy",
},
}

View file

@ -0,0 +1,81 @@
/// @func BBMOD_AnimationState(_name, _animation[, _loop])
///
/// @extends BBMOD_State
/// @implements {BBMOD_IEventListener}
///
/// @desc A state of an animation state machine.
///
/// @param {String} _name The name of the state.
/// @param {Struct.BBMOD_Animation} _animation The animation played while the
/// is active.
/// @param {Bool} [_loop] If `true` then the animation will be looped.
/// Defaults to `false`.
///
/// @example
/// The following code shows examples of animation states which together make
/// a simple locomotion state machine.
///
/// ```gml
/// stateIdle = new BBMOD_AnimationState("Idle", animIdle, true);
/// stateIdle.OnUpdate = method(self, function () {
/// if (in_air())
/// {
/// animationStateMachine.change_state(stateJump);
/// return;
/// }
/// if (speed > 0)
/// {
/// animationStateMachine.change_state(stateWalk);
/// return;
/// }
/// });
/// animationStateMachine.add_state(stateIdle);
///
/// stateWalk = new BBMOD_AnimationState("Walk", animWalk, true);
/// stateWalk.OnUpdate = method(self, function () {
/// if (in_air())
/// {
/// animationStateMachine.change_state(stateJump);
/// return;
/// }
/// if (speed == 0)
/// {
/// animationStateMachine.change_state(stateIdle);
/// return;
/// }
/// });
/// animationStateMachine.add_state(stateWalk);
///
/// stateJump = new BBMOD_AnimationState("Jump", animJump, true);
/// stateJump.OnUpdate = method(self, function () {
/// if (!in_air())
/// {
/// animationStateMachine.change_state(stateLanding);
/// return;
/// }
/// });
/// animationStateMachine.add_state(stateJump);
///
/// stateLanding = new BBMOD_AnimationState("Landing", animLanding);
/// stateLanding.on_event(BBMOD_EV_ANIMATION_END, method(self, function () {
/// animationStateMachine.change_state(stateIdle);
/// }));
/// ```
///
/// @see BBMOD_AnimationStateMachine
function BBMOD_AnimationState(_name, _animation, _loop=false)
: BBMOD_State(_name) constructor
{
BBMOD_CLASS_GENERATED_BODY;
implement(BBMOD_IEventListener);
/// @var {Struct.BBMOD_Animation} The animation played while the state is
/// active.
/// @readonly
Animation = _animation;
/// @var {Bool} If `true` then the animation is played in loops.
/// @readonly
Loop = _loop;
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AnimationState",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "StateMachine",
"path": "folders/_Extensions/BBMOD/StateMachine.yy",
},
}

View file

@ -0,0 +1,87 @@
/// @func BBMOD_AnimationStateMachine(_animationPlayer)
///
/// @extends BBMOD_StateMachine
///
/// @desc A state machine that controls animation playback.
///
/// @param {Struct.BBMOD_AnimationPlayer} _animationPlayer The animation player
/// to control.
///
/// @example
/// Following code shows an animation state machine which goes to the "Idle"
/// state on start and independently on the current state switches to "Dead"
/// state when variable `hp` meets 0. After the death animation ends, the state
/// machine enters the final state and the instance is destroyed.
///
/// ```gml
/// // Create event
/// destroy = false;
/// animationPlayer = new BBMOD_AnimationPlayer(model);
///
/// animationStateMachine = new BBMOD_AnimationStateMachine(animationPlayer);
/// animationStateMachine.OnEnter = method(self, function () {
/// animationStateMachine.change_state(stateIdle);
/// });
/// animationStateMachine.OnExit = method(self, function () {
/// destroy = true;
/// });
/// animationStateMachine.OnPreUpdate = method(self, function () {
/// if (hp <= 0 && animationStateMachine.State != stateDead)
/// {
/// animationStateMachine.change_state(stateDead);
/// }
/// });
///
/// stateIdle = new BBMOD_AnimationState("Idle", animIdle);
/// animationStateMachine.add_state(stateIdle);
///
/// stateDead = new BBMOD_AnimationState("Dead", animDead);
/// stateDead.on_event(BBMOD_EV_ANIMATION_END, method(self, function () {
/// animationStateMachine.finish();
/// }));
/// animationStateMachine.add_state(stateDead);
///
/// animationStateMachine.start();
///
/// // Step event
/// animationStateMachine.update();
/// if (destroy)
/// {
/// instance_destroy();
/// }
///
/// // Clean Up event
/// animationPlayer = animationPlayer.destroy();
/// animationStateMachine = animationStateMachine.destroy();
/// ```
///
/// @see BBMOD_AnimationPlayer
/// @see BBMOD_AnimationState
function BBMOD_AnimationStateMachine(_animationPlayer)
: BBMOD_StateMachine() constructor
{
BBMOD_CLASS_GENERATED_BODY;
static StateMachine_update = update;
/// @var {Struct.BBMOD_AnimationPlayer} The state machine's animation player.
/// @readonly
AnimationPlayer = _animationPlayer;
AnimationPlayer.on_event(method(self, function (_data, _event) {
if (State != undefined)
{
State.trigger_event(_event, _data);
}
}));
static update = function (_deltaTime) {
StateMachine_update(_deltaTime);
if (State != undefined)
{
AnimationPlayer.change(State.Animation, State.Loop);
}
AnimationPlayer.update(_deltaTime);
return self;
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AnimationStateMachine",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "StateMachine",
"path": "folders/_Extensions/BBMOD/StateMachine.yy",
},
}

View file

@ -0,0 +1,80 @@
/// @func BBMOD_AttractorModule([_position[, _relative[, _radius[, _force]]]])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A particle module that attracts/repels particles to/from a given
/// position.
///
/// @param {Struct.BBMOD_Vec3} [_position] The position to attract/repel
/// particles to/from. Defaults to `(0, 0, 0)`.
/// @param {Bool} [_relative] If `true`, then the position is relative to the
/// emitter. Defaults to `true`.
/// @param {Real} [_radius] The radius of the influence. Defaults to 1.0.
/// @param {Real} [_force] The strength of the force. Use negative to repel the
/// particles. Defaults to 1.0.
function BBMOD_AttractorModule(
_position=new BBMOD_Vec3(),
_relative=true,
_radius=1.0,
_force=1.0
) : BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Struct.BBMOD_Vec3} The position to attract/repel particles to/from.
/// Default value is `(0, 0, 0)`.
Position = _position;
/// @var {Bool} If `true`, then {@link BBMOD_AttractorModule.Position} is
/// relative to the emitter. Default value is `true`.
Relative = _relative;
/// @var {Struct.BBMOD_Vec3}
/// @private
__positionReal = Position;
/// @var {Real} The radius of the influence. Defaults to 1.0.
Radius = _radius;
/// @var {Real} The strength of the force. Use negative to repel the
/// particles. Defaults value is 1.0.
Force = _force;
static on_update = function (_emitter, _deltaTime) {
__positionReal = Relative ? _emitter.Position.Add(Position) : Position;
var _particles = _emitter.Particles;
var _positionRealX = __positionReal.X;
var _positionRealY = __positionReal.Y;
var _positionRealZ = __positionReal.Z;
var _radius = Radius;
var _force = Force;
var _particleIndex = 0;
repeat (_emitter.ParticlesAlive)
{
var _mass = _particles[# BBMOD_EParticle.Mass, _particleIndex];
if (_mass != 0.0)
{
var _vecX = _positionRealX
- _particles[# BBMOD_EParticle.PositionX, _particleIndex];
var _vecY = _positionRealY
- _particles[# BBMOD_EParticle.PositionY, _particleIndex];
var _vecZ = _positionRealZ
- _particles[# BBMOD_EParticle.PositionZ, _particleIndex];
var _distance = sqrt((_vecX * _vecX) + (_vecY * _vecY) + (_vecZ * _vecZ));
if (_distance <= _radius)
{
var _scale = (_force * (1.0 - (_distance / _radius))) / _mass;
_particles[# BBMOD_EParticle.AccelerationX, _particleIndex] +=
(_vecX / _distance) * _scale;
_particles[# BBMOD_EParticle.AccelerationY, _particleIndex] +=
(_vecY / _distance) * _scale;
_particles[# BBMOD_EParticle.AccelerationZ, _particleIndex] +=
(_vecZ / _distance) * _scale;
}
}
++_particleIndex;
}
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_AttractorModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Physics",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Physics.yy",
},
}

View file

@ -0,0 +1,354 @@
/// @var {Struct.BBMOD_BaseCamera} The last used camera. Can be `undefined`.
/// @private
global.__bbmodCameraCurrent = undefined;
/// @func BBMOD_BaseCamera()
///
/// @extends BBMOD_Class
///
/// @desc A camera with support for both orthographic and perspective
/// projection.
///
/// @see BBMOD_Camera
function BBMOD_BaseCamera()
: BBMOD_Class() constructor
{
BBMOD_CLASS_GENERATED_BODY;
static Class_destroy = destroy;
/// @var {camera} An underlying GameMaker camera.
/// @readonly
Raw = camera_create();
/// @var {Real} The camera's exposure value. Defaults to `1`.
Exposure = 1.0;
/// @var {Struct.BBMOD_Vec3} The camera's positon. Defaults to `(0, 0, 0)`.
Position = new BBMOD_Vec3(0.0);
/// @var {Struct.BBMOD_Vec3} A position where the camera is looking at.
Target = BBMOD_VEC3_FORWARD;
/// @var {Struct.BBMOD_Vec3} The up vector.
Up = BBMOD_VEC3_UP;
/// @var {Real} The camera's field of view. Defaults to `60`.
/// @note This does not have any effect when {@link BBMOD_BaseCamera.Orthographic}
/// is enabled.
Fov = 60.0;
/// @var {Real} The camera's aspect ratio. Defaults to
/// `window_get_width() / window_get_height()`.
AspectRatio = window_get_width() / window_get_height();
/// @var {Real} Distance to the near clipping plane. Anything closer to the
/// camera than this will not be visible. Defaults to `0.1`.
/// @note This can be a negative value if {@link BBMOD_BaseCamera.Orthographic}
/// is enabled.
ZNear = 0.1;
/// @var {Real} Distance to the far clipping plane. Anything farther from
/// the camera than this will not be visible. Defaults to `32768`.
ZFar = 32768.0;
/// @var {Bool} Use `true` to enable orthographic projection. Defaults to
/// `false` (perspective projection).
Orthographic = false;
/// @var {Real} The width of the orthographic projection. If `undefined`,
/// then it is computed from {@link BBMOD_BaseCamera.Height} using
/// {@link BBMOD_BaseCamera.AspectRatio}. Defaults to the window's width.
/// @see BBMOD_BaseCamera.Orthographic
Width = window_get_width();
/// @var {Real} The height of the orthographic projection. If `undefined`,
/// then it is computed from {@link BBMOD_BaseCamera.Width} using
/// {@link BBMOD_BaseCamera.AspectRatio}. Defaults to `undefined`.
/// @see BBMOD_BaseCamera.Orthographic
Height = undefined;
/// @var {Bool} If `true` then the camera updates position and orientation
/// of the 3D audio listener in the {@link BBMOD_BaseCamera.update_matrices}
/// method. Defaults to `true`.
AudioListener = true;
/// @var {Array<Real>} The `view * projection` matrix.
/// @note This is updated each time {@link BBMOD_BaseCamera.update_matrices}
/// is called.
/// @readonly
ViewProjectionMatrix = matrix_build_identity();
/// @func __build_proj_mat()
///
/// @desc Builds a projection matrix based on the camera's properties.
///
/// @return {Array<Real>} The projection matrix.
///
/// @private
static __build_proj_mat = function () {
var _proj;
if (Orthographic)
{
var _width = (Width != undefined) ? Width : (Height * AspectRatio);
var _height = (Height != undefined) ? Height : (Width / AspectRatio);
_proj = matrix_build_projection_ortho(_width, -_height, ZNear, ZFar);
}
else
{
_proj = matrix_build_projection_perspective_fov(
-Fov, -AspectRatio, ZNear, ZFar);
}
return _proj;
};
/// @func update_matrices()
///
/// @desc Recomputes camera's view and projection matrices.
///
/// @return {Struct.BBMOD_BaseCamera} Returns `self`.
///
/// @note This is called automatically in the {@link BBMOD_BaseCamera.update}
/// method, so you do not need to call this unless you modify
/// {@link BBMOD_BaseCamera.Position} or {@link BBMOD_BaseCamera.Target}
/// after the `update` method.
///
/// @example
/// ```gml
/// /// @desc Step event
/// camera.set_mouselook(true);
/// camera.update(delta_time);
/// if (camera.Position.Z < 0.0)
/// {
/// camera.Position.Z = 0.0;
/// }
/// camera.update_matrices();
/// ```
static update_matrices = function () {
gml_pragma("forceinline");
var _view = matrix_build_lookat(
Position.X, Position.Y, Position.Z,
Target.X, Target.Y, Target.Z,
Up.X, Up.Y, Up.Z);
camera_set_view_mat(Raw, _view);
var _proj = __build_proj_mat();
camera_set_proj_mat(Raw, _proj);
// Note: Using _view and _proj mat straight away leads into a weird result...
ViewProjectionMatrix = matrix_multiply(
get_view_mat(),
get_proj_mat());
if (AudioListener)
{
audio_listener_position(Position.X, Position.Y, Position.Z);
audio_listener_orientation(
Target.X, Target.Y, Target.Z,
Up.X, Up.Y, Up.Z);
}
return self;
}
/// @func update(_deltaTime)
///
/// @desc Updates camera's matrices.
///
/// @param {Real} _deltaTime How much time has passed since the last frame
/// (in microseconds).
///
/// @return {Struct.BBMOD_BaseCamera} Returns `self`.
static update = function (_deltaTime) {
update_matrices();
return self;
};
/// @func get_view_mat()
///
/// @desc Retrieves camera's view matrix.
///
/// @return {Array<Real>} The view matrix.
static get_view_mat = function () {
gml_pragma("forceinline");
if (os_browser == browser_not_a_browser)
{
// This returns a struct in HTML5 for some reason...
return camera_get_view_mat(Raw);
}
var _view = matrix_get(matrix_view);
var _proj = matrix_get(matrix_projection);
camera_apply(Raw);
var _retval = matrix_get(matrix_view);
matrix_set(matrix_view, _view);
matrix_set(matrix_projection, _proj);
return _retval;
};
/// @func get_proj_mat()
///
/// @desc Retrieves camera's projection matrix.
///
/// @return {Array<Real>} The projection matrix.
static get_proj_mat = function () {
gml_pragma("forceinline");
if (os_browser == browser_not_a_browser)
{
// This returns a struct in HTML5 for some reason...
return camera_get_proj_mat(Raw);
}
var _view = matrix_get(matrix_view);
var _proj = matrix_get(matrix_projection);
camera_apply(Raw);
var _retval = matrix_get(matrix_projection);
matrix_set(matrix_view, _view);
matrix_set(matrix_projection, _proj);
return _retval;
};
/// @func get_right()
///
/// @desc Retrieves a vector pointing right relative to the camera's
/// direction.
///
/// @return {Struct.BBMOD_Vec3} The right vector.
static get_right = function () {
gml_pragma("forceinline");
var _view = get_view_mat();
return new BBMOD_Vec3(
_view[0],
_view[4],
_view[8]
);
};
/// @func get_up()
///
/// @desc Retrieves a vector pointing up relative to the camera's
/// direction.
///
/// @return {Struct.BBMOD_Vec3} The up vector.
static get_up = function () {
gml_pragma("forceinline");
var _view = get_view_mat();
return new BBMOD_Vec3(
_view[1],
_view[5],
_view[9]
);
};
/// @func get_forward()
///
/// @desc Retrieves a vector pointing forward in the camera's direction.
///
/// @return {Struct.BBMOD_Vec3} The forward vector.
static get_forward = function () {
gml_pragma("forceinline");
var _view = get_view_mat();
return new BBMOD_Vec3(
_view[2],
_view[6],
_view[10]
);
};
/// @func world_to_screen(_position[, _screenWidth[, _screenHeight]])
///
/// @desc Computes screen-space position of a point in world-space.
///
/// @param {Struct.BBMOD_Vec3} _position The world-space position.
/// @param {Real} [_screenWidth] The width of the screen. If `undefined`, it
/// is retrieved using `window_get_width`.
/// @param {Real} [_screenHeight] The height of the screen. If `undefined`,
/// it is retrieved using `window_get_height`.
///
/// @return {Struct.BBMOD_Vec4} The screen-space position or `undefined` if
/// the point is outside of the screen.
///
/// @note This requires {@link BBMOD_BaseCamera.ViewProjectionMatrix}, so you
/// should use this *after* {@link BBMOD_BaseCamera.update_matrices} (or
/// {@link BBMOD_BaseCamera.update}) is called!
static world_to_screen = function (_position, _screenWidth=undefined, _screenHeight=undefined) {
gml_pragma("forceinline");
_screenWidth ??= window_get_width();
_screenHeight ??= window_get_height();
var _screenPos = new BBMOD_Vec4(_position.X, _position.Y, _position.Z, 1.0)
.Transform(ViewProjectionMatrix);
if (_screenPos.Z < 0.0)
{
return undefined;
}
_screenPos = _screenPos.Scale(1.0 / _screenPos.W);
_screenPos.X = ((_screenPos.X * 0.5) + 0.5) * _screenWidth;
_screenPos.Y = (1.0 - ((_screenPos.Y * 0.5) + 0.5)) * _screenHeight;
return _screenPos;
};
/// @func screen_point_to_vec3(_vector[, _renderer])
///
/// @desc Unprojects a position on the screen into a direction in world-space.
///
/// @param {Struct.BBMOD_Vector2} _vector The position on the screen.
/// @param {Struct.BBMOD_Renderer} [_renderer] A renderer or `undefined`.
///
/// @return {Struct.BBMOD_Vec3} The world-space direction.
static screen_point_to_vec3 = function (_vector, _renderer=undefined) {
var _forward = get_forward();
var _up = get_up();
var _right = get_right();
var _tFov = dtan(Fov * 0.5);
_up = _up.Scale(_tFov);
_right = _right.Scale(_tFov * AspectRatio);
var _screenWidth = _renderer ? _renderer.get_width() : window_get_width();
var _screenHeight = _renderer ? _renderer.get_height() : window_get_height();
var _screenX = _vector.X - (_renderer ? _renderer.X : 0);
var _screenY = _vector.Y - (_renderer ? _renderer.Y : 0);
var _ray = _forward.Add(_up.Scale(1.0 - 2.0 * (_screenY / _screenHeight))
.Add(_right.Scale(2.0 * (_screenX / _screenWidth) - 1.0)));
return _ray.Normalize();
};
/// @func apply()
///
/// @desc Applies the camera.
///
/// @return {Struct.BBMOD_BaseCamera} Returns `self`.
///
/// @example
/// Following code renders a model from the camera's view.
/// ```gml
/// camera.apply();
/// bbmod_material_reset();
/// model.submit();
/// bbmod_material_reset();
/// ```
///
/// @note This also overrides the camera position and exposure passed to
/// shaders using {@link bbmod_camera_set_position} and
/// {@link bbmod_camera_set_exposure} respectively!
static apply = function () {
gml_pragma("forceinline");
global.__bbmodCameraCurrent = self;
camera_apply(Raw);
bbmod_camera_set_position(Position.Clone());
bbmod_camera_set_zfar(ZFar);
bbmod_camera_set_exposure(Exposure);
return self;
};
static destroy = function () {
Class_destroy();
camera_destroy(Raw);
if (global.__bbmodCameraCurrent == self)
{
global.__bbmodCameraCurrent = undefined;
}
return undefined;
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_BaseCamera",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Camera",
"path": "folders/_Extensions/BBMOD/Core/Camera.yy",
},
}

View file

@ -0,0 +1,121 @@
/// @func BBMOD_BaseMaterial([_shader])
///
/// @extends BBMOD_Material
///
/// @desc A material that can be used when rendering models.
///
/// @param {Struct.BBMOD_Shader} [_shader] A shader that the material uses in
/// the {@link BBMOD_ERenderPass.Forward} pass. Leave `undefined` if you would
/// like to use {@link BBMOD_Material.set_shader} to specify shaders used in
/// specific render passes.
///
/// @see BBMOD_Shader
function BBMOD_BaseMaterial(_shader=undefined)
: BBMOD_Material(_shader) constructor
{
BBMOD_CLASS_GENERATED_BODY;
static Material_copy = copy;
static Material_to_json = to_json;
static Material_from_json = from_json;
/// @var {Struct.BBMOD_Color} Multiplier for {@link BBMOD_Material.BaseOpacity}.
/// Default value is {@link BBMOD_C_WHITE}.
BaseOpacityMultiplier = BBMOD_C_WHITE;
/// @var {Struct.BBMOD_Vec2} An offset of texture UV coordinates. Defaults
/// to `(0, 0)`. Using this you can control texture's position within texture
/// page.
TextureOffset = new BBMOD_Vec2(0.0);
/// @var {Struct.BBMOD_Vec2} A scale of texture UV coordinates. Defaults to
/// `(1, 1)`.
/// Using this you can control texture's size within texture page.
TextureScale = new BBMOD_Vec2(1.0);
/// @var {Real} Controls range over which the mesh smoothly transitions into
/// shadow. This can be useful for example for billboarded particles, where
/// harsh transition does not look good. Default value is 0, which means no
/// smooth transition.
ShadowmapBias = 0.0;
static copy = function (_dest) {
Material_copy(_dest);
BaseOpacityMultiplier.Copy(_dest.BaseOpacityMultiplier);
_dest.TextureOffset = TextureOffset.Clone();
_dest.TextureScale = TextureScale.Clone();
_dest.ShadowmapBias = ShadowmapBias;
return self;
};
static clone = function () {
var _clone = new BBMOD_BaseMaterial();
copy(_clone);
return _clone;
};
static to_json = function (_json) {
Material_to_json(_json);
_json.BaseOpacityMultiplier = {
Red: BaseOpacityMultiplier.Red,
Green: BaseOpacityMultiplier.Green,
Blue: BaseOpacityMultiplier.Blue,
Alpha: BaseOpacityMultiplier.Alpha,
};
_json.TextureOffset = {
X: TextureOffset.X,
Y: TextureOffset.Y,
};
_json.TextureScale = {
X: TextureScale.X,
Y: TextureScale.Y,
};
_json.ShadowmapBias = ShadowmapBias;
return self;
};
static from_json = function (_json) {
Material_from_json(_json);
var _baseOpacityMultiplier = _json[$ "BaseOpacityMultiplier"];
if (_baseOpacityMultiplier != undefined)
{
BaseOpacityMultiplier = new BBMOD_Color(
_baseOpacityMultiplier.Red,
_baseOpacityMultiplier.Green,
_baseOpacityMultiplier.Blue,
_baseOpacityMultiplier.Alpha
);
}
var _textureOffset = _json[$ "TextureOffset"];
if (_textureOffset != undefined)
{
TextureOffset = new BBMOD_Vec2(
_textureOffset.X,
_textureOffset.Y
);
}
var _textureScale = _json[$ "TextureScale"];
if (_textureScale != undefined)
{
TextureScale = new BBMOD_Vec2(
_textureScale.X,
_textureScale.Y
);
}
if (variable_struct_exists(_json, "ShadowmapBias"))
{
ShadowmapBias = _json.ShadowmapBias;
}
return self;
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_BaseMaterial",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Rendering",
"path": "folders/_Extensions/BBMOD/Core/Rendering.yy",
},
}

View file

@ -0,0 +1,864 @@
/// @func BBMOD_BaseRenderer()
///
/// @extends BBMOD_Class
///
/// @desc Base struct for renderers, which execute
/// [render commands](./BBMOD_RenderCommand.html) created with method
/// [render](./BBMOD_Model.render.html).
///
/// @see BBMOD_DefaultRenderer
function BBMOD_BaseRenderer()
: BBMOD_Class() constructor
{
BBMOD_CLASS_GENERATED_BODY;
static Class_destroy = destroy;
/// @var {Real} The X position of the renderer on the screen. Default value
/// is 0.
X = 0;
/// @var {Real} The Y position of the renderer on the screen. Default value
/// is 0.
Y = 0;
/// @var {Real} The width of the renderer on the screen. If `undefined` then
/// the window width is used. Default value is `undefined`.
Width = undefined;
/// @var {Real} The height of the renderer on the screen. If `undefined`
/// then the window height is used. Default value is `undefined`.
Height = undefined;
/// @var {Bool} If `true` then rendering of instance IDs into an off-screen
/// surface is enabled. This must be enabled if you would like to use method
/// {@link BBMOD_BaseRenderer.get_instance_id} for mouse-picking instances.
/// Default value is `false`.
RenderInstanceIDs = false;
/// @var {Id.Surface} Surface for rendering highlight of selected instances.
/// @private
__surInstanceHighlight = noone;
/// @var {Struct.BBMOD_Color} Outline color of instances selected by gizmo.
/// Default value is {@link BBMOD_C_ORANGE}.
/// @see BBMOD_BaseRenderer.Gizmo
InstanceHighlightColor = BBMOD_C_ORANGE;
/// @var {Bool} If `true` then edit mode is enabled. Default value is `false`.
EditMode = false;
/// @var {Bool} If `true` then mousepicking of gizmo and instances is enabled.
/// Default value is `true`.
/// @note This can be useful for example to disable mousepicking when the
/// mouse cursor is over UI.
EnableMousepick = true;
/// @var {Constant.MouseButton} The mouse button used to select instances when
/// edit mode is enabled. Default value is `mb_left`.
/// @see BBMOD_BaseRenderer.EditMode
ButtonSelect = mb_left;
/// @var {Constant.VirtualKey} The keyboard key used to add/remove instances
/// from multiple selection when edit mode is enabled. Default value is
/// `vk_shift`.
/// @see BBMOD_BaseRenderer.EditMode
KeyMultiSelect = vk_shift;
/// @var {Struct.BBMOD_Gizmo} A gizmo for transforming instances when
/// {@link BBMOD_BaseRenderer.EditMode} is enabled. This is by default `undefined`.
/// @see BBMOD_Gizmo
Gizmo = undefined;
/// @var {Id.Surface} A surface containing the gizmo. Used to enable
/// z-testing against itself, but ingoring the scene geometry.
/// @private
__surGizmo = noone;
/// @var {Id.Surface} Surface for mouse-picking the gizmo.
/// @private
__surSelect = noone;
/// @var {Array<Struct.BBMOD_IRenderable>} An array of renderable objects
/// and structs. These are automatically rendered in
/// {@link BBMOD_BaseRenderer.render}.
/// @readonly
/// @see BBMOD_BaseRenderer.add
/// @see BBMOD_BaseRenderer.remove
/// @see BBMOD_IRenderable
Renderables = [];
/// @var {Bool} Set to `true` to enable the `application_surface`.
/// Use method {@link BBMOD_BaseRenderer.present} to draw the
/// `application_surface` to the screen. Defaults to `false`.
UseAppSurface = false;
/// @var {Real} Resolution multiplier for the `application_surface`.
/// {@link BBMOD_BaseRenderer.UseAppSurface} must be enabled for this to
/// have any effect. Defaults to 1. Use lower values to improve framerate.
RenderScale = 1.0;
/// @var {Bool} Enables rendering into a shadowmap in the shadows render pass.
/// Defauls to `false`.
/// @see BBMOD_BaseRenderer.ShadowmapArea
/// @see BBMOD_BaseRenderer.ShadowmapResolution
EnableShadows = false;
/// @var {Id.Surface} The surface used for rendering the scene's depth from the
/// directional light's view.
/// @private
__surShadowmap = noone;
/// @var {Real} The area captured by the shadowmap. Defaults to 1024.
/// @obsolete This has been replaced with {@link BBMOD_DirectionalLight.ShadowmapArea}.
ShadowmapArea = 1024.
/// @var {Real} The resolution of the shadowmap surface. Must be power of 2.
/// Defaults to 4096.
/// @obsolete This has been replaced with {@link BBMOD_Light.ShadowmapResolution}.
ShadowmapResolution = 4096;
/// @var {Real} When rendering shadows, offsets vertex position by its normal
/// scaled by this value. Defaults to 1. Increasing the value can remove some
/// artifacts but using too high value could make the objects appear flying
/// above the ground.
ShadowmapNormalOffset = 1;
/// @var {Bool} Enables post-processing effects. Defaults to `false`. Enabling
/// this requires the [Post-processing submodule](./PostProcessingSubmodule.html)!
///
/// @note {@link BBMOD_BaseRenderer.UseAppSurface} must be enabled for this to
/// have any effect!
///
/// @obsolete Post-processing is now handled through
/// {@link BBMOD_BaseRenderer.PostProcessor}!
EnablePostProcessing = false;
/// @var {Struct.BBMOD_PostProcessor} Handles post-processing effects if
/// isn't `undefined` and {@link BBMOD_BaseRenderer.UseAppSurface} is enabled.
/// Default value is `undefined`.
/// @see BBMOD_PostProcessor
PostProcessor = undefined;
/// @var {Id.Surface}
/// @private
__surFinal = noone;
/// @func get_width()
///
/// @desc Retrieves the width of the renderer on the screen.
///
/// @return {Real} The width of the renderer on the screen.
static get_width = function () {
gml_pragma("forceinline");
return max((Width == undefined) ? window_get_width() : Width, 1);
};
/// @func get_height()
///
/// @desc Retrieves the height of the renderer on the screen.
///
/// @return {Real} The height of the renderer on the screen.
static get_height = function () {
gml_pragma("forceinline");
return max((Height == undefined) ? window_get_height() : Height, 1);
};
/// @func get_render_width()
///
/// @desc Retrieves the width of the renderer with
///
/// {@link BBMOD_BaseRenderer.RenderScale} applied.
///
/// @return {Real} The width of the renderer after `RenderScale` is applied.
static get_render_width = function () {
gml_pragma("forceinline");
return max(get_width() * RenderScale, 1);
};
/// @func get_render_height()
///
/// @desc Retrieves the height of the renderer with
/// {@link BBMOD_BaseRenderer.RenderScale} applied.
///
/// @return {Real} The height of the renderer after `RenderScale` is applied.
static get_render_height = function () {
gml_pragma("forceinline");
return max(get_height() * RenderScale, 1);
};
/// @func set_position(_x, _y)
///
/// @desc Changes the renderer's position on the screen.
///
/// @param {Real} _x The new X position on the screen.
/// @param {Real} _y The new Y position on the screen.
///
/// @return {Struct.BBMOD_BaseRenderer} Returns `self`.
static set_position = function (_x, _y) {
gml_pragma("forceinline");
X = _x;
Y = _y;
return self;
};
/// @func set_size(_width, _height)
///
/// @desc Changes the renderer's size on the screen.
///
/// @param {Real} _width The new width on the screen.
/// @param {Real} _height The new height on the screen.
///
/// @return {Struct.BBMOD_BaseRenderer} Returns `self`.
static set_size = function (_width, _height) {
gml_pragma("forceinline");
Width = _width;
Height = _height;
return self;
};
/// @func set_rectangle(_x, _y, _width, _height)
///
/// @desc Changes the renderer's position and size on the screen.
///
/// @param {Real} _x The new X position on the screen.
/// @param {Real} _y The new Y position on the screen.
/// @param {Real} _width The new width on the screen.
/// @param {Real} _height The new height on the screen.
///
/// @return {Struct.BBMOD_BaseRenderer} Returns `self`.
static set_rectangle = function (_x, _y, _width, _height) {
gml_pragma("forceinline");
set_position(_x, _y);
set_size(_width, _height);
return self;
};
/// @func select_gizmo(_screenX, _screenY)
///
/// @desc Tries to select a gizmo at given screen coordinates and
/// automatically changes its {@link BBMOD_Gizmo.EditAxis} and
/// {@link BBMOD_Gizmo.EditType} based on which part of the gizmo
/// was selected.
///
/// @param {Real} _screenX The X position on the screen.
/// @param {Real} _screenY The Y position on the screen.
///
/// @return {Bool} Returns `true` if the gizmo was selected.
///
/// @note {@link BBMOD_BaseRenderer.Gizmo} must be defined.
///
/// @private
static select_gizmo = function (_screenX, _screenY) {
_screenX = clamp(_screenX - X, 0, get_width()) * RenderScale;
_screenY = clamp(_screenY - Y, 0, get_height()) * RenderScale;
Gizmo.EditAxis = BBMOD_EEditAxis.None;
var _pixel = surface_getpixel_ext(__surSelect, _screenX, _screenY);
if (_pixel & $FF000000 == 0)
{
return false;
}
var _blue = (_pixel >> 16) & 255;
var _green = (_pixel >> 8) & 255;
var _red = _pixel & 255;
var _value = max(_red, _green, _blue);
Gizmo.EditAxis = 0
| (BBMOD_EEditAxis.X * (_red > 0))
| (BBMOD_EEditAxis.Y * (_green > 0))
| (BBMOD_EEditAxis.Z * (_blue > 0));
Gizmo.EditType = ((_value == 255) ? BBMOD_EEditType.Position
: ((_value == 128) ? BBMOD_EEditType.Rotation
: BBMOD_EEditType.Scale));
return true;
};
/// @func get_instance_id(_screenX, _screenY)
///
/// @desc Retrieves an ID of an instance at given position on the screen.
///
/// @param {Real} _screenX The X position on the screen.
/// @param {Real} _screenY The Y position on the screen.
///
/// @return {Id.Instance} The ID of the instance or 0 if no instance was
/// found at the given position.
///
/// @note {@link BBMOD_BaseRenderer.RenderInstanceIDs} must be enabled.
static get_instance_id = function (_screenX, _screenY) {
gml_pragma("forceinline");
if (!surface_exists(__surSelect))
{
return 0;
}
_screenX = clamp(_screenX - X, 0, get_width()) * RenderScale;
_screenY = clamp(_screenY - Y, 0, get_height()) * RenderScale;
return surface_getpixel_ext(__surSelect, _screenX, _screenY);
};
/// @func add(_renderable)
///
/// @desc Adds a renderable object or struct to the renderer.
///
/// @param {Struct.BBMOD_IRenderable} _renderable The renderable object or
/// struct to add.
///
/// @return {Struct.BBMOD_BaseRenderer} Returns `self`.
///
/// @see BBMOD_BaseRenderer.remove
/// @see BBMOD_IRenderable
static add = function (_renderable) {
gml_pragma("forceinline");
array_push(Renderables, _renderable);
return self;
};
/// @func remove(_renderable)
///
/// @desc Removes a renderable object or a struct from the renderer.
///
/// @param {Struct.BBMOD_IRenderable} _renderable The renderable object or
/// struct to remove.
///
/// @return {Struct.BBMOD_BaseRenderer} Returns `self`.
///
/// @see BBMOD_BaseRenderer.add
/// @see BBMOD_IRenderable
static remove = function (_renderable) {
gml_pragma("forceinline");
for (var i = array_length(Renderables) - 1; i >= 0; --i)
{
if (Renderables[i] == _renderable)
{
array_delete(Renderables, i, 1);
}
}
return self;
};
/// @func update(_deltaTime)
///
/// @desc Updates the renderer. This should be called in the Step event.
///
/// @param {Real} _deltaTime How much time has passed since the last frame
/// (in microseconds).
///
/// @return {Struct.BBMOD_BaseRenderer} Returns `self`.
static update = function (_deltaTime) {
global.__bbmodRendererCurrent = self;
if (UseAppSurface)
{
application_surface_enable(true);
application_surface_draw_enable(false);
var _surfaceWidth = get_render_width();
var _surfaceHeight = get_render_height();
if (surface_exists(application_surface)
&& (surface_get_width(application_surface) != _surfaceWidth
|| surface_get_height(application_surface) != _surfaceHeight))
{
surface_resize(application_surface, _surfaceWidth, _surfaceHeight);
}
}
if (Gizmo && EditMode)
{
Gizmo.update(delta_time);
}
return self;
};
/// @func __render_shadowmap()
///
/// @desc Renders a shadowmap.
///
/// @note This modifies render pass and view and projection matrices and
/// for optimization reasons it does not reset them back! Make sure to do
/// that yourself in the calling function if needed.
///
/// @private
static __render_shadowmap = function () {
gml_pragma("forceinline");
static _renderQueues = bbmod_render_queues_get();
var _shadowCaster = undefined;
var _shadowCasterIndex = -1;
var _shadowmapMatrix;
var _shadowmapZFar;
if (EnableShadows)
{
var _light = bbmod_light_directional_get();
if (_light != undefined
&& _light.CastShadows
&& _light.__getZFar != undefined
&& _light.__getShadowmapMatrix != undefined)
{
// Directional light
_shadowCaster = _light;
_shadowmapMatrix = _light.__getShadowmapMatrix();
_shadowmapZFar = _light.__getZFar();
}
else
{
// Punctual lights
var i = 0;
repeat (array_length(global.__bbmodPunctualLights))
{
var _light = global.__bbmodPunctualLights[i];
if (_light.CastShadows
&& _light.__getZFar != undefined
&& _light.__getShadowmapMatrix != undefined)
{
_shadowCaster = _light;
_shadowCasterIndex = i;
_shadowmapMatrix = _light.__getShadowmapMatrix();
_shadowmapZFar = _light.__getZFar();
break;
}
++i;
}
}
}
if (_shadowCaster == undefined)
{
if (surface_exists(__surShadowmap))
{
surface_free(__surShadowmap);
__surShadowmap = noone;
}
// No shadow caster was found!!!
bbmod_shader_unset_global("bbmod_Shadowmap");
bbmod_shader_set_global_f("bbmod_ShadowmapEnableVS", 0.0);
bbmod_shader_set_global_f("bbmod_ShadowmapEnablePS", 0.0);
return;
}
bbmod_render_pass_set(BBMOD_ERenderPass.Shadows);
__surShadowmap = bbmod_surface_check(
__surShadowmap, _light.ShadowmapResolution, _light.ShadowmapResolution);
surface_set_target(__surShadowmap);
draw_clear(c_red);
matrix_set(matrix_view, _light.__getViewMatrix());
matrix_set(matrix_projection, _light.__getProjMatrix());
bbmod_shader_set_global_f("bbmod_ZFar", _light.__getZFar());
var _rqi = 0;
repeat (array_length(_renderQueues))
{
_renderQueues[_rqi++].submit();
}
surface_reset_target();
var _shadowmapTexture = surface_get_texture(__surShadowmap);
bbmod_shader_set_global_f("bbmod_ShadowmapEnableVS", 1.0);
bbmod_shader_set_global_f("bbmod_ShadowmapEnablePS", 1.0);
bbmod_shader_set_global_sampler("bbmod_Shadowmap", _shadowmapTexture);
bbmod_shader_set_global_sampler_mip_enable("bbmod_Shadowmap", true);
bbmod_shader_set_global_sampler_filter("bbmod_Shadowmap", true);
bbmod_shader_set_global_sampler_repeat("bbmod_Shadowmap", false);
bbmod_shader_set_global_f2("bbmod_ShadowmapTexel",
texture_get_texel_width(_shadowmapTexture),
texture_get_texel_height(_shadowmapTexture));
bbmod_shader_set_global_f("bbmod_ShadowmapArea", _shadowmapZFar);
bbmod_shader_set_global_f("bbmod_ShadowmapNormalOffset", ShadowmapNormalOffset);
bbmod_shader_set_global_matrix_array("bbmod_ShadowmapMatrix", _shadowmapMatrix);
bbmod_shader_set_global_f("bbmod_ShadowCasterIndex", _shadowCasterIndex);
};
/// @func __render_gizmo_and_instance_ids()
///
/// @desc Renders gizmo and instance IDs into dedicated surfaces.
///
/// @private
static __render_gizmo_and_instance_ids = function () {
static _renderQueues = bbmod_render_queues_get();
var _view = matrix_get(matrix_view);
var _projection = matrix_get(matrix_projection);
var _renderWidth = get_render_width();
var _renderHeight = get_render_height();
var _editMode = (EditMode && Gizmo);
var _mouseX = window_mouse_get_x();
var _mouseY = window_mouse_get_y();
var _mouseOver = (_mouseX >= X && _mouseX < X + get_width()
&& _mouseY >= Y && _mouseY < Y + get_height());
var _continueMousePick = EnableMousepick;
var _gizmoSize;
if (_editMode)
{
_gizmoSize = Gizmo.Size;
if (_projection[11] != 0.0)
{
Gizmo.Size = _gizmoSize
* Gizmo.Position.Sub(bbmod_camera_get_position()).Length() / 100.0;
}
}
////////////////////////////////////////////////////////////////////////
// Gizmo select
if (_editMode
&& _continueMousePick
&& _mouseOver
&& mouse_check_button_pressed(Gizmo.ButtonDrag))
{
__surSelect = bbmod_surface_check(__surSelect, _renderWidth, _renderHeight);
surface_set_target(__surSelect);
draw_clear_alpha(0, 0.0);
matrix_set(matrix_view, _view);
matrix_set(matrix_projection, _projection);
Gizmo.submit(Gizmo.MaterialsSelect);
surface_reset_target();
if (select_gizmo(_mouseX, _mouseY))
{
Gizmo.IsEditing = true;
_continueMousePick = false;
}
}
////////////////////////////////////////////////////////////////////////
// Instance IDs
var _mousePickInstance = (_editMode && _continueMousePick
&& _mouseOver && mouse_check_button_pressed(ButtonSelect));
if (_mousePickInstance || RenderInstanceIDs)
{
__surSelect = bbmod_surface_check(__surSelect, _renderWidth, _renderHeight);
surface_set_target(__surSelect);
draw_clear_alpha(0, 0.0);
matrix_set(matrix_view, _view);
matrix_set(matrix_projection, _projection);
bbmod_render_pass_set(BBMOD_ERenderPass.Id);
var _rqi = 0;
repeat (array_length(_renderQueues))
{
_renderQueues[_rqi++].submit();
}
surface_reset_target();
// Select instance
if (_mousePickInstance)
{
if (!keyboard_check(KeyMultiSelect))
{
Gizmo.clear_selection();
}
var _id = get_instance_id(_mouseX, _mouseY);
if (_id != 0)
{
Gizmo.toggle_select(_id).update_position();
Gizmo.Size = _gizmoSize
* Gizmo.Position.Sub(bbmod_camera_get_position()).Length() / 100.0;
}
}
}
if (_editMode && !ds_list_empty(Gizmo.Selected))
{
////////////////////////////////////////////////////////////////////
// Instance highlight
__surInstanceHighlight = bbmod_surface_check(
__surInstanceHighlight, _renderWidth, _renderHeight);
surface_set_target(__surInstanceHighlight);
draw_clear_alpha(0, 0.0);
matrix_set(matrix_view, _view);
matrix_set(matrix_projection, _projection);
bbmod_render_pass_set(BBMOD_ERenderPass.Id);
var _selectedInstances = Gizmo.Selected;
var _rqi = 0;
repeat (array_length(_renderQueues))
{
_renderQueues[_rqi++].submit(_selectedInstances);
}
surface_reset_target();
////////////////////////////////////////////////////////////////////
// Gizmo
bbmod_render_pass_set(BBMOD_ERenderPass.Forward);
__surGizmo = bbmod_surface_check(__surGizmo, _renderWidth, _renderHeight);
surface_set_target(__surGizmo);
draw_clear_alpha(0, 0.0);
matrix_set(matrix_view, _view);
matrix_set(matrix_projection, _projection);
Gizmo.submit();
surface_reset_target();
}
if (_editMode)
{
Gizmo.Size = _gizmoSize;
}
};
/// @func render(_clearQueues=true)
///
/// @desc Renders all added [renderables](./BBMOD_BaseRenderer.Renderables.html)
/// to the current render target.
///
/// @param {Bool} [_clearQueues] If true then all render queues are cleared
/// at the end of this method. Default value is `true`.
///
/// @return {Struct.BBMOD_BaseRenderer} Returns `self`.
static render = function (_clearQueues=true) {
global.__bbmodRendererCurrent = self;
static _renderQueues = bbmod_render_queues_get();
var _world = matrix_get(matrix_world);
var _view = matrix_get(matrix_view);
var _projection = matrix_get(matrix_projection);
var i = 0;
repeat (array_length(Renderables))
{
with (Renderables[i++])
{
render();
}
}
bbmod_material_reset();
////////////////////////////////////////////////////////////////////////
//
// Edit mode
//
__render_gizmo_and_instance_ids();
////////////////////////////////////////////////////////////////////////
//
// Shadow map
//
__render_shadowmap();
////////////////////////////////////////////////////////////////////////
//
// Forward pass
//
bbmod_shader_set_global_f("bbmod_ZFar", bbmod_camera_get_zfar());
matrix_set(matrix_view, _view);
matrix_set(matrix_projection, _projection);
bbmod_render_pass_set(BBMOD_ERenderPass.Forward);
var _rqi = 0;
repeat (array_length(_renderQueues))
{
var _queue = _renderQueues[_rqi++].submit();
if (_clearQueues)
{
_queue.clear();
}
}
// Unset in case it gets destroyed when the room changes etc.
bbmod_shader_unset_global("bbmod_Shadowmap");
bbmod_material_reset();
matrix_set(matrix_world, _world);
return self;
};
/// @func present()
///
/// @desc Presents the rendered graphics on the screen, with post-processing
/// applied (if {@link BBMOD_BaseRenderer.PostProcessor} is defined).
///
/// @return {Struct.BBMOD_BaseRenderer} Returns `self`.
///
/// @note If {@link BBMOD_BaseRenderer.UseAppSurface} is `false`, then this only
/// draws the gizmo and selected instances.
static present = function () {
global.__bbmodRendererCurrent = self;
static _gpuState = undefined;
if (_gpuState == undefined)
{
gpu_push_state();
gpu_set_state(bbmod_gpu_get_default_state());
gpu_set_tex_filter(true);
gpu_set_tex_repeat(false);
gpu_set_blendenable(true);
_gpuState = gpu_get_state();
gpu_pop_state();
}
var _width = get_width();
var _height = get_height();
var _texelWidth = 1.0 / _width;
var _texelHeight = 1.0 / _height;
if (!UseAppSurface // Can't use post-processing even if it was defined
|| (PostProcessor == undefined || !PostProcessor.Enabled))
{
////////////////////////////////////////////////////////////////////
//
// Post-processing DISABLED
//
gpu_push_state();
gpu_set_state(_gpuState);
if (UseAppSurface)
{
gpu_set_blendenable(false);
draw_surface_stretched(application_surface, X, Y, _width, _height);
gpu_set_blendenable(true);
}
if (EditMode && Gizmo && !ds_list_empty(Gizmo.Selected))
{
////////////////////////////////////////////////////////////////
// Highlighted instances
if (!ds_list_empty(Gizmo.Selected)
&& surface_exists(__surInstanceHighlight))
{
var _shader = BBMOD_ShInstanceHighlight;
shader_set(_shader);
shader_set_uniform_f(shader_get_uniform(_shader, "u_vTexel"),
_texelWidth, _texelHeight);
shader_set_uniform_f(shader_get_uniform(_shader, "u_vColor"),
InstanceHighlightColor.Red / 255.0,
InstanceHighlightColor.Green / 255.0,
InstanceHighlightColor.Blue / 255.0,
InstanceHighlightColor.Alpha);
draw_surface_stretched(__surInstanceHighlight, X, Y, _width, _height);
shader_reset();
}
////////////////////////////////////////////////////////////////
// Gizmo
if (surface_exists(__surGizmo))
{
draw_surface_stretched(__surGizmo, X, Y, _width, _height);
}
}
gpu_pop_state();
}
else
{
////////////////////////////////////////////////////////////////////
//
// Post-processing ENABLED
//
var _world = matrix_get(matrix_world);
__surFinal = bbmod_surface_check(__surFinal, _width, _height);
gpu_push_state();
gpu_set_state(_gpuState);
surface_set_target(__surFinal);
matrix_set(matrix_world, matrix_build_identity());
draw_surface_stretched(application_surface, 0, 0, _width, _height);
if (EditMode && Gizmo && !ds_list_empty(Gizmo.Selected))
{
////////////////////////////////////////////////////////////////
// Highlighted instances
if (!ds_list_empty(Gizmo.Selected)
&& surface_exists(__surInstanceHighlight))
{
var _shader = BBMOD_ShInstanceHighlight;
shader_set(_shader);
shader_set_uniform_f(shader_get_uniform(_shader, "u_vTexel"),
_texelWidth, _texelHeight);
shader_set_uniform_f(shader_get_uniform(_shader, "u_vColor"),
InstanceHighlightColor.Red / 255.0,
InstanceHighlightColor.Green / 255.0,
InstanceHighlightColor.Blue / 255.0,
InstanceHighlightColor.Alpha);
draw_surface_stretched(__surInstanceHighlight, 0, 0, _width, _height);
shader_reset();
}
////////////////////////////////////////////////////////////////
// Gizmo
if (surface_exists(__surGizmo))
{
draw_surface_stretched(__surGizmo, 0, 0, _width, _height);
}
}
surface_reset_target();
matrix_set(matrix_world, _world);
gpu_pop_state();
PostProcessor.draw(__surFinal, X, Y);
}
return self;
};
static destroy = function () {
Class_destroy();
if (global.__bbmodRendererCurrent == self)
{
global.__bbmodRendererCurrent = undefined;
}
if (surface_exists(__surSelect))
{
surface_free(__surSelect);
}
if (surface_exists(__surInstanceHighlight))
{
surface_free(__surInstanceHighlight);
}
if (surface_exists(__surGizmo))
{
surface_free(__surGizmo);
}
if (surface_exists(__surShadowmap))
{
surface_free(__surShadowmap);
}
if (surface_exists(__surFinal))
{
surface_free(__surFinal);
}
if (UseAppSurface)
{
application_surface_enable(false);
application_surface_draw_enable(true);
}
return undefined;
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_BaseRenderer",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Rendering",
"path": "folders/_Extensions/BBMOD/Core/Rendering.yy",
},
}

View file

@ -0,0 +1,443 @@
/// @func BBMOD_BaseShader(_shader, _vertexFormat)
///
/// @extends BBMOD_Shader
///
/// @desc Base class for BBMOD shaders.
///
/// @param {Asset.GMShader} _shader The shader resource.
/// @param {Struct.BBMOD_VertexFormat} _vertexFormat The vertex format required
/// by the shader.
///
/// @see BBMOD_VertexFormat
function BBMOD_BaseShader(_shader, _vertexFormat)
: BBMOD_Shader(_shader, _vertexFormat) constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Real} Maximum number of point lights in the shader. This must
/// match with value defined in the raw GameMaker shader!
/// @obsolete This was replaced with {@link BBMOD_BaseShader.MaxPunctualLights}!
MaxPointLights = 8;
/// @var {Real} Maximum number of punctual lights in the shader. This must
/// match with value defined in the raw GameMaker shader!
MaxPunctualLights = 8;
/// @func set_texture_offset(_offset)
///
/// @desc Sets the `bbmod_TextureOffset` uniform to the given offset.
///
/// @param {Struct.BBMOD_Vec2} _offset The texture offset.
///
/// @return {Struct.BBMOD_Shader} Returns `self`.
static set_texture_offset = function (_offset) {
gml_pragma("forceinline");
shader_set_uniform_f(
shader_get_uniform(shader_current(), "bbmod_TextureOffset"),
_offset.X, _offset.Y);
return self;
};
/// @func set_texture_scale(_scale)
///
/// @desc Sets the `bbmod_TextureScale` uniform to the given scale.
///
/// @param {Struct.BBMOD_Vec2} _scale The texture scale.
///
/// @return {Struct.BBMOD_Shader} Returns `self`.
static set_texture_scale = function (_scale) {
gml_pragma("forceinline");
shader_set_uniform_f(
shader_get_uniform(shader_current(), "bbmod_TextureScale"),
_scale.X, _scale.Y);
return self;
};
/// @func set_bones(_bones)
///
/// @desc Sets the `bbmod_Bones` uniform.
///
/// @param {Array<Real>} _bones The array of bone transforms.
///
/// @return {Struct.BBMOD_Shader} Returns `self`.
///
/// @see BBMOD_AnimationPlayer.get_transform
static set_bones = function (_bones) {
gml_pragma("forceinline");
shader_set_uniform_f_array(
shader_get_uniform(shader_current(), "bbmod_Bones"),
_bones);
return self;
};
/// @func set_batch_data(_data)
///
/// @desc Sets the `bbmod_BatchData` uniform.
///
/// @param {Array<Real>} _data The dynamic batch data.
///
/// @return {Struct.BBMOD_Shader} Returns `self`.
static set_batch_data = function (_data) {
gml_pragma("forceinline");
shader_set_uniform_f_array(
shader_get_uniform(shader_current(), "bbmod_BatchData"),
_data);
return self;
};
/// @func set_alpha_test(_value)
///
/// @desc Sets the `bbmod_AlphaTest` uniform.
///
/// @param {Real} _value The alpha test value.
///
/// @return {Struct.BBMOD_Shader} Returns `self`.
static set_alpha_test = function (_value) {
gml_pragma("forceinline");
shader_set_uniform_f(
shader_get_uniform(shader_current(), "bbmod_AlphaTest"),
_value);
return self;
};
/// @func set_cam_pos([_pos])
///
/// @desc Sets a fragment shader uniform `bbmod_CamPos` to the given position.
///
/// @param {Struct.BBMOD_Vec3} [_pos] The camera position. If `undefined`,
/// then the value set by {@link bbmod_camera_set_position} is used.
///
/// @return {Struct.BBMOD_Shader} Returns `self`.
static set_cam_pos = function (_pos=undefined) {
gml_pragma("forceinline");
_pos ??= global.__bbmodCameraPosition;
shader_set_uniform_f(
shader_get_uniform(shader_current(), "bbmod_CamPos"),
_pos.X, _pos.Y, _pos.Z);
return self;
};
/// @func set_exposure([_value])
///
/// @desc Sets the `bbmod_Exposure` uniform.
///
/// @param {Real} [_value] The camera exposure. If `undefined`,
/// then the value set by {@link bbmod_camera_set_exposure} is used.
///
/// @return {Struct.BBMOD_BaseShader} Returns `self`.
static set_exposure = function (_value=undefined) {
gml_pragma("forceinline");
shader_set_uniform_f(
shader_get_uniform(shader_current(), "bbmod_Exposure"),
_value ?? global.__bbmodCameraExposure);
return self;
};
/// @func set_instance_id([_id])
///
/// @desc Sets the `bbmod_InstanceID` uniform.
///
/// @param {Id.Instance} [_id] The instance ID. If `undefined`,
/// then the value set by {@link bbmod_set_instance_id} is used.
///
/// @return {Struct.BBMOD_BaseShader} Returns `self`.
static set_instance_id = function (_id=undefined) {
gml_pragma("forceinline");
_id ??= global.__bbmodInstanceID;
shader_set_uniform_f(
shader_get_uniform(shader_current(), "bbmod_InstanceID"),
((_id & $000000FF) >> 0) / 255,
((_id & $0000FF00) >> 8) / 255,
((_id & $00FF0000) >> 16) / 255,
((_id & $FF000000) >> 24) / 255);
return self;
};
/// @func set_material_index(_index)
///
/// @desc Sets the `bbmod_MaterialIndex` uniform.
///
/// @param {Real} [_index] The index of the current material.
///
/// @return {Struct.BBMOD_BaseShader} Returns `self`.
static set_material_index = function (_index) {
gml_pragma("forceinline");
shader_set_uniform_f(
shader_get_uniform(shader_current(), "bbmod_MaterialIndex"),
_index);
return self;
};
/// @func set_ibl([_ibl])
///
/// @desc Sets a fragment shader uniform `bbmod_IBLTexel` and samplers
/// `bbmod_IBL` and `bbmod_BRDF`. These are required for image based
/// lighting.
///
/// @param {Struct.BBMOD_ImageBasedLight} [_ibl] The image based light.
/// If `undefined`, then the value set by {@link bbmod_ibl_set} is used. If
/// the light is not enabled, then it is not passed.
///
/// @return {Struct.BBMOD_BaseShader} Returns `self`.
static set_ibl = function (_ibl=undefined) {
gml_pragma("forceinline");
static _iblNull = sprite_get_texture(BBMOD_SprBlack, 0);
var _texture = _iblNull;
var _texel = 0.0;
_ibl ??= global.__bbmodImageBasedLight;
if (_ibl != undefined && _ibl.Enabled)
{
_texture = _ibl.Texture;
_texel = _ibl.Texel;
}
var _shaderCurrent = shader_current();
var _uIBL = shader_get_sampler_index(_shaderCurrent, "bbmod_IBL");
texture_set_stage(_uIBL, _texture);
gpu_set_tex_mip_enable_ext(_uIBL, mip_off)
gpu_set_tex_filter_ext(_uIBL, true);
gpu_set_tex_repeat_ext(_uIBL, false);
shader_set_uniform_f(
shader_get_uniform(_shaderCurrent, "bbmod_IBLTexel"),
_texel, _texel);
return self;
};
/// @func set_ambient_light([_up[, _down]])
///
/// @desc Sets the `bbmod_LightAmbientUp`, `bbmod_LightAmbientDown` uniforms.
///
/// @param {Struct.BBMOD_Color} [_up] RGBM encoded ambient light color on
/// the upper hemisphere. If `undefined`, then the value set by
/// {@link bbmod_light_ambient_set_up} is used.
/// @param {Struct.BBMOD_Color} [_down] RGBM encoded ambient light color on
/// the lower hemisphere. If `undefined`, then the value set by
/// {@link bbmod_light_ambient_set_down} is used.
///
/// @return {Struct.BBMOD_BaseShader} Returns `self`.
static set_ambient_light = function (_up=undefined, _down=undefined) {
gml_pragma("forceinline");
_up ??= global.__bbmodAmbientLightUp;
_down ??= global.__bbmodAmbientLightDown;
var _shaderCurrent = shader_current();
shader_set_uniform_f(
shader_get_uniform(_shaderCurrent, "bbmod_LightAmbientUp"),
_up.Red / 255.0, _up.Green / 255.0, _up.Blue / 255.0, _up.Alpha);
shader_set_uniform_f(
shader_get_uniform(_shaderCurrent, "bbmod_LightAmbientDown"),
_down.Red / 255.0, _down.Green / 255.0, _down.Blue / 255.0, _down.Alpha);
return self;
};
/// @func set_directional_light([_light])
///
/// @desc Sets uniforms `bbmod_LightDirectionalDir` and
/// `bbmod_LightDirectionalColor`.
///
/// @param {Struct.BBMOD_DirectionalLight} [_light] The directional light.
/// If `undefined`, then the value set by {@link bbmod_light_directional_set}
/// is used. If the light is not enabled then it is not passed.
///
/// @return {Struct.BBMOD_BaseShader} Returns `self`.
///
/// @see BBMOD_DirectionalLight
static set_directional_light = function (_light=undefined) {
gml_pragma("forceinline");
_light ??= global.__bbmodDirectionalLight;
var _shaderCurrent = shader_current();
var _uLightDirectionalDir = shader_get_uniform(_shaderCurrent, "bbmod_LightDirectionalDir");
var _uLightDirectionalColor = shader_get_uniform(_shaderCurrent, "bbmod_LightDirectionalColor");
if (_light != undefined && _light.Enabled)
{
var _direction = _light.Direction;
shader_set_uniform_f(_uLightDirectionalDir,
_direction.X, _direction.Y, _direction.Z);
var _color = _light.Color;
shader_set_uniform_f(_uLightDirectionalColor,
_color.Red / 255.0,
_color.Green / 255.0,
_color.Blue / 255.0,
_color.Alpha);
}
else
{
shader_set_uniform_f(_uLightDirectionalDir, 0.0, 0.0, -1.0);
shader_set_uniform_f(_uLightDirectionalColor, 0.0, 0.0, 0.0, 0.0);
}
return self;
};
/// @func set_point_lights([_lights])
///
/// @desc Sets uniforms `bbmod_LightPunctualDataA` and
/// `bbmod_LightPunctualDataB`.
///
/// @param {Array<Struct.BBMOD_PointLight>} [_lights] An array of point
/// lights. If `undefined`, then the lights defined using
/// {@link bbmod_light_point_add} are passed. Only enabled lights will be used!
///
/// @return {Struct.BBMOD_BaseShader} Returns `self`.
///
/// @deprecated Please use {@link set_punctual_lights} instead.
static set_point_lights = function (_lights=undefined) {
gml_pragma("forceinline");
set_punctual_lights(_lights);
return self;
};
/// @func set_punctual_lights([_lights])
///
/// @desc Sets uniforms `bbmod_LightPunctualDataA` and
/// `bbmod_LightPunctualDataB`.
///
/// @param {Array<Struct.BBMOD_PunctualLight>} [_lights] An array of punctual
/// lights. If `undefined`, then the lights defined using
/// {@link bbmod_light_punctual_add} are passed. Only enabled lights will be used!
///
/// @return {Struct.BBMOD_BaseShader} Returns `self`.
static set_punctual_lights = function (_lights=undefined) {
gml_pragma("forceinline");
_lights ??= global.__bbmodPunctualLights;
var _maxLights = MaxPunctualLights;
var _indexA = 0;
var _indexMaxA = _maxLights * 8;
var _dataA = array_create(_indexMaxA, 0.0);
var _indexB = 0;
var _indexMaxB = _maxLights * 6;
var _dataB = array_create(_indexMaxB, 0.0);
var i = 0;
repeat (array_length(_lights))
{
var _light = _lights[i++];
if (_light.Enabled)
{
_light.Position.ToArray(_dataA, _indexA);
_dataA[@ _indexA + 3] = _light.Range;
var _color = _light.Color;
_dataA[@ _indexA + 4] = _color.Red / 255.0;
_dataA[@ _indexA + 5] = _color.Green / 255.0;
_dataA[@ _indexA + 6] = _color.Blue / 255.0;
_dataA[@ _indexA + 7] = _color.Alpha;
_indexA += 8;
if (_light.is_instance(BBMOD_SpotLight)) // Ugh, but works!
{
_dataB[@ _indexB] = 1.0; // Is spot light
_dataB[@ _indexB + 1] = dcos(_light.AngleInner);
_dataB[@ _indexB + 2] = dcos(_light.AngleOuter);
_light.Direction.ToArray(_dataB, _indexB + 3);
}
_indexB += 6;
if (_indexA >= _indexMaxA)
{
break;
}
}
}
var _shaderCurrent = shader_current();
shader_set_uniform_f_array(
shader_get_uniform(_shaderCurrent, "bbmod_LightPunctualDataA"),
_dataA);
shader_set_uniform_f_array(
shader_get_uniform(_shaderCurrent, "bbmod_LightPunctualDataB"),
_dataB);
return self;
};
/// @func set_fog([_color[, _intensity[, _start[, _end]]]])
///
/// @desc Sets uniforms `bbmod_FogColor`, `bbmod_FogIntensity`,
/// `bbmod_FogStart` and `bbmod_FogRcpRange`.
///
/// @param {Struct.BBMOD_Color} [_color] The color of the fog. If `undefined`,
/// then the value set by {@link bbmod_fog_set_color} is used.
/// @param {Real} [_intensity] The fog intensity. If `undefined`, then the
/// value set by {@link bbmod_fog_set_intensity} is used.
/// @param {Real} [_start] The distance at which the fog starts. If
/// `undefined`, then the value set by {@link bbmod_fog_set_start} is used.
/// @param {Real} [_end] The distance at which the fog has maximum intensity.
/// If `undefined`, then the value set by {@link bbmod_fog_set_end} is used.
///
/// @return {Struct.BBMOD_BaseShader} Returns `self`.
static set_fog = function (_color=undefined, _intensity=undefined, _start=undefined, _end=undefined) {
gml_pragma("forceinline");
_color ??= global.__bbmodFogColor;
_intensity ??= global.__bbmodFogIntensity;
_start ??= global.__bbmodFogStart;
_end ??= global.__bbmodFogEnd;
var _rcpFogRange = 1.0 / (_end - _start);
var _shaderCurrent = shader_current();
shader_set_uniform_f(
shader_get_uniform(_shaderCurrent, "bbmod_FogColor"),
_color.Red / 255.0,
_color.Green / 255.0,
_color.Blue / 255.0,
_color.Alpha);
shader_set_uniform_f(
shader_get_uniform(_shaderCurrent, "bbmod_FogIntensity"),
_intensity);
shader_set_uniform_f(
shader_get_uniform(_shaderCurrent, "bbmod_FogStart"),
_start);
shader_set_uniform_f(
shader_get_uniform(_shaderCurrent, "bbmod_FogRcpRange"),
_rcpFogRange);
return self;
};
static on_set = function () {
gml_pragma("forceinline");
set_cam_pos();
set_exposure();
set_ibl();
set_ambient_light();
set_directional_light();
set_punctual_lights();
set_fog();
texture_set_stage(
shader_get_sampler_index(shader_current(), "bbmod_SSAO"),
sprite_get_texture(BBMOD_SprWhite, 0));
};
/// @func set_material(_material)
///
/// @desc Sets shader uniforms using values from the material.
/// @param {Struct.BBMOD_BaseMaterial} _material The material to take the
/// values from.
///
/// @return {Struct.BBMOD_BaseShader} Returns `self`.
///
/// @see BBMOD_BaseMaterial
static set_material = function (_material) {
gml_pragma("forceinline");
var _shaderCurrent = shader_current();
shader_set_uniform_f(
shader_get_uniform(_shaderCurrent, "bbmod_BaseOpacityMultiplier"),
_material.BaseOpacityMultiplier.Red / 255.0,
_material.BaseOpacityMultiplier.Green / 255.0,
_material.BaseOpacityMultiplier.Blue / 255.0,
_material.BaseOpacityMultiplier.Alpha);
set_alpha_test(_material.AlphaTest);
set_texture_offset(_material.TextureOffset);
set_texture_scale(_material.TextureScale);
shader_set_uniform_f(
shader_get_uniform(_shaderCurrent, "bbmod_ShadowmapBias"),
_material.ShadowmapBias);
return self;
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_BaseShader",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Rendering",
"path": "folders/_Extensions/BBMOD/Core/Rendering.yy",
},
}

View file

@ -0,0 +1,289 @@
/// @func BBMOD_Camera()
///
/// @extends BBMOD_BaseCamera
///
/// @desc A camera driven by angles and an object to follor, rather than raw
/// vectors. Supports both first-person and third-person view and comes with
/// a mouselook implementation that also works in HTML5.
///
/// @example
/// ```gml
/// // Create event
/// camera = new BBMOD_Camera();
/// camera.FollowObject = OPlayer;
/// camera.Zoom = 0.0; // Use 0.0 for FPS, > 0.0 for TPS
///
/// // End-Step event
/// camera.set_mouselook(true);
/// camera.update(delta_time);
///
/// // Draw event
/// camera.apply();
/// // Render scene here...
/// ```
function BBMOD_Camera()
: BBMOD_BaseCamera() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Bool} If `true` then mouselook is enabled. Defaults to `false`.
/// @readonly
/// @see BBMOD_Camera.set_mouselook
MouseLook = false;
/// @var {Real} Controls the mouselook sensitivity. Defaults to `1`.
MouseSensitivity = 1.0;
/// @var {Struct.BBMOD_Vec2} The position on the screen where the cursor
/// is locked when {@link BBMOD_Camera.MouseLook} is `true`. Can be
/// `undefined`.
/// @private
__mouseLockAt = undefined;
/// @var {Id.Instance} An id of an instance to follow or `undefined`. The
/// object must have a `z` variable (position on the z axis) defined!
/// Defaults to `undefined`.
FollowObject = undefined;
/// @var {Bool} Used to determine change of the object to follow.
/// @private
__followObjectLast = undefined;
/// @var {Function} A function which remaps value in range `0..1` to a
/// different `0..1` value. This is used to control the follow curve.
/// If `undefined` then `lerp` is used. Defaults to `undefined`.
FollowCurve = undefined;
/// @var {Real} Controls lerp factor between the previous camera position
/// and the object it follows. Defaults to `1`, which means the camera is
/// immediately moved to its target position.
/// {@link BBMOD_Camera.FollowObject} must not be `undefined` for this to
/// have any effect.
FollowFactor = 1.0;
/// @var {Struct.BBMOD_Vec3} The camera's offset from its target. Defaults to
/// `(0, 0, 0)`.
Offset = new BBMOD_Vec3(0.0);
/// @var {Real} The camera's horizontal direction. Defaults to `0`.
Direction = 0.0;
/// @var {Real} The camera's vertical direction. Automatically clamped
/// between {@link BBMOD_Camera.DirectionUpMin} and
/// {@link BBMOD_Camera.DirectionUpMax}. Defaults to `0`.
DirectionUp = 0.0;
/// @var {Real} Minimum angle that {@link BBMOD_Camrea.DirectionUp}
/// can be. Use `undefined` to remove the limit. Default value is `-89`.
DirectionUpMin = -89.0;
/// @var {Real} Maximum angle that {@link BBMOD_Camrea.DirectionUp}
/// can be. Use `undefined` to remove the limit. Default value is `89`.
DirectionUpMax = 89.0;
/// @var {Real} The angle of camera's rotation from side to side. Default
/// value is `0`.
Roll = 0.0;
/// @var {Real} The camera's distance from its target. Use `0` for a
/// first-person camera. Defaults to `0`.
Zoom = 0.0;
static update_matrices = function () {
gml_pragma("forceinline");
var _forward = BBMOD_VEC3_FORWARD;
var _right = BBMOD_VEC3_RIGHT;
var _up = BBMOD_VEC3_UP;
var _quatZ = new BBMOD_Quaternion().FromAxisAngle(_up, Direction);
_forward = _quatZ.Rotate(_forward);
_right = _quatZ.Rotate(_right);
_up = _quatZ.Rotate(_up);
var _quatY = new BBMOD_Quaternion().FromAxisAngle(_right, DirectionUp);
_forward = _quatY.Rotate(_forward);
_right = _quatY.Rotate(_right);
_up = _quatY.Rotate(_up);
var _quatX = new BBMOD_Quaternion().FromAxisAngle(_forward, Roll);
_forward = _quatX.Rotate(_forward);
_right = _quatX.Rotate(_right);
_up = _quatX.Rotate(_up);
var _target = Position.Add(_forward);
var _view = matrix_build_lookat(
Position.X, Position.Y, Position.Z,
_target.X, _target.Y, _target.Z,
_up.X, _up.Y, _up.Z);
camera_set_view_mat(Raw, _view);
var _proj = __build_proj_mat();
camera_set_proj_mat(Raw, _proj);
// Note: Using _view and _proj mat straight away leads into a weird result...
ViewProjectionMatrix = matrix_multiply(
get_view_mat(),
get_proj_mat());
if (AudioListener)
{
audio_listener_position(Position.X, Position.Y, Position.Z);
audio_listener_orientation(
Target.X, Target.Y, Target.Z,
_up.X, _up.Y, _up.Z);
}
Up = _up;
return self;
}
/// @func set_mouselook(_enable)
///
/// @desc Enable/disable mouselook. This locks the mouse cursor at its
/// current position when enabled.
///
/// @param {Bool} _enable USe `true` to enable mouselook.
///
/// @return {Struct.BBMOD_Camera} Returns `self`.
static set_mouselook = function (_enable) {
if (_enable)
{
if (os_browser != browser_not_a_browser)
{
bbmod_html5_pointer_lock();
}
if (__mouseLockAt == undefined)
{
__mouseLockAt = new BBMOD_Vec2(
window_mouse_get_x(),
window_mouse_get_y());
}
}
else
{
__mouseLockAt = undefined;
}
MouseLook = _enable;
return self;
};
/// @func update(_deltaTime[, _positionHandler])
///
/// @desc Handles mouselook, updates camera's position, matrices etc.
///
/// @param {Real} _deltaTime How much time has passed since the last frame
/// (in microseconds).
/// @param {Function} [_positionHandler] A function which takes the camera's
/// position (@{link BBMOD_Vec3}) and returns a new position. This could be
/// used for example for camera collisions in a third-person game. Defaults
/// to `undefined`.
///
/// @return {Struct.BBMOD_Camera} Returns `self`.
static update = function (_deltaTime, _positionHandler=undefined) {
if (os_browser != browser_not_a_browser)
{
set_mouselook(bbmod_html5_pointer_is_locked());
}
if (MouseLook)
{
if (os_browser != browser_not_a_browser)
{
Direction -= bbmod_html5_pointer_get_movement_x() * MouseSensitivity;
DirectionUp -= bbmod_html5_pointer_get_movement_y() * MouseSensitivity;
}
else
{
var _mouseX = window_mouse_get_x();
var _mouseY = window_mouse_get_y();
Direction += (__mouseLockAt.X - _mouseX) * MouseSensitivity;
DirectionUp += (__mouseLockAt.Y - _mouseY) * MouseSensitivity;
window_mouse_set(__mouseLockAt.X, __mouseLockAt.Y);
}
}
if (DirectionUpMin != undefined)
{
DirectionUp = max(DirectionUp, DirectionUpMin);
}
if (DirectionUpMax != undefined)
{
DirectionUp = min(DirectionUp, DirectionUpMax);
}
var _offsetX = lengthdir_x(Offset.X, Direction - 90.0)
+ lengthdir_x(Offset.Y, Direction);
var _offsetY = lengthdir_y(Offset.X, Direction - 90.0)
+ lengthdir_y(Offset.Y, Direction);
var _offsetZ = Offset.Z;
if (Zoom <= 0)
{
// First person camera
if (FollowObject != undefined
&& instance_exists(FollowObject))
{
Position.X = FollowObject.x + _offsetX;
Position.Y = FollowObject.y + _offsetY;
Position.Z = FollowObject.z + _offsetZ;
}
Target = Position.Add(new BBMOD_Vec3(
+dcos(Direction),
-dsin(Direction),
+dtan(DirectionUp)
));
}
else
{
// Third person camera
if (FollowObject != undefined
&& instance_exists(FollowObject))
{
var _targetNew = new BBMOD_Vec3(
FollowObject.x + _offsetX,
FollowObject.y + _offsetY,
FollowObject.z + _offsetZ
);
if (__followObjectLast == FollowObject
&& FollowFactor < 1.0)
{
var _factor = 1.0
- bbmod_lerp_delta_time(0.0, 1.0, FollowFactor, _deltaTime);
if (FollowCurve != undefined)
{
_factor = FollowCurve(0.0, 1.0, _factor);
}
Target = _targetNew.Lerp(Target, _factor);
}
else
{
Target = _targetNew;
}
}
var _l = dcos(DirectionUp) * Zoom;
Position = Target.Add(new BBMOD_Vec3(
-dcos(Direction) * _l,
+dsin(Direction) * _l,
-dsin(DirectionUp) * Zoom
));
}
if (_positionHandler != undefined)
{
Position = _positionHandler(Position);
}
update_matrices();
__followObjectLast = FollowObject;
return self;
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_Camera",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Camera",
"path": "folders/_Extensions/BBMOD/Core/Camera.yy",
},
}

View file

@ -0,0 +1,148 @@
/// @macro Must be the first line when defining a custom class!
/// @example
/// ```gml
/// function CSurface(_width, _height)
/// : BBMOD_Class() constructor
/// {
/// BBMOD_CLASS_GENERATED_BODY;
///
/// static Class_destroy = destroy;
///
/// Surface = surface_create(_width, _height);
///
/// static destroy = function () {
/// Class_destroy();
/// surface_free(Surface);
/// return undefined;
/// };
/// }
/// ```
#macro BBMOD_CLASS_GENERATED_BODY \
static __ClassName = bbmod_get_calling_function_name(); \
array_push(__inheritance, __ClassName)
/// @func BBMOD_Class()
///
/// @desc Base for BBMOD structs that require more OOP functionality.
function BBMOD_Class() constructor
{
/// @var {Array<String>} An array of names of inherited classes.
/// @private
__inheritance = [];
BBMOD_CLASS_GENERATED_BODY;
/// @var {Array<Function>} An array of implemented interfaces.
/// @private
__interfaces = [];
/// @var {Array<Function>} An array of functions executed when the destroy
/// method is called.
/// @private
__destroyActions = [];
/// @func is_instance(_class)
///
/// @desc Checks if the struct inherits from given class.
///
/// @param {Function} _class The class constructor.
///
/// @return {Bool} Returns `true` if the struct inherits from the class.
static is_instance = function (_class) {
gml_pragma("forceinline");
var _className = bbmod_class_get_name(_class);
var i = 0;
repeat (array_length(__inheritance))
{
if (__inheritance[i++] == _className)
{
return true;
}
}
return false;
};
/// @func implement(_interface)
///
/// @desc Implements an interface into the struct.
///
/// @return {Struct.BBMOD_Class} Returns `self`.
/// @throws {BBMOD_Exception} If the struct already implements the interface.
static implement = function (_interface) {
gml_pragma("forceinline");
if (implements(_interface))
{
throw new BBMOD_Exception("Interface already implemented!");
return self;
}
array_push(__interfaces, _interface);
method(self, _interface)();
return self;
};
/// @func implements(_interface)
///
/// @desc Checks whether the struct implements an interface.
///
/// @param {Function} _interface The interface to check.
///
/// @return {Bool} Returns `true` if the struct implements the interface.
static implements = function (_interface) {
gml_pragma("forceinline");
var i = 0;
repeat (array_length(__interfaces))
{
if (__interfaces[i++] == _interface)
{
return true;
}
}
return false;
};
/// @func destroy()
///
/// @desc Frees resources used by the struct from memory.
///
/// @return {Undefined} Returns `undefined`.
static destroy = function () {
var i = 0;
repeat (array_length(__destroyActions))
{
method(self, __destroyActions[i++])();
}
return undefined;
};
}
/// @func bbmod_is_class(_value)
///
/// @desc Checks if a value is an instance of {@link BBMOD_Class}.
///
/// @param {Any} _value The value to check.
///
/// @return {Bool} Returns `true` if the value is an instance of {@link BBMOD_Class}.
///
/// @see BBMOD_Class
function bbmod_is_class(_value)
{
gml_pragma("forceinline");
return (is_struct(_value)
&& variable_struct_exists(_value, "__ClassName"));
}
/// @func bbmod_class_get_name(_class)
///
/// @desc Retrieves class name from class instance or class type.
///
/// @param {Struct.BBMOD_Class, Function} _class An instance of {@link BBMOD_Class}
/// or the class type (function).
///
/// @return {String} The name of the class.
function bbmod_class_get_name(_class)
{
gml_pragma("forceinline");
return is_struct(_class)
? _class.__ClassName
: script_get_name(_class);
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_Class",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Core",
"path": "folders/_Extensions/BBMOD/Core.yy",
},
}

View file

@ -0,0 +1,132 @@
/// @func BBMOD_Collider()
///
/// @extends BBMOD_Class
///
/// @desc Base struct for colliders.
///
/// @see BBMOD_AABBCollider
/// @see BBMOD_FrustumCollider
/// @see BBMOD_PlaneCollider
/// @see BBMOD_SphereCollider
function BBMOD_Collider()
: BBMOD_Class() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @func GetClosestPoint(_point)
///
/// @desc Retrieves a point on the surface of the collider that is closest
/// to the point specified.
///
/// @param {Struct.BBMOD_Vec3} _point The point to get the closest point to.
///
/// @return {Struct.BBMOD_Vec3} A point on the surface of the collider that
/// is closest to the point specified.
///
/// @throws {BBMOD_NotImplementedException} If the method is not implemented.
static GetClosestPoint = function (_point) {
throw new BBMOD_NotImplementedException();
};
/// @func TestAABB(_aabb)
///
/// @desc Tests whether the collider intersects with an AABB.
///
/// @param {Struct.BBMOD_AABBCollider} _aabb The AABB to check intersection
/// with.
///
/// @return {Bool} Returns `true` if the colliders intersect.
///
/// @throws {BBMOD_NotImplementedException} If the method is not implemented.
static TestAABB = function (_aabb) {
throw new BBMOD_NotImplementedException();
};
/// @func TestFrustum(_frustum)
///
/// @desc Tests whether the collider intersects with a frustum.
///
/// @param {Struct.BBMOD_FrustumCollider} _frustum The frustum to check intersection
/// with.
///
/// @return {Bool} Returns `true` if the colliders intersect.
///
/// @throws {BBMOD_NotImplementedException} If the method is not implemented.
static TestFrustum = function (_frustum) {
throw new BBMOD_NotImplementedException();
};
/// @func TestPlane(_plane)
///
/// @desc Tests whether the collider intersects with a plane.
///
/// @param {Struct.BBMOD_PlaneCollider} _plane The plane to check intersection
/// with.
///
/// @return {Bool} Returns `true` if the colliders intersect.
///
/// @throws {BBMOD_NotImplementedException} If the method is not implemented.
static TestPlane = function (_plane) {
throw new BBMOD_NotImplementedException();
};
/// @func TestPoint(_point)
///
/// @desc Tests whether the collider intersects with a point.
///
/// @param {Struct.BBMOD_Vec3} _point The point to check intersection with.
///
/// @return {Bool} Returns `true` if the colliders intersect.
///
/// @throws {BBMOD_NotImplementedException} If the method is not implemented.
static TestPoint = function (_point) {
throw new BBMOD_NotImplementedException();
};
/// @func TestSphere(_sphere)
///
/// @desc Tests whether the collider intersects with a sphere.
///
/// @param {Struct.BBMOD_SphereCollider} _sphere The sphere to check
/// intersection with.
///
/// @return {Bool} Returns `true` if the colliders intersect.
///
/// @throws {BBMOD_NotImplementedException} If the method is not implemented.
static TestSphere = function (_sphere) {
throw new BBMOD_NotImplementedException();
};
/// @func Raycast(_ray)
///
/// @desc Casts a ray against the collider.
///
/// @param {Struct.BBMOD_Ray} _ray The ray to cast.
/// @param {Struct.BBMOD_RaycastResult} [_result] Where to store
/// additional raycast info to or `undefined`.
///
/// @return {Bool} Returns `true` if the ray hits the collider.
///
/// @throws {BBMOD_NotImplementedException} If the method is not implemented.
///
/// @see BBMOD_RaycastResult
/// @see BBMOD_Ray.Raycast
static Raycast = function (_ray, _result=undefined) {
throw new BBMOD_NotImplementedException();
};
/// @func DrawDebug([_color])
///
/// @desc Draws a debug preview of the collider.
///
/// @param {Constant.Color} [_color] The preview color. Defaults to
/// `c_white`.
/// @param {Real} [_alpha] The preview alpha. Defaults to 1.
///
/// @return {Struct.BBMOD_Collider} Returns `self`.
///
/// @throws {BBMOD_NotImplementedException} If the method is not implemented.
static DrawDebug = function (_color=c_white, _alpha=1.0) {
throw new BBMOD_NotImplementedException();
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_Collider",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Raycasting",
"path": "folders/_Extensions/BBMOD/Raycasting.yy",
},
}

View file

@ -0,0 +1,43 @@
/// @func BBMOD_CollisionEventModule([_callback])
///
/// @extends BBMOD_ParticleModule
///
/// @desc A particle module that executes a callback on particle collision.
///
/// @param {Function} [_callback] The function to execute. Must take the emitter
/// as the first argument and the particle's index as the second argument.
/// Defaults to `undefined`.
///
/// @see BBMOD_EParticle.HasCollided
/// @see BBMOD_ParticleEmitter
/// @see BBMOD_ParticleEmitter.Particles
function BBMOD_CollisionEventModule(_callback=undefined)
: BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
/// @var {Function} The function to execute on particle collision. Must take
/// the emitter as the first argument and the particle's index as the second
/// argument. Default value is `undefined`.
/// @see BBMOD_ParticleEmitter
/// @see BBMOD_ParticleEmitter.Particles
Callback = _callback;
static on_update = function (_emitter, _deltaTime) {
var _callback = Callback;
if (!_callback)
{
return;
}
var _particles = _emitter.Particles;
var _particleIndex = 0;
repeat (_emitter.ParticlesAlive)
{
if (_particles[# BBMOD_EParticle.HasCollided, _particleIndex])
{
_callback(_emitter, _particleIndex);
}
++_particleIndex;
}
};
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "BBMOD_CollisionEventModule",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "Event",
"path": "folders/_Extensions/BBMOD/Particles/Modules/Event.yy",
},
}

View file

@ -0,0 +1,51 @@
/// @func BBMOD_CollisionKillModule()
///
/// @extends BBMOD_ParticleModule
///
/// @desc A particle module that kills all particles that had a collision.
///
/// @note Make sure to add this *after* a collision module, otherwise no
/// collision will be detected!
///
/// @see BBMOD_EParticle.HasCollided
function BBMOD_CollisionKillModule()
: BBMOD_ParticleModule() constructor
{
BBMOD_CLASS_GENERATED_BODY;
static on_update = function (_emitter, _deltaTime) {
var _y2 = _emitter.ParticlesAlive - 1;
if (_y2 >= 0)
{
var _particles = _emitter.Particles;
var _gridCompute = _emitter.GridCompute;
ds_grid_set_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HealthLeft, 0,
BBMOD_EParticle.HealthLeft, _y2,
0, 0);
ds_grid_multiply_region(
_gridCompute,
0, 0,
0, _y2,
-1);
ds_grid_multiply_grid_region(
_gridCompute,
_particles,
BBMOD_EParticle.HasCollided, 0,
BBMOD_EParticle.HasCollided, _y2,
0, 0);
ds_grid_add_grid_region(
_particles,
_gridCompute,
0, 0,
0, _y2,
BBMOD_EParticle.HealthLeft, 0);
}
};
}

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