mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-03 22:24:48 +01:00
Custom addon API, Cache bug, Path undo
This commit is contained in:
parent
1e69f88a70
commit
2542d080cf
611 changed files with 2791 additions and 41831 deletions
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"FolderOrderSettings": [
|
"FolderOrderSettings": [
|
||||||
{"name":"_Extensions","order":9,"path":"folders/_Extensions.yy",},
|
{"name":"_Extensions","order":9,"path":"folders/_Extensions.yy",},
|
||||||
|
{"name":"BBMOD","order":9,"path":"folders/_Extensions/BBMOD.yy",},
|
||||||
|
{"name":"Math","order":1,"path":"folders/_Extensions/BBMOD/Math.yy",},
|
||||||
{"name":"MAC","order":7,"path":"folders/_Extensions/MAC.yy",},
|
{"name":"MAC","order":7,"path":"folders/_Extensions/MAC.yy",},
|
||||||
{"name":"addons","order":11,"path":"folders/addons.yy",},
|
{"name":"addons","order":11,"path":"folders/addons.yy",},
|
||||||
{"name":"custom","order":4,"path":"folders/addons/custom.yy",},
|
{"name":"custom","order":4,"path":"folders/addons/custom.yy",},
|
||||||
|
@ -61,6 +63,7 @@
|
||||||
{"name":"data","order":10,"path":"folders/nodes/data.yy",},
|
{"name":"data","order":10,"path":"folders/nodes/data.yy",},
|
||||||
{"name":"__base__","order":12,"path":"folders/nodes/data/__base__.yy",},
|
{"name":"__base__","order":12,"path":"folders/nodes/data/__base__.yy",},
|
||||||
{"name":"3D","order":7,"path":"folders/nodes/data/3D.yy",},
|
{"name":"3D","order":7,"path":"folders/nodes/data/3D.yy",},
|
||||||
|
{"name":"primitive","order":19,"path":"folders/nodes/data/3D/primitive.yy",},
|
||||||
{"name":"animation","order":5,"path":"folders/nodes/data/animation.yy",},
|
{"name":"animation","order":5,"path":"folders/nodes/data/animation.yy",},
|
||||||
{"name":"compose","order":15,"path":"folders/nodes/data/compose.yy",},
|
{"name":"compose","order":15,"path":"folders/nodes/data/compose.yy",},
|
||||||
{"name":"feedback","order":14,"path":"folders/nodes/data/feedback.yy",},
|
{"name":"feedback","order":14,"path":"folders/nodes/data/feedback.yy",},
|
||||||
|
@ -77,6 +80,7 @@
|
||||||
{"name":"iterate","order":10,"path":"folders/nodes/data/iterate.yy",},
|
{"name":"iterate","order":10,"path":"folders/nodes/data/iterate.yy",},
|
||||||
{"name":"for each","order":1,"path":"folders/nodes/data/iterate/for each.yy",},
|
{"name":"for each","order":1,"path":"folders/nodes/data/iterate/for each.yy",},
|
||||||
{"name":"for filter","order":3,"path":"folders/nodes/data/iterate/for filter.yy",},
|
{"name":"for filter","order":3,"path":"folders/nodes/data/iterate/for filter.yy",},
|
||||||
|
{"name":"for sort","order":5,"path":"folders/nodes/data/iterate/for sort.yy",},
|
||||||
{"name":"lua","order":17,"path":"folders/nodes/data/lua.yy",},
|
{"name":"lua","order":17,"path":"folders/nodes/data/lua.yy",},
|
||||||
{"name":"node","order":11,"path":"folders/nodes/data/node.yy",},
|
{"name":"node","order":11,"path":"folders/nodes/data/node.yy",},
|
||||||
{"name":"render","order":2,"path":"folders/nodes/data/render.yy",},
|
{"name":"render","order":2,"path":"folders/nodes/data/render.yy",},
|
||||||
|
@ -114,6 +118,7 @@
|
||||||
{"name":"VFX","order":134,"path":"folders/nodes/icons/VFX.yy",},
|
{"name":"VFX","order":134,"path":"folders/nodes/icons/VFX.yy",},
|
||||||
{"name":"panels","order":2,"path":"folders/panels.yy",},
|
{"name":"panels","order":2,"path":"folders/panels.yy",},
|
||||||
{"name":"colors","order":5,"path":"folders/panels/colors.yy",},
|
{"name":"colors","order":5,"path":"folders/panels/colors.yy",},
|
||||||
|
{"name":"context menu","order":6,"path":"folders/panels/context menu.yy",},
|
||||||
{"name":"graph","order":1,"path":"folders/panels/graph.yy",},
|
{"name":"graph","order":1,"path":"folders/panels/graph.yy",},
|
||||||
{"name":"inspectors","order":2,"path":"folders/panels/inspectors.yy",},
|
{"name":"inspectors","order":2,"path":"folders/panels/inspectors.yy",},
|
||||||
{"name":"components","order":3,"path":"folders/panels/inspectors/components.yy",},
|
{"name":"components","order":3,"path":"folders/panels/inspectors/components.yy",},
|
||||||
|
@ -144,58 +149,8 @@
|
||||||
{"name":"sprites","order":12,"path":"folders/sprites.yy",},
|
{"name":"sprites","order":12,"path":"folders/sprites.yy",},
|
||||||
{"name":"gameframe","order":2,"path":"folders/sprites/gameframe.yy",},
|
{"name":"gameframe","order":2,"path":"folders/sprites/gameframe.yy",},
|
||||||
{"name":"widgets","order":5,"path":"folders/widgets.yy",},
|
{"name":"widgets","order":5,"path":"folders/widgets.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": [
|
"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":"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":"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",},
|
{"name":"panel_function","order":2,"path":"scripts/panel_function/panel_function.yy",},
|
||||||
|
@ -224,25 +179,20 @@
|
||||||
{"name":"s_node_rigidSim_object_spawner","order":5,"path":"sprites/s_node_rigidSim_object_spawner/s_node_rigidSim_object_spawner.yy",},
|
{"name":"s_node_rigidSim_object_spawner","order":5,"path":"sprites/s_node_rigidSim_object_spawner/s_node_rigidSim_object_spawner.yy",},
|
||||||
{"name":"draw_text_function","order":11,"path":"scripts/draw_text_function/draw_text_function.yy",},
|
{"name":"draw_text_function","order":11,"path":"scripts/draw_text_function/draw_text_function.yy",},
|
||||||
{"name":"o_dialog_file_name_collection","order":5,"path":"objects/o_dialog_file_name_collection/o_dialog_file_name_collection.yy",},
|
{"name":"o_dialog_file_name_collection","order":5,"path":"objects/o_dialog_file_name_collection/o_dialog_file_name_collection.yy",},
|
||||||
{"name":"node_3d_prim_cone","order":14,"path":"scripts/node_3d_prim_cone/node_3d_prim_cone.yy",},
|
|
||||||
{"name":"node_line","order":7,"path":"scripts/node_line/node_line.yy",},
|
{"name":"node_line","order":7,"path":"scripts/node_line/node_line.yy",},
|
||||||
{"name":"s_node_frame","order":1,"path":"sprites/s_node_frame/s_node_frame.yy",},
|
{"name":"s_node_frame","order":1,"path":"sprites/s_node_frame/s_node_frame.yy",},
|
||||||
{"name":"s_node_fluidSim_turbulence","order":10,"path":"sprites/s_node_fluidSim_turbulence/s_node_fluidSim_turbulence.yy",},
|
{"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_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":"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":"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":"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":"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":"s_node_tunnel_out","order":22,"path":"sprites/s_node_tunnel_out/s_node_tunnel_out.yy",},
|
||||||
{"name":"__background_set_element","order":3,"path":"scripts/__background_set_element/__background_set_element.yy",},
|
{"name":"__background_set_element","order":3,"path":"scripts/__background_set_element/__background_set_element.yy",},
|
||||||
{"name":"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_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":"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":"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":"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":"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":"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",},
|
{"name":"node_path_blend","order":2,"path":"scripts/node_path_blend/node_path_blend.yy",},
|
||||||
|
@ -250,7 +200,6 @@
|
||||||
{"name":"sh_corner","order":20,"path":"shaders/sh_corner/sh_corner.yy",},
|
{"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":"node_array","order":8,"path":"scripts/node_array/node_array.yy",},
|
||||||
{"name":"pack_corner","order":3,"path":"scripts/pack_corner/pack_corner.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":"sh_colorize","order":9,"path":"shaders/sh_colorize/sh_colorize.yy",},
|
||||||
{"name":"node_string","order":13,"path":"scripts/node_string/node_string.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",},
|
{"name":"cross_product","order":3,"path":"scripts/cross_product/cross_product.yy",},
|
||||||
|
@ -260,13 +209,10 @@
|
||||||
{"name":"s_node_loop_input","order":14,"path":"sprites/s_node_loop_input/s_node_loop_input.yy",},
|
{"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":"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":"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":"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":"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_functions","order":2,"path":"scripts/node_functions/node_functions.yy",},
|
||||||
{"name":"node_math","order":1,"path":"scripts/node_math/node_math.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":"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":"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",},
|
{"name":"sh_blur_final","order":2,"path":"shaders/sh_blur_final/sh_blur_final.yy",},
|
||||||
|
@ -274,10 +220,8 @@
|
||||||
{"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":"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_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":"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_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":"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":"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":"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",},
|
{"name":"s_node_noise_simplex","order":20,"path":"sprites/s_node_noise_simplex/s_node_noise_simplex.yy",},
|
||||||
|
@ -288,13 +232,11 @@
|
||||||
{"name":"sh_flip","order":7,"path":"shaders/sh_flip/sh_flip.yy",},
|
{"name":"sh_flip","order":7,"path":"shaders/sh_flip/sh_flip.yy",},
|
||||||
{"name":"libdlgmodule","order":3,"path":"extensions/libdlgmodule/libdlgmodule.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":"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":"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":"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_h1","order":11,"path":"fonts/_f_h1/_f_h1.yy",},
|
||||||
{"name":"_f_h2","order":12,"path":"fonts/_f_h2/_f_h2.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":"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":"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":"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",},
|
{"name":"node_atlas_set","order":2,"path":"scripts/node_atlas_set/node_atlas_set.yy",},
|
||||||
|
@ -302,14 +244,10 @@
|
||||||
{"name":"s_node_gradient_data","order":17,"path":"sprites/s_node_gradient_data/s_node_gradient_data.yy",},
|
{"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":"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":"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":"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":"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":"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_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":"_3D","order":6,"path":"scripts/_3D/_3D.yy",},
|
||||||
{"name":"node_vector_cross2D","order":29,"path":"scripts/node_vector_cross2D/node_vector_cross2D.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",},
|
{"name":"sh_corner_erode","order":48,"path":"shaders/sh_corner_erode/sh_corner_erode.yy",},
|
||||||
|
@ -322,6 +260,7 @@
|
||||||
{"name":"node_polygonal_shape","order":27,"path":"scripts/node_polygonal_shape/node_polygonal_shape.yy",},
|
{"name":"node_polygonal_shape","order":27,"path":"scripts/node_polygonal_shape/node_polygonal_shape.yy",},
|
||||||
{"name":"fd_rectangle_get_collision_mask_sprite","order":4,"path":"scripts/fd_rectangle_get_collision_mask_sprite/fd_rectangle_get_collision_mask_sprite.yy",},
|
{"name":"fd_rectangle_get_collision_mask_sprite","order":4,"path":"scripts/fd_rectangle_get_collision_mask_sprite/fd_rectangle_get_collision_mask_sprite.yy",},
|
||||||
{"name":"node_flip","order":13,"path":"scripts/node_flip/node_flip.yy",},
|
{"name":"node_flip","order":13,"path":"scripts/node_flip/node_flip.yy",},
|
||||||
|
{"name":"sh_FXAA","order":52,"path":"shaders/sh_FXAA/sh_FXAA.yy",},
|
||||||
{"name":"node_gradient_points","order":20,"path":"scripts/node_gradient_points/node_gradient_points.yy",},
|
{"name":"node_gradient_points","order":20,"path":"scripts/node_gradient_points/node_gradient_points.yy",},
|
||||||
{"name":"_f_code","order":9,"path":"fonts/_f_code/_f_code.yy",},
|
{"name":"_f_code","order":9,"path":"fonts/_f_code/_f_code.yy",},
|
||||||
{"name":"sh_combine_rgb","order":40,"path":"shaders/sh_combine_rgb/sh_combine_rgb.yy",},
|
{"name":"sh_combine_rgb","order":40,"path":"shaders/sh_combine_rgb/sh_combine_rgb.yy",},
|
||||||
|
@ -329,8 +268,8 @@
|
||||||
{"name":"o_dialog_panel","order":13,"path":"objects/o_dialog_panel/o_dialog_panel.yy",},
|
{"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":"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":"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":"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":"addon_function","order":3,"path":"scripts/addon_function/addon_function.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":"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",},
|
{"name":"draw_surface_blend","order":1,"path":"scripts/draw_surface_blend/draw_surface_blend.yy",},
|
||||||
{"name":"o_dialog_group_input_order","order":3,"path":"objects/o_dialog_group_input_order/o_dialog_group_input_order.yy",},
|
{"name":"o_dialog_group_input_order","order":3,"path":"objects/o_dialog_group_input_order/o_dialog_group_input_order.yy",},
|
||||||
|
@ -348,7 +287,6 @@
|
||||||
{"name":"sh_texture_atlas","order":39,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",},
|
{"name":"sh_texture_atlas","order":39,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",},
|
||||||
{"name":"s_node_fluidSim_domain","order":6,"path":"sprites/s_node_fluidSim_domain/s_node_fluidSim_domain.yy",},
|
{"name":"s_node_fluidSim_domain","order":6,"path":"sprites/s_node_fluidSim_domain/s_node_fluidSim_domain.yy",},
|
||||||
{"name":"s_node_displace","order":20,"path":"sprites/s_node_displace/s_node_displace.yy",},
|
{"name":"s_node_displace","order":20,"path":"sprites/s_node_displace/s_node_displace.yy",},
|
||||||
{"name":"BBMOD_ParticleModule","order":6,"path":"scripts/BBMOD_ParticleModule/BBMOD_ParticleModule.yy",},
|
|
||||||
{"name":"sh_polar","order":1,"path":"shaders/sh_polar/sh_polar.yy",},
|
{"name":"sh_polar","order":1,"path":"shaders/sh_polar/sh_polar.yy",},
|
||||||
{"name":"s_node_warp_mesh","order":10,"path":"sprites/s_node_warp_mesh/s_node_warp_mesh.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",},
|
{"name":"sh_pixel_cloud","order":13,"path":"shaders/sh_pixel_cloud/sh_pixel_cloud.yy",},
|
||||||
|
@ -361,6 +299,7 @@
|
||||||
{"name":"s_node_path_plot","order":12,"path":"sprites/s_node_path_plot/s_node_path_plot.yy",},
|
{"name":"s_node_path_plot","order":12,"path":"sprites/s_node_path_plot/s_node_path_plot.yy",},
|
||||||
{"name":"__initAddon","order":2,"path":"scripts/__initAddon/__initAddon.yy",},
|
{"name":"__initAddon","order":2,"path":"scripts/__initAddon/__initAddon.yy",},
|
||||||
{"name":"json_functions","order":8,"path":"scripts/json_functions/json_functions.yy",},
|
{"name":"json_functions","order":8,"path":"scripts/json_functions/json_functions.yy",},
|
||||||
|
{"name":"s_node_3d_displace","order":11,"path":"sprites/s_node_3d_displace/s_node_3d_displace.yy",},
|
||||||
{"name":"event_recorder","order":4,"path":"scripts/event_recorder/event_recorder.yy",},
|
{"name":"event_recorder","order":4,"path":"scripts/event_recorder/event_recorder.yy",},
|
||||||
{"name":"s_node_path_l_system","order":10,"path":"sprites/s_node_path_l_system/s_node_path_l_system.yy",},
|
{"name":"s_node_path_l_system","order":10,"path":"sprites/s_node_path_l_system/s_node_path_l_system.yy",},
|
||||||
{"name":"s_node_noise_cell","order":10,"path":"sprites/s_node_noise_cell/s_node_noise_cell.yy",},
|
{"name":"s_node_noise_cell","order":10,"path":"sprites/s_node_noise_cell/s_node_noise_cell.yy",},
|
||||||
|
@ -372,13 +311,13 @@
|
||||||
{"name":"s_node_2d_light","order":2,"path":"sprites/s_node_2d_light/s_node_2d_light.yy",},
|
{"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":"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":"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":"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":"__init_background","order":4,"path":"scripts/__init_background/__init_background.yy",},
|
||||||
{"name":"__node","order":9,"path":"scripts/__node/__node.yy",},
|
{"name":"__node","order":9,"path":"scripts/__node/__node.yy",},
|
||||||
{"name":"fd_rectangle_add_velocity","order":5,"path":"scripts/fd_rectangle_add_velocity/fd_rectangle_add_velocity.yy",},
|
{"name":"fd_rectangle_add_velocity","order":5,"path":"scripts/fd_rectangle_add_velocity/fd_rectangle_add_velocity.yy",},
|
||||||
{"name":"sh_level_selector","order":23,"path":"shaders/sh_level_selector/sh_level_selector.yy",},
|
{"name":"sh_level_selector","order":23,"path":"shaders/sh_level_selector/sh_level_selector.yy",},
|
||||||
{"name":"checkboxGroup","order":28,"path":"scripts/checkboxGroup/checkboxGroup.yy",},
|
{"name":"checkboxGroup","order":28,"path":"scripts/checkboxGroup/checkboxGroup.yy",},
|
||||||
|
{"name":"node_FXAA","order":8,"path":"scripts/node_FXAA/node_FXAA.yy",},
|
||||||
{"name":"s_node_pixel_find","order":13,"path":"sprites/s_node_pixel_find/s_node_pixel_find.yy",},
|
{"name":"s_node_pixel_find","order":13,"path":"sprites/s_node_pixel_find/s_node_pixel_find.yy",},
|
||||||
{"name":"sh_noise_grid_tri","order":25,"path":"shaders/sh_noise_grid_tri/sh_noise_grid_tri.yy",},
|
{"name":"sh_noise_grid_tri","order":25,"path":"shaders/sh_noise_grid_tri/sh_noise_grid_tri.yy",},
|
||||||
{"name":"globals","order":2,"path":"scripts/globals/globals.yy",},
|
{"name":"globals","order":2,"path":"scripts/globals/globals.yy",},
|
||||||
|
@ -403,21 +342,19 @@
|
||||||
{"name":"s_node_3d_cone","order":9,"path":"sprites/s_node_3d_cone/s_node_3d_cone.yy",},
|
{"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_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":"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":"s_node_crop","order":2,"path":"sprites/s_node_crop/s_node_crop.yy",},
|
||||||
{"name":"__VFX","order":2,"path":"scripts/__VFX/__VFX.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",},
|
{"name":"s_menu_black","order":2,"path":"sprites/s_menu_black/s_menu_black.yy",},
|
||||||
|
{"name":"node_3d_export","order":17,"path":"scripts/node_3d_export/node_3d_export.yy",},
|
||||||
{"name":"node_bevel","order":3,"path":"scripts/node_bevel/node_bevel.yy",},
|
{"name":"node_bevel","order":3,"path":"scripts/node_bevel/node_bevel.yy",},
|
||||||
{"name":"s_node_vfx_override","order":11,"path":"sprites/s_node_vfx_override/s_node_vfx_override.yy",},
|
{"name":"s_node_vfx_override","order":11,"path":"sprites/s_node_vfx_override/s_node_vfx_override.yy",},
|
||||||
{"name":"rotatorRange","order":12,"path":"scripts/rotatorRange/rotatorRange.yy",},
|
{"name":"rotatorRange","order":12,"path":"scripts/rotatorRange/rotatorRange.yy",},
|
||||||
{"name":"font_loader","order":8,"path":"scripts/font_loader/font_loader.yy",},
|
{"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":"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":"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":"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":"node_displacement","order":1,"path":"scripts/node_displacement/node_displacement.yy",},
|
||||||
{"name":"mask_function","order":1,"path":"scripts/mask_function/mask_function.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":"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":"sh_trail_filler_pass1","order":49,"path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.yy",},
|
||||||
{"name":"s_node_vfx_wind","order":3,"path":"sprites/s_node_vfx_wind/s_node_vfx_wind.yy",},
|
{"name":"s_node_vfx_wind","order":3,"path":"sprites/s_node_vfx_wind/s_node_vfx_wind.yy",},
|
||||||
|
@ -428,7 +365,6 @@
|
||||||
{"name":"s_node_image_sheet","order":10,"path":"sprites/s_node_image_sheet/s_node_image_sheet.yy",},
|
{"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":"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":"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":"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":"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",},
|
{"name":"fd_rectangle_get_collision_mask_surface","order":6,"path":"scripts/fd_rectangle_get_collision_mask_surface/fd_rectangle_get_collision_mask_surface.yy",},
|
||||||
|
@ -438,10 +374,8 @@
|
||||||
{"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":"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_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":"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_color_from_rgb","order":7,"path":"scripts/node_color_from_rgb/node_color_from_rgb.yy",},
|
||||||
{"name":"node_struct_get","order":1,"path":"scripts/node_struct_get/node_struct_get.yy",},
|
{"name":"node_struct_get","order":1,"path":"scripts/node_struct_get/node_struct_get.yy",},
|
||||||
{"name":"BBMOD_Class","order":16,"path":"scripts/BBMOD_Class/BBMOD_Class.yy",},
|
|
||||||
{"name":"curveBox","order":8,"path":"scripts/curveBox/curveBox.yy",},
|
{"name":"curveBox","order":8,"path":"scripts/curveBox/curveBox.yy",},
|
||||||
{"name":"s_node_iterator_length","order":24,"path":"sprites/s_node_iterator_length/s_node_iterator_length.yy",},
|
{"name":"s_node_iterator_length","order":24,"path":"sprites/s_node_iterator_length/s_node_iterator_length.yy",},
|
||||||
{"name":"preview_overlay_vector","order":2,"path":"scripts/preview_overlay_vector/preview_overlay_vector.yy",},
|
{"name":"preview_overlay_vector","order":2,"path":"scripts/preview_overlay_vector/preview_overlay_vector.yy",},
|
||||||
|
@ -453,18 +387,16 @@
|
||||||
{"name":"spr_gameframe_caption","order":2,"path":"sprites/spr_gameframe_caption/spr_gameframe_caption.yy",},
|
{"name":"spr_gameframe_caption","order":2,"path":"sprites/spr_gameframe_caption/spr_gameframe_caption.yy",},
|
||||||
{"name":"o_dialog_splash","order":9,"path":"objects/o_dialog_splash/o_dialog_splash.yy",},
|
{"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":"json_file","order":4,"path":"scripts/json_file/json_file.yy",},
|
||||||
|
{"name":"_addon_custom","order":5,"path":"objects/_addon_custom/_addon_custom.yy",},
|
||||||
|
{"name":"s_node_3d_export","order":10,"path":"sprites/s_node_3d_export/s_node_3d_export.yy",},
|
||||||
{"name":"s_node_curve_edit","order":1,"path":"sprites/s_node_curve_edit/s_node_curve_edit.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":"textBox","order":17,"path":"scripts/textBox/textBox.yy",},
|
||||||
{"name":"pathArrayBox","order":27,"path":"scripts/pathArrayBox/pathArrayBox.yy",},
|
{"name":"pathArrayBox","order":27,"path":"scripts/pathArrayBox/pathArrayBox.yy",},
|
||||||
{"name":"node_statistic","order":7,"path":"scripts/node_statistic/node_statistic.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":"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":"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":"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":"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":"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_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",},
|
{"name":"node_lua_surface","order":2,"path":"scripts/node_lua_surface/node_lua_surface.yy",},
|
||||||
|
@ -483,15 +415,12 @@
|
||||||
{"name":"s_node_blur","order":9,"path":"sprites/s_node_blur/s_node_blur.yy",},
|
{"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":"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":"s_node_gradient_4points","order":2,"path":"sprites/s_node_gradient_4points/s_node_gradient_4points.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_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_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":"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":"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":"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":"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":"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":"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",},
|
{"name":"sh_blur_zoom","order":5,"path":"shaders/sh_blur_zoom/sh_blur_zoom.yy",},
|
||||||
|
@ -501,14 +430,11 @@
|
||||||
{"name":"s_node_invert","order":27,"path":"sprites/s_node_invert/s_node_invert.yy",},
|
{"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":"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":"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":"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":"Apollo","order":6,"path":"extensions/Apollo/Apollo.yy",},
|
||||||
{"name":"sh_grid","order":14,"path":"shaders/sh_grid/sh_grid.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":"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":"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":"time_source","order":25,"path":"scripts/time_source/time_source.yy",},
|
||||||
{"name":"string_formatting","order":5,"path":"scripts/string_formatting/string_formatting.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",},
|
{"name":"node_level_selector","order":8,"path":"scripts/node_level_selector/node_level_selector.yy",},
|
||||||
|
@ -518,7 +444,6 @@
|
||||||
{"name":"node_color_mix","order":14,"path":"scripts/node_color_mix/node_color_mix.yy",},
|
{"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":"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":"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":"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":"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",},
|
{"name":"node_iterator_each_input","order":1,"path":"scripts/node_iterator_each_input/node_iterator_each_input.yy",},
|
||||||
|
@ -527,14 +452,10 @@
|
||||||
{"name":"s_node_loop","order":5,"path":"sprites/s_node_loop/s_node_loop.yy",},
|
{"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_zigzag","order":12,"path":"scripts/node_zigzag/node_zigzag.yy",},
|
||||||
{"name":"node_equation","order":18,"path":"scripts/node_equation/node_equation.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":"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":"preset_data","order":8,"path":"scripts/preset_data/preset_data.yy",},
|
||||||
{"name":"_f_h5","order":2,"path":"fonts/_f_h5/_f_h5.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":"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":"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_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",},
|
{"name":"node_scatter_points","order":24,"path":"scripts/node_scatter_points/node_scatter_points.yy",},
|
||||||
|
@ -548,10 +469,7 @@
|
||||||
{"name":"sh_sample_points","order":26,"path":"shaders/sh_sample_points/sh_sample_points.yy",},
|
{"name":"sh_sample_points","order":26,"path":"shaders/sh_sample_points/sh_sample_points.yy",},
|
||||||
{"name":"node_combine_rgb","order":1,"path":"scripts/node_combine_rgb/node_combine_rgb.yy",},
|
{"name":"node_combine_rgb","order":1,"path":"scripts/node_combine_rgb/node_combine_rgb.yy",},
|
||||||
{"name":"fd_rectangle_draw_part","order":10,"path":"scripts/fd_rectangle_draw_part/fd_rectangle_draw_part.yy",},
|
{"name":"fd_rectangle_draw_part","order":10,"path":"scripts/fd_rectangle_draw_part/fd_rectangle_draw_part.yy",},
|
||||||
{"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":"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":"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_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",},
|
{"name":"s_node_random","order":3,"path":"sprites/s_node_random/s_node_random.yy",},
|
||||||
|
@ -563,7 +481,6 @@
|
||||||
{"name":"node_path_anchor","order":13,"path":"scripts/node_path_anchor/node_path_anchor.yy",},
|
{"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":"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":"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":"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":"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",},
|
{"name":"s_node_threshold","order":47,"path":"sprites/s_node_threshold/s_node_threshold.yy",},
|
||||||
|
@ -588,7 +505,6 @@
|
||||||
{"name":"node_chromatic_aberration","order":4,"path":"scripts/node_chromatic_aberration/node_chromatic_aberration.yy",},
|
{"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":"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":"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":"_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_noise","order":16,"path":"shaders/sh_noise/sh_noise.yy",},
|
||||||
{"name":"sh_skew","order":6,"path":"shaders/sh_skew/sh_skew.yy",},
|
{"name":"sh_skew","order":6,"path":"shaders/sh_skew/sh_skew.yy",},
|
||||||
|
@ -602,7 +518,6 @@
|
||||||
{"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":"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_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":"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_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":"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",},
|
{"name":"s_node_time_map","order":39,"path":"sprites/s_node_time_map/s_node_time_map.yy",},
|
||||||
|
@ -611,35 +526,28 @@
|
||||||
{"name":"s_node_lua_compute","order":17,"path":"sprites/s_node_lua_compute/s_node_lua_compute.yy",},
|
{"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":"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":"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":"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":"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":"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":"type_conversion","order":8,"path":"scripts/type_conversion/type_conversion.yy",},
|
||||||
{"name":"node_keyframe","order":4,"path":"scripts/node_keyframe/node_keyframe.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":"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":"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":"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":"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":"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":"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":"node_VFX_effect_attract","order":8,"path":"scripts/node_VFX_effect_attract/node_VFX_effect_attract.yy",},
|
||||||
|
{"name":"panel_addon","order":5,"path":"scripts/panel_addon/panel_addon.yy",},
|
||||||
{"name":"s_node_text_splice","order":6,"path":"sprites/s_node_text_splice/s_node_text_splice.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":"__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":"node_3d_transform","order":11,"path":"scripts/node_3d_transform/node_3d_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":"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":"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":"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":"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":"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":"__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":"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":"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",},
|
{"name":"addon_lua","order":1,"path":"scripts/addon_lua/addon_lua.yy",},
|
||||||
|
@ -654,18 +562,15 @@
|
||||||
{"name":"buttonColor","order":3,"path":"scripts/buttonColor/buttonColor.yy",},
|
{"name":"buttonColor","order":3,"path":"scripts/buttonColor/buttonColor.yy",},
|
||||||
{"name":"notification_system","order":7,"path":"scripts/notification_system/notification_system.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":"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":"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_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_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":"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_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":"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":"sh_sdf","order":1,"path":"shaders/sh_sdf/sh_sdf.yy",},
|
||||||
{"name":"slider","order":15,"path":"scripts/slider/slider.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":"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":"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_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":"node_9slice","order":5,"path":"scripts/node_9slice/node_9slice.yy",},
|
||||||
|
@ -677,16 +582,12 @@
|
||||||
{"name":"node_wiggler","order":2,"path":"scripts/node_wiggler/node_wiggler.yy",},
|
{"name":"node_wiggler","order":2,"path":"scripts/node_wiggler/node_wiggler.yy",},
|
||||||
{"name":"fd_GUIDE","order":5,"path":"scripts/fd_GUIDE/fd_GUIDE.yy",},
|
{"name":"fd_GUIDE","order":5,"path":"scripts/fd_GUIDE/fd_GUIDE.yy",},
|
||||||
{"name":"node_fluid_update","order":3,"path":"scripts/node_fluid_update/node_fluid_update.yy",},
|
{"name":"node_fluid_update","order":3,"path":"scripts/node_fluid_update/node_fluid_update.yy",},
|
||||||
{"name":"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":"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":"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_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":"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":"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":"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":"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":"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",},
|
{"name":"s_node_radial","order":53,"path":"sprites/s_node_radial/s_node_radial.yy",},
|
||||||
|
@ -696,7 +597,6 @@
|
||||||
{"name":"node_feedback_input","order":1,"path":"scripts/node_feedback_input/node_feedback_input.yy",},
|
{"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_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":"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":"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_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",},
|
{"name":"sh_fd_visualize_thick_smoke_glsl","order":17,"path":"shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.yy",},
|
||||||
|
@ -729,15 +629,13 @@
|
||||||
{"name":"sh_clean_shape","order":37,"path":"shaders/sh_clean_shape/sh_clean_shape.yy",},
|
{"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":"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":"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_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":"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":"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":"_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":"sh_color_replace","order":8,"path":"shaders/sh_color_replace/sh_color_replace.yy",},
|
||||||
{"name":"__surface","order":8,"path":"scripts/__surface/__surface.yy",},
|
{"name":"__surface","order":8,"path":"scripts/__surface/__surface.yy",},
|
||||||
{"name":"BBMOD_AddVec4OverTimeModule","order":3,"path":"scripts/BBMOD_AddVec4OverTimeModule/BBMOD_AddVec4OverTimeModule.yy",},
|
{"name":"clipboard","order":10,"path":"extensions/clipboard/clipboard.yy",},
|
||||||
{"name":"rotator","order":11,"path":"scripts/rotator/rotator.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":"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",},
|
{"name":"node_fluid_add_collider","order":6,"path":"scripts/node_fluid_add_collider/node_fluid_add_collider.yy",},
|
||||||
|
@ -748,14 +646,11 @@
|
||||||
{"name":"node_strand_render_texture","order":7,"path":"scripts/node_strand_render_texture/node_strand_render_texture.yy",},
|
{"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":"luaRenderer","order":2,"path":"scripts/luaRenderer/luaRenderer.yy",},
|
||||||
{"name":"node_blur_zoom","order":3,"path":"scripts/node_blur_zoom/node_blur_zoom.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":"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_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":"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":"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":"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":"__strandSim","order":2,"path":"scripts/__strandSim/__strandSim.yy",},
|
||||||
{"name":"sh_shape","order":3,"path":"shaders/sh_shape/sh_shape.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",},
|
{"name":"draw_line_width2","order":2,"path":"scripts/draw_line_width2/draw_line_width2.yy",},
|
||||||
|
@ -768,11 +663,11 @@
|
||||||
{"name":"__global_object_depths","order":7,"path":"scripts/__global_object_depths/__global_object_depths.yy",},
|
{"name":"__global_object_depths","order":7,"path":"scripts/__global_object_depths/__global_object_depths.yy",},
|
||||||
{"name":"s_node_filter_array","order":28,"path":"sprites/s_node_filter_array/s_node_filter_array.yy",},
|
{"name":"s_node_filter_array","order":28,"path":"sprites/s_node_filter_array/s_node_filter_array.yy",},
|
||||||
{"name":"node_noise_grid_hex","order":24,"path":"scripts/node_noise_grid_hex/node_noise_grid_hex.yy",},
|
{"name":"node_noise_grid_hex","order":24,"path":"scripts/node_noise_grid_hex/node_noise_grid_hex.yy",},
|
||||||
|
{"name":"_3d_rotation","order":2,"path":"scripts/_3d_rotation/_3d_rotation.yy",},
|
||||||
{"name":"node_lua_global","order":1,"path":"scripts/node_lua_global/node_lua_global.yy",},
|
{"name":"node_lua_global","order":1,"path":"scripts/node_lua_global/node_lua_global.yy",},
|
||||||
{"name":"o_dialog_preset","order":1,"path":"objects/o_dialog_preset/o_dialog_preset.yy",},
|
{"name":"o_dialog_preset","order":1,"path":"objects/o_dialog_preset/o_dialog_preset.yy",},
|
||||||
{"name":"s_node_mesh_transform","order":1,"path":"sprites/s_node_mesh_transform/s_node_mesh_transform.yy",},
|
{"name":"s_node_mesh_transform","order":1,"path":"sprites/s_node_mesh_transform/s_node_mesh_transform.yy",},
|
||||||
{"name":"o_dialog_tunnels","order":6,"path":"objects/o_dialog_tunnels/o_dialog_tunnels.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":"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":"node_particle","order":14,"path":"scripts/node_particle/node_particle.yy",},
|
||||||
{"name":"histogram_drawer","order":2,"path":"scripts/histogram_drawer/histogram_drawer.yy",},
|
{"name":"histogram_drawer","order":2,"path":"scripts/histogram_drawer/histogram_drawer.yy",},
|
||||||
|
@ -787,7 +682,6 @@
|
||||||
{"name":"s_icon_64","order":2,"path":"sprites/s_icon_64/s_icon_64.yy",},
|
{"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":"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":"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":"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":"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",},
|
{"name":"draw_circle_border","order":3,"path":"scripts/draw_circle_border/draw_circle_border.yy",},
|
||||||
|
@ -795,41 +689,33 @@
|
||||||
{"name":"sliderRange","order":16,"path":"scripts/sliderRange/sliderRange.yy",},
|
{"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":"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":"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":"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":"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":"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":"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":"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":"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":"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_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":"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":"panel_globalvar","order":4,"path":"scripts/panel_globalvar/panel_globalvar.yy",},
|
||||||
{"name":"node_guide","order":18,"path":"scripts/node_guide/node_guide.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":"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":"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":"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":"node_timeline_preview","order":2,"path":"scripts/node_timeline_preview/node_timeline_preview.yy",},
|
||||||
{"name":"__polygon","order":2,"path":"scripts/__polygon/__polygon.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":"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":"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":"sh_greyscale","order":10,"path":"shaders/sh_greyscale/sh_greyscale.yy",},
|
||||||
{"name":"gameframe_native","order":2,"path":"extensions/gameframe_native/gameframe_native.yy",},
|
{"name":"gameframe_native","order":2,"path":"extensions/gameframe_native/gameframe_native.yy",},
|
||||||
{"name":"node_global","order":3,"path":"scripts/node_global/node_global.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":"spr_gameframe_buttons","order":1,"path":"sprites/spr_gameframe_buttons/spr_gameframe_buttons.yy",},
|
||||||
{"name":"s_node_draw_stack","order":4,"path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",},
|
{"name":"s_node_draw_stack","order":4,"path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",},
|
||||||
{"name":"delaunay","order":1,"path":"scripts/delaunay/delaunay.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":"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_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":"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_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":"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",},
|
{"name":"node_checkerboard","order":13,"path":"scripts/node_checkerboard/node_checkerboard.yy",},
|
||||||
|
@ -838,12 +724,9 @@
|
||||||
{"name":"panel_workspace","order":1,"path":"scripts/panel_workspace/panel_workspace.yy",},
|
{"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_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":"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":"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":"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":"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":"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_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",},
|
{"name":"fd_rectangle_set_material_type","order":9,"path":"scripts/fd_rectangle_set_material_type/fd_rectangle_set_material_type.yy",},
|
||||||
|
@ -859,7 +742,6 @@
|
||||||
{"name":"s_node_flood_fill","order":24,"path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",},
|
{"name":"s_node_flood_fill","order":24,"path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",},
|
||||||
{"name":"node_rigid_force_apply","order":4,"path":"scripts/node_rigid_force_apply/node_rigid_force_apply.yy",},
|
{"name":"node_rigid_force_apply","order":4,"path":"scripts/node_rigid_force_apply/node_rigid_force_apply.yy",},
|
||||||
{"name":"s_node_rigid_variable","order":8,"path":"sprites/s_node_rigid_variable/s_node_rigid_variable.yy",},
|
{"name":"s_node_rigid_variable","order":8,"path":"sprites/s_node_rigid_variable/s_node_rigid_variable.yy",},
|
||||||
{"name":"BBMOD_MixVec4FromSpeedModule","order":5,"path":"scripts/BBMOD_MixVec4FromSpeedModule/BBMOD_MixVec4FromSpeedModule.yy",},
|
|
||||||
{"name":"safe_operation","order":6,"path":"scripts/safe_operation/safe_operation.yy",},
|
{"name":"safe_operation","order":6,"path":"scripts/safe_operation/safe_operation.yy",},
|
||||||
{"name":"s_node_rigid_override","order":9,"path":"sprites/s_node_rigid_override/s_node_rigid_override.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",},
|
{"name":"s_node_array_get","order":3,"path":"sprites/s_node_array_get/s_node_array_get.yy",},
|
||||||
|
@ -871,24 +753,19 @@
|
||||||
{"name":"s_node_fluidSim_domain_queue","order":9,"path":"sprites/s_node_fluidSim_domain_queue/s_node_fluidSim_domain_queue.yy",},
|
{"name":"s_node_fluidSim_domain_queue","order":9,"path":"sprites/s_node_fluidSim_domain_queue/s_node_fluidSim_domain_queue.yy",},
|
||||||
{"name":"s_node_vfx_spawn","order":2,"path":"sprites/s_node_vfx_spawn/s_node_vfx_spawn.yy",},
|
{"name":"s_node_vfx_spawn","order":2,"path":"sprites/s_node_vfx_spawn/s_node_vfx_spawn.yy",},
|
||||||
{"name":"texture_set_repeat","order":1,"path":"scripts/texture_set_repeat/texture_set_repeat.yy",},
|
{"name":"texture_set_repeat","order":1,"path":"scripts/texture_set_repeat/texture_set_repeat.yy",},
|
||||||
{"name":"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":"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":"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":"__bbox","order":5,"path":"scripts/__bbox/__bbox.yy",},
|
||||||
{"name":"node_shadow","order":14,"path":"scripts/node_shadow/node_shadow.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":"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":"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":"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":"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_random","order":20,"path":"scripts/node_random/node_random.yy",},
|
||||||
{"name":"node_atlas","order":2,"path":"scripts/node_atlas/node_atlas.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":"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":"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":"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":"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":"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",},
|
{"name":"node_polar","order":4,"path":"scripts/node_polar/node_polar.yy",},
|
||||||
|
@ -899,7 +776,6 @@
|
||||||
{"name":"s_node_solid","order":15,"path":"sprites/s_node_solid/s_node_solid.yy",},
|
{"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":"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":"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":"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":"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",},
|
{"name":"_node_strand_affector","order":10,"path":"scripts/_node_strand_affector/_node_strand_affector.yy",},
|
||||||
|
@ -912,10 +788,8 @@
|
||||||
{"name":"s_node_repeat","order":23,"path":"sprites/s_node_repeat/s_node_repeat.yy",},
|
{"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":"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":"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":"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":"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":"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":"o_main","order":1,"path":"objects/o_main/o_main.yy",},
|
||||||
{"name":"area_function","order":2,"path":"scripts/area_function/area_function.yy",},
|
{"name":"area_function","order":2,"path":"scripts/area_function/area_function.yy",},
|
||||||
|
@ -924,7 +798,6 @@
|
||||||
{"name":"number_function","order":14,"path":"scripts/number_function/number_function.yy",},
|
{"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_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":"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":"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":"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",},
|
{"name":"widget","order":25,"path":"scripts/widget/widget.yy",},
|
||||||
|
@ -935,7 +808,6 @@
|
||||||
{"name":"s_node_noise","order":8,"path":"sprites/s_node_noise/s_node_noise.yy",},
|
{"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":"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":"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":"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":"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",},
|
{"name":"draw_line_zigzag","order":20,"path":"scripts/draw_line_zigzag/draw_line_zigzag.yy",},
|
||||||
|
@ -943,15 +815,14 @@
|
||||||
{"name":"s_node_rigidSim_activate","order":6,"path":"sprites/s_node_rigidSim_activate/s_node_rigidSim_activate.yy",},
|
{"name":"s_node_rigidSim_activate","order":6,"path":"sprites/s_node_rigidSim_activate/s_node_rigidSim_activate.yy",},
|
||||||
{"name":"s_transparent","order":1,"path":"sprites/s_transparent/s_transparent.yy",},
|
{"name":"s_transparent","order":1,"path":"sprites/s_transparent/s_transparent.yy",},
|
||||||
{"name":"o_dialog_animation","order":1,"path":"objects/o_dialog_animation/o_dialog_animation.yy",},
|
{"name":"o_dialog_animation","order":1,"path":"objects/o_dialog_animation/o_dialog_animation.yy",},
|
||||||
|
{"name":"s_gizmo","order":4,"path":"sprites/s_gizmo/s_gizmo.yy",},
|
||||||
{"name":"s_node_3d_plane","order":6,"path":"sprites/s_node_3d_plane/s_node_3d_plane.yy",},
|
{"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":"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":"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_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":"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":"_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":"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":"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_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",},
|
{"name":"s_node_vec2","order":7,"path":"sprites/s_node_vec2/s_node_vec2.yy",},
|
||||||
|
@ -966,7 +837,6 @@
|
||||||
{"name":"sh_blend_add_alpha_adj","order":2,"path":"shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.yy",},
|
{"name":"sh_blend_add_alpha_adj","order":2,"path":"shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.yy",},
|
||||||
{"name":"preview_overlay_area","order":3,"path":"scripts/preview_overlay_area/preview_overlay_area.yy",},
|
{"name":"preview_overlay_area","order":3,"path":"scripts/preview_overlay_area/preview_overlay_area.yy",},
|
||||||
{"name":"node_text","order":10,"path":"scripts/node_text/node_text.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":"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":"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",},
|
{"name":"lerp_float","order":1,"path":"scripts/lerp_float/lerp_float.yy",},
|
||||||
|
@ -974,7 +844,6 @@
|
||||||
{"name":"fd_rectangle_get_velocity_width","order":26,"path":"scripts/fd_rectangle_get_velocity_width/fd_rectangle_get_velocity_width.yy",},
|
{"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":"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":"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":"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":"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_color_sampler","order":3,"path":"scripts/node_color_sampler/node_color_sampler.yy",},
|
||||||
|
@ -998,18 +867,15 @@
|
||||||
{"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":"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":"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":"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":"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":"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",},
|
{"name":"panel_notification","order":4,"path":"scripts/panel_notification/panel_notification.yy",},
|
||||||
{"name":"render_data","order":3,"path":"scripts/render_data/render_data.yy",},
|
{"name":"render_data","order":3,"path":"scripts/render_data/render_data.yy",},
|
||||||
{"name":"o_dialog_graph_view","order":4,"path":"objects/o_dialog_graph_view/o_dialog_graph_view.yy",},
|
{"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":"fd_rectangle_get_velocity_height","order":22,"path":"scripts/fd_rectangle_get_velocity_height/fd_rectangle_get_velocity_height.yy",},
|
||||||
|
{"name":"s_node_FXAA","order":57,"path":"sprites/s_node_FXAA/s_node_FXAA.yy",},
|
||||||
{"name":"logger","order":1,"path":"scripts/logger/logger.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":"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_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_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",},
|
{"name":"s_node_text_length","order":9,"path":"sprites/s_node_text_length/s_node_text_length.yy",},
|
||||||
|
@ -1020,16 +886,13 @@
|
||||||
{"name":"__background_get_element","order":1,"path":"scripts/__background_get_element/__background_get_element.yy",},
|
{"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"_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":"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",},
|
{"name":"fd_rectangle_set_material_dissipation_type","order":4,"path":"scripts/fd_rectangle_set_material_dissipation_type/fd_rectangle_set_material_dissipation_type.yy",},
|
||||||
|
@ -1039,7 +902,6 @@
|
||||||
{"name":"draw_rect_border","order":6,"path":"scripts/draw_rect_border/draw_rect_border.yy",},
|
{"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":"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":"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":"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":"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",},
|
{"name":"node_image_sequence","order":1,"path":"scripts/node_image_sequence/node_image_sequence.yy",},
|
||||||
|
@ -1062,10 +924,7 @@
|
||||||
{"name":"draw_circle_angle","order":15,"path":"scripts/draw_circle_angle/draw_circle_angle.yy",},
|
{"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":"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":"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":"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":"value_snap","order":10,"path":"scripts/value_snap/value_snap.yy",},
|
||||||
{"name":"file_dropper","order":1,"path":"extensions/file_dropper/file_dropper.yy",},
|
{"name":"file_dropper","order":1,"path":"extensions/file_dropper/file_dropper.yy",},
|
||||||
{"name":"sh_mirror_mask","order":8,"path":"shaders/sh_mirror_mask/sh_mirror_mask.yy",},
|
{"name":"sh_mirror_mask","order":8,"path":"shaders/sh_mirror_mask/sh_mirror_mask.yy",},
|
||||||
|
@ -1075,20 +934,17 @@
|
||||||
{"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":"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":"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":"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":"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":"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":"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":"node_blur_contrast","order":1,"path":"scripts/node_blur_contrast/node_blur_contrast.yy",},
|
||||||
{"name":"sh_trail_filler","order":50,"path":"shaders/sh_trail_filler/sh_trail_filler.yy",},
|
{"name":"sh_trail_filler","order":50,"path":"shaders/sh_trail_filler/sh_trail_filler.yy",},
|
||||||
{"name":"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":"s_node_border","order":12,"path":"sprites/s_node_border/s_node_border.yy",},
|
||||||
{"name":"d3_vector","order":1,"path":"scripts/d3_vector/d3_vector.yy",},
|
{"name":"d3_vector","order":1,"path":"scripts/d3_vector/d3_vector.yy",},
|
||||||
{"name":"s_node_pin","order":2,"path":"sprites/s_node_pin/s_node_pin.yy",},
|
{"name":"s_node_pin","order":2,"path":"sprites/s_node_pin/s_node_pin.yy",},
|
||||||
{"name":"node_local_analyze","order":17,"path":"scripts/node_local_analyze/node_local_analyze.yy",},
|
{"name":"node_local_analyze","order":17,"path":"scripts/node_local_analyze/node_local_analyze.yy",},
|
||||||
{"name":"s_node_blur_contrast","order":10,"path":"sprites/s_node_blur_contrast/s_node_blur_contrast.yy",},
|
{"name":"s_node_blur_contrast","order":10,"path":"sprites/s_node_blur_contrast/s_node_blur_contrast.yy",},
|
||||||
{"name":"fd_y","order":5,"path":"scripts/fd_y/fd_y.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":"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":"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",},
|
{"name":"__init_global","order":8,"path":"scripts/__init_global/__init_global.yy",},
|
||||||
|
@ -1100,14 +956,11 @@
|
||||||
{"name":"node_alpha_hash","order":11,"path":"scripts/node_alpha_hash/node_alpha_hash.yy",},
|
{"name":"node_alpha_hash","order":11,"path":"scripts/node_alpha_hash/node_alpha_hash.yy",},
|
||||||
{"name":"mouse_input","order":1,"path":"scripts/mouse_input/mouse_input.yy",},
|
{"name":"mouse_input","order":1,"path":"scripts/mouse_input/mouse_input.yy",},
|
||||||
{"name":"string_cut","order":2,"path":"scripts/string_cut/string_cut.yy",},
|
{"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":"node_3d_prim_cylinder","order":2,"path":"scripts/node_3d_prim_cylinder/node_3d_prim_cylinder.yy",},
|
||||||
{"name":"panel_nodes","order":2,"path":"scripts/panel_nodes/panel_nodes.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":"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":"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":"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":"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_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",},
|
{"name":"node_edge_detect","order":8,"path":"scripts/node_edge_detect/node_edge_detect.yy",},
|
||||||
|
@ -1130,10 +983,9 @@
|
||||||
{"name":"node_path_trim","order":6,"path":"scripts/node_path_trim/node_path_trim.yy",},
|
{"name":"node_path_trim","order":6,"path":"scripts/node_path_trim/node_path_trim.yy",},
|
||||||
{"name":"s_node_rigidSim_deactivate","order":7,"path":"sprites/s_node_rigidSim_deactivate/s_node_rigidSim_deactivate.yy",},
|
{"name":"s_node_rigidSim_deactivate","order":7,"path":"sprites/s_node_rigidSim_deactivate/s_node_rigidSim_deactivate.yy",},
|
||||||
{"name":"sh_blend_contrast","order":16,"path":"shaders/sh_blend_contrast/sh_blend_contrast.yy",},
|
{"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":"node_3d_prim_cube","order":1,"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":"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":4,"path":"scripts/node_3d_plane/node_3d_plane.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_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",},
|
{"name":"node_strand_update","order":3,"path":"scripts/node_strand_update/node_strand_update.yy",},
|
||||||
{"name":"sh_grid_noise","order":8,"path":"shaders/sh_grid_noise/sh_grid_noise.yy",},
|
{"name":"sh_grid_noise","order":8,"path":"shaders/sh_grid_noise/sh_grid_noise.yy",},
|
||||||
|
@ -1143,14 +995,12 @@
|
||||||
{"name":"panel_color","order":1,"path":"scripts/panel_color/panel_color.yy",},
|
{"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":"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":"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":"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":"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":"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":"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_3d_displace","order":18,"path":"scripts/node_3d_displace/node_3d_displace.yy",},
|
||||||
{"name":"node_vector_dot","order":27,"path":"scripts/node_vector_dot/node_vector_dot.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":"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":"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",},
|
{"name":"node_csv_file_read","order":9,"path":"scripts/node_csv_file_read/node_csv_file_read.yy",},
|
||||||
|
@ -1163,9 +1013,7 @@
|
||||||
{"name":"node_fluid_apply_velo","order":5,"path":"scripts/node_fluid_apply_velo/node_fluid_apply_velo.yy",},
|
{"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_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":"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":"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":"buttonGradient","order":4,"path":"scripts/buttonGradient/buttonGradient.yy",},
|
||||||
{"name":"sh_draw_downsample","order":2,"path":"shaders/sh_draw_downsample/sh_draw_downsample.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",},
|
{"name":"__view_get","order":1,"path":"scripts/__view_get/__view_get.yy",},
|
||||||
|
@ -1173,37 +1021,26 @@
|
||||||
{"name":"fd_rectangle_create","order":7,"path":"scripts/fd_rectangle_create/fd_rectangle_create.yy",},
|
{"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":"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":"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":"s_node_input","order":6,"path":"sprites/s_node_input/s_node_input.yy",},
|
||||||
{"name":"addon","order":1,"path":"objects/addon/addon.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":"_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":"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":"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":"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":"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":"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":"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":"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":"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_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_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":"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":"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":"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":"draw_line_round","order":4,"path":"scripts/draw_line_round/draw_line_round.yy",},
|
||||||
{"name":"vectorBox","order":18,"path":"scripts/vectorBox/vectorBox.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":"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":"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_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":"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",},
|
{"name":"sh_downsample","order":1,"path":"shaders/sh_downsample/sh_downsample.yy",},
|
||||||
|
@ -1220,29 +1057,24 @@
|
||||||
{"name":"s_node_array_add","order":1,"path":"sprites/s_node_array_add/s_node_array_add.yy",},
|
{"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":"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":"_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":"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":"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_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_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":"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":"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":"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":"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":"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":"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":"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":"sh_BGR","order":2,"path":"shaders/sh_BGR/sh_BGR.yy",},
|
||||||
{"name":"BBMOD_ShInstanceIDAnimated","order":6,"path":"shaders/BBMOD_ShInstanceIDAnimated/BBMOD_ShInstanceIDAnimated.yy",},
|
|
||||||
{"name":"oRigidbody","order":2,"path":"objects/oRigidbody/oRigidbody.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":"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":"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":"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":"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":"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":"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":"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",},
|
{"name":"sh_blend_screen","order":3,"path":"shaders/sh_blend_screen/sh_blend_screen.yy",},
|
||||||
|
@ -1256,13 +1088,11 @@
|
||||||
{"name":"sh_warp_4points","order":9,"path":"shaders/sh_warp_4points/sh_warp_4points.yy",},
|
{"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":"_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":"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":"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":"sh_lum2alpha","order":38,"path":"shaders/sh_lum2alpha/sh_lum2alpha.yy",},
|
||||||
{"name":"button","order":2,"path":"scripts/button/button.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":"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":"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_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":"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",},
|
{"name":"s_node_3d_cylinder","order":1,"path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",},
|
||||||
|
@ -1271,7 +1101,6 @@
|
||||||
{"name":"s_node_regex_replace","order":10,"path":"sprites/s_node_regex_replace/s_node_regex_replace.yy",},
|
{"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":"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":"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":"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":"_f_p1","order":1,"path":"fonts/_f_p1/_f_p1.yy",},
|
||||||
{"name":"tuple_functions","order":5,"path":"scripts/tuple_functions/tuple_functions.yy",},
|
{"name":"tuple_functions","order":5,"path":"scripts/tuple_functions/tuple_functions.yy",},
|
||||||
|
@ -1283,12 +1112,10 @@
|
||||||
{"name":"bin_function","order":11,"path":"scripts/bin_function/bin_function.yy",},
|
{"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":"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":"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":"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_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":"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":"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":"pseudo_regex","order":7,"path":"scripts/pseudo_regex/pseudo_regex.yy",},
|
||||||
{"name":"node_invert","order":6,"path":"scripts/node_invert/node_invert.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",},
|
{"name":"o_dialog_history","order":3,"path":"objects/o_dialog_history/o_dialog_history.yy",},
|
||||||
|
@ -1305,15 +1132,12 @@
|
||||||
{"name":"s_node_cache","order":27,"path":"sprites/s_node_cache/s_node_cache.yy",},
|
{"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":"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":"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":"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":"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":"__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":"s_node_group_input","order":16,"path":"sprites/s_node_group_input/s_node_group_input.yy",},
|
||||||
{"name":"sample_projects","order":6,"path":"scripts/sample_projects/sample_projects.yy",},
|
{"name":"sample_projects","order":6,"path":"scripts/sample_projects/sample_projects.yy",},
|
||||||
{"name":"load_function","order":2,"path":"scripts/load_function/load_function.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":"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":"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",},
|
{"name":"fd_rectangle_get_velocity_dissipation_type","order":20,"path":"scripts/fd_rectangle_get_velocity_dissipation_type/fd_rectangle_get_velocity_dissipation_type.yy",},
|
||||||
|
@ -1324,7 +1148,6 @@
|
||||||
{"name":"node_path_array","order":11,"path":"scripts/node_path_array/node_path_array.yy",},
|
{"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":"node_scale","order":8,"path":"scripts/node_scale/node_scale.yy",},
|
||||||
{"name":"sh_displace","order":5,"path":"shaders/sh_displace/sh_displace.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":"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":"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",},
|
{"name":"node_VFX_effect_accelerate","order":7,"path":"scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.yy",},
|
||||||
|
@ -1342,7 +1165,6 @@
|
||||||
{"name":"sprite_loader","order":11,"path":"scripts/sprite_loader/sprite_loader.yy",},
|
{"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_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":"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":"__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":"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",},
|
{"name":"preferences","order":5,"path":"scripts/preferences/preferences.yy",},
|
||||||
|
@ -1351,14 +1173,12 @@
|
||||||
{"name":"s_node_json_file_write","order":13,"path":"sprites/s_node_json_file_write/s_node_json_file_write.yy",},
|
{"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":"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":"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":"font_data","order":10,"path":"scripts/font_data/font_data.yy",},
|
||||||
{"name":"node_camera","order":3,"path":"scripts/node_camera/node_camera.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":"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":"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":"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":"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":"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":"sh_channel_V","order":6,"path":"shaders/sh_channel_V/sh_channel_V.yy",},
|
||||||
{"name":"__shapes","order":3,"path":"scripts/__shapes/__shapes.yy",},
|
{"name":"__shapes","order":3,"path":"scripts/__shapes/__shapes.yy",},
|
||||||
|
@ -1366,14 +1186,12 @@
|
||||||
{"name":"shell_helper","order":20,"path":"scripts/shell_helper/shell_helper.yy",},
|
{"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":"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":"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":"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":"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":"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":"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_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":"node_3d_prim_sphere","order":3,"path":"scripts/node_3d_prim_sphere/node_3d_prim_sphere.yy",},
|
||||||
{"name":"dialog_management","order":2,"path":"scripts/dialog_management/dialog_management.yy",},
|
{"name":"dialog_management","order":2,"path":"scripts/dialog_management/dialog_management.yy",},
|
||||||
{"name":"draw_shapes","order":10,"path":"scripts/draw_shapes/draw_shapes.yy",},
|
{"name":"draw_shapes","order":10,"path":"scripts/draw_shapes/draw_shapes.yy",},
|
||||||
{"name":"string_eval_tree","order":2,"path":"scripts/string_eval_tree/string_eval_tree.yy",},
|
{"name":"string_eval_tree","order":2,"path":"scripts/string_eval_tree/string_eval_tree.yy",},
|
||||||
|
@ -1393,11 +1211,9 @@
|
||||||
{"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":"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":"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":"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":"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":"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":"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_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":"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",},
|
{"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
Binary file not shown.
79
objects/_addon_custom/Create_0.gml
Normal file
79
objects/_addon_custom/Create_0.gml
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
/// @description
|
||||||
|
event_inherited();
|
||||||
|
|
||||||
|
#region init
|
||||||
|
function init(directory) {
|
||||||
|
ID = UUID_generate();
|
||||||
|
global.ADDON_ID[? ID] = self;
|
||||||
|
ready = false;
|
||||||
|
name = filename_name_only(directory);
|
||||||
|
|
||||||
|
thread = lua_create();
|
||||||
|
lua_error_handler = _lua_error;
|
||||||
|
__addon_lua_setup(thread, self);
|
||||||
|
|
||||||
|
self.directory = directory;
|
||||||
|
|
||||||
|
var propPath = directory + "\\meta.json";
|
||||||
|
context_menus = {};
|
||||||
|
panels = {};
|
||||||
|
|
||||||
|
if(file_exists(propPath)) {
|
||||||
|
var meta = json_load_struct(propPath);
|
||||||
|
if(struct_has(meta, "panels")) {
|
||||||
|
panels = meta.panels;
|
||||||
|
var arr = variable_struct_get_names(meta.panels);
|
||||||
|
|
||||||
|
for( var i = 0; i < array_length(arr); i++ ) {
|
||||||
|
var _key = arr[i];
|
||||||
|
var pane = meta.panels[$ _key];
|
||||||
|
|
||||||
|
if(pane.create) {
|
||||||
|
var panel = new addonPanel(self, pane, pane.drawFn, struct_has(pane, "drawFn")? pane.drawUIFn : "");
|
||||||
|
dialogPanelCall(panel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(struct_has(meta, "context_menu_callbacks")) {
|
||||||
|
context_menus = meta.context_menu_callbacks;
|
||||||
|
|
||||||
|
var arr = variable_struct_get_names(context_menus);
|
||||||
|
for( var i = 0; i < array_length(arr); i++ ) {
|
||||||
|
var _call = ds_map_try_get(CONTEXT_MENU_CALLBACK, arr[i], []);
|
||||||
|
var _fnk = context_menus[$ arr[i]];
|
||||||
|
var _generator = new addonContextGenerator(self, _fnk);
|
||||||
|
array_push(_call, _generator);
|
||||||
|
|
||||||
|
CONTEXT_MENU_CALLBACK[? arr[i]] = _call;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
scriptPath = directory + "\\script.lua";
|
||||||
|
if(!file_exists(scriptPath)) {
|
||||||
|
noti_warning(title + " Addon error: script.lua not found.");
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
lua_add_file(thread, scriptPath);
|
||||||
|
var runResult = lua_call(thread, "init");
|
||||||
|
|
||||||
|
array_push(ANIMATION_PRE, animationPreStep);
|
||||||
|
array_push(ANIMATION_POST, animationPostStep);
|
||||||
|
}
|
||||||
|
|
||||||
|
function animationPreStep() {
|
||||||
|
if(!ready) return;
|
||||||
|
var runResult = lua_call(thread, "animationPreStep");
|
||||||
|
}
|
||||||
|
|
||||||
|
function animationPostStep() {
|
||||||
|
if(!ready) return;
|
||||||
|
var runResult = lua_call(thread, "animationPostStep");
|
||||||
|
}
|
||||||
|
|
||||||
|
function callFunctions(fn) {
|
||||||
|
lua_call(thread, fn);
|
||||||
|
}
|
||||||
|
#endregion
|
16
objects/_addon_custom/Destroy_0.gml
Normal file
16
objects/_addon_custom/Destroy_0.gml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
/// @description
|
||||||
|
if(!ready) exit;
|
||||||
|
var runResult = lua_call(thread, "destroy");
|
||||||
|
|
||||||
|
array_remove(ANIMATION_PRE, animationPreStep);
|
||||||
|
array_remove(ANIMATION_POST, animationPostStep);
|
||||||
|
|
||||||
|
var arr = variable_struct_get_names(context_menus);
|
||||||
|
for( var i = 0; i < array_length(arr); i++ ) {
|
||||||
|
var _call = ds_map_try_get(CONTEXT_MENU_CALLBACK, arr[i], []);
|
||||||
|
|
||||||
|
for( var j = array_length(_call) - 1; j >= 0; j-- ) {
|
||||||
|
if(_call[j]._addon == self)
|
||||||
|
array_delete(_call, j, 1);
|
||||||
|
}
|
||||||
|
}
|
3
objects/_addon_custom/Step_0.gml
Normal file
3
objects/_addon_custom/Step_0.gml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/// @description
|
||||||
|
if(!ready) exit;
|
||||||
|
|
3
objects/_addon_custom/Step_1.gml
Normal file
3
objects/_addon_custom/Step_1.gml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/// @description
|
||||||
|
if(!ready) exit;
|
||||||
|
var runResult = lua_call(thread, "step");
|
39
objects/_addon_custom/_addon_custom.yy
Normal file
39
objects/_addon_custom/_addon_custom.yy
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMObject",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "_addon_custom",
|
||||||
|
"eventList": [
|
||||||
|
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,},
|
||||||
|
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,},
|
||||||
|
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":3,"isDnD":false,},
|
||||||
|
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,},
|
||||||
|
],
|
||||||
|
"managed": true,
|
||||||
|
"overriddenProperties": [],
|
||||||
|
"parent": {
|
||||||
|
"name": "addons",
|
||||||
|
"path": "folders/addons.yy",
|
||||||
|
},
|
||||||
|
"parentObjectId": {
|
||||||
|
"name": "addon",
|
||||||
|
"path": "objects/addon/addon.yy",
|
||||||
|
},
|
||||||
|
"persistent": false,
|
||||||
|
"physicsAngularDamping": 0.1,
|
||||||
|
"physicsDensity": 0.5,
|
||||||
|
"physicsFriction": 0.2,
|
||||||
|
"physicsGroup": 1,
|
||||||
|
"physicsKinematic": false,
|
||||||
|
"physicsLinearDamping": 0.1,
|
||||||
|
"physicsObject": false,
|
||||||
|
"physicsRestitution": 0.1,
|
||||||
|
"physicsSensor": false,
|
||||||
|
"physicsShape": 1,
|
||||||
|
"physicsShapePoints": [],
|
||||||
|
"physicsStartAwake": true,
|
||||||
|
"properties": [],
|
||||||
|
"solid": false,
|
||||||
|
"spriteId": null,
|
||||||
|
"spriteMaskId": null,
|
||||||
|
"visible": true,
|
||||||
|
}
|
|
@ -39,7 +39,7 @@ event_inherited();
|
||||||
}, THEME.star)
|
}, THEME.star)
|
||||||
];
|
];
|
||||||
|
|
||||||
menuCall(,, menu);
|
menuCall("add_node_window_manu",,, menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
function filtered(node) {
|
function filtered(node) {
|
||||||
|
|
|
@ -129,7 +129,7 @@ event_inherited();
|
||||||
|
|
||||||
if(mouse_press(mb_right, interactable && sFOCUS)) {
|
if(mouse_press(mb_right, interactable && sFOCUS)) {
|
||||||
hovering_name = preset_name[| i];
|
hovering_name = preset_name[| i];
|
||||||
menuCall(,, [
|
menuCall("gradient_window_preset_menu",,, [
|
||||||
menuItem("Delete gradient", function() {
|
menuItem("Delete gradient", function() {
|
||||||
file_delete( DIRECTORY + "Gradients/" + hovering_name);
|
file_delete( DIRECTORY + "Gradients/" + hovering_name);
|
||||||
presetCollect();
|
presetCollect();
|
||||||
|
|
|
@ -98,7 +98,7 @@ if !ready exit;
|
||||||
var by = dialog_y + ui(16);
|
var by = dialog_y + ui(16);
|
||||||
|
|
||||||
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, interactable && sFOCUS, sHOVER, get_text("gradient_editor_key_blend", "Key blending"), THEME.grad_blend) == 2) {
|
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, interactable && sFOCUS, sHOVER, get_text("gradient_editor_key_blend", "Key blending"), THEME.grad_blend) == 2) {
|
||||||
menuCall( bx + ui(32), by, [
|
menuCall("gradient_window_blend_menu", bx + ui(32), by, [
|
||||||
menuItem(get_text("gradient_editor_blend_RGB", "RGB blend"), function() { gradient.type = 0; onApply(gradient); }),
|
menuItem(get_text("gradient_editor_blend_RGB", "RGB blend"), function() { gradient.type = 0; onApply(gradient); }),
|
||||||
menuItem(get_text("gradient_editor_blend_HSV", "HSV blend"), function() { gradient.type = 2; onApply(gradient); }),
|
menuItem(get_text("gradient_editor_blend_HSV", "HSV blend"), function() { gradient.type = 2; onApply(gradient); }),
|
||||||
menuItem(get_text("gradient_editor_blend_hard", "Hard blend"), function() { gradient.type = 1; onApply(gradient); }),
|
menuItem(get_text("gradient_editor_blend_hard", "Hard blend"), function() { gradient.type = 1; onApply(gradient); }),
|
||||||
|
|
|
@ -110,7 +110,7 @@ event_inherited();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(menu > -1) {
|
if(menu > -1) {
|
||||||
menuCall(,, [
|
menuCall("image_array_edit_menu",,, [
|
||||||
menuItem("Remove", function() {
|
menuItem("Remove", function() {
|
||||||
var arr = target.inputs[| 0].getValue();
|
var arr = target.inputs[| 0].getValue();
|
||||||
array_delete(arr, menuOn, 1);
|
array_delete(arr, menuOn, 1);
|
||||||
|
|
|
@ -33,15 +33,23 @@ if(!ready) exit;
|
||||||
if(tips != noone) TOOLTIP = tips;
|
if(tips != noone) TOOLTIP = tips;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var cc = c_white;
|
||||||
|
if(struct_has(_menuItem, "color"))
|
||||||
|
cc = _menuItem.color;
|
||||||
|
|
||||||
if(selecting == i) {
|
if(selecting == i) {
|
||||||
draw_sprite_stretched_ext(THEME.textbox, 3, dialog_x, yy, dialog_w, _h, COLORS.dialog_menubox_highlight, 0.75);
|
if(cc == c_white)
|
||||||
|
draw_sprite_stretched_ext(THEME.textbox, 3, dialog_x, yy, dialog_w, _h, COLORS.dialog_menubox_highlight, 0.75);
|
||||||
|
else
|
||||||
|
draw_sprite_stretched_ext(THEME.textbox, 3, dialog_x, yy, dialog_w, _h, cc, 0.8);
|
||||||
|
|
||||||
if(instanceof(_menuItem) == "MenuItem" && sFOCUS && (mouse_release(mb_left) || keyboard_check_released(vk_enter))) {
|
if(instanceof(_menuItem) == "MenuItem" && sFOCUS && (mouse_release(mb_left) || keyboard_check_released(vk_enter))) {
|
||||||
var res = _menuItem.func(dialog_x + dialog_w, yy, depth, _menuItem.name, i);
|
var res = _menuItem.func(dialog_x + dialog_w, yy, depth, _menuItem.name, i);
|
||||||
if(_menuItem.isShelf) ds_list_add(children, res);
|
if(_menuItem.isShelf) ds_list_add(children, res);
|
||||||
else instance_destroy(o_dialog_menubox);
|
else instance_destroy(o_dialog_menubox);
|
||||||
}
|
}
|
||||||
}
|
} else if(cc != c_white)
|
||||||
|
draw_sprite_stretched_ext(THEME.textbox, 3, dialog_x, yy, dialog_w, _h, cc, 0.5);
|
||||||
|
|
||||||
if(instanceof(_menuItem) == "MenuItemGroup") {
|
if(instanceof(_menuItem) == "MenuItemGroup") {
|
||||||
var _submenus = _menuItem.group;
|
var _submenus = _menuItem.group;
|
||||||
|
|
|
@ -71,7 +71,7 @@ event_inherited();
|
||||||
noti.onClick();
|
noti.onClick();
|
||||||
|
|
||||||
if(mouse_press(mb_right, sFOCUS)) {
|
if(mouse_press(mb_right, sFOCUS)) {
|
||||||
var dia = menuCall(,, [
|
var dia = menuCall("notification_menu",,, [
|
||||||
menuItem(get_text("noti_copy_message", "Copy notification message"), function() {
|
menuItem(get_text("noti_copy_message", "Copy notification message"), function() {
|
||||||
clipboard_set_text(o_dialog_menubox.noti.txt);
|
clipboard_set_text(o_dialog_menubox.noti.txt);
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -26,21 +26,21 @@ if !ready exit;
|
||||||
var toolt = error? get_text("noti_hide_error", "Hide error") : get_text("noti_show_error", "Show error");
|
var toolt = error? get_text("noti_hide_error", "Hide error") : get_text("noti_show_error", "Show error");
|
||||||
var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, mouse_ui, sFOCUS, sHOVER, toolt, THEME.noti_icon_error, error, c_white, 0.3 + error * 0.7);
|
var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, mouse_ui, sFOCUS, sHOVER, toolt, THEME.noti_icon_error, error, c_white, 0.3 + error * 0.7);
|
||||||
if(b == 2) filter = filter ^ NOTI_TYPE.error;
|
if(b == 2) filter = filter ^ NOTI_TYPE.error;
|
||||||
if(b == 3) menuCall(,, rightClickMenu);
|
if(b == 3) menuCall("notification_error_menu",,, rightClickMenu);
|
||||||
bx -= ui(36);
|
bx -= ui(36);
|
||||||
|
|
||||||
var warn = !!(filter & NOTI_TYPE.warning);
|
var warn = !!(filter & NOTI_TYPE.warning);
|
||||||
var toolt = warn? get_text("noti_hide_warning", "Hide warning") : get_text("noti_show_warning", "Show warning");
|
var toolt = warn? get_text("noti_hide_warning", "Hide warning") : get_text("noti_show_warning", "Show warning");
|
||||||
var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, mouse_ui, sFOCUS, sHOVER, toolt, THEME.noti_icon_warning, warn, c_white, 0.3 + warn * 0.7);
|
var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, mouse_ui, sFOCUS, sHOVER, toolt, THEME.noti_icon_warning, warn, c_white, 0.3 + warn * 0.7);
|
||||||
if(b == 2) filter = filter ^ NOTI_TYPE.warning;
|
if(b == 2) filter = filter ^ NOTI_TYPE.warning;
|
||||||
if(b == 3) menuCall(,, rightClickMenu);
|
if(b == 3) menuCall("notification_warning_menu",,, rightClickMenu);
|
||||||
bx -= ui(36);
|
bx -= ui(36);
|
||||||
|
|
||||||
var log = !!(filter & NOTI_TYPE.log);
|
var log = !!(filter & NOTI_TYPE.log);
|
||||||
var toolt = log? get_text("noti_hide_log", "Hide log") : get_text("noti_show_log", "Show log");
|
var toolt = log? get_text("noti_hide_log", "Hide log") : get_text("noti_show_log", "Show log");
|
||||||
var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, mouse_ui, sFOCUS, sHOVER, toolt, THEME.noti_icon_log, log, c_white, 0.3 + log * 0.7);
|
var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, mouse_ui, sFOCUS, sHOVER, toolt, THEME.noti_icon_log, log, c_white, 0.3 + log * 0.7);
|
||||||
if(b == 2) filter = filter ^ NOTI_TYPE.log;
|
if(b == 2) filter = filter ^ NOTI_TYPE.log;
|
||||||
if(b == 3) menuCall(,, rightClickMenu);
|
if(b == 3) menuCall("notification_log_menu",,, rightClickMenu);
|
||||||
|
|
||||||
var px = dialog_x + ui(padding);
|
var px = dialog_x + ui(padding);
|
||||||
var py = dialog_y + ui(title_height);
|
var py = dialog_y + ui(title_height);
|
||||||
|
|
|
@ -101,7 +101,7 @@ event_inherited();
|
||||||
|
|
||||||
if(mouse_press(mb_right, interactable && sFOCUS)) {
|
if(mouse_press(mb_right, interactable && sFOCUS)) {
|
||||||
hovering_name = preset_name[| i];
|
hovering_name = preset_name[| i];
|
||||||
menuCall(,, [
|
menuCall("palette_window_preset_menu",,, [
|
||||||
menuItem("Delete palette", function() {
|
menuItem("Delete palette", function() {
|
||||||
file_delete( DIRECTORY + "Palettes/" + hovering_name);
|
file_delete( DIRECTORY + "Palettes/" + hovering_name);
|
||||||
presetCollect();
|
presetCollect();
|
||||||
|
|
|
@ -95,7 +95,7 @@ if palette == 0 exit;
|
||||||
var by = dialog_y + ui(16);
|
var by = dialog_y + ui(16);
|
||||||
|
|
||||||
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, interactable && sFOCUS, sHOVER, get_text("palette_editor_sort", "Sort color"), THEME.sort) == 2) {
|
if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, interactable && sFOCUS, sHOVER, get_text("palette_editor_sort", "Sort color"), THEME.sort) == 2) {
|
||||||
menuCall( bx + ui(32), by, [
|
menuCall("palette_window_sort_menu", bx + ui(32), by, [
|
||||||
menuItem(get_text("palette_editor_sort_brighter", "Brighter"), function() { sortPalette(__sortBright); }),
|
menuItem(get_text("palette_editor_sort_brighter", "Brighter"), function() { sortPalette(__sortBright); }),
|
||||||
menuItem(get_text("palette_editor_sort_darker", "Darker"), function() { sortPalette(__sortDark); }),
|
menuItem(get_text("palette_editor_sort_darker", "Darker"), function() { sortPalette(__sortDark); }),
|
||||||
-1,
|
-1,
|
||||||
|
|
|
@ -78,7 +78,7 @@ if !ready exit;
|
||||||
|
|
||||||
instance_destroy();
|
instance_destroy();
|
||||||
} else if(mouse_press(mb_right)) {
|
} else if(mouse_press(mb_right)) {
|
||||||
menuCall(,, [
|
menuCall("panel_window_menu",,, [
|
||||||
menuItem("Move", function() {
|
menuItem("Move", function() {
|
||||||
content.dragSurface = surface_clone(panel);
|
content.dragSurface = surface_clone(panel);
|
||||||
o_main.panel_dragging = content;
|
o_main.panel_dragging = content;
|
||||||
|
|
|
@ -139,24 +139,6 @@ event_inherited();
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
|
|
||||||
ds_list_add(pref_global, [
|
|
||||||
get_text("pref_show_node_render_time", "Show node render time"),
|
|
||||||
"node_show_time",
|
|
||||||
new checkBox(function() {
|
|
||||||
PREF_MAP[? "node_show_time"] = !PREF_MAP[? "node_show_time"];
|
|
||||||
PREF_SAVE();
|
|
||||||
})
|
|
||||||
]);
|
|
||||||
|
|
||||||
ds_list_add(pref_global, [
|
|
||||||
get_text("pref_show_node_render_status", "Show node render status"),
|
|
||||||
"node_show_render_status",
|
|
||||||
new checkBox(function() {
|
|
||||||
PREF_MAP[? "node_show_render_status"] = !PREF_MAP[? "node_show_render_status"];
|
|
||||||
PREF_SAVE();
|
|
||||||
})
|
|
||||||
]);
|
|
||||||
|
|
||||||
ds_list_add(pref_global, [
|
ds_list_add(pref_global, [
|
||||||
get_text("pref_collection_preview_speed", "Collection preview speed"),
|
get_text("pref_collection_preview_speed", "Collection preview speed"),
|
||||||
"collection_preview_speed",
|
"collection_preview_speed",
|
||||||
|
@ -203,6 +185,15 @@ event_inherited();
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
ds_list_add(pref_global, [
|
||||||
|
get_text("pref_save_file_minify", "Minify save file"),
|
||||||
|
"save_file_minify",
|
||||||
|
new checkBox(function() {
|
||||||
|
PREF_MAP[? "save_file_minify"] = !PREF_MAP[? "save_file_minify"];
|
||||||
|
PREF_SAVE();
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
|
||||||
ds_list_add(pref_global, [
|
ds_list_add(pref_global, [
|
||||||
get_text("pref_enable_test_mode", "Enable test mode (require restart)"),
|
get_text("pref_enable_test_mode", "Enable test mode (require restart)"),
|
||||||
"test_mode",
|
"test_mode",
|
||||||
|
|
|
@ -36,7 +36,7 @@ event_inherited();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mouse_click(mb_right, sFOCUS)) {
|
if(mouse_click(mb_right, sFOCUS)) {
|
||||||
var dia = menuCall(,, [
|
var dia = menuCall("preset_window_menu",,, [
|
||||||
menuItem("Delete", function() {
|
menuItem("Delete", function() {
|
||||||
file_delete(o_dialog_menubox.path);
|
file_delete(o_dialog_menubox.path);
|
||||||
__initPresets();
|
__initPresets();
|
||||||
|
|
|
@ -109,7 +109,7 @@ if(node_target == noone) {
|
||||||
|
|
||||||
array_push(_menu, menuItem(o.name, function(_x, _y, _d, _n, index) { changeChannel(index); }));
|
array_push(_menu, menuItem(o.name, function(_x, _y, _d, _n, index) { changeChannel(index); }));
|
||||||
}
|
}
|
||||||
menuCall(,, _menu);
|
menuCall("preview_window_menu",,, _menu);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -85,12 +85,10 @@
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Loader
|
#region Loader
|
||||||
globalvar GIF_READER, _BBMOD_DLL;
|
globalvar GIF_READER;
|
||||||
|
|
||||||
GIF_READER = ds_list_create();
|
GIF_READER = ds_list_create();
|
||||||
gif_complete_st = ds_stack_create();
|
gif_complete_st = ds_stack_create();
|
||||||
|
|
||||||
_BBMOD_DLL = new BBMOD_DLL();
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region tunnel
|
#region tunnel
|
||||||
|
|
|
@ -32,6 +32,7 @@ if(OS == os_windows && gameframe_is_minimized()) {
|
||||||
catch(e) {
|
catch(e) {
|
||||||
while(surface_get_target() != surf)
|
while(surface_get_target() != surf)
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
|
|
||||||
noti_warning(exception_print(e));
|
noti_warning(exception_print(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,11 @@ if(OS == os_windows && gameframe_is_minimized()) exit;
|
||||||
txt += " (triangles: " + string(array_length(content.triangles)) + ")";
|
txt += " (triangles: " + string(array_length(content.triangles)) + ")";
|
||||||
draw_tooltip_text("[" + txt + "]");
|
draw_tooltip_text("[" + txt + "]");
|
||||||
break;
|
break;
|
||||||
|
case VALUE_TYPE.d3vertex :
|
||||||
|
var txt = get_text("tooltip_mesh_vertex", "3D Vertex");
|
||||||
|
txt += " (groups: " + string(array_length(content)) + ")";
|
||||||
|
draw_tooltip_text("[" + txt + "]");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
draw_tooltip_text(TOOLTIP);
|
draw_tooltip_text(TOOLTIP);
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
/// @description init
|
/// @description init
|
||||||
|
HOVERING_ELEMENT = _HOVERING_ELEMENT;
|
||||||
|
_HOVERING_ELEMENT = noone;
|
||||||
|
|
||||||
#region minimize
|
#region minimize
|
||||||
if(OS == os_windows && gameframe_is_minimized()) {
|
if(OS == os_windows && gameframe_is_minimized()) {
|
||||||
if(!minimized)
|
if(!minimized)
|
||||||
|
|
|
@ -1,296 +0,0 @@
|
||||||
/// @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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
/// @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);
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AABBEmissionModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Shape",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Emission/Shape.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AddRealOnCollisionModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "AddPropertyOnCollision",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOnCollision.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
/// @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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AddRealOverTimeModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "AddPropertyOverTime",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOverTime.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,51 +0,0 @@
|
||||||
/// @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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AddVec2OnCollisionModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "AddPropertyOnCollision",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOnCollision.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,74 +0,0 @@
|
||||||
/// @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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AddVec2OverTimeModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "AddPropertyOverTime",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOverTime.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
/// @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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AddVec3OnCollisionModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "AddPropertyOnCollision",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOnCollision.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,87 +0,0 @@
|
||||||
/// @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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AddVec3OverTimeModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "AddPropertyOverTime",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOverTime.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,55 +0,0 @@
|
||||||
/// @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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AddVec4OnCollisionModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "AddPropertyOnCollision",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOnCollision.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,100 +0,0 @@
|
||||||
/// @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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AddVec4OverTimeModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "AddPropertyOverTime",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Universal/AddPropertyOverTime.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
/// @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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,508 +0,0 @@
|
||||||
#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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
/// @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;
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AnimationInstance",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Animation",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Animation.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,600 +0,0 @@
|
||||||
/// @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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AnimationPlayer",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Animation",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Animation.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,81 +0,0 @@
|
||||||
/// @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;
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AnimationState",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "StateMachine",
|
|
||||||
"path": "folders/_Extensions/BBMOD/StateMachine.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,87 +0,0 @@
|
||||||
/// @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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AnimationStateMachine",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "StateMachine",
|
|
||||||
"path": "folders/_Extensions/BBMOD/StateMachine.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/// @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;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_AttractorModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Physics",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Physics.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,354 +0,0 @@
|
||||||
/// @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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,121 +0,0 @@
|
||||||
/// @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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_BaseMaterial",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Rendering",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Rendering.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,864 +0,0 @@
|
||||||
/// @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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_BaseRenderer",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Rendering",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Rendering.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,443 +0,0 @@
|
||||||
/// @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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_BaseShader",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Rendering",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Rendering.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,289 +0,0 @@
|
||||||
/// @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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,148 +0,0 @@
|
||||||
/// @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);
|
|
||||||
}
|
|
|
@ -1,132 +0,0 @@
|
||||||
/// @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();
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
/// @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;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_CollisionEventModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Event",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Event.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,51 +0,0 @@
|
||||||
/// @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);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_CollisionKillModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Kill",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Kill.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,330 +0,0 @@
|
||||||
/// @macro {Real}
|
|
||||||
/// @private
|
|
||||||
#macro __BBMOD_RGBM_RANGE 6.0
|
|
||||||
|
|
||||||
/// @macro {Real} The maximum value of a single channel when using RGBM encoded
|
|
||||||
/// colors. This is always at least 255.
|
|
||||||
#macro BBMOD_RGBM_VALUE_MAX (255.0 * __BBMOD_RGBM_RANGE)
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_aqua)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_AQUA (new BBMOD_Color().FromConstant(c_aqua))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_black)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_BLACK (new BBMOD_Color().FromConstant(c_black))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_blue)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_BLUE (new BBMOD_Color().FromConstant(c_blue))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_dkgray)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_DKGRAY (new BBMOD_Color().FromConstant(c_dkgray))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_fuchsia)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_FUCHSIA (new BBMOD_Color().FromConstant(c_fuchsia))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_gray)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_GRAY (new BBMOD_Color().FromConstant(c_gray))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_green)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_GREEN (new BBMOD_Color().FromConstant(c_green))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_lime)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_LIME (new BBMOD_Color().FromConstant(c_lime))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_ltgray)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_LTGRAY (new BBMOD_Color().FromConstant(c_ltgray))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_maroon)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_MAROON (new BBMOD_Color().FromConstant(c_maroon))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_navy)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_NAVY (new BBMOD_Color().FromConstant(c_navy))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_olive)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_OLIVE (new BBMOD_Color().FromConstant(c_olive))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_orange)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_ORANGE (new BBMOD_Color().FromConstant(c_orange))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_purple)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_PURPLE (new BBMOD_Color().FromConstant(c_purple))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_red)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_RED (new BBMOD_Color().FromConstant(c_red))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_silver)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_SILVER (new BBMOD_Color().FromConstant(c_silver))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_teal)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_TEAL (new BBMOD_Color().FromConstant(c_teal))
|
|
||||||
|
|
||||||
/// @macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_white)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_WHITE (new BBMOD_Color().FromConstant(c_white))
|
|
||||||
|
|
||||||
///@macro {Struct.BBMOD_Color} Shorthand for `new BBMOD_Color().FromConstant(c_yellow)`.
|
|
||||||
/// @see BBMOD_Color
|
|
||||||
#macro BBMOD_C_YELLOW (new BBMOD_Color().FromConstant(c_yellow))
|
|
||||||
|
|
||||||
/// @func BBMOD_Color([_red[, _green[, _blue[, _alpha]]]])
|
|
||||||
///
|
|
||||||
/// @desc A color struct with support for high dynamic range.
|
|
||||||
///
|
|
||||||
/// @param {Real} [_red] The value of the red channel. Use values in range
|
|
||||||
/// 0..`BBMOD_RGBM_VALUE_MAX`. Defaults to 255.
|
|
||||||
/// @param {Real} [_green] The value of the green channel. Use values in range
|
|
||||||
/// 0..`BBMOD_RGBM_VALUE_MAX`. Defaults to 255.
|
|
||||||
/// @param {Real} [_blue] The value of the blue channel. Use values in range
|
|
||||||
/// 0..`BBMOD_RGBM_VALUE_MAX`. Defaults to 255.
|
|
||||||
/// @param {Real} [_alpha] The value of the alpha channel. Use values in range
|
|
||||||
/// 0..1. Defaults to 1.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_C_AQUA
|
|
||||||
/// @see BBMOD_C_BLACK
|
|
||||||
/// @see BBMOD_C_BLUE
|
|
||||||
/// @see BBMOD_C_DKGRAY
|
|
||||||
/// @see BBMOD_C_FUCHSIA
|
|
||||||
/// @see BBMOD_C_GRAY
|
|
||||||
/// @see BBMOD_C_GREEN
|
|
||||||
/// @see BBMOD_C_LIME
|
|
||||||
/// @see BBMOD_C_LTGRAY
|
|
||||||
/// @see BBMOD_C_MAROON
|
|
||||||
/// @see BBMOD_C_NAVY
|
|
||||||
/// @see BBMOD_C_OLIVE
|
|
||||||
/// @see BBMOD_C_ORANGE
|
|
||||||
/// @see BBMOD_C_PURPLE
|
|
||||||
/// @see BBMOD_C_RED
|
|
||||||
/// @see BBMOD_C_SILVER
|
|
||||||
/// @see BBMOD_C_TEAL
|
|
||||||
/// @see BBMOD_C_WHITE
|
|
||||||
/// @see BBMOD_C_YELLOW
|
|
||||||
/// @see BBMOD_RGBM_VALUE_MAX
|
|
||||||
function BBMOD_Color(
|
|
||||||
_red=255.0,
|
|
||||||
_green=255.0,
|
|
||||||
_blue=255.0,
|
|
||||||
_alpha=1.0) constructor
|
|
||||||
{
|
|
||||||
/// @var {Real} The value of the red color channel.
|
|
||||||
Red = _red;
|
|
||||||
|
|
||||||
/// @var {Real} The value of the green color channel.
|
|
||||||
Green = _green;
|
|
||||||
|
|
||||||
/// @var {Real} The value of the blue color channel.
|
|
||||||
Blue = _blue;
|
|
||||||
|
|
||||||
/// @var {Real} The value of the alpha channel.
|
|
||||||
Alpha = _alpha;
|
|
||||||
|
|
||||||
/// @func Copy(_dest)
|
|
||||||
///
|
|
||||||
/// @desc Copies properties to another color struct.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_Color} Returns `self`.
|
|
||||||
static Copy = function (_dest) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
_dest.Red = Red;
|
|
||||||
_dest.Green = Green;
|
|
||||||
_dest.Blue = Blue;
|
|
||||||
_dest.Alpha = Alpha;
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func Clone()
|
|
||||||
///
|
|
||||||
/// @desc Creates a clone of the color struct.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_Color} The created clone.
|
|
||||||
static Clone = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _clone = new BBMOD_Color();
|
|
||||||
Copy(_clone);
|
|
||||||
return _clone;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func FromConstant(_color)
|
|
||||||
///
|
|
||||||
/// @desc Initializes the color using a color constant.
|
|
||||||
///
|
|
||||||
/// @param {Real} _color The color constant.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_Color} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @example
|
|
||||||
/// ```gml
|
|
||||||
/// var _red = new BBMOD_Color().FromConstant(c_red);
|
|
||||||
/// ```
|
|
||||||
static FromConstant = function (_color) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
Red = color_get_red(_color);
|
|
||||||
Green = color_get_green(_color);
|
|
||||||
Blue = color_get_blue(_color);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func FromRGBA(_red, _green, _blue[, _alpha])
|
|
||||||
///
|
|
||||||
/// @desc Initializes the color using RGBA.
|
|
||||||
///
|
|
||||||
/// @param {Real} _red The value of the red channel. Use values in range
|
|
||||||
/// 0..`BBMOD_RGBM_VALUE_MAX`.
|
|
||||||
/// @param {Real} _green The value of the green channel. Use values in range
|
|
||||||
/// 0..`BBMOD_RGBM_VALUE_MAX`.
|
|
||||||
/// @param {Real} _blue The value of the blue channel. Use values in range
|
|
||||||
/// 0..`BBMOD_RGBM_VALUE_MAX`.
|
|
||||||
///
|
|
||||||
/// @param {Real} [_alpha] The value of the alpha channel. Defaults to 1.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_Color} Returns `self`.
|
|
||||||
static FromRGBA = function (_red, _green, _blue, _alpha=1.0) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
Red = _red;
|
|
||||||
Green = _green;
|
|
||||||
Blue = _blue;
|
|
||||||
Alpha = _alpha;
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func FromHex(_hex)
|
|
||||||
///
|
|
||||||
/// @desc Initializes the color using `RRGGBB` hexadecimal format. Alpha
|
|
||||||
/// channel is set to 1.
|
|
||||||
///
|
|
||||||
/// @param {Real} _hex The hexadecimal color.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_Color} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @example
|
|
||||||
/// ```gml
|
|
||||||
/// new BBMOD_Color().FromHex($FF0000); // Same as FromConstant(c_red)
|
|
||||||
/// new BBMOD_Color().FromHex($00FF00); // Same as FromConstant(c_lime)
|
|
||||||
/// new BBMOD_Color().FromHex($0000FF); // Same as FromConstant(c_blue)
|
|
||||||
/// ```
|
|
||||||
static FromHex = function (_hex) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
Red = color_get_blue(_hex);
|
|
||||||
Green = color_get_green(_hex);
|
|
||||||
Blue = color_get_red(_hex);
|
|
||||||
Alpha = 1.0;
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func FromHSV(_hue, _saturation, _value)
|
|
||||||
///
|
|
||||||
/// @desc Initializes the color using HSV. Alpha channel is set to 1.
|
|
||||||
///
|
|
||||||
/// @param {Real} _hue Color hue. Use values in range 0..255.
|
|
||||||
/// @param {Real} _saturation Color saturation. Use values in range 0..255.
|
|
||||||
/// @param {Real} _value Color value. Use values in range 0..255.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_Color} Returns `self`.
|
|
||||||
static FromHSV = function (_hue, _saturation, _value) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _hsv = make_color_hsv(_hue, _saturation, _value);
|
|
||||||
Red = color_get_red(_hsv);
|
|
||||||
Green = color_get_green(_hsv);
|
|
||||||
Blue = color_get_blue(_hsv);
|
|
||||||
Alpha = 1.0;
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func Mix(_color, _factor)
|
|
||||||
///
|
|
||||||
/// @desc Mixes two colors.
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_Color} _color The other color to mix this one with.
|
|
||||||
///
|
|
||||||
/// @param {Real} _factor The mixing factor. Use values in range 0..1,
|
|
||||||
/// where 0 would result into this color, 1 would be the other color and
|
|
||||||
/// 0.5 would return a merge of both colors equally.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_Color} The new color.
|
|
||||||
static Mix = function (_color, _factor) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
return new BBMOD_Color(
|
|
||||||
lerp(Red, _color.Red, _factor),
|
|
||||||
lerp(Green, _color.Green, _factor),
|
|
||||||
lerp(Blue, _color.Blue, _factor),
|
|
||||||
lerp(Alpha, _color.Alpha, _factor));
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func ToConstant()
|
|
||||||
///
|
|
||||||
/// @desc Encodes the color into a single value, compatible with GameMaker's
|
|
||||||
/// color constants. Ignores the alpha channel.
|
|
||||||
///
|
|
||||||
/// @return {Constant.Color} The color as a single value.
|
|
||||||
///
|
|
||||||
/// @example
|
|
||||||
/// ```gml
|
|
||||||
/// var _red = new BBMOD_Color(255, 0, 0);
|
|
||||||
/// show_debug_message(_red.ToConstant() == c_red); // Prints true
|
|
||||||
/// ```
|
|
||||||
static ToConstant = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
return make_color_rgb(Red, Green, Blue);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func ToHSV([_array[, _index]])
|
|
||||||
///
|
|
||||||
/// @desc Encodes the color into HSV format, ignoring the alpha channel.
|
|
||||||
///
|
|
||||||
/// @param {Array<Real>} [_array] The array to output the values to. A new
|
|
||||||
/// one is created if not defined.
|
|
||||||
/// @param {Real} [_index] The index to start writing the values to. Defaults
|
|
||||||
/// to 0.
|
|
||||||
///
|
|
||||||
/// @return {Array<Real>} Returns the array with HSV values.
|
|
||||||
static ToHSV = function (_array, _index) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
_array = (_array != undefined) ? _array : array_create(3, 0);
|
|
||||||
_index = (_index != undefined) ? _index : 0;
|
|
||||||
var _rgb = make_color_rgb(Red, Green, Blue);
|
|
||||||
_array[@ _index] = color_get_hue(_rgb);
|
|
||||||
_array[@ _index + 1] = color_get_saturation(_rgb);
|
|
||||||
_array[@ _index + 2] = color_get_value(_rgb);
|
|
||||||
return _array;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func ToRGBM([_array[, _index]])
|
|
||||||
///
|
|
||||||
/// @desc Encodes the color into RGBM format, ignoring the alpha channel.
|
|
||||||
///
|
|
||||||
/// @param {Array<Real>} [_array] The array to output the values to. If
|
|
||||||
/// `undefined`, then a new one is created.
|
|
||||||
/// @param {Real} [_index] The index to start writing the values to.
|
|
||||||
/// Defaults to 0.
|
|
||||||
///
|
|
||||||
/// @return {Array<Real>} Returns the array with RGBM values.
|
|
||||||
static ToRGBM = function (_array=undefined, _index=0) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
_array ??= array_create(4, 0);
|
|
||||||
var _red = min(Red / BBMOD_RGBM_VALUE_MAX, 1.0);
|
|
||||||
var _green = min(Green / BBMOD_RGBM_VALUE_MAX, 1.0);
|
|
||||||
var _blue = min(Blue / BBMOD_RGBM_VALUE_MAX, 1.0);
|
|
||||||
var _alpha = clamp(max(_red, _green, _blue, 0.000001), 0.0, 1.0);
|
|
||||||
_alpha = ceil(_alpha * 255.0) / 255.0;
|
|
||||||
_array[@ _index] = _red / _alpha;
|
|
||||||
_array[@ _index + 1] = _green / _alpha;
|
|
||||||
_array[@ _index + 2] = _blue / _alpha;
|
|
||||||
_array[@ _index + 3] = _alpha;
|
|
||||||
return _array;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_Color",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Rendering",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Rendering.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,241 +0,0 @@
|
||||||
/// @enum Enumeration of cube sides, compatible with
|
|
||||||
/// [Xpanda](https://github.com/GameMakerDiscord/Xpanda)'s cubemap layout.
|
|
||||||
enum BBMOD_ECubeSide
|
|
||||||
{
|
|
||||||
/// @member Front cube side.
|
|
||||||
PosX,
|
|
||||||
/// @member Back cube side.
|
|
||||||
NegX,
|
|
||||||
/// @member Right cube side.
|
|
||||||
PosY,
|
|
||||||
/// @member Left cube side.
|
|
||||||
NegY,
|
|
||||||
/// @member Top cube side.
|
|
||||||
PosZ,
|
|
||||||
/// @member Bottom cube side.
|
|
||||||
NegZ,
|
|
||||||
/// @member Number of cube sides.
|
|
||||||
SIZE,
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func BBMOD_Cubemap(_resolution)
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_Class
|
|
||||||
///
|
|
||||||
/// @implements {BBMOD_IRenderTarget}
|
|
||||||
///
|
|
||||||
/// @desc A cubemap.
|
|
||||||
///
|
|
||||||
/// @param {Real} _resolution A resolution of single cubemap side. Must be power
|
|
||||||
/// of 2!
|
|
||||||
function BBMOD_Cubemap(_resolution)
|
|
||||||
: BBMOD_Class() constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
implement(BBMOD_IRenderTarget);
|
|
||||||
|
|
||||||
static Class_destroy = destroy;
|
|
||||||
|
|
||||||
/// @var {Array} The position of the cubemap in the world space.
|
|
||||||
/// @see BBMOD_Cubemap.get_view_matrix
|
|
||||||
Position = new BBMOD_Vec3();
|
|
||||||
|
|
||||||
/// @var {Real} Distance to the near clipping plane used in the cubemap's
|
|
||||||
/// projection matrix. Defaults to `0.1`.
|
|
||||||
/// @see BBMOD_Cubemap.get_projection_matrix
|
|
||||||
ZNear = 0.1;
|
|
||||||
|
|
||||||
/// @var {Real} Distance to the far clipping plane used in the cubemap's
|
|
||||||
/// projection matrix. Defaults to `8192`.
|
|
||||||
/// @see BBMOD_Cubemap.get_projection_matrix
|
|
||||||
ZFar = 8192.0;
|
|
||||||
|
|
||||||
/// @var {Array<Id.Surface>} An array of surfaces.
|
|
||||||
/// @readonly
|
|
||||||
Sides = array_create(BBMOD_ECubeSide.SIZE, noone);
|
|
||||||
|
|
||||||
/// @var {Id.Surface} A single surface containing all cubemap sides.
|
|
||||||
/// This can be passed as uniform to a shader for cubemapping.
|
|
||||||
/// @readonly
|
|
||||||
Surface = noone;
|
|
||||||
|
|
||||||
/// @var {Real} A resolution of single cubemap side. Must be power of two.
|
|
||||||
/// @readonly
|
|
||||||
Resolution = _resolution;
|
|
||||||
|
|
||||||
/// @var {Real} An index of a side that we are currently rendering to.
|
|
||||||
/// Contains values from {@link BBMOD_ECubeSide}.
|
|
||||||
/// @see BBMOD_Cubemap.set_target
|
|
||||||
/// @private
|
|
||||||
__renderTo = 0;
|
|
||||||
|
|
||||||
/// @func get_surface(_side)
|
|
||||||
///
|
|
||||||
/// @desc Gets a surface for given cubemap side. If the surface is corrupted,
|
|
||||||
/// then a new one is created.
|
|
||||||
///
|
|
||||||
/// @param {Real} _side The cubemap side.
|
|
||||||
///
|
|
||||||
/// @return {Id.Surface} The surface.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_ECubeSide
|
|
||||||
static get_surface = function (_side) {
|
|
||||||
var _surOld = Sides[_side];
|
|
||||||
var _sur = bbmod_surface_check(_surOld, Resolution, Resolution);
|
|
||||||
if (_sur != _surOld)
|
|
||||||
{
|
|
||||||
Sides[@ _side] = _sur;
|
|
||||||
}
|
|
||||||
return _sur;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func to_single_surface(_clearColor, _clearAlpha)
|
|
||||||
///
|
|
||||||
/// @desc Puts all faces of the cubemap into a single surface.
|
|
||||||
///
|
|
||||||
/// @param {Real} _clearColor The color to clear the target surface with
|
|
||||||
/// before the cubemap is rendered into it.
|
|
||||||
/// @param {Real} _clearAlpha The alpha to clear the targe surface with
|
|
||||||
/// before the cubemap is rendered into it.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_Cubemap.Surface
|
|
||||||
static to_single_surface = function (_clearColor, _clearAlpha) {
|
|
||||||
Surface = bbmod_surface_check(Surface, Resolution * 8, Resolution);
|
|
||||||
surface_set_target(Surface);
|
|
||||||
draw_clear_alpha(_clearColor, _clearAlpha);
|
|
||||||
var _x = 0;
|
|
||||||
var i = 0;
|
|
||||||
repeat (BBMOD_ECubeSide.SIZE)
|
|
||||||
{
|
|
||||||
draw_surface(Sides[i++], _x, 0);
|
|
||||||
_x += Resolution;
|
|
||||||
}
|
|
||||||
surface_reset_target();
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_view_matrix(_side)
|
|
||||||
///
|
|
||||||
/// @desc Creates a view matrix for given cubemap side.
|
|
||||||
///
|
|
||||||
/// @param {Real} _side The cubemap side. Use values from
|
|
||||||
/// {@link BBMOD_ECubeSide}.
|
|
||||||
///
|
|
||||||
/// @return {Array<Real>} The created view matrix.
|
|
||||||
static get_view_matrix = function (_side) {
|
|
||||||
var _negEye = Position.Scale(-1.0);
|
|
||||||
var _x, _y, _z;
|
|
||||||
|
|
||||||
switch (_side)
|
|
||||||
{
|
|
||||||
case BBMOD_ECubeSide.PosX:
|
|
||||||
_x = new BBMOD_Vec3(0.0, +1.0, 0.0);
|
|
||||||
_y = new BBMOD_Vec3(0.0, 0.0, +1.0);
|
|
||||||
_z = new BBMOD_Vec3(+1.0, 0.0, 0.0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BBMOD_ECubeSide.NegX:
|
|
||||||
_x = new BBMOD_Vec3(0.0, -1.0, 0.0);
|
|
||||||
_y = new BBMOD_Vec3(0.0, 0.0, +1.0);
|
|
||||||
_z = new BBMOD_Vec3(-1.0, 0.0, 0.0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BBMOD_ECubeSide.PosY:
|
|
||||||
_x = new BBMOD_Vec3(-1.0, 0.0, 0.0);
|
|
||||||
_y = new BBMOD_Vec3(0.0, 0.0, +1.0);
|
|
||||||
_z = new BBMOD_Vec3(0.0, +1.0, 0.0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BBMOD_ECubeSide.NegY:
|
|
||||||
_x = new BBMOD_Vec3(+1.0, 0.0, 0.0);
|
|
||||||
_y = new BBMOD_Vec3(0.0, 0.0, +1.0);
|
|
||||||
_z = new BBMOD_Vec3(0.0, -1.0, 0.0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BBMOD_ECubeSide.PosZ:
|
|
||||||
_x = new BBMOD_Vec3(0.0, +1.0, 0.0);
|
|
||||||
_y = new BBMOD_Vec3(-1.0, 0.0, 0.0);
|
|
||||||
_z = new BBMOD_Vec3(0.0, 0.0, +1.0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BBMOD_ECubeSide.NegZ:
|
|
||||||
_x = new BBMOD_Vec3(0.0, +1.0, 0.0);
|
|
||||||
_y = new BBMOD_Vec3(+1.0, 0.0, 0.0);
|
|
||||||
_z = new BBMOD_Vec3(0.0, 0.0, -1.0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
|
||||||
_x.X, _y.X, _z.X, 0.0,
|
|
||||||
_x.Y, _y.Y, _z.Y, 0.0,
|
|
||||||
_x.Z, _y.Z, _z.Z, 0.0,
|
|
||||||
_x.Dot(_negEye), _y.Dot(_negEye), _z.Dot(_negEye), 1.0
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @func get_projection_matrix()
|
|
||||||
///
|
|
||||||
/// @desc Creates a projection matrix for the cubemap.
|
|
||||||
///
|
|
||||||
/// @return {Array<Real>} The created projection matrix.
|
|
||||||
static get_projection_matrix = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
return matrix_build_projection_perspective_fov(90.0, 1.0, ZNear, ZFar);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_target()
|
|
||||||
///
|
|
||||||
/// @desc Sets next cubemap side surface as the render target and sets
|
|
||||||
/// the current view and projection matrices appropriately.
|
|
||||||
///
|
|
||||||
/// @return {Bool} Returns `true` if the render target was set or `false`
|
|
||||||
/// if all cubemap sides were iterated through.
|
|
||||||
///
|
|
||||||
/// @example
|
|
||||||
/// ```gml
|
|
||||||
/// while (cubemap.set_target())
|
|
||||||
/// {
|
|
||||||
/// draw_clear(c_black);
|
|
||||||
/// // Render to cubemap here...
|
|
||||||
/// cubemap.reset_target();
|
|
||||||
/// }
|
|
||||||
/// ```
|
|
||||||
///
|
|
||||||
/// @see BBMOD_IRenderTarget.reset_target
|
|
||||||
static set_target = function () {
|
|
||||||
var _renderTo = __renderTo++;
|
|
||||||
if (_renderTo < BBMOD_ECubeSide.SIZE)
|
|
||||||
{
|
|
||||||
surface_set_target(get_surface(_renderTo));
|
|
||||||
matrix_set(matrix_view, get_view_matrix(_renderTo));
|
|
||||||
matrix_set(matrix_projection, get_projection_matrix());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
__renderTo = 0;
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
static reset_target = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
surface_reset_target();
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
static destroy = function () {
|
|
||||||
Class_destroy();
|
|
||||||
var i = 0;
|
|
||||||
repeat (BBMOD_ECubeSide.SIZE)
|
|
||||||
{
|
|
||||||
var _surface = Sides[i++];
|
|
||||||
if (surface_exists(_surface))
|
|
||||||
{
|
|
||||||
surface_free(_surface);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (surface_exists(Surface))
|
|
||||||
{
|
|
||||||
surface_free(Surface);
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_Cubemap",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Rendering",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Rendering.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,867 +0,0 @@
|
||||||
/// @macro {Bool} Evaluates to `true` if BBMOD DLL is supported on the current
|
|
||||||
/// platform and the BBMOD dynamic library exists.
|
|
||||||
///
|
|
||||||
/// @example
|
|
||||||
/// ```gml
|
|
||||||
/// if (BBMOD_DLL_IS_SUPPORTED)
|
|
||||||
/// {
|
|
||||||
/// var _dll = new BBMOD_DLL();
|
|
||||||
/// // Use BBMOD DLL here...
|
|
||||||
/// _dll = _dll.destroy();
|
|
||||||
/// }
|
|
||||||
/// ```
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL_PATH
|
|
||||||
#macro BBMOD_DLL_IS_SUPPORTED __bbmod_dll_is_supported()
|
|
||||||
|
|
||||||
/// @macro {String} Path to the BBMOD dynamic library. Defaults to
|
|
||||||
/// "Data/BBMOD/BBMOD.dll" on Windows and "Data/BBMOD/libBBMOD.dylib" on macOS.
|
|
||||||
#macro BBMOD_DLL_PATH \
|
|
||||||
((os_type == os_windows) ? "Data/BBMOD/BBMOD.dll" : "Data/BBMOD/libBBMOD.dylib")
|
|
||||||
|
|
||||||
/// @macro {Real} A code returned from the DLL on fail, when none of
|
|
||||||
/// `BBMOD_DLL_ERR_` is applicable.
|
|
||||||
/// @private
|
|
||||||
#macro __BBMOD_DLL_FAILURE -1
|
|
||||||
|
|
||||||
/// @macro {Real} A code returned from the DLL when a model is successfully
|
|
||||||
/// converted.
|
|
||||||
/// @private
|
|
||||||
#macro __BBMOD_DLL_SUCCESS 0
|
|
||||||
|
|
||||||
/// @macro {Real} An error code returned from the DLL when model loading fails.
|
|
||||||
/// @private
|
|
||||||
#macro __BBMOD_DLL_ERR_LOAD_FAILED 1
|
|
||||||
|
|
||||||
/// @macro {Real} An error code returned from the DLL when model conversion
|
|
||||||
/// fails.
|
|
||||||
/// @private
|
|
||||||
#macro __BBMOD_DLL_ERR_CONVERSION_FAILED 2
|
|
||||||
|
|
||||||
/// @macro {Real} An error code returned from the DLL when converted model
|
|
||||||
/// is not saved.
|
|
||||||
/// @private
|
|
||||||
#macro __BBMOD_DLL_ERR_SAVE_FAILED 3
|
|
||||||
|
|
||||||
/// @func BBMOD_DLL()
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_Class
|
|
||||||
///
|
|
||||||
/// @desc Loads a dynamic library which allows you to convert models into BBMOD.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the DLL file does not exist.
|
|
||||||
///
|
|
||||||
/// @example
|
|
||||||
/// ```gml
|
|
||||||
/// var _dll = new BBMOD_DLL();
|
|
||||||
/// _dll.set_gen_normal(BBMOD_NORMALS_FLAT);
|
|
||||||
/// _dll.convert("House.fbx", "House.bbmod");
|
|
||||||
/// _dll = _dll.destroy();
|
|
||||||
/// modHouse = new BBMOD_Model("House.bbmod");
|
|
||||||
/// ```
|
|
||||||
function BBMOD_DLL()
|
|
||||||
: BBMOD_Class() constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
static Class_destroy = destroy;
|
|
||||||
|
|
||||||
/// @var {String} Path to the dynamic library.
|
|
||||||
/// @readonly
|
|
||||||
/// @obsolete This was replaced with {@link BBMOD_DLL_PATH}.
|
|
||||||
Path = BBMOD_DLL_PATH;
|
|
||||||
|
|
||||||
if (!file_exists(BBMOD_DLL_PATH))
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception("File " + BBMOD_DLL_PATH + " does not exist!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @func convert(_fin, _fout)
|
|
||||||
///
|
|
||||||
/// @desc Converts a model into a BBMOD.
|
|
||||||
///
|
|
||||||
/// @param {String} _fin Path to the original model.
|
|
||||||
/// @param {String} _fout Path to the converted model.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the model conversion fails.
|
|
||||||
static convert = function (_fin, _fout) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_convert", dll_cdecl, ty_real, 2, ty_string, ty_string);
|
|
||||||
var _retval = external_call(_fn, _fin, _fout);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_disable_bone()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether bones are disabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then bones are disabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_disable_bone
|
|
||||||
static get_disable_bone = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_disable_bone", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_disable_bone(_disable)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables bones and animations. These are by default
|
|
||||||
/// **enabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _disable `true` to disable.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_disable_bone
|
|
||||||
static set_disable_bone = function (_disable) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_disable_bone", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _disable);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_disable_color()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether vertex colors are disabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then vertex colors are disabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_disable_color
|
|
||||||
static get_disable_color = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_disable_color", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_disable_color(_disable)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables vertex colors. Vertex colors are by default
|
|
||||||
/// **disabled**. Changing this makes the model incompatible with the
|
|
||||||
/// default shaders!
|
|
||||||
///
|
|
||||||
/// @param {Bool} _disable `true` to disable.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_disable_color
|
|
||||||
static set_disable_color = function (_disable) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_disable_color", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _disable);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_disable_normal()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether vertex normals are disabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then vertex normals are disabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_disable_normal
|
|
||||||
static get_disable_normal = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_disable_normal", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_disable_normal(_disable)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables vertex normals. Vertex normals are by default
|
|
||||||
/// **enabled**. Changing this makes the model incompatible with the default
|
|
||||||
/// shaders!
|
|
||||||
///
|
|
||||||
/// @param {Bool} _disable `true` to disable.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_disable_normal
|
|
||||||
static set_disable_normal = function (_disable) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_disable_normal", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _disable);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_flip_normal()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether flipping vertex normals is enabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} Returns `true` if enabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_flip_normal
|
|
||||||
static get_flip_normal = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_flip_normal", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_flip_normal(_flip)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables flipping vertex normals. This is by default
|
|
||||||
/// **disabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _flip `true` to enable.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_flip_normal
|
|
||||||
static set_flip_normal = function (_flip) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_flip_normal", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _flip);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_gen_normal()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether generating normal vectors is enabled.
|
|
||||||
///
|
|
||||||
/// @return {Real} Returns one of the `BBMOD_NORMALS_*` macros.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_gen_normal
|
|
||||||
/// @see BBMOD_NORMALS_NONE
|
|
||||||
/// @see BBMOD_NORMALS_FLAT
|
|
||||||
/// @see BBMOD_NORMALS_SMOOTH
|
|
||||||
static get_gen_normal = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_gen_normal", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_gen_normal(_normals)
|
|
||||||
///
|
|
||||||
/// @desc Configures generating normal vectors. This is by default
|
|
||||||
/// set to {@link BBMOD_NORMALS_SMOOTH}. Vertex normals are required
|
|
||||||
/// by the default shaders!
|
|
||||||
///
|
|
||||||
/// @param {Real} _normals Use one of the `BBMOD_NORMALS_*` macros.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_gen_normal
|
|
||||||
/// @see BBMOD_NORMALS_NONE
|
|
||||||
/// @see BBMOD_NORMALS_FLAT
|
|
||||||
/// @see BBMOD_NORMALS_SMOOTH
|
|
||||||
static set_gen_normal = function (_normals) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_gen_normal", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _normals);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_disable_tangent()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether tangent and bitangent vectors are disabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then tangent and bitangent vectors are disabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_disable_tangent
|
|
||||||
static get_disable_tangent = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_disable_tangent", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_disable_tangent(_disable)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables tangent and bitangent vectors. These are by
|
|
||||||
/// default **enabled**. Changing this makes the model incompatible with
|
|
||||||
/// the default shaders!
|
|
||||||
///
|
|
||||||
/// @param {Bool} _disable `true` to disable tangent and bitangent vectors.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_disable_tangent
|
|
||||||
static set_disable_tangent = function (_disable) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_disable_tangent", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _disable);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_disable_uv()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether texture coordinates are disabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then texture coordinates are disabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_disable_uv
|
|
||||||
static get_disable_uv = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_disable_uv", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_disable_uv(_disable)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables texture coordinates. Texture coordinates
|
|
||||||
/// are by default **enabled**. Changing this makes the model incompatible
|
|
||||||
/// with the default shaders!
|
|
||||||
///
|
|
||||||
/// @param {Bool} _disable `true` to disable texture coordinates.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_disable_uv
|
|
||||||
static set_disable_uv = function (_disable) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_disable_uv", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _disable);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_disable_uv2()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether second UV channel is disabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then second UV channel is disabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_disable_uv2
|
|
||||||
static get_disable_uv2 = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_disable_uv2", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_disable_uv2(_disable)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables second UV channel. Second UV channel is by
|
|
||||||
/// default **disabled**. Changing this makes the model incompatible
|
|
||||||
/// with the default shaders!
|
|
||||||
///
|
|
||||||
/// @param {Bool} _disable `true` to disable second UV channel.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_disable_uv2
|
|
||||||
static set_disable_uv2 = function (_disable) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_disable_uv2", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _disable);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_flip_uv_horizontally()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether flipping texture coordinates horizontally is
|
|
||||||
/// enabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} Returns `true` if enabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_flip_uv_horizontally
|
|
||||||
static get_flip_uv_horizontally = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_flip_uv_horizontally", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_flip_uv_horizontally(_flip)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables flipping texture coordinates horizontally. This
|
|
||||||
/// is by default **disabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _flip `true` to enable.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_flip_uv_horizontally
|
|
||||||
static set_flip_uv_horizontally = function (_flip) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_flip_uv_horizontally", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _flip);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_flip_uv_vertically()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether flipping texture coordinates vertically is enabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} Returns `true` if enabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_flip_uv_vertically
|
|
||||||
static get_flip_uv_vertically = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_flip_uv_vertically", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_flip_uv_vertically(_flip)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables flipping texture coordinates vertically. This is
|
|
||||||
/// by default **enabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _flip `true` to enable.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_flip_uv_vertically
|
|
||||||
static set_flip_uv_vertically = function (_flip) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_flip_uv_vertically", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _flip);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_invert_winding()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether inverse vertex winding is enabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then inverse vertex winding is enabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_invert_winding
|
|
||||||
static get_invert_winding = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_invert_winding", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_invert_winding(_invert)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables inverse vertex winding. This is by default
|
|
||||||
/// **disabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _invert `true` to invert winding.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_invert_winding
|
|
||||||
static set_invert_winding = function (_invert) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_invert_winding", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _invert);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_left_handed()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether conversion to left-handed coordinate system is
|
|
||||||
/// enabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then conversion to left-handed coordinate
|
|
||||||
/// system is enabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_left_handed
|
|
||||||
static get_left_handed = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_left_handed", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_left_handed(_leftHanded)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables conversion to left-handed coordinate system.
|
|
||||||
/// This is by default **enabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _leftHanded `true` to enable conversion to left-handed
|
|
||||||
/// coordinate system.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_left_handed
|
|
||||||
static set_left_handed = function (_leftHanded) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_left_handed", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _leftHanded);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_optimize_nodes()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether node optimization is enabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then node optimization is enabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_optimize_nodes
|
|
||||||
static get_optimize_nodes = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_optimize_nodes", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_optimize_nodes(_optimize)
|
|
||||||
///
|
|
||||||
/// @desc Enable/disable node optimization. When enabled, multiple
|
|
||||||
/// nodes (without bones, animations, ...) are joined into one.
|
|
||||||
/// This is by default **enabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _optimize `true` to enable node optimization.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_optimize_nodes
|
|
||||||
static set_optimize_nodes = function (_optimize) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_optimize_nodes", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _optimize);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_optimize_meshes()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether mesh optimization is enabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then mesh optimization is enabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_optimize_meshes
|
|
||||||
static get_optimize_meshes = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_optimize_meshes", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_optimize_meshes(_optimize)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables mesh optimization. When enabled, multiple meshes
|
|
||||||
/// with the same material are joined into one to reduce draw calls. This is
|
|
||||||
/// by default **enabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _optimize `true` to enable mesh optimization.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_optimize_meshes
|
|
||||||
static set_optimize_meshes = function (_optimize) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_optimize_meshes", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _optimize);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_optimize_materials()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether material optimization is enabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then material optimization is enabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_optimize_materials
|
|
||||||
static get_optimize_materials = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_optimize_materials", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_optimize_materials(_optimize)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables material optimization. When enabled, redundant
|
|
||||||
/// materials are joined into one and unused materials are removed.
|
|
||||||
/// This is by default **enabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _optimize `true` to enable material optimization.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_optimize_materials
|
|
||||||
static set_optimize_materials = function (_optimize) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_optimize_materials", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _optimize);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_apply_scale()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether the "apply scale" option is enabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then the "apply scale" option is enabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_apply_scale
|
|
||||||
static get_apply_scale = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_apply_scale", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_apply_scale(_enable)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables the "apply scale" option, which applies global
|
|
||||||
/// scaling factor defined in the model file if enabled.
|
|
||||||
/// This is by default **disabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _enable `true` to enable the option.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_apply_scale
|
|
||||||
static set_apply_scale = function (_enable) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_apply_scale", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _enable);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_pre_transform()
|
|
||||||
///
|
|
||||||
/// @desc Checks whether the "pre-transform" option is enabled.
|
|
||||||
///
|
|
||||||
/// @return {Bool} If `true` then the "pre-transform" option is enabled.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_pre_transform
|
|
||||||
static get_pre_transform = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_pre_transform", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_pre_transform(_enable)
|
|
||||||
///
|
|
||||||
/// @desc Enables/disables the "pre-transform" option, which pre-transforms
|
|
||||||
/// the models and collapses all nodes into one if possible.
|
|
||||||
/// This is by default **disabled**.
|
|
||||||
///
|
|
||||||
/// @param {Bool} _enable `true` to enable the option.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_pre_transform
|
|
||||||
static set_pre_transform = function (_enable) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_apply_scale", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, _enable);
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_optimize_animations()
|
|
||||||
///
|
|
||||||
/// @desc Retrieves the animation optimization level.
|
|
||||||
///
|
|
||||||
/// @return {Real} The animation optimization level. See section
|
|
||||||
/// [Animation optimization levels](./AnimationOptimizationLevels.html) for
|
|
||||||
/// more info.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_optimize_animations
|
|
||||||
static get_optimize_animations = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_optimize_animations", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_optimize_animations(_level)
|
|
||||||
///
|
|
||||||
/// @desc Sets the animation optimization level.
|
|
||||||
/// This is by default set to **0**.
|
|
||||||
///
|
|
||||||
/// @param {Real} _level The new animation optimization level. See section
|
|
||||||
/// [Animation optimization levels](./AnimationOptimizationLevels.html) for
|
|
||||||
/// more info.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_optimize_animations
|
|
||||||
static set_optimize_animations = function (_level) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_optimize_animations", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, clamp(_level, 0, 2));
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func get_sampling_rate()
|
|
||||||
///
|
|
||||||
/// @desc Retrieves the animation samping rate (frames per second).
|
|
||||||
///
|
|
||||||
/// @return {Real} The animation sampling rate.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.set_sampling_rate
|
|
||||||
static get_sampling_rate = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_get_sampling_rate", dll_cdecl, ty_real, 0);
|
|
||||||
return external_call(_fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_sampling_rate(_fps)
|
|
||||||
///
|
|
||||||
/// @desc Sets the animation sampling rate (frames per second).
|
|
||||||
/// This is by default set to **60**.
|
|
||||||
///
|
|
||||||
/// @param {Real} _fps The new animation sampling rate.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DLL} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @throws {BBMOD_Exception} If the operation fails.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DLL.get_sampling_rate
|
|
||||||
static set_sampling_rate = function (_fps) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _fn = external_define(
|
|
||||||
BBMOD_DLL_PATH, "bbmod_dll_set_sampling_rate", dll_cdecl, ty_real, 1, ty_real);
|
|
||||||
var _retval = external_call(_fn, max(floor(_fps), 1));
|
|
||||||
if (_retval != __BBMOD_DLL_SUCCESS)
|
|
||||||
{
|
|
||||||
throw new BBMOD_Exception();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
static destroy = function () {
|
|
||||||
Class_destroy();
|
|
||||||
// This is basically a singleton, so we shouldn't call free!
|
|
||||||
//external_free(BBMOD_DLL_PATH);
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @func __bbmod_dll_is_supported()
|
|
||||||
///
|
|
||||||
/// @return {Bool}
|
|
||||||
///
|
|
||||||
/// @private
|
|
||||||
function __bbmod_dll_is_supported()
|
|
||||||
{
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
static _isSupported = ((os_type == os_windows || os_type == os_macosx)
|
|
||||||
&& file_exists(BBMOD_DLL_PATH));
|
|
||||||
return _isSupported;
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
/// @func BBMOD_DefaultLightmapMaterial([_shader])
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_DefaultMaterial
|
|
||||||
///
|
|
||||||
/// @desc A material that can be used when rendering lightmapped models with
|
|
||||||
/// two UV channels.
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_LightmapShader} [_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_LightmapShader
|
|
||||||
function BBMOD_DefaultLightmapMaterial(_shader=undefined)
|
|
||||||
: BBMOD_DefaultMaterial(_shader) constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
static DefaultMaterial_copy = copy;
|
|
||||||
|
|
||||||
/// @var {Pointer.Texture} A texture with RGBM encoded lightmap. Overrides
|
|
||||||
/// the default lightmap texture defined with {@link bbmod_lightmap_set}.
|
|
||||||
Lightmap = undefined;
|
|
||||||
|
|
||||||
static copy = function (_dest) {
|
|
||||||
DefaultMaterial_copy(_dest);
|
|
||||||
_dest.Lightmap = Lightmap;
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
static clone = function () {
|
|
||||||
var _clone = new BBMOD_DefaultLightmapMaterial();
|
|
||||||
copy(_clone);
|
|
||||||
return _clone;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_DefaultLightmapMaterial",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "DefaultRenderer",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/DefaultRenderer.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,223 +0,0 @@
|
||||||
/// @func BBMOD_DefaultLightmapShader(_shader, _vertexFormat)
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_DefaultShader
|
|
||||||
///
|
|
||||||
/// @desc Shader used by lightmapped materials.
|
|
||||||
///
|
|
||||||
/// @param {Asset.GMShader} _shader The shader resource.
|
|
||||||
/// @param {Struct.BBMOD_VertexFormat} _vertexFormat The vertex format required
|
|
||||||
/// by the shader.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_LightmapMaterial
|
|
||||||
function BBMOD_DefaultLightmapShader(_shader, _vertexFormat)
|
|
||||||
: BBMOD_DefaultShader(_shader, _vertexFormat) constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
static DefaultShader_on_set = on_set;
|
|
||||||
static DefaultShader_set_material = set_material;
|
|
||||||
|
|
||||||
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
|
|
||||||
&& _ibl.AffectLightmaps)
|
|
||||||
{
|
|
||||||
_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;
|
|
||||||
};
|
|
||||||
|
|
||||||
static set_ambient_light = function (_up=undefined, _down=undefined) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _shaderCurrent = shader_current();
|
|
||||||
var _uLightAmbientUp = shader_get_uniform(_shaderCurrent, "bbmod_LightAmbientUp");
|
|
||||||
var _uLightAmbientDown = shader_get_uniform(_shaderCurrent, "bbmod_LightAmbientDown");
|
|
||||||
if (global.__bbmodAmbientAffectLightmap)
|
|
||||||
{
|
|
||||||
_up ??= global.__bbmodAmbientLightUp;
|
|
||||||
_down ??= global.__bbmodAmbientLightDown;
|
|
||||||
shader_set_uniform_f(_uLightAmbientUp,
|
|
||||||
_up.Red / 255.0, _up.Green / 255.0, _up.Blue / 255.0, _up.Alpha);
|
|
||||||
shader_set_uniform_f(_uLightAmbientDown,
|
|
||||||
_down.Red / 255.0, _down.Green / 255.0, _down.Blue / 255.0, _down.Alpha);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
shader_set_uniform_f(_uLightAmbientUp, 0.0, 0.0, 0.0, 0.0);
|
|
||||||
shader_set_uniform_f(_uLightAmbientDown, 0.0, 0.0, 0.0, 0.0);
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
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
|
|
||||||
&& _light.AffectLightmaps)
|
|
||||||
{
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
|
|
||||||
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.AffectLightmaps)
|
|
||||||
{
|
|
||||||
_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_lightmap(_texture)
|
|
||||||
///
|
|
||||||
/// @desc Sets the `bbmod_Lightmap` uniform.
|
|
||||||
///
|
|
||||||
/// @param {Pointer.Texture} [_texture] The new RGBM encoded lightmap
|
|
||||||
/// texture. If not specified, defaults to the one configured using
|
|
||||||
/// {@link bbmod_lightmap_set}.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DefaultLightmapShader} Returns `self`.
|
|
||||||
static set_lightmap = function (_texture=global.__bbmodLightmap) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _uLightmap = shader_get_sampler_index(shader_current(), "bbmod_Lightmap");
|
|
||||||
texture_set_stage(_uLightmap, _texture);
|
|
||||||
gpu_set_tex_mip_enable_ext(_uLightmap, mip_off);
|
|
||||||
gpu_set_tex_filter_ext(_uLightmap, true);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
static on_set = function () {
|
|
||||||
DefaultShader_on_set();
|
|
||||||
set_lightmap();
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
static set_material = function (_material) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
DefaultShader_set_material(_material);
|
|
||||||
if (_material.Lightmap != undefined)
|
|
||||||
{
|
|
||||||
set_lightmap(_material.Lightmap);
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @var {Pointer.Texture}
|
|
||||||
/// @private
|
|
||||||
global.__bbmodLightmap = sprite_get_texture(BBMOD_SprBlack, 0);
|
|
||||||
|
|
||||||
/// @func bbmod_lightmap_get()
|
|
||||||
///
|
|
||||||
/// @desc Retrieves the default lightmap texture used by all lightmapped
|
|
||||||
/// materials.
|
|
||||||
///
|
|
||||||
/// @return {Pointer.Texture} The default RGBM encoded lightmap texture.
|
|
||||||
function bbmod_lightmap_get()
|
|
||||||
{
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
return global.__bbmodLightmap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @func bbmod_lightmap_set(_texture)
|
|
||||||
///
|
|
||||||
/// @desc Changes the default lightmap texture used by all lightmapped
|
|
||||||
/// materials.
|
|
||||||
///
|
|
||||||
/// @param {Pointer.Texture} _texture The new default RGBM encoded lightmap
|
|
||||||
/// texture.
|
|
||||||
function bbmod_lightmap_set(_texture)
|
|
||||||
{
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
global.__bbmodLightmap = _texture;
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_DefaultLightmapShader",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "DefaultRenderer",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/DefaultRenderer.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,455 +0,0 @@
|
||||||
/// @func BBMOD_DefaultMaterial([_shader])
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_BaseMaterial
|
|
||||||
///
|
|
||||||
/// @desc A material that can be used when rendering models.
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_DefaultShader} [_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_DefaultShader
|
|
||||||
function BBMOD_DefaultMaterial(_shader=undefined)
|
|
||||||
: BBMOD_BaseMaterial(_shader) constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
static BaseMaterial_copy = copy;
|
|
||||||
static BaseMaterial_from_json = from_json;
|
|
||||||
static BaseMaterial_destroy = destroy;
|
|
||||||
|
|
||||||
/// @var {Pointer.Texture} A texture with tangent-space normals in the RGB
|
|
||||||
/// channels and smoothness in the alpha channel or `undefined`.
|
|
||||||
NormalSmoothness = sprite_get_texture(BBMOD_SprDefaultNormalW, 0);
|
|
||||||
|
|
||||||
__normalSmoothnessSprite = undefined;
|
|
||||||
|
|
||||||
/// @var {Pointer.Texture} A texture specular color in the RGB channels
|
|
||||||
/// or `undefined`.
|
|
||||||
SpecularColor = sprite_get_texture(BBMOD_SprDefaultSpecularColor, 0);
|
|
||||||
|
|
||||||
__specularColorSprite = undefined;
|
|
||||||
|
|
||||||
/// @var {Pointer.Texture} A texture with tangent-space normals in the RGB
|
|
||||||
/// channels and roughness in the alpha channel or `undefined`.
|
|
||||||
NormalRoughness = undefined;
|
|
||||||
|
|
||||||
__normalRoughnessSprite = undefined;
|
|
||||||
|
|
||||||
/// @var {Pointer.Texture} A texture with metallic in the red channel and
|
|
||||||
/// ambient occlusion in the green channel or `undefined`.
|
|
||||||
MetallicAO = undefined;
|
|
||||||
|
|
||||||
__metallicAOSprite = undefined;
|
|
||||||
|
|
||||||
/// @var {Pointer.Texture} A texture with subsurface color in the RGB
|
|
||||||
/// channels and subsurface effect intensity in the alpha channel.
|
|
||||||
Subsurface = sprite_get_texture(BBMOD_SprBlack, 0);
|
|
||||||
|
|
||||||
__subsurfaceSprite = undefined;
|
|
||||||
|
|
||||||
/// @var {Pointer.Texture} RGBM encoded emissive texture.
|
|
||||||
Emissive = sprite_get_texture(BBMOD_SprBlack, 0);
|
|
||||||
|
|
||||||
__emissiveSprite = undefined;
|
|
||||||
|
|
||||||
// TODO: Add to_json
|
|
||||||
|
|
||||||
static from_json = function (_json) {
|
|
||||||
BaseMaterial_from_json(_json);
|
|
||||||
|
|
||||||
if (variable_struct_exists(_json, "NormalSmoothness"))
|
|
||||||
{
|
|
||||||
if (__normalSmoothnessSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__normalSmoothnessSprite);
|
|
||||||
__normalSmoothnessSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
NormalSmoothness = _json.NormalSmoothness;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (variable_struct_exists(_json, "SpecularColor"))
|
|
||||||
{
|
|
||||||
if (__specularColorSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__specularColorSprite);
|
|
||||||
__specularColorSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
SpecularColor = _json.SpecularColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (variable_struct_exists(_json, "NormalRoughness"))
|
|
||||||
{
|
|
||||||
if (__normalRoughnessSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__normalRoughnessSprite);
|
|
||||||
__normalRoughnessSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
NormalRoughness = _json.NormalRoughness;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (variable_struct_exists(_json, "MetallicAO"))
|
|
||||||
{
|
|
||||||
if (__metallicAOSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__metallicAOSprite);
|
|
||||||
__metallicAOSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
MetallicAO = _json.MetallicAO;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (variable_struct_exists(_json, "Subsurface"))
|
|
||||||
{
|
|
||||||
if (__subsurfaceSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__subsurfaceSprite);
|
|
||||||
__subsurfaceSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
Subsurface = _json.Subsurface;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (variable_struct_exists(_json, "Emissive"))
|
|
||||||
{
|
|
||||||
if (__emissiveSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__emissiveSprite);
|
|
||||||
__emissiveSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
Emissive = _json.Emissive;
|
|
||||||
}
|
|
||||||
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_normal_smoothness(_normal, _smoothness)
|
|
||||||
///
|
|
||||||
/// @desc Changes the normal vector and smoothness to a uniform value for
|
|
||||||
/// the entire material.
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_Vec3} _normal The new normal vector. If you are not
|
|
||||||
/// sure what this value should be, use {@link BBMOD_VEC3_UP}.
|
|
||||||
/// @param {Real} _smoothness The new smoothness. Use values in range 0..1.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DefaultMaterial} Returns `self`.
|
|
||||||
static set_normal_smoothness = function (_normal, _smoothness) {
|
|
||||||
NormalRoughness = undefined;
|
|
||||||
if (__normalRoughnessSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__normalRoughnessSprite);
|
|
||||||
__normalRoughnessSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__normalSmoothnessSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__normalSmoothnessSprite);
|
|
||||||
}
|
|
||||||
_normal = _normal.Normalize();
|
|
||||||
__normalSmoothnessSprite = _make_sprite(
|
|
||||||
(_normal.X * 0.5 + 0.5) * 255.0,
|
|
||||||
(_normal.Y * 0.5 + 0.5) * 255.0,
|
|
||||||
(_normal.Z * 0.5 + 0.5) * 255.0,
|
|
||||||
_smoothness
|
|
||||||
);
|
|
||||||
NormalSmoothness = sprite_get_texture(__normalSmoothnessSprite, 0);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_specular_color(_color)
|
|
||||||
///
|
|
||||||
/// @desc Changes the specular color to a uniform value for the entire
|
|
||||||
/// material.
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_Color} _color The new specular color.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DefaultMaterial} Returns `self`.
|
|
||||||
static set_specular_color = function (_color) {
|
|
||||||
MetallicAO = undefined;
|
|
||||||
if (__metallicAOSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__metallicAOSprite);
|
|
||||||
__metallicAOSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__specularColorSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__specularColorSprite);
|
|
||||||
}
|
|
||||||
__specularColorSprite = _make_sprite(
|
|
||||||
_color.Red,
|
|
||||||
_color.Green,
|
|
||||||
_color.Blue,
|
|
||||||
1.0
|
|
||||||
);
|
|
||||||
SpecularColor = sprite_get_texture(__specularColorSprite, 0);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_normal_roughness(_normal, _roughness)
|
|
||||||
///
|
|
||||||
/// @desc Changes the normal vector and roughness to a uniform value for the
|
|
||||||
/// entire material.
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_Vec3} _normal The new normal vector. If you are not
|
|
||||||
/// sure what this value should be, use {@link BBMOD_VEC3_UP}.
|
|
||||||
/// @param {Real} _roughness The new roughness. Use values in range 0..1.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_PBRMaterial} Returns `self`.
|
|
||||||
static set_normal_roughness = function (_normal, _roughness) {
|
|
||||||
NormalSmoothness = undefined;
|
|
||||||
if (__normalSmoothnessSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__normalSmoothnessSprite);
|
|
||||||
__normalSmoothnessSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__normalRoughnessSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__normalRoughnessSprite);
|
|
||||||
}
|
|
||||||
_normal = _normal.Normalize();
|
|
||||||
__normalRoughnessSprite = _make_sprite(
|
|
||||||
(_normal.X * 0.5 + 0.5) * 255.0,
|
|
||||||
(_normal.Y * 0.5 + 0.5) * 255.0,
|
|
||||||
(_normal.Z * 0.5 + 0.5) * 255.0,
|
|
||||||
_roughness
|
|
||||||
);
|
|
||||||
NormalRoughness = sprite_get_texture(__normalRoughnessSprite, 0);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_metallic_ao(_metallic, _ao)
|
|
||||||
///
|
|
||||||
/// @desc Changes the metalness and ambient occlusion to a uniform value for
|
|
||||||
/// the entire material.
|
|
||||||
///
|
|
||||||
/// @param {Real} _metallic The new metalness. You can use any value in range
|
|
||||||
/// 0..1, but in general this is usually either 0 for dielectric materials
|
|
||||||
/// and 1 for metals.
|
|
||||||
/// @param {Real} _ao The new ambient occlusion value. Use values in range
|
|
||||||
/// 0..1, where 0 means full occlusion and 1 means no occlusion.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_PBRMaterial} Returns `self`.
|
|
||||||
static set_metallic_ao = function (_metallic, _ao) {
|
|
||||||
SpecularColor = undefined;
|
|
||||||
if (__specularColorSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__specularColorSprite);
|
|
||||||
__specularColorSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__metallicAOSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__metallicAOSprite);
|
|
||||||
}
|
|
||||||
__metallicAOSprite = _make_sprite(
|
|
||||||
_metallic * 255.0,
|
|
||||||
_ao * 255.0,
|
|
||||||
0.0,
|
|
||||||
0.0
|
|
||||||
);
|
|
||||||
MetallicAO = sprite_get_texture(__metallicAOSprite, 0);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_subsurface(_color, _intensity)
|
|
||||||
///
|
|
||||||
/// @desc Changes the subsurface color to a uniform value for the entire
|
|
||||||
/// material.
|
|
||||||
///
|
|
||||||
/// @param {Real} _color The new subsurface color.
|
|
||||||
/// @param {Real} _intensity The subsurface color intensity. Use values in
|
|
||||||
/// range 0..1. The higher the value, the more visible the effect is.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_PBRMaterial} Returns `self`.
|
|
||||||
static set_subsurface = function (_color, _intensity) {
|
|
||||||
if (__subsurfaceSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__subsurfaceSprite);
|
|
||||||
}
|
|
||||||
__subsurfaceSprite = _make_sprite(
|
|
||||||
color_get_red(_color),
|
|
||||||
color_get_green(_color),
|
|
||||||
color_get_blue(_color),
|
|
||||||
_intensity
|
|
||||||
);
|
|
||||||
Subsurface = sprite_get_texture(__subsurfaceSprite, 0);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_emissive(_color)
|
|
||||||
///
|
|
||||||
/// @desc Changes the emissive color to a uniform value for the entire
|
|
||||||
/// material.
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_Color} _color The new emissive color.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_PBRMaterial} Returns `self`.
|
|
||||||
static set_emissive = function () {
|
|
||||||
var _color = (argument_count == 3)
|
|
||||||
? new BBMOD_Color(argument[0], argument[1], argument[2])
|
|
||||||
: argument[0];
|
|
||||||
var _rgbm = _color.ToRGBM();
|
|
||||||
if (__emissiveSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__emissiveSprite);
|
|
||||||
}
|
|
||||||
__emissiveSprite = _make_sprite(
|
|
||||||
_rgbm[0] * 255.0,
|
|
||||||
_rgbm[1] * 255.0,
|
|
||||||
_rgbm[2] * 255.0,
|
|
||||||
_rgbm[3]
|
|
||||||
);
|
|
||||||
Emissive = sprite_get_texture(__emissiveSprite, 0);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
static copy = function (_dest) {
|
|
||||||
BaseMaterial_copy(_dest);
|
|
||||||
|
|
||||||
// NormalSmoothness
|
|
||||||
if (_dest.__normalSmoothnessSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(_dest.__normalSmoothnessSprite);
|
|
||||||
_dest.__normalSmoothnessSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__normalSmoothnessSprite != undefined)
|
|
||||||
{
|
|
||||||
_dest.__normalSmoothnessSprite = sprite_duplicate(__normalSmoothnessSprite);
|
|
||||||
_dest.NormalSmoothness = sprite_get_texture(_dest.__normalSmoothnessSprite, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_dest.NormalSmoothness = NormalSmoothness;
|
|
||||||
}
|
|
||||||
|
|
||||||
// SpecularColor
|
|
||||||
if (_dest.__specularColorSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(_dest.__specularColorSprite);
|
|
||||||
_dest.__specularColorSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__specularColorSprite != undefined)
|
|
||||||
{
|
|
||||||
_dest.__specularColorSprite = sprite_duplicate(__specularColorSprite);
|
|
||||||
_dest.SpecularColor = sprite_get_texture(_dest.__specularColorSprite, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_dest.SpecularColor = SpecularColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
// NormalRoughness
|
|
||||||
if (_dest.__normalRoughnessSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(_dest.__normalRoughnessSprite);
|
|
||||||
_dest.__normalRoughnessSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__normalRoughnessSprite != undefined)
|
|
||||||
{
|
|
||||||
_dest.__normalRoughnessSprite = sprite_duplicate(__normalRoughnessSprite);
|
|
||||||
_dest.NormalRoughness = sprite_get_texture(_dest.__normalRoughnessSprite, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_dest.NormalRoughness = NormalRoughness;
|
|
||||||
}
|
|
||||||
|
|
||||||
// MetallicAO
|
|
||||||
if (_dest.__metallicAOSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(_dest.__metallicAOSprite);
|
|
||||||
_dest.__metallicAOSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__metallicAOSprite != undefined)
|
|
||||||
{
|
|
||||||
_dest.__metallicAOSprite = sprite_duplicate(__metallicAOSprite);
|
|
||||||
_dest.MetallicAO = sprite_get_texture(_dest.__metallicAOSprite, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_dest.MetallicAO = MetallicAO;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Subsurface
|
|
||||||
if (_dest.__subsurfaceSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(_dest.__subsurfaceSprite);
|
|
||||||
_dest.__subsurfaceSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__subsurfaceSprite != undefined)
|
|
||||||
{
|
|
||||||
_dest.__subsurfaceSprite = sprite_duplicate(__subsurfaceSprite);
|
|
||||||
_dest.Subsurface = sprite_get_texture(_dest.__subsurfaceSprite, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_dest.Subsurface = Subsurface;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Emissive
|
|
||||||
if (_dest.__emissiveSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(_dest.__emissiveSprite);
|
|
||||||
_dest.__emissiveSprite = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (__emissiveSprite != undefined)
|
|
||||||
{
|
|
||||||
_dest.__emissiveSprite = sprite_duplicate(__emissiveSprite);
|
|
||||||
_dest.Emissive = sprite_get_texture(_dest.__emissiveSprite, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_dest.Emissive = Emissive;
|
|
||||||
}
|
|
||||||
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
static clone = function () {
|
|
||||||
var _clone = new BBMOD_DefaultMaterial();
|
|
||||||
copy(_clone);
|
|
||||||
return _clone;
|
|
||||||
};
|
|
||||||
|
|
||||||
static destroy = function () {
|
|
||||||
BaseMaterial_destroy();
|
|
||||||
if (__normalSmoothnessSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__normalSmoothnessSprite);
|
|
||||||
}
|
|
||||||
if (__specularColorSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__specularColorSprite);
|
|
||||||
}
|
|
||||||
if (__normalRoughnessSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__normalRoughnessSprite);
|
|
||||||
}
|
|
||||||
if (__metallicAOSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__metallicAOSprite);
|
|
||||||
}
|
|
||||||
if (__subsurfaceSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__subsurfaceSprite);
|
|
||||||
}
|
|
||||||
if (__emissiveSprite != undefined)
|
|
||||||
{
|
|
||||||
sprite_delete(__emissiveSprite);
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_DefaultMaterial",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "DefaultRenderer",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/DefaultRenderer.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,239 +0,0 @@
|
||||||
/// @func BBMOD_DefaultRenderer()
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_BaseRenderer
|
|
||||||
///
|
|
||||||
/// @desc The default renderer.
|
|
||||||
///
|
|
||||||
/// @example
|
|
||||||
/// Following code is a typical use of the renderer.
|
|
||||||
/// ```gml
|
|
||||||
/// // Create event
|
|
||||||
/// renderer = new BBMOD_DefaultRenderer()
|
|
||||||
/// .add(OCharacter)
|
|
||||||
/// .add(OTree)
|
|
||||||
/// .add(OTerrain)
|
|
||||||
/// .add(OSky);
|
|
||||||
/// renderer.UseAppSurface = true;
|
|
||||||
/// renderer.EnableShadows = true;
|
|
||||||
///
|
|
||||||
/// camera = new BBMOD_Camera();
|
|
||||||
/// camera.FollowObject = OPlayer;
|
|
||||||
///
|
|
||||||
/// // Step event
|
|
||||||
/// camera.set_mouselook(true);
|
|
||||||
/// camera.update(delta_time);
|
|
||||||
/// renderer.update(delta_time);
|
|
||||||
///
|
|
||||||
/// // Draw event
|
|
||||||
/// camera.apply();
|
|
||||||
/// renderer.render();
|
|
||||||
///
|
|
||||||
/// // Post-Draw event
|
|
||||||
/// renderer.present();
|
|
||||||
///
|
|
||||||
/// // Clean Up event
|
|
||||||
/// renderer = renderer.destroy();
|
|
||||||
/// ```
|
|
||||||
///
|
|
||||||
/// @see BBMOD_IRenderable
|
|
||||||
/// @see BBMOD_Camera
|
|
||||||
function BBMOD_DefaultRenderer()
|
|
||||||
: BBMOD_BaseRenderer() constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
static BaseRenderer_destroy = destroy;
|
|
||||||
|
|
||||||
/// @var {Bool} Enables rendering scene depth into a depth buffer during the
|
|
||||||
/// {@link BBMOD_ERenderPass.DepthOnly} render pass pass. Defaults to `false`.
|
|
||||||
EnableGBuffer = false;
|
|
||||||
|
|
||||||
/// @var {Real} Resolution multiplier for the depth buffer surface. Defaults
|
|
||||||
/// to 1.
|
|
||||||
GBufferScale = 1.0;
|
|
||||||
|
|
||||||
/// @var {Id.Surface} The G-buffer surface.
|
|
||||||
/// @private
|
|
||||||
__surDepthBuffer = noone;
|
|
||||||
|
|
||||||
/// @var {Bool} Enables screen-space ambient occlusion. This requires
|
|
||||||
/// the depth buffer. Defaults to `false`. Enabling this requires the
|
|
||||||
/// [SSAO submodule](./SSAOSubmodule.html)!
|
|
||||||
/// @see BBMOD_DefaultRenderer.EnableGBuffer
|
|
||||||
EnableSSAO = false;
|
|
||||||
|
|
||||||
/// @var {Id.Surface} The SSAO surface.
|
|
||||||
/// @private
|
|
||||||
__surSSAO = noone;
|
|
||||||
|
|
||||||
/// @var {Id.Surface} Surface used for blurring SSAO.
|
|
||||||
/// @private
|
|
||||||
__surWork = noone;
|
|
||||||
|
|
||||||
/// @var {Real} Resolution multiplier for SSAO surface. Defaults to 1.
|
|
||||||
SSAOScale = 1.0;
|
|
||||||
|
|
||||||
/// @var {Real} Screen-space radius of SSAO. Default value is 16.
|
|
||||||
SSAORadius = 16.0;
|
|
||||||
|
|
||||||
/// @var {Real} Strength of the SSAO effect. Should be greater than 0.
|
|
||||||
/// Default value is 1.
|
|
||||||
SSAOPower = 1.0;
|
|
||||||
|
|
||||||
/// @var {Real} SSAO angle bias in radians. Default value is 0.03.
|
|
||||||
SSAOAngleBias = 0.03;
|
|
||||||
|
|
||||||
/// @var {Real} Maximum depth difference of SSAO samples. Samples farther
|
|
||||||
/// away from the origin than this will not contribute to the effect.
|
|
||||||
/// Default value is 10.
|
|
||||||
SSAODepthRange = 10.0;
|
|
||||||
|
|
||||||
/// @var {Real} Defaults to 0.01. Increase to fix self-occlusion.
|
|
||||||
SSAOSelfOcclusionBias = 0.01;
|
|
||||||
|
|
||||||
/// @var {Real} Maximum depth difference over which can be SSAO samples
|
|
||||||
/// blurred. Defaults to 2.
|
|
||||||
SSAOBlurDepthRange = 2.0;
|
|
||||||
|
|
||||||
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 _renderWidth = get_render_width();
|
|
||||||
var _renderHeight = get_render_height();
|
|
||||||
|
|
||||||
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();
|
|
||||||
|
|
||||||
bbmod_shader_set_global_f("bbmod_ZFar", bbmod_camera_get_zfar());
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// G-buffer pass
|
|
||||||
//
|
|
||||||
if (EnableGBuffer)
|
|
||||||
{
|
|
||||||
var _width = _renderWidth * GBufferScale;
|
|
||||||
var _height = _renderHeight * GBufferScale;
|
|
||||||
|
|
||||||
__surDepthBuffer = bbmod_surface_check(__surDepthBuffer, _width, _height);
|
|
||||||
|
|
||||||
surface_set_target(__surDepthBuffer);
|
|
||||||
draw_clear(c_white);
|
|
||||||
matrix_set(matrix_view, _view);
|
|
||||||
matrix_set(matrix_projection, _projection);
|
|
||||||
bbmod_render_pass_set(BBMOD_ERenderPass.DepthOnly);
|
|
||||||
var _rqi = 0;
|
|
||||||
repeat (array_length(_renderQueues))
|
|
||||||
{
|
|
||||||
_renderQueues[_rqi++].submit();
|
|
||||||
}
|
|
||||||
surface_reset_target();
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Render SSAO
|
|
||||||
//
|
|
||||||
if (EnableGBuffer && EnableSSAO)
|
|
||||||
{
|
|
||||||
var _width = _renderWidth * SSAOScale;
|
|
||||||
var _height = _renderHeight * SSAOScale;
|
|
||||||
|
|
||||||
__surSSAO = bbmod_surface_check(__surSSAO, _width, _height);
|
|
||||||
__surWork = bbmod_surface_check(__surWork, _width, _height);
|
|
||||||
|
|
||||||
bbmod_material_reset();
|
|
||||||
|
|
||||||
bbmod_ssao_draw(SSAORadius * SSAOScale, SSAOPower, SSAOAngleBias,
|
|
||||||
SSAODepthRange, __surSSAO, __surWork, __surDepthBuffer, _projection,
|
|
||||||
bbmod_camera_get_zfar(), SSAOSelfOcclusionBias, SSAOBlurDepthRange);
|
|
||||||
|
|
||||||
bbmod_shader_set_global_sampler(
|
|
||||||
"bbmod_SSAO", surface_get_texture(__surSSAO));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bbmod_shader_set_global_sampler(
|
|
||||||
"bbmod_SSAO", sprite_get_texture(BBMOD_SprWhite, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Forward pass
|
|
||||||
//
|
|
||||||
bbmod_shader_set_global_sampler("bbmod_GBuffer", EnableGBuffer
|
|
||||||
? surface_get_texture(__surDepthBuffer)
|
|
||||||
: sprite_get_texture(BBMOD_SprWhite, 0));
|
|
||||||
|
|
||||||
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_shader_unset_global("bbmod_SSAO");
|
|
||||||
bbmod_shader_unset_global("bbmod_GBuffer");
|
|
||||||
|
|
||||||
bbmod_material_reset();
|
|
||||||
|
|
||||||
matrix_set(matrix_world, _world);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
static destroy = function () {
|
|
||||||
BaseRenderer_destroy();
|
|
||||||
|
|
||||||
if (surface_exists(__surDepthBuffer))
|
|
||||||
{
|
|
||||||
surface_free(__surDepthBuffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (surface_exists(__surSSAO))
|
|
||||||
{
|
|
||||||
surface_free(__surSSAO);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (surface_exists(__surWork))
|
|
||||||
{
|
|
||||||
surface_free(__surWork);
|
|
||||||
}
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_DefaultRenderer",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "DefaultRenderer",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/DefaultRenderer.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,154 +0,0 @@
|
||||||
/// @func BBMOD_DefaultShader(_shader, _vertexFormat)
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_BaseShader
|
|
||||||
///
|
|
||||||
/// @desc Shader used by the default BBMOD materials.
|
|
||||||
///
|
|
||||||
/// @param {Asset.GMShader} _shader The shader resource.
|
|
||||||
/// @param {Struct.BBMOD_VertexFormat} _vertexFormat The vertex format required
|
|
||||||
/// by the shader.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DefaultMaterial
|
|
||||||
function BBMOD_DefaultShader(_shader, _vertexFormat)
|
|
||||||
: BBMOD_BaseShader(_shader, _vertexFormat) constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
static BaseShader_set_material = set_material;
|
|
||||||
|
|
||||||
/// @func set_normal_smoothness(_texture)
|
|
||||||
///
|
|
||||||
/// @desc Sets the `bbmod_NormalW` uniform.
|
|
||||||
///
|
|
||||||
/// @param {Pointer.Texture} _texture The new texture with normal vector in
|
|
||||||
/// the RGB channels and smoothness in the A channel.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DefaultShader} Returns `self`.
|
|
||||||
static set_normal_smoothness = function (_texture) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _shaderCurrent = shader_current();
|
|
||||||
var _uIsRoughness = shader_get_uniform(_shaderCurrent, "bbmod_IsRoughness");
|
|
||||||
var _uNormalW = shader_get_sampler_index(_shaderCurrent, "bbmod_NormalW");
|
|
||||||
shader_set_uniform_f(_uIsRoughness, 0.0);
|
|
||||||
texture_set_stage(_uNormalW, _texture);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_specular_color(_texture)
|
|
||||||
///
|
|
||||||
/// @desc Sets the `bbmod_Material` uniform.
|
|
||||||
///
|
|
||||||
/// @param {Pointer.Texture} _texture The new texture with specular color in
|
|
||||||
/// the RGB channels.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DefaultShader} Returns `self`.
|
|
||||||
static set_specular_color = function (_texture) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _shaderCurrent = shader_current();
|
|
||||||
var _uIsMetallic = shader_get_uniform(_shaderCurrent, "bbmod_IsMetallic");
|
|
||||||
var _uMaterial = shader_get_sampler_index(_shaderCurrent, "bbmod_Material");
|
|
||||||
shader_set_uniform_f(_uIsMetallic, 0.0);
|
|
||||||
texture_set_stage(_uMaterial, _texture);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_normal_roughness(_texture)
|
|
||||||
///
|
|
||||||
/// @desc Sets the `bbmod_NormalW` uniform.
|
|
||||||
///
|
|
||||||
/// @param {Pointer.Texture} _texture The new texture with normal vector in
|
|
||||||
/// the RGB channels and roughness in the A channel.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DefaultShader} Returns `self`.
|
|
||||||
static set_normal_roughness = function (_texture) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _shaderCurrent = shader_current();
|
|
||||||
var _uIsRoughness = shader_get_uniform(_shaderCurrent, "bbmod_IsRoughness");
|
|
||||||
var _uNormalW = shader_get_sampler_index(_shaderCurrent, "bbmod_NormalW");
|
|
||||||
shader_set_uniform_f(_uIsRoughness, 1.0);
|
|
||||||
texture_set_stage(_uNormalW, _texture);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_metallic_ao(_texture)
|
|
||||||
///
|
|
||||||
/// @desc Sets the `bbmod_Material` uniform.
|
|
||||||
///
|
|
||||||
/// @param {Pointer.Texture} _texture The new texture with metalness in the
|
|
||||||
/// R channel and ambient occlusion in the G channel.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DefaultShader} Returns `self`.
|
|
||||||
static set_metallic_ao = function (_texture) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _shaderCurrent = shader_current();
|
|
||||||
var _uIsMetallic = shader_get_uniform(_shaderCurrent, "bbmod_IsMetallic");
|
|
||||||
var _uMaterial = shader_get_sampler_index(_shaderCurrent, "bbmod_Material");
|
|
||||||
shader_set_uniform_f(_uIsMetallic, 1.0);
|
|
||||||
texture_set_stage(_uMaterial, _texture);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_subsurface(_texture)
|
|
||||||
///
|
|
||||||
/// @desc Sets the `bbmod_Subsurface` uniform.
|
|
||||||
///
|
|
||||||
/// @param {Pointer.Texture} _texture The new texture with subsurface color
|
|
||||||
/// in the RGB channels and its intensity in the A channel.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DefaultShader} Returns `self`.
|
|
||||||
static set_subsurface = function (_texture) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _uSubsurface = shader_get_sampler_index(shader_current(), "bbmod_Subsurface");
|
|
||||||
texture_set_stage(_uSubsurface, _texture);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func set_emissive(_texture)
|
|
||||||
///
|
|
||||||
/// @desc Sets the `bbmod_Emissive` uniform.
|
|
||||||
///
|
|
||||||
/// @param {Pointer.Texture} _texture The new texture with RGBM encoded
|
|
||||||
/// emissive color.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DefaultShader} Returns `self`.
|
|
||||||
static set_emissive = function (_texture) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _uEmissive = shader_get_sampler_index(shader_current(), "bbmod_Emissive");
|
|
||||||
texture_set_stage(_uEmissive, _texture);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
static set_material = function (_material) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
BaseShader_set_material(_material);
|
|
||||||
|
|
||||||
// Normal smoothness/roughness
|
|
||||||
if (_material.NormalSmoothness != undefined)
|
|
||||||
{
|
|
||||||
set_normal_smoothness(_material.NormalSmoothness);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_material.NormalRoughness != undefined)
|
|
||||||
{
|
|
||||||
set_normal_roughness(_material.NormalRoughness);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Specular color/Metallic and AO
|
|
||||||
if (_material.SpecularColor != undefined)
|
|
||||||
{
|
|
||||||
set_specular_color(_material.SpecularColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_material.MetallicAO != undefined)
|
|
||||||
{
|
|
||||||
set_metallic_ao(_material.MetallicAO);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Subsurface
|
|
||||||
set_subsurface(_material.Subsurface);
|
|
||||||
|
|
||||||
// Emissive
|
|
||||||
set_emissive(_material.Emissive);
|
|
||||||
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_DefaultShader",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "DefaultRenderer",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/DefaultRenderer.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
/// @func BBMOD_DefaultSpriteShader(_shader, _vertexFormat)
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_DefaultShader
|
|
||||||
///
|
|
||||||
/// @desc A variant of {@link BBMOD_DefaultShader} which can be used when
|
|
||||||
/// rendering GameMaker sprites.
|
|
||||||
///
|
|
||||||
/// @param {Asset.GMShader} _shader The shader resource.
|
|
||||||
/// @param {Struct.BBMOD_VertexFormat} _vertexFormat The vertex format required
|
|
||||||
/// by the shader.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DefaultMaterial
|
|
||||||
function BBMOD_DefaultSpriteShader(_shader, _vertexFormat)
|
|
||||||
: BBMOD_DefaultShader(_shader, _vertexFormat) constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
static DefaultShader_set_material = set_material;
|
|
||||||
|
|
||||||
static set_material = function (_material) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
DefaultShader_set_material(_material);
|
|
||||||
|
|
||||||
var _shaderCurrent = shader_current();
|
|
||||||
|
|
||||||
var _texture = _material.BaseOpacity;
|
|
||||||
if (_texture != pointer_null)
|
|
||||||
{
|
|
||||||
var _uBaseOpacityUV = shader_get_uniform(_shaderCurrent, "bbmod_BaseOpacityUV");
|
|
||||||
shader_set_uniform_f_array(_uBaseOpacityUV, texture_get_uvs(_texture));
|
|
||||||
}
|
|
||||||
|
|
||||||
_texture = _material.NormalSmoothness ?? _material.NormalRoughness;
|
|
||||||
if (_texture != undefined)
|
|
||||||
{
|
|
||||||
var _uNormalWUV = shader_get_uniform(_shaderCurrent, "bbmod_NormalWUV");
|
|
||||||
shader_set_uniform_f_array(_uNormalWUV, texture_get_uvs(_texture));
|
|
||||||
}
|
|
||||||
|
|
||||||
_texture = _material.SpecularColor ?? _material.MetallicAO;
|
|
||||||
if (_texture != undefined)
|
|
||||||
{
|
|
||||||
var _uMaterialUV = shader_get_uniform(_shaderCurrent, "bbmod_MaterialUV");
|
|
||||||
shader_set_uniform_f_array(_uMaterialUV, texture_get_uvs(_texture));
|
|
||||||
}
|
|
||||||
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_DefaultSpriteShader",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "DefaultRenderer",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/DefaultRenderer.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,98 +0,0 @@
|
||||||
/// @var {Struct.BBMOD_DirectionalLight}
|
|
||||||
/// @private
|
|
||||||
global.__bbmodDirectionalLight = undefined;
|
|
||||||
|
|
||||||
/// @func BBMOD_DirectionalLight([_color[, _direction]])
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_Light
|
|
||||||
///
|
|
||||||
/// @desc A directional light.
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_Color} [_color] The light's color. Defaults to
|
|
||||||
/// {@link BBMOD_C_WHITE} if `undefined`.
|
|
||||||
/// @param {Struct.BBMOD_Vec3} [_direction] The light's direction. Defaults to
|
|
||||||
/// `(-1, 0, -1)` if `undefined`.
|
|
||||||
function BBMOD_DirectionalLight(_color=undefined, _direction=undefined)
|
|
||||||
: BBMOD_Light() constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
/// @var {Struct.BBMOD_Color} The color of the light. Defaul value is
|
|
||||||
/// {@link BBMOD_C_WHITE}.
|
|
||||||
Color = _color ?? BBMOD_C_WHITE;
|
|
||||||
|
|
||||||
/// @var {Struct.BBMOD_Vec3} The direction of the light. Default value is
|
|
||||||
/// `(-1, 0, -1)`.
|
|
||||||
Direction = _direction ?? new BBMOD_Vec3(-1.0, 0.0, -1.0).Normalize();
|
|
||||||
|
|
||||||
/// @var {Real} The area captured by the shadowmap. Defaults to 1024.
|
|
||||||
ShadowmapArea = 1024;
|
|
||||||
|
|
||||||
__getZFar = __get_shadowmap_zfar;
|
|
||||||
|
|
||||||
__getViewMatrix = __get_shadowmap_view;
|
|
||||||
|
|
||||||
__getProjMatrix = __get_shadowmap_projection;
|
|
||||||
|
|
||||||
__getShadowmapMatrix = __get_shadowmap_matrix;
|
|
||||||
|
|
||||||
static __get_shadowmap_zfar = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
return ShadowmapArea;
|
|
||||||
};
|
|
||||||
|
|
||||||
static __get_shadowmap_view = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _position = bbmod_camera_get_position();
|
|
||||||
return matrix_build_lookat(
|
|
||||||
_position.X,
|
|
||||||
_position.Y,
|
|
||||||
_position.Z,
|
|
||||||
_position.X + Direction.X,
|
|
||||||
_position.Y + Direction.Y,
|
|
||||||
_position.Z + Direction.Z,
|
|
||||||
0.0, 0.0, 1.0); // TODO: Find the up vector
|
|
||||||
};
|
|
||||||
|
|
||||||
static __get_shadowmap_projection = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
return matrix_build_projection_ortho(
|
|
||||||
ShadowmapArea, ShadowmapArea, -ShadowmapArea * 0.5, ShadowmapArea * 0.5);
|
|
||||||
};
|
|
||||||
|
|
||||||
static __get_shadowmap_matrix = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
return matrix_multiply(
|
|
||||||
__getViewMatrix(),
|
|
||||||
__getProjMatrix());
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @func bbmod_light_directional_get()
|
|
||||||
///
|
|
||||||
/// @desc Retrieves the directional light passed to shaders.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DirectionalLight} The directional light or `undefined`.
|
|
||||||
///
|
|
||||||
/// @see bbmod_light_directional_set
|
|
||||||
/// @see BBMOD_DirectionalLight
|
|
||||||
function bbmod_light_directional_get()
|
|
||||||
{
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
return global.__bbmodDirectionalLight;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @func bbmod_light_directional_set(_light)
|
|
||||||
///
|
|
||||||
/// @desc Defines the directional light passed to shaders.
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_DirectionalLight} _light The new directional light or
|
|
||||||
/// `undefined`.
|
|
||||||
///
|
|
||||||
/// @see bbmod_light_directional_get
|
|
||||||
/// @see BBMOD_DirectionalLight
|
|
||||||
function bbmod_light_directional_set(_light)
|
|
||||||
{
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
global.__bbmodDirectionalLight = _light;
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_DirectionalLight",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Lights",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Lights.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/// @func BBMOD_DragModule()
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_ParticleModule
|
|
||||||
///
|
|
||||||
/// @desc A particle module that applies drag force to particles.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_EParticle.Drag
|
|
||||||
function BBMOD_DragModule()
|
|
||||||
: BBMOD_ParticleModule() constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
static on_update = function (_emitter, _deltaTime) {
|
|
||||||
var _particles = _emitter.Particles;
|
|
||||||
var _particleIndex = 0;
|
|
||||||
repeat (_emitter.ParticlesAlive)
|
|
||||||
{
|
|
||||||
var _mass = _particles[# BBMOD_EParticle.Mass, _particleIndex];
|
|
||||||
if (_mass != 0.0)
|
|
||||||
{
|
|
||||||
var _dragHalf = _particles[# BBMOD_EParticle.Drag, _particleIndex] * 0.5;
|
|
||||||
var _velocityX = _particles[# BBMOD_EParticle.VelocityX, _particleIndex];
|
|
||||||
var _velocityY = _particles[# BBMOD_EParticle.VelocityY, _particleIndex];
|
|
||||||
var _velocityZ = _particles[# BBMOD_EParticle.VelocityZ, _particleIndex];
|
|
||||||
_particles[# BBMOD_EParticle.AccelerationX, _particleIndex] -=
|
|
||||||
(_dragHalf * _velocityX * abs(_velocityX)) / _mass;
|
|
||||||
_particles[# BBMOD_EParticle.AccelerationY, _particleIndex] -=
|
|
||||||
(_dragHalf * _velocityY * abs(_velocityY)) / _mass;
|
|
||||||
_particles[# BBMOD_EParticle.AccelerationZ, _particleIndex] -=
|
|
||||||
(_dragHalf * _velocityZ * abs(_velocityZ)) / _mass;
|
|
||||||
}
|
|
||||||
++_particleIndex;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_DragModule",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Physics",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles/Modules/Physics.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -6,6 +6,6 @@
|
||||||
"isDnD": false,
|
"isDnD": false,
|
||||||
"parent": {
|
"parent": {
|
||||||
"name": "Math",
|
"name": "Math",
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Math.yy",
|
"path": "folders/_Extensions/BBMOD/Math.yy",
|
||||||
},
|
},
|
||||||
}
|
}
|
|
@ -1,583 +0,0 @@
|
||||||
/// @macro {Real} Maximum number of vec4 uniforms for dynamic batch data
|
|
||||||
/// available in the default shaders. Equals to 192.
|
|
||||||
#macro BBMOD_MAX_BATCH_VEC4S 192
|
|
||||||
|
|
||||||
/// @func BBMOD_DynamicBatch([_model[, _size[, _slotsPerInstance]]])
|
|
||||||
///
|
|
||||||
/// @extends BBMOD_Class
|
|
||||||
///
|
|
||||||
/// @desc A dynamic batch is a structure that allows you to render multiple
|
|
||||||
/// instances of a single model at once, each with its own position, scale and
|
|
||||||
/// rotation. Compared to {@link BBMOD_Model.submit}, this drastically reduces
|
|
||||||
/// draw calls and increases performance, but requires more memory. Number of
|
|
||||||
/// model instances per batch is also affected by maximum number of uniforms
|
|
||||||
/// that a vertex shader can accept.
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_Model} [_model] The model to create a dynamic batch of.
|
|
||||||
/// @param {Real} [_size] Number of model instances in the batch. Default value
|
|
||||||
/// is 32.
|
|
||||||
/// @param {Real} [_slotsPerInstance] Number of slots that each instance takes
|
|
||||||
/// in the data array. Default value is 12.
|
|
||||||
///
|
|
||||||
/// @example
|
|
||||||
/// Following code renders all instances of a car object in batches of 64.
|
|
||||||
/// ```gml
|
|
||||||
/// /// @desc Create event
|
|
||||||
/// modCar = new BBMOD_Model("Car.bbmod");
|
|
||||||
/// matCar = new BBMOD_DefaultMaterial(BBMOD_ShDefaultBatched,
|
|
||||||
/// sprite_get_texture(SprCar, 0));
|
|
||||||
/// carBatch = new BBMOD_DynamicBatch(modCar, 64);
|
|
||||||
///
|
|
||||||
/// /// @desc Draw event
|
|
||||||
/// carBatch.render_object(OCar, matCar);
|
|
||||||
/// ```
|
|
||||||
///
|
|
||||||
/// @see BBMOD_StaticBatch
|
|
||||||
function BBMOD_DynamicBatch(_model=undefined, _size=32, _slotsPerInstance=12)
|
|
||||||
: BBMOD_Class() constructor
|
|
||||||
{
|
|
||||||
BBMOD_CLASS_GENERATED_BODY;
|
|
||||||
|
|
||||||
static Class_destroy = destroy;
|
|
||||||
|
|
||||||
/// @var {Struct.BBMOD_Model} A model that is being batched.
|
|
||||||
/// @readonly
|
|
||||||
Model = _model;
|
|
||||||
|
|
||||||
/// @var {Struct.BBMOD_Model} The batched model.
|
|
||||||
/// @readonly
|
|
||||||
Batch = undefined;
|
|
||||||
|
|
||||||
/// @var {Real} Number of model instances in the batch.
|
|
||||||
/// @readonly
|
|
||||||
Size = _size;
|
|
||||||
|
|
||||||
/// @var {Real} Number of instances currently added to the dynamic batch.
|
|
||||||
/// @readonly
|
|
||||||
/// @see BBMOD_DynamicBatch.add_instance
|
|
||||||
InstanceCount = 0;
|
|
||||||
|
|
||||||
/// @var {Real} Number of slots that each instance takes in the data array.
|
|
||||||
/// @readonly
|
|
||||||
SlotsPerInstance = _slotsPerInstance;
|
|
||||||
|
|
||||||
/// @var {Real} Total length of batch data array for a single draw call.
|
|
||||||
/// @readonly
|
|
||||||
BatchLength = Size * SlotsPerInstance;
|
|
||||||
|
|
||||||
/// @var {Function} A function that writes instance data into the batch data
|
|
||||||
/// array. It must take the instance, array and starting index as arguments!
|
|
||||||
/// Defaults to {@link BBMOD_DynamicBatch.default_fn}.
|
|
||||||
DataWriter = default_fn;
|
|
||||||
|
|
||||||
/// @var {Array<Array<Real>>}
|
|
||||||
/// @private
|
|
||||||
__data = [];
|
|
||||||
|
|
||||||
/// @var {Array<Array<Id.Instance>}}
|
|
||||||
/// @private
|
|
||||||
__ids = [];
|
|
||||||
|
|
||||||
/// @var {Id.DsMap} Mapping from instances to indices at which they are
|
|
||||||
/// stored in the data array.
|
|
||||||
/// @private
|
|
||||||
__instanceToIndex = ds_map_create();
|
|
||||||
|
|
||||||
/// @var {Id.DsMap} Mapping from data array indices to instances that they
|
|
||||||
/// hold.
|
|
||||||
/// @private
|
|
||||||
__indexToInstance = ds_map_create();
|
|
||||||
|
|
||||||
// @func from_model(_model)
|
|
||||||
///
|
|
||||||
/// @desc
|
|
||||||
///
|
|
||||||
/// @param {Struct.BBMOD_Model} _model
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DynamicBatch} Returns `self`.
|
|
||||||
static from_model = function (_model) {
|
|
||||||
Model = _model;
|
|
||||||
build_batch();
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func __resize_data()
|
|
||||||
///
|
|
||||||
/// @desc Resizes `__data` and `__ids` arrays to required size.
|
|
||||||
///
|
|
||||||
/// @private
|
|
||||||
static __resize_data = function () {
|
|
||||||
var _requiredArrayCount = ceil(InstanceCount / Size);
|
|
||||||
var _currentArrayCount = array_length(__data);
|
|
||||||
|
|
||||||
if (_currentArrayCount > _requiredArrayCount)
|
|
||||||
{
|
|
||||||
array_resize(__data, _requiredArrayCount);
|
|
||||||
array_resize(__ids, _requiredArrayCount);
|
|
||||||
}
|
|
||||||
else if (_currentArrayCount < _requiredArrayCount)
|
|
||||||
{
|
|
||||||
repeat (_requiredArrayCount - _currentArrayCount)
|
|
||||||
{
|
|
||||||
array_push(__data, array_create(BatchLength, 0.0));
|
|
||||||
array_push(__ids, array_create(Size, 0.0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func add_instance(_instance)
|
|
||||||
///
|
|
||||||
/// @desc Adds an instance to the dynamic batch.
|
|
||||||
///
|
|
||||||
/// @param {Id.Instance, Struct} _instance The instance to be added.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DynamicBatch} Returns `self`.
|
|
||||||
static add_instance = function (_instance) {
|
|
||||||
var _indexIds = InstanceCount;
|
|
||||||
var _indexData = _indexIds * SlotsPerInstance;
|
|
||||||
__instanceToIndex[? _instance] = _indexData;
|
|
||||||
__indexToInstance[? _indexData] = _instance;
|
|
||||||
++InstanceCount;
|
|
||||||
__resize_data();
|
|
||||||
method(_instance, DataWriter)(__data[_indexData div BatchLength], _indexData mod BatchLength);
|
|
||||||
__ids[_indexIds div Size][@ _indexIds mod Size] = real(_instance[$ "id"] ?? 0.0);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func update_instance(_instance)
|
|
||||||
///
|
|
||||||
/// @desc Updates batch data for given instance.
|
|
||||||
///
|
|
||||||
/// @param {Id.Instance, Struct} _instance The instance to update.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DynamicBatch} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DynamicBatch.DataWriter
|
|
||||||
static update_instance = function (_instance) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
var _index = __instanceToIndex[? _instance];
|
|
||||||
method(_instance, DataWriter)(__data[_index div BatchLength], _index mod BatchLength);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func remove_instance(_instance)
|
|
||||||
///
|
|
||||||
/// @desc Removes an instance from the dynamic batch.
|
|
||||||
///
|
|
||||||
/// @param {Id.Instance, Struct} _instance The instance to remove.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DynamicBatch} Returns `self`.
|
|
||||||
static remove_instance = function (_instance) {
|
|
||||||
var _indexDataDeleted = __instanceToIndex[? _instance];
|
|
||||||
if (_indexDataDeleted != undefined)
|
|
||||||
{
|
|
||||||
var _indexIdDeleted = _indexDataDeleted / SlotsPerInstance;
|
|
||||||
|
|
||||||
--InstanceCount;
|
|
||||||
if (InstanceCount > 0)
|
|
||||||
{
|
|
||||||
////////////////////////////////////////////////////////////////
|
|
||||||
// Data
|
|
||||||
|
|
||||||
// Get last used index
|
|
||||||
var _indexLast = InstanceCount * SlotsPerInstance;
|
|
||||||
// Get instance that is stored on that index
|
|
||||||
var _instanceLast = __indexToInstance[? _indexLast];
|
|
||||||
// Find the exact array that stores the data
|
|
||||||
var _dataLast = __data[_indexLast div BatchLength];
|
|
||||||
// Get starting index within that array
|
|
||||||
var i = _indexLast mod BatchLength;
|
|
||||||
|
|
||||||
// Copy data of the last instance over the data of the removed instance
|
|
||||||
array_copy(
|
|
||||||
__data[_indexDataDeleted div BatchLength], _indexDataDeleted mod BatchLength,
|
|
||||||
_dataLast, i, SlotsPerInstance);
|
|
||||||
|
|
||||||
// Clear slots
|
|
||||||
repeat (SlotsPerInstance)
|
|
||||||
{
|
|
||||||
_dataLast[i++] = 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
|
||||||
// Ids
|
|
||||||
|
|
||||||
// Get last used index
|
|
||||||
var _indexLast = InstanceCount;
|
|
||||||
// Find the exact array that stores the id
|
|
||||||
var _idsLast = __ids[_indexLast div Size];
|
|
||||||
// Get starting index within that array
|
|
||||||
var i = _indexLast mod Size;
|
|
||||||
|
|
||||||
// Copy id of the last instance over the id of the removed instance
|
|
||||||
__ids[_indexIdDeleted div Size][@ _indexIdDeleted mod Size] = _idsLast[i];
|
|
||||||
|
|
||||||
// Clear slots
|
|
||||||
_idsLast[i] = 0.0;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// Last instance is now stored instead of the deleted one
|
|
||||||
__instanceToIndex[? _instanceLast] = _indexDataDeleted;
|
|
||||||
__indexToInstance[? _indexDataDeleted] = _instanceLast;
|
|
||||||
ds_map_delete(__indexToInstance, _indexLast);
|
|
||||||
}
|
|
||||||
__resize_data();
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func submit([_materials[, _batchData]])
|
|
||||||
///
|
|
||||||
/// @desc Immediately submits the dynamic batch for rendering.
|
|
||||||
///
|
|
||||||
/// @param {Array<Struct.BBMOD_Material>} [_materials] An array of materials.
|
|
||||||
/// @param {Array<Real>, Array<Array<Real>>} [_batchData] Data for dynamic
|
|
||||||
/// batching.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DynamicBatch} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DynamicBatch.submit_object
|
|
||||||
/// @see BBMOD_DynamicBatch.render
|
|
||||||
/// @see BBMOD_DynamicBatch.render_object
|
|
||||||
/// @see BBMOD_Material
|
|
||||||
/// @see BBMOD_ERenderPass
|
|
||||||
static submit = function (_materials=undefined, _batchData=undefined) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
_batchData ??= __data;
|
|
||||||
if (array_length(_batchData) > 0)
|
|
||||||
{
|
|
||||||
if (_materials != undefined
|
|
||||||
&& !is_array(_materials))
|
|
||||||
{
|
|
||||||
_materials = [_materials];
|
|
||||||
}
|
|
||||||
matrix_set(matrix_world, matrix_build_identity());
|
|
||||||
Batch.submit(_materials, undefined, _batchData);
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func render([_materials[, _batchData[, _ids]]])
|
|
||||||
///
|
|
||||||
/// @desc Enqueues the dynamic batch for rendering.
|
|
||||||
///
|
|
||||||
/// @param {Array<Struct.BBMOD_Material>} [_materials] An array of materials.
|
|
||||||
/// @param {Array<Real>, Array<Array<Real>>} [_batchData] Data for dynamic
|
|
||||||
/// batching. Defaults to data of instances added with
|
|
||||||
/// {@link BBMOD_DynamicBatch.add_instance}.
|
|
||||||
/// @param {Array<Id.Instance>, Array<Array<Id.Instance>>} [_ids] IDs of
|
|
||||||
/// instances in the `_batchData` array(s). Defaults to IDs of instances
|
|
||||||
/// added with {@link BBMOD_DynamicBatch.add_instance}. Applicable only when
|
|
||||||
/// `_batchData` is `undefined`!
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DynamicBatch} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DynamicBatch.submit
|
|
||||||
/// @see BBMOD_DynamicBatch.submit_object
|
|
||||||
/// @see BBMOD_DynamicBatch.render_object
|
|
||||||
/// @see BBMOD_Material
|
|
||||||
static render = function (_materials=undefined, _batchData=undefined, _ids=undefined) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
|
|
||||||
if (_batchData == undefined)
|
|
||||||
{
|
|
||||||
_batchData = __data;
|
|
||||||
global.__bbmodInstanceIDBatch = __ids;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
global.__bbmodInstanceIDBatch = _ids;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (array_length(_batchData) > 0)
|
|
||||||
{
|
|
||||||
if (_materials != undefined
|
|
||||||
&& !is_array(_materials))
|
|
||||||
{
|
|
||||||
_materials = [_materials];
|
|
||||||
}
|
|
||||||
matrix_set(matrix_world, matrix_build_identity());
|
|
||||||
Batch.render(_materials, undefined, _batchData);
|
|
||||||
}
|
|
||||||
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func default_fn(_data, _index)
|
|
||||||
///
|
|
||||||
/// @desc The default data writer function. Uses instance's variables
|
|
||||||
/// `x`, `y`, `z` for position, `image_xscale` for uniform scale and
|
|
||||||
/// `image_angle` for rotation around the `z` axis.
|
|
||||||
///
|
|
||||||
/// @param {Array<Real>} _data An array to which the function will write
|
|
||||||
/// instance data. The data layout is compatible with shader `BBMOD_ShDefaultBatched`
|
|
||||||
/// and hence with material {@link BBMOD_MATERIAL_DEFAULT_BATCHED}.
|
|
||||||
/// @param {Real} _index An index at which the first variable will be written.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DynamicBatch.submit_object
|
|
||||||
/// @see BBMOD_DynamicBatch.render_object
|
|
||||||
static default_fn = function (_data, _index) {
|
|
||||||
// Position
|
|
||||||
_data[@ _index] = x;
|
|
||||||
_data[@ _index + 1] = y;
|
|
||||||
_data[@ _index + 2] = z;
|
|
||||||
// Uniform scale
|
|
||||||
_data[@ _index + 3] = image_xscale;
|
|
||||||
// Rotation
|
|
||||||
new BBMOD_Quaternion()
|
|
||||||
.FromAxisAngle(BBMOD_VEC3_UP, image_angle)
|
|
||||||
.ToArray(_data, _index + 4);
|
|
||||||
// ID
|
|
||||||
_data[@ _index + 8] = ((id & $000000FF) >> 0) / 255;
|
|
||||||
_data[@ _index + 9] = ((id & $0000FF00) >> 8) / 255;
|
|
||||||
_data[@ _index + 10] = ((id & $00FF0000) >> 16) / 255;
|
|
||||||
_data[@ _index + 11] = ((id & $FF000000) >> 24) / 255;
|
|
||||||
};
|
|
||||||
|
|
||||||
static __draw_object = function (_method, _object, _materials, _fn=undefined) {
|
|
||||||
if (!instance_exists(_object))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_fn ??= DataWriter;
|
|
||||||
|
|
||||||
var _slotsPerInstance = SlotsPerInstance;
|
|
||||||
var _size = Size;
|
|
||||||
var _dataSize = _size * _slotsPerInstance;
|
|
||||||
var _data = array_create(_dataSize, 0.0);
|
|
||||||
var _ids = array_create(_size, 0.0);
|
|
||||||
var _indexData = 0;
|
|
||||||
var _indexId = 0;
|
|
||||||
var _batchData = [_data];
|
|
||||||
var _batchIds = [_ids];
|
|
||||||
|
|
||||||
with (_object)
|
|
||||||
{
|
|
||||||
method(self, _fn)(_data, _indexData);
|
|
||||||
_indexData += _slotsPerInstance;
|
|
||||||
|
|
||||||
_ids[@ _indexId++] = real(self[$ "id"] ?? 0.0);
|
|
||||||
|
|
||||||
if (_indexData >= _dataSize)
|
|
||||||
{
|
|
||||||
_data = array_create(_dataSize, 0.0);
|
|
||||||
_indexData = 0;
|
|
||||||
array_push(_batchData, _data);
|
|
||||||
|
|
||||||
_ids = array_create(_size, 0.0);
|
|
||||||
_indexId = 0;
|
|
||||||
array_push(_batchIds, _ids);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_method(_material, _batchData, _batchIds);
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func submit_object(_object[, _materials[, _fn]])
|
|
||||||
///
|
|
||||||
/// @desc Immediately submits all instances of an object for rendering in
|
|
||||||
/// batches of {@link BBMOD_DynamicBatch.size}.
|
|
||||||
///
|
|
||||||
/// @param {Real} _object An object to submit.
|
|
||||||
/// @param {Array<Struct.BBMOD_Materials>} [_material] An array of materials
|
|
||||||
/// to use.
|
|
||||||
/// @param {Function} [_fn] A function that writes instance data to an array
|
|
||||||
/// which is then passed to the material's shader. Defaults to
|
|
||||||
/// {@link BBMOD_DynamicBatch.default_fn} if `undefined`.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DynamicBatch} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @example
|
|
||||||
/// ```gml
|
|
||||||
/// carBatch.submit_object(OCar, [matCar], function (_data, _index) {
|
|
||||||
/// // Position
|
|
||||||
/// _data[@ _index] = x;
|
|
||||||
/// _data[@ _index + 1] = y;
|
|
||||||
/// _data[@ _index + 2] = z;
|
|
||||||
/// // Uniform scale
|
|
||||||
/// _data[@ _index + 3] = image_xscale;
|
|
||||||
/// // Rotation
|
|
||||||
/// new BBMOD_Quaternion()
|
|
||||||
/// .FromAxisAngle(BBMOD_VEC3_UP, image_angle)
|
|
||||||
/// .ToArray(_data, _index + 4);
|
|
||||||
/// // ID
|
|
||||||
/// _data[@ _index + 8] = ((id & $000000FF) >> 0) / 255;
|
|
||||||
/// _data[@ _index + 9] = ((id & $0000FF00) >> 8) / 255;
|
|
||||||
/// _data[@ _index + 10] = ((id & $00FF0000) >> 16) / 255;
|
|
||||||
/// _data[@ _index + 11] = ((id & $FF000000) >> 24) / 255;
|
|
||||||
/// });
|
|
||||||
/// ```
|
|
||||||
/// The function defined in this example is actually the implementation of
|
|
||||||
/// {@link BBMOD_DynamicBatch.DataWriter}. You can use this to create you own
|
|
||||||
/// variation of it.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DynamicBatch.submit
|
|
||||||
/// @see BBMOD_DynamicBatch.render
|
|
||||||
/// @see BBMOD_DynamicBatch.render_object
|
|
||||||
/// @see BBMOD_DynamicBatch.DataWriter
|
|
||||||
static submit_object = function (_object, _materials=undefined, _fn=undefined) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
__draw_object(method(self, submit), _object, _materials, _fn);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func render_object(_object[, _materials[, _fn]])
|
|
||||||
///
|
|
||||||
/// @desc Enqueues all instances of an object for rendering in batches of
|
|
||||||
/// {@link BBMOD_DynamicBatch.size}.
|
|
||||||
///
|
|
||||||
/// @param {Asset.GMObject} _object An object to render.
|
|
||||||
/// @param {Array<Struct.BBMOD_Material>} [_materials] An array of materials
|
|
||||||
/// to use.
|
|
||||||
/// @param {Function} [_fn] A function that writes instance data to an
|
|
||||||
/// array which is then passed to the material's shader. Defaults to
|
|
||||||
/// {@link BBMOD_DynamicBatch.DataWriter} if `undefined`.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DynamicBatch} Returns `self`.
|
|
||||||
///
|
|
||||||
/// @example
|
|
||||||
/// ```gml
|
|
||||||
/// carBatch.render_object(OCar, [matCar], function (_data, _index) {
|
|
||||||
/// // Position
|
|
||||||
/// _data[@ _index] = x;
|
|
||||||
/// _data[@ _index + 1] = y;
|
|
||||||
/// _data[@ _index + 2] = z;
|
|
||||||
/// // Uniform scale
|
|
||||||
/// _data[@ _index + 3] = image_xscale;
|
|
||||||
/// // Rotation
|
|
||||||
/// new BBMOD_Quaternion()
|
|
||||||
/// .FromAxisAngle(BBMOD_VEC3_UP, image_angle)
|
|
||||||
/// .ToArray(_data, _index + 4);
|
|
||||||
/// // ID
|
|
||||||
/// _data[@ _index + 8] = ((id & $000000FF) >> 0) / 255;
|
|
||||||
/// _data[@ _index + 9] = ((id & $0000FF00) >> 8) / 255;
|
|
||||||
/// _data[@ _index + 10] = ((id & $00FF0000) >> 16) / 255;
|
|
||||||
/// _data[@ _index + 11] = ((id & $FF000000) >> 24) / 255;
|
|
||||||
/// });
|
|
||||||
/// ```
|
|
||||||
/// The function defined in this example is actually the implementation of
|
|
||||||
/// {@link BBMOD_DynamicBatch.default_fn}. You can use this to create your
|
|
||||||
/// own variation of it.
|
|
||||||
///
|
|
||||||
/// @see BBMOD_DynamicBatch.submit
|
|
||||||
/// @see BBMOD_DynamicBatch.submit_object
|
|
||||||
/// @see BBMOD_DynamicBatch.render
|
|
||||||
/// @see BBMOD_DynamicBatch.DataWriter
|
|
||||||
static render_object = function (_object, _materials=undefined, _fn=undefined) {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
__draw_object(method(self, render), _object, _materials, _fn);
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @func freeze()
|
|
||||||
///
|
|
||||||
/// @desc Freezes the dynamic batch. This makes it render faster.
|
|
||||||
///
|
|
||||||
/// @return {Struct.BBMOD_DynamicBatch} Returns `self`.
|
|
||||||
static freeze = function () {
|
|
||||||
gml_pragma("forceinline");
|
|
||||||
Batch.freeze();
|
|
||||||
return self;
|
|
||||||
};
|
|
||||||
|
|
||||||
static build_batch = function () {
|
|
||||||
if (Batch != undefined)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Batch = Model.clone();
|
|
||||||
var _vertexFormatOld = Batch.VertexFormat;
|
|
||||||
var _vertexFormatNew;
|
|
||||||
|
|
||||||
if (_vertexFormatOld != undefined)
|
|
||||||
{
|
|
||||||
_vertexFormatNew = new BBMOD_VertexFormat({
|
|
||||||
Vertices: _vertexFormatOld.Vertices,
|
|
||||||
Normals: _vertexFormatOld.Normals,
|
|
||||||
TextureCoords: _vertexFormatOld.TextureCoords,
|
|
||||||
TextureCoords2: _vertexFormatOld.TextureCoords2,
|
|
||||||
Colors: _vertexFormatOld.Colors,
|
|
||||||
TangentW: _vertexFormatOld.TangentW,
|
|
||||||
Bones: _vertexFormatOld.Bones,
|
|
||||||
Ids: true,
|
|
||||||
});
|
|
||||||
Batch.VertexFormat = _vertexFormatNew;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = array_length(Batch.Meshes) - 1; i >= 0; --i)
|
|
||||||
{
|
|
||||||
var _mesh = Batch.Meshes[i];
|
|
||||||
var _meshVertexFormatOld = _mesh.VertexFormat ?? _vertexFormatOld;
|
|
||||||
var _byteSizeOld = _meshVertexFormatOld.get_byte_size();
|
|
||||||
|
|
||||||
var _meshVertexFormatNew;
|
|
||||||
if (_mesh.VertexFormat)
|
|
||||||
{
|
|
||||||
_meshVertexFormatNew = new BBMOD_VertexFormat({
|
|
||||||
Vertices: _meshVertexFormatOld.Vertices,
|
|
||||||
Normals: _meshVertexFormatOld.Normals,
|
|
||||||
TextureCoords: _meshVertexFormatOld.TextureCoords,
|
|
||||||
TextureCoords2: _meshVertexFormatOld.TextureCoords2,
|
|
||||||
Colors: _meshVertexFormatOld.Colors,
|
|
||||||
TangentW: _meshVertexFormatOld.TangentW,
|
|
||||||
Bones: _meshVertexFormatOld.Bones,
|
|
||||||
Ids: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_meshVertexFormatNew = _vertexFormatNew;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _byteSizeNew = _meshVertexFormatNew.get_byte_size();
|
|
||||||
var _vertexBufferOld = _mesh.VertexBuffer;
|
|
||||||
var _bufferOld = buffer_create_from_vertex_buffer(_vertexBufferOld, buffer_fixed, 1);
|
|
||||||
var _vertexCount = buffer_get_size(_bufferOld) / _byteSizeOld;
|
|
||||||
var _bufferNew = buffer_create(Size * _vertexCount * _byteSizeNew, buffer_fixed, 1);
|
|
||||||
var _offsetNew = 0;
|
|
||||||
var _sizeOfF32 = buffer_sizeof(buffer_f32);
|
|
||||||
|
|
||||||
var _id = 0;
|
|
||||||
repeat (Size)
|
|
||||||
{
|
|
||||||
var _offsetOld = 0;
|
|
||||||
repeat (_vertexCount)
|
|
||||||
{
|
|
||||||
buffer_copy(_bufferOld, _offsetOld, _byteSizeOld, _bufferNew, _offsetNew);
|
|
||||||
_offsetOld += _byteSizeOld;
|
|
||||||
_offsetNew += _byteSizeOld;
|
|
||||||
buffer_poke(_bufferNew, _offsetNew, buffer_f32, _id);
|
|
||||||
_offsetNew += _sizeOfF32;
|
|
||||||
}
|
|
||||||
++_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
_mesh.VertexBuffer = vertex_create_buffer_from_buffer(_bufferNew, _meshVertexFormatNew.Raw);
|
|
||||||
_mesh.VertexFormat = _meshVertexFormatNew;
|
|
||||||
buffer_delete(_bufferNew);
|
|
||||||
|
|
||||||
vertex_delete_buffer(_vertexBufferOld);
|
|
||||||
buffer_delete(_bufferOld);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static destroy = function () {
|
|
||||||
Class_destroy();
|
|
||||||
if (Batch != undefined)
|
|
||||||
{
|
|
||||||
Batch = Batch.destroy();
|
|
||||||
}
|
|
||||||
__data = undefined;
|
|
||||||
ds_map_destroy(__instanceToIndex);
|
|
||||||
ds_map_destroy(__indexToInstance);
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (Model != undefined)
|
|
||||||
{
|
|
||||||
build_batch();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_DynamicBatch",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Batching",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Batching.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
/// @enum Enumeration of anti-aliasing techniques.
|
|
||||||
enum BBMOD_EAntialiasing
|
|
||||||
{
|
|
||||||
/// @member Anti-aliasing is turned off.
|
|
||||||
None,
|
|
||||||
/// @member Use fast approximate anti-aliasing.
|
|
||||||
/// Requires the [FXAA submodule](./FXAASubmodule.html)!
|
|
||||||
FXAA,
|
|
||||||
};
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_EAntialiasing",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "PostProcessing",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Rendering/PostProcessing.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,84 +0,0 @@
|
||||||
/// @enum Enumeration of particle properties.
|
|
||||||
/// @see BBMOD_ParticleEmitter.Particles
|
|
||||||
enum BBMOD_EParticle
|
|
||||||
{
|
|
||||||
/// @member The ID of the particle, unique within the emitter which spawned
|
|
||||||
/// it.
|
|
||||||
Id,
|
|
||||||
/// @member Whether the particle is alive. If not, then the rest of the data
|
|
||||||
/// can be nonsense. All particles within a particle system are dead at the
|
|
||||||
/// start.
|
|
||||||
IsAlive,
|
|
||||||
/// @member How long in seconds has the particle been alive for. This is set
|
|
||||||
/// to 0 on spawn and increases on every update.
|
|
||||||
TimeAlive,
|
|
||||||
/// @member The particle's initial health value. Default value is 1.
|
|
||||||
Health,
|
|
||||||
/// @member The particle's remaining health. The particle dies when this
|
|
||||||
/// reaches 0. Default value is 1, same as for {@link BBMOD_EParticle.Health}.
|
|
||||||
HealthLeft,
|
|
||||||
/// @member The particle's X position in world-space. This is set to the
|
|
||||||
/// emitter's X position on spawn.
|
|
||||||
PositionX,
|
|
||||||
/// @member The particle's Y position in world-space. This is set to the
|
|
||||||
/// emitter's Y position on spawn.
|
|
||||||
PositionY,
|
|
||||||
/// @member The particle's Z position in world-space. This is set to the
|
|
||||||
/// emitter's Z position on spawn.
|
|
||||||
PositionZ,
|
|
||||||
/// @member The particle's velocity on the X axis. Default value is 0.
|
|
||||||
VelocityX,
|
|
||||||
/// @member The particle's velocity on the Y axis. Default value is 0.
|
|
||||||
VelocityY,
|
|
||||||
/// @member The particle's velocity on the Z axis. Default value is 0.
|
|
||||||
VelocityZ,
|
|
||||||
/// @member The particle's acceleration on the X axis. Default value is 0.
|
|
||||||
AccelerationX,
|
|
||||||
/// @member The particle's acceleration on the Y axis. Default value is 0.
|
|
||||||
AccelerationY,
|
|
||||||
/// @member The particle's acceleration on the Z axis. Default value is 0.
|
|
||||||
AccelerationZ,
|
|
||||||
/// @member The mass of the particle. Default value is 1 unit.
|
|
||||||
Mass,
|
|
||||||
/// @member The particle's resistance to motion. Default value is 0.
|
|
||||||
Drag,
|
|
||||||
/// @member Modulates particle velocity on collision. Default value is 0.
|
|
||||||
Bounce,
|
|
||||||
/// @member If `true` then the particle has collided. This is set to
|
|
||||||
/// `false` at the beginning of every update.
|
|
||||||
HasCollided,
|
|
||||||
/// @member Internal use only!
|
|
||||||
AccelerationRealX,
|
|
||||||
/// @member Internal use only!
|
|
||||||
AccelerationRealY,
|
|
||||||
/// @member Internal use only!
|
|
||||||
AccelerationRealZ,
|
|
||||||
/// @member The first component of the particle's quaternion rotation.
|
|
||||||
/// Default value is 0.
|
|
||||||
RotationX,
|
|
||||||
/// @member The second component of the particle's quaternion rotation.
|
|
||||||
/// Default value is 0.
|
|
||||||
RotationY,
|
|
||||||
/// @member The third component of the particle's quaternion rotation.
|
|
||||||
/// Default value is 0.
|
|
||||||
RotationZ,
|
|
||||||
/// @member The fourth component of the particle's quaternion rotation.
|
|
||||||
/// Default value is 1.
|
|
||||||
RotationW,
|
|
||||||
/// @member The particle's scale on the X axis. Default value is 1.
|
|
||||||
ScaleX,
|
|
||||||
/// @member The particle's scale on the Y axis. Default value is 1.
|
|
||||||
ScaleY,
|
|
||||||
/// @member The particle's scale on the Z axis. Default value is 1.
|
|
||||||
ScaleZ,
|
|
||||||
/// @member The red value of the particle's color. Default value is 255.
|
|
||||||
ColorR,
|
|
||||||
/// @member The green value of the particle's color. Default value is 255.
|
|
||||||
ColorG,
|
|
||||||
/// @member The blue value of the particle's color. Default value is 255.
|
|
||||||
ColorB,
|
|
||||||
/// @member The alpha value of the particle's color. Default value is 1.
|
|
||||||
ColorA,
|
|
||||||
/// @member Total number of members of this enum.
|
|
||||||
SIZE,
|
|
||||||
};
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_EParticle",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Particles",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Particles.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
/// @enum An enumeration of all property types.
|
|
||||||
/// @see BBMOD_Property
|
|
||||||
enum BBMOD_EPropertyType
|
|
||||||
{
|
|
||||||
/// @member A boolean.
|
|
||||||
Bool,
|
|
||||||
/// @member A {@link BBMOD_Color}.
|
|
||||||
Color,
|
|
||||||
/// @member A GameMaker Font asset.
|
|
||||||
GMFont,
|
|
||||||
/// @member A GameMaker Object asset.
|
|
||||||
GMObject,
|
|
||||||
/// @member A GameMaker Path asset.
|
|
||||||
GMPath,
|
|
||||||
/// @member A GameMaker Room asset.
|
|
||||||
GMRoom,
|
|
||||||
/// @member A GameMaker Script asset.
|
|
||||||
GMScript,
|
|
||||||
/// @member A GameMaker Shader asset.
|
|
||||||
GMShader,
|
|
||||||
/// @member A GameMaker Sound asset.
|
|
||||||
GMSound,
|
|
||||||
/// @member A GameMaker Sprite asset.
|
|
||||||
GMSprite,
|
|
||||||
/// @member A GameMaker Tile Set asset.
|
|
||||||
GMTileSet,
|
|
||||||
/// @member A GameMaker Timeline asset.
|
|
||||||
GMTimeline,
|
|
||||||
/// @member A matrix.
|
|
||||||
Matrix,
|
|
||||||
/// @member A path to a file or a directory.
|
|
||||||
Path,
|
|
||||||
/// @member A {@link BBMOD_Quaternion}.
|
|
||||||
Quaternion,
|
|
||||||
/// @member A real number.
|
|
||||||
Real,
|
|
||||||
/// @member An array of real numbers.
|
|
||||||
RealArray,
|
|
||||||
/// @member A string.
|
|
||||||
String,
|
|
||||||
/// @member A {@link BBMOD_Vec2}.
|
|
||||||
Vec2,
|
|
||||||
/// @member A {@link BBMOD_Vec3}.
|
|
||||||
Vec3,
|
|
||||||
/// @member A {@link BBMOD_Vec4}.
|
|
||||||
Vec4,
|
|
||||||
// WARNING: Any new property type must be added at the end of this enum,
|
|
||||||
// otherwise save files would be corrupted!!!
|
|
||||||
};
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"resourceType": "GMScript",
|
|
||||||
"resourceVersion": "1.0",
|
|
||||||
"name": "BBMOD_EPropertyType",
|
|
||||||
"isCompatibility": false,
|
|
||||||
"isDnD": false,
|
|
||||||
"parent": {
|
|
||||||
"name": "Properties",
|
|
||||||
"path": "folders/_Extensions/BBMOD/Core/Properties.yy",
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,133 +0,0 @@
|
||||||
/// @enum An enumeration of all possible render commands.
|
|
||||||
enum BBMOD_ERenderCommand
|
|
||||||
{
|
|
||||||
/// @member Applies a material if it has a shader that can be used in the
|
|
||||||
/// current render pass.
|
|
||||||
ApplyMaterial,
|
|
||||||
/// @member Marks the beginning of a conditional block. Commands within this
|
|
||||||
/// block are executed only if the last command was successfully executed.
|
|
||||||
/// @example
|
|
||||||
/// ```gml
|
|
||||||
/// renderQueue.apply_material(material, vertexFormat)
|
|
||||||
/// .begin_conditional_block()
|
|
||||||
/// // Commands here will be executed only if the material was applied...
|
|
||||||
/// .end_conditional_block();
|
|
||||||
/// ```
|
|
||||||
/// @see BBMOD_ERenderCommand.EndConditionalBlock
|
|
||||||
BeginConditionalBlock,
|
|
||||||
/// @member Checks if the current render pass is one of specified passes.
|
|
||||||
CheckRenderPass,
|
|
||||||
/// @member Draws a mesh if its material can be used in the current render
|
|
||||||
/// pass.
|
|
||||||
DrawMesh,
|
|
||||||
/// @member Draws an animated mesh if its material can be used in the current
|
|
||||||
/// render pass.
|
|
||||||
DrawMeshAnimated,
|
|
||||||
/// @member Draws a dynamically batched mesh if its material can be used in
|
|
||||||
/// the current render pass.
|
|
||||||
DrawMeshBatched,
|
|
||||||
/// @member Marks the end of a conditional block.
|
|
||||||
/// @see BBMOD_ERenderCommand.BeginConditionalBlock
|
|
||||||
EndConditionalBlock,
|
|
||||||
/// @member Pops the GPU state.
|
|
||||||
PopGpuState,
|
|
||||||
/// @member Pushes the GPU state.
|
|
||||||
PushGpuState,
|
|
||||||
/// @member Resets material.
|
|
||||||
ResetMaterial,
|
|
||||||
/// @member Resets shader.
|
|
||||||
ResetShader,
|
|
||||||
/// @member Enables/disables alpha testing.
|
|
||||||
SetGpuAlphaTestEnable,
|
|
||||||
/// @member Configures the alpha testing threshold value.
|
|
||||||
SetGpuAlphaTestRef,
|
|
||||||
/// @member Enables/disables alpha blending.
|
|
||||||
SetGpuBlendEnable,
|
|
||||||
/// @member Sets a blend mode.
|
|
||||||
SetGpuBlendMode,
|
|
||||||
/// @member Sets source and destination blend modes.
|
|
||||||
SetGpuBlendModeExt,
|
|
||||||
/// @member Sets source and destination blend modes with separate blend modes
|
|
||||||
/// for the alpha channel.
|
|
||||||
SetGpuBlendModeExtSepAlpha,
|
|
||||||
/// @member Enables/disables writing into individual color channels.
|
|
||||||
SetGpuColorWriteEnable,
|
|
||||||
/// @member Sets the culling mode.
|
|
||||||
SetGpuCullMode,
|
|
||||||
/// @member Configures fog.
|
|
||||||
SetGpuFog,
|
|
||||||
/// @member Enables/disables texture filtering.
|
|
||||||
SetGpuTexFilter,
|
|
||||||
/// @member Enables/disables texture filtering for a specific sampler.
|
|
||||||
SetGpuTexFilterExt,
|
|
||||||
/// @member Sets maximum anisotropy.
|
|
||||||
SetGpuTexMaxAniso,
|
|
||||||
/// @member Sets maximum anisotropy for a specific sampler.
|
|
||||||
SetGpuTexMaxAnisoExt,
|
|
||||||
/// @member Sets maximum mipmap level.
|
|
||||||
SetGpuTexMaxMip,
|
|
||||||
/// @member Sets maximum mipmap level for a specific sampler.
|
|
||||||
SetGpuTexMaxMipExt,
|
|
||||||
/// @member Sets miminum mipmap level.
|
|
||||||
SetGpuTexMinMip,
|
|
||||||
/// @member Sets miminum mipmap level for a specific sampler.
|
|
||||||
SetGpuTexMinMipExt,
|
|
||||||
/// @member Sets mipmapping bias.
|
|
||||||
SetGpuTexMipBias,
|
|
||||||
/// @member Sets mipmapping bias for a specific sampler.
|
|
||||||
SetGpuTexMipBiasExt,
|
|
||||||
/// @member Enables/disables mipmapping.
|
|
||||||
SetGpuTexMipEnable,
|
|
||||||
/// @member Enables/disables mipmapping for a specific sampler.
|
|
||||||
SetGpuTexMipEnableExt,
|
|
||||||
/// @member Sets mipmap filter function.
|
|
||||||
SetGpuTexMipFilter,
|
|
||||||
/// @member Sets mipmap filter function for a specific sampler.
|
|
||||||
SetGpuTexMipFilterExt,
|
|
||||||
/// @member Enables/disables texture repeat.
|
|
||||||
SetGpuTexRepeat,
|
|
||||||
/// @member Enables/disables texture repeat for a specific sampler.
|
|
||||||
SetGpuTexRepeatExt,
|
|
||||||
/// @member Sets the depth buffer test function.
|
|
||||||
SetGpuZFunc,
|
|
||||||
/// @member Enables/disables testing against the depth buffer.
|
|
||||||
SetGpuZTestEnable,
|
|
||||||
/// @member Enables/disables writing to the depth buffer.
|
|
||||||
SetGpuZWriteEnable,
|
|
||||||
/// @member Sets the projection matrix.
|
|
||||||
SetProjectionMatrix,
|
|
||||||
/// @member Sets a shader texture sampler.
|
|
||||||
SetSampler,
|
|
||||||
/// @member Sets a shader.
|
|
||||||
SetShader,
|
|
||||||
/// @member Sets a float shader uniform.
|
|
||||||
SetUniformFloat,
|
|
||||||
/// @member Sets a float2 shader uniform.
|
|
||||||
SetUniformFloat2,
|
|
||||||
/// @member Sets a float3 shader uniform.
|
|
||||||
SetUniformFloat3,
|
|
||||||
/// @member Sets a float4 shader uniform.
|
|
||||||
SetUniformFloat4,
|
|
||||||
/// @member Sets a float array shader uniform.
|
|
||||||
SetUniformFloatArray,
|
|
||||||
/// @member Sets an int shader uniform.
|
|
||||||
SetUniformInt,
|
|
||||||
/// @member Sets an int2 shader uniform.
|
|
||||||
SetUniformInt2,
|
|
||||||
/// @member Sets an int3 shader uniform.
|
|
||||||
SetUniformInt3,
|
|
||||||
/// @member Sets an int4 shader uniform.
|
|
||||||
SetUniformInt4,
|
|
||||||
/// @member Sets an int array shader uniform.
|
|
||||||
SetUniformIntArray,
|
|
||||||
/// @member Sets a matrix shader uniform.
|
|
||||||
SetUniformMatrix,
|
|
||||||
/// @member Sets a matrix array shader uniform.
|
|
||||||
SetUniformMatrixArray,
|
|
||||||
/// @member Sets the view matrix.
|
|
||||||
SetViewMatrix,
|
|
||||||
/// @member Sets the world matrix.
|
|
||||||
SetWorldMatrix,
|
|
||||||
/// @member Submits a vertex buffer.
|
|
||||||
SubmitVertexBuffer,
|
|
||||||
};
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue