@bornengine/engine 0.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +231 -0
  3. package/native/android/Cargo.lock +1848 -0
  4. package/native/android/Cargo.toml +24 -0
  5. package/native/android/src/lib.rs +702 -0
  6. package/native/ios/Cargo.lock +1690 -0
  7. package/native/ios/Cargo.toml +32 -0
  8. package/native/ios/src/lib.rs +1267 -0
  9. package/native/linux/Cargo.lock +3279 -0
  10. package/native/linux/Cargo.toml +29 -0
  11. package/native/linux/src/lib.rs +1331 -0
  12. package/native/macos/Cargo.lock +3310 -0
  13. package/native/macos/Cargo.toml +46 -0
  14. package/native/macos/src/lib.rs +1302 -0
  15. package/native/shared/Cargo.lock +1899 -0
  16. package/native/shared/Cargo.toml +62 -0
  17. package/native/shared/assets/default_font.ttf +0 -0
  18. package/native/shared/build.rs +270 -0
  19. package/native/shared/shaders/common/clouds.wgsl +122 -0
  20. package/native/shared/shaders/common/fog.wgsl +16 -0
  21. package/native/shared/shaders/common/foliage_wind.wgsl +98 -0
  22. package/native/shared/shaders/common/imposter.wgsl +112 -0
  23. package/native/shared/shaders/common/pbr.wgsl +186 -0
  24. package/native/shared/shaders/common/shadows.wgsl +186 -0
  25. package/native/shared/shaders/common/sky.wgsl +8 -0
  26. package/native/shared/shaders/common/tonemap.wgsl +25 -0
  27. package/native/shared/shaders/impulse_field.wgsl +57 -0
  28. package/native/shared/shaders/material_abi.wgsl +383 -0
  29. package/native/shared/shaders/materials/test_minimal.wgsl +42 -0
  30. package/native/shared/src/anim_mixer.rs +61 -0
  31. package/native/shared/src/attach.rs +263 -0
  32. package/native/shared/src/audio/decode.rs +123 -0
  33. package/native/shared/src/audio/mod.rs +863 -0
  34. package/native/shared/src/audio/render.rs +892 -0
  35. package/native/shared/src/audio/spsc.rs +156 -0
  36. package/native/shared/src/audio/stream.rs +226 -0
  37. package/native/shared/src/custom_shaders.rs +104 -0
  38. package/native/shared/src/decals.rs +245 -0
  39. package/native/shared/src/drs.rs +211 -0
  40. package/native/shared/src/engine.rs +261 -0
  41. package/native/shared/src/ffi.rs +116 -0
  42. package/native/shared/src/ffi_core/assets.rs +388 -0
  43. package/native/shared/src/ffi_core/audio_ffi.rs +184 -0
  44. package/native/shared/src/ffi_core/draw.rs +334 -0
  45. package/native/shared/src/ffi_core/game_loop.rs +577 -0
  46. package/native/shared/src/ffi_core/input.rs +234 -0
  47. package/native/shared/src/ffi_core/mod.rs +127 -0
  48. package/native/shared/src/ffi_core/models.rs +1154 -0
  49. package/native/shared/src/ffi_core/ragdoll_ffi.rs +261 -0
  50. package/native/shared/src/ffi_core/scene.rs +626 -0
  51. package/native/shared/src/ffi_core/vfx.rs +212 -0
  52. package/native/shared/src/ffi_core/visual.rs +691 -0
  53. package/native/shared/src/frame_callbacks.rs +122 -0
  54. package/native/shared/src/geometry.rs +236 -0
  55. package/native/shared/src/handles.rs +182 -0
  56. package/native/shared/src/input.rs +448 -0
  57. package/native/shared/src/jolt_sys.rs +822 -0
  58. package/native/shared/src/lib.rs +55 -0
  59. package/native/shared/src/models.rs +1093 -0
  60. package/native/shared/src/models_gltf.rs +1280 -0
  61. package/native/shared/src/particles.rs +391 -0
  62. package/native/shared/src/physics_jolt.rs +1908 -0
  63. package/native/shared/src/picking.rs +298 -0
  64. package/native/shared/src/postfx.rs +345 -0
  65. package/native/shared/src/profiler.rs +492 -0
  66. package/native/shared/src/ragdoll.rs +474 -0
  67. package/native/shared/src/renderer/atmosphere_lut.rs +573 -0
  68. package/native/shared/src/renderer/brdf_lut.rs +154 -0
  69. package/native/shared/src/renderer/draw2d.rs +143 -0
  70. package/native/shared/src/renderer/formats.rs +822 -0
  71. package/native/shared/src/renderer/froxel.rs +421 -0
  72. package/native/shared/src/renderer/gi_bake.rs +653 -0
  73. package/native/shared/src/renderer/graph.rs +462 -0
  74. package/native/shared/src/renderer/hiz.rs +269 -0
  75. package/native/shared/src/renderer/hot_reload.rs +390 -0
  76. package/native/shared/src/renderer/impulse_field.rs +456 -0
  77. package/native/shared/src/renderer/lighting.rs +154 -0
  78. package/native/shared/src/renderer/material_instancing.rs +171 -0
  79. package/native/shared/src/renderer/material_pipeline.rs +700 -0
  80. package/native/shared/src/renderer/material_system.rs +1996 -0
  81. package/native/shared/src/renderer/material_system_tests.rs +601 -0
  82. package/native/shared/src/renderer/material_system_wasm.rs +41 -0
  83. package/native/shared/src/renderer/mod.rs +12556 -0
  84. package/native/shared/src/renderer/model_draw.rs +641 -0
  85. package/native/shared/src/renderer/occlusion.rs +429 -0
  86. package/native/shared/src/renderer/planar_pass.rs +593 -0
  87. package/native/shared/src/renderer/planar_reflection.rs +499 -0
  88. package/native/shared/src/renderer/post_pass.rs +249 -0
  89. package/native/shared/src/renderer/postfx_chain.rs +728 -0
  90. package/native/shared/src/renderer/pt_pass.rs +577 -0
  91. package/native/shared/src/renderer/scene_pass.rs +607 -0
  92. package/native/shared/src/renderer/shader_include.rs +205 -0
  93. package/native/shared/src/renderer/shader_library.rs +135 -0
  94. package/native/shared/src/renderer/shaders/ao.rs +570 -0
  95. package/native/shared/src/renderer/shaders/core.rs +1243 -0
  96. package/native/shared/src/renderer/shaders/env.rs +907 -0
  97. package/native/shared/src/renderer/shaders/gi.rs +810 -0
  98. package/native/shared/src/renderer/shaders/mod.rs +19 -0
  99. package/native/shared/src/renderer/shaders/post.rs +1558 -0
  100. package/native/shared/src/renderer/shaders/pt.rs +1859 -0
  101. package/native/shared/src/renderer/shaders/ssgi.rs +1586 -0
  102. package/native/shared/src/renderer/shadow_pass.rs +731 -0
  103. package/native/shared/src/renderer/ssgi_pass.rs +392 -0
  104. package/native/shared/src/renderer/ssr_pass.rs +188 -0
  105. package/native/shared/src/renderer/texture_store.rs +473 -0
  106. package/native/shared/src/renderer/transient.rs +591 -0
  107. package/native/shared/src/renderer/types.rs +941 -0
  108. package/native/shared/src/renderer/util.rs +152 -0
  109. package/native/shared/src/scene.rs +1362 -0
  110. package/native/shared/src/sdf_cache.rs +274 -0
  111. package/native/shared/src/shadows.rs +1036 -0
  112. package/native/shared/src/staging.rs +102 -0
  113. package/native/shared/src/string_header.rs +266 -0
  114. package/native/shared/src/text_renderer.rs +502 -0
  115. package/native/shared/src/textures.rs +197 -0
  116. package/native/tvos/Cargo.lock +1693 -0
  117. package/native/tvos/Cargo.toml +36 -0
  118. package/native/tvos/metal-patched/Cargo.toml +178 -0
  119. package/native/tvos/metal-patched/LICENSE-APACHE +201 -0
  120. package/native/tvos/metal-patched/LICENSE-MIT +25 -0
  121. package/native/tvos/metal-patched/src/acceleration_structure.rs +667 -0
  122. package/native/tvos/metal-patched/src/acceleration_structure_pass.rs +108 -0
  123. package/native/tvos/metal-patched/src/argument.rs +366 -0
  124. package/native/tvos/metal-patched/src/blitpass.rs +102 -0
  125. package/native/tvos/metal-patched/src/buffer.rs +71 -0
  126. package/native/tvos/metal-patched/src/capturedescriptor.rs +76 -0
  127. package/native/tvos/metal-patched/src/capturemanager.rs +113 -0
  128. package/native/tvos/metal-patched/src/commandbuffer.rs +192 -0
  129. package/native/tvos/metal-patched/src/commandqueue.rs +44 -0
  130. package/native/tvos/metal-patched/src/computepass.rs +107 -0
  131. package/native/tvos/metal-patched/src/constants.rs +152 -0
  132. package/native/tvos/metal-patched/src/counters.rs +119 -0
  133. package/native/tvos/metal-patched/src/depthstencil.rs +190 -0
  134. package/native/tvos/metal-patched/src/device.rs +2134 -0
  135. package/native/tvos/metal-patched/src/drawable.rs +39 -0
  136. package/native/tvos/metal-patched/src/encoder.rs +2041 -0
  137. package/native/tvos/metal-patched/src/heap.rs +281 -0
  138. package/native/tvos/metal-patched/src/indirect_encoder.rs +344 -0
  139. package/native/tvos/metal-patched/src/lib.rs +657 -0
  140. package/native/tvos/metal-patched/src/library.rs +902 -0
  141. package/native/tvos/metal-patched/src/mps.rs +575 -0
  142. package/native/tvos/metal-patched/src/pipeline/compute.rs +475 -0
  143. package/native/tvos/metal-patched/src/pipeline/mod.rs +71 -0
  144. package/native/tvos/metal-patched/src/pipeline/render.rs +762 -0
  145. package/native/tvos/metal-patched/src/renderpass.rs +443 -0
  146. package/native/tvos/metal-patched/src/resource.rs +182 -0
  147. package/native/tvos/metal-patched/src/sampler.rs +165 -0
  148. package/native/tvos/metal-patched/src/sync.rs +178 -0
  149. package/native/tvos/metal-patched/src/texture.rs +352 -0
  150. package/native/tvos/metal-patched/src/types.rs +90 -0
  151. package/native/tvos/metal-patched/src/vertexdescriptor.rs +250 -0
  152. package/native/tvos/src/audio_backend.rs +197 -0
  153. package/native/tvos/src/lib.rs +1891 -0
  154. package/native/visionos/Cargo.lock +1693 -0
  155. package/native/visionos/Cargo.toml +40 -0
  156. package/native/visionos/src/audio_backend.rs +197 -0
  157. package/native/visionos/src/lib.rs +1887 -0
  158. package/native/watchos/Cargo.lock +16 -0
  159. package/native/watchos/Cargo.toml +19 -0
  160. package/native/watchos/shaders/bloom_postfx.metal +99 -0
  161. package/native/watchos/src/BloomWatchApp.swift +1267 -0
  162. package/native/watchos/src/BloomWatchAudio.swift +179 -0
  163. package/native/watchos/src/audio.rs +55 -0
  164. package/native/watchos/src/draw_list.rs +229 -0
  165. package/native/watchos/src/ffi_stubs.rs +915 -0
  166. package/native/watchos/src/ffi_stubs_manual.rs +35 -0
  167. package/native/watchos/src/lib.rs +1124 -0
  168. package/native/watchos/src/models.rs +746 -0
  169. package/native/watchos/src/postfx.rs +95 -0
  170. package/native/watchos/src/scene.rs +534 -0
  171. package/native/watchos/src/textures.rs +184 -0
  172. package/native/web/Cargo.lock +1657 -0
  173. package/native/web/Cargo.toml +43 -0
  174. package/native/web/bloom_glue.js +695 -0
  175. package/native/web/build.sh +131 -0
  176. package/native/web/index.html +35 -0
  177. package/native/web/jolt_bridge.js +1519 -0
  178. package/native/web/src/input_ffi.rs +286 -0
  179. package/native/web/src/lib.rs +1796 -0
  180. package/native/web/src/material_ffi.rs +710 -0
  181. package/native/web/src/parity_ffi.rs +343 -0
  182. package/native/web/src/physics_ffi.rs +643 -0
  183. package/native/web/src/ragdoll_ffi.rs +250 -0
  184. package/native/web/src/render_settings.rs +98 -0
  185. package/native/windows/Cargo.lock +1815 -0
  186. package/native/windows/Cargo.toml +68 -0
  187. package/native/windows/src/lib.rs +1486 -0
  188. package/package.json +4279 -0
  189. package/src/audio/index.ts +315 -0
  190. package/src/core/colors.ts +63 -0
  191. package/src/core/index.ts +1206 -0
  192. package/src/core/keys.ts +63 -0
  193. package/src/core/types.ts +104 -0
  194. package/src/index.ts +171 -0
  195. package/src/math/index.ts +516 -0
  196. package/src/mobile/index.ts +294 -0
  197. package/src/models/index.ts +1258 -0
  198. package/src/physics/index.ts +1134 -0
  199. package/src/scene/index.ts +698 -0
  200. package/src/shapes/index.ts +120 -0
  201. package/src/text/index.ts +48 -0
  202. package/src/textures/index.ts +187 -0
  203. package/src/vfx/index.ts +191 -0
  204. package/src/world/index.ts +24 -0
  205. package/src/world/loader.ts +423 -0
  206. package/src/world/prefab.ts +217 -0
  207. package/src/world/render.ts +172 -0
  208. package/src/world/saver.ts +108 -0
  209. package/src/world/serialize.ts +301 -0
  210. package/src/world/terrain.ts +355 -0
  211. package/src/world/types.ts +160 -0
  212. package/src/world/validate.ts +319 -0
  213. package/src/world/version.ts +114 -0
@@ -0,0 +1,643 @@
1
+ //! Physics (Jolt 5.x via JoltPhysics.js) — the web bloom_physics_* FFI
2
+ //! surface. Split out of lib.rs; every function is a thin wrapper around
3
+ //! a JS export of jolt_bridge.js.
4
+
5
+ use wasm_bindgen::prelude::*;
6
+
7
+ // ============================================================
8
+ // Physics (Jolt 5.x via JoltPhysics.js) — web FFI surface
9
+ // ============================================================
10
+ //
11
+ // Every bloom_physics_* call is a thin wrapper around a JS function defined
12
+ // in jolt_bridge.js. Block is generated from package.json manifest.
13
+
14
+ // 117 physics FFI entries — generated from package.json
15
+ #[cfg(feature = "jolt")]
16
+ #[wasm_bindgen(module = "/jolt_bridge.js")]
17
+ extern "C" {
18
+ #[wasm_bindgen(js_name = initJolt, catch)]
19
+ async fn jb_init_jolt(factory: JsValue) -> Result<JsValue, JsValue>;
20
+ #[wasm_bindgen(js_name = createWorld)]
21
+ fn jb_create_world(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64) -> f64;
22
+ #[wasm_bindgen(js_name = destroyWorld)]
23
+ fn jb_destroy_world(a0: f64);
24
+ #[wasm_bindgen(js_name = setGravity)]
25
+ fn jb_set_gravity(a0: f64, a1: f64, a2: f64, a3: f64);
26
+ #[wasm_bindgen(js_name = getGravity)]
27
+ fn jb_get_gravity(a0: f64, a1: f64) -> f64;
28
+ #[wasm_bindgen(js_name = optimizeBroadphase)]
29
+ fn jb_optimize_broadphase(a0: f64);
30
+ #[wasm_bindgen(js_name = step)]
31
+ fn jb_step(a0: f64, a1: f64, a2: f64);
32
+ #[wasm_bindgen(js_name = stepFixed)]
33
+ fn jb_step_fixed(a0: f64, a1: f64, a2: f64) -> f64;
34
+ #[wasm_bindgen(js_name = setFixedTimestep)]
35
+ fn jb_set_fixed_timestep(a0: f64, a1: f64, a2: f64);
36
+ #[wasm_bindgen(js_name = setInterpolation)]
37
+ fn jb_set_interpolation(a0: f64, a1: f64);
38
+ #[wasm_bindgen(js_name = getStepAlpha)]
39
+ fn jb_get_step_alpha(a0: f64) -> f64;
40
+ #[wasm_bindgen(js_name = setLayerCollides)]
41
+ fn jb_set_layer_collides(a0: f64, a1: f64, a2: f64, a3: f64);
42
+ #[wasm_bindgen(js_name = getLayerCollides)]
43
+ fn jb_get_layer_collides(a0: f64, a1: f64, a2: f64) -> f64;
44
+ #[wasm_bindgen(js_name = bodyCount)]
45
+ fn jb_body_count(a0: f64) -> f64;
46
+ #[wasm_bindgen(js_name = activeBodyCount)]
47
+ fn jb_active_body_count(a0: f64) -> f64;
48
+ #[wasm_bindgen(js_name = shapeBox)]
49
+ fn jb_shape_box(a0: f64, a1: f64, a2: f64, a3: f64) -> f64;
50
+ #[wasm_bindgen(js_name = shapeSphere)]
51
+ fn jb_shape_sphere(a0: f64) -> f64;
52
+ #[wasm_bindgen(js_name = shapeCapsule)]
53
+ pub(crate) fn jb_shape_capsule(a0: f64, a1: f64) -> f64;
54
+ #[wasm_bindgen(js_name = shapeCylinder)]
55
+ fn jb_shape_cylinder(a0: f64, a1: f64, a2: f64) -> f64;
56
+ #[wasm_bindgen(js_name = shapeScaled)]
57
+ fn jb_shape_scaled(a0: f64, a1: f64, a2: f64, a3: f64) -> f64;
58
+ #[wasm_bindgen(js_name = shapeOffsetCom)]
59
+ fn jb_shape_offset_com(a0: f64, a1: f64, a2: f64, a3: f64) -> f64;
60
+ #[wasm_bindgen(js_name = shapeRelease)]
61
+ fn jb_shape_release(a0: f64);
62
+ #[wasm_bindgen(js_name = scratchReset)]
63
+ fn jb_scratch_reset();
64
+ #[wasm_bindgen(js_name = scratchPushF32)]
65
+ fn jb_scratch_push_f32(a0: f64);
66
+ #[wasm_bindgen(js_name = scratchPushU32)]
67
+ fn jb_scratch_push_u32(a0: f64);
68
+ #[wasm_bindgen(js_name = shapeConvexHull)]
69
+ fn jb_shape_convex_hull(a0: f64, a1: f64) -> f64;
70
+ #[wasm_bindgen(js_name = shapeMesh)]
71
+ fn jb_shape_mesh(a0: f64, a1: f64) -> f64;
72
+ #[wasm_bindgen(js_name = shapeHeightfield)]
73
+ fn jb_shape_heightfield(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64) -> f64;
74
+ #[wasm_bindgen(js_name = compoundBegin)]
75
+ fn jb_compound_begin();
76
+ #[wasm_bindgen(js_name = compoundAddChild)]
77
+ fn jb_compound_add_child(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64);
78
+ #[wasm_bindgen(js_name = compoundEnd)]
79
+ fn jb_compound_end() -> f64;
80
+ #[wasm_bindgen(js_name = shapeBounds)]
81
+ fn jb_shape_bounds(a0: f64, a1: f64) -> f64;
82
+ #[wasm_bindgen(js_name = shapeVolume)]
83
+ fn jb_shape_volume(a0: f64) -> f64;
84
+ #[wasm_bindgen(js_name = bodyCreate)]
85
+ pub(crate) fn jb_body_create(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64) -> f64;
86
+ #[wasm_bindgen(js_name = bodyDestroy)]
87
+ pub(crate) fn jb_body_destroy(a0: f64);
88
+ #[wasm_bindgen(js_name = bodyActivate)]
89
+ fn jb_body_activate(a0: f64);
90
+ #[wasm_bindgen(js_name = bodyDeactivate)]
91
+ fn jb_body_deactivate(a0: f64);
92
+ #[wasm_bindgen(js_name = bodyIsActive)]
93
+ fn jb_body_is_active(a0: f64) -> f64;
94
+ #[wasm_bindgen(js_name = bodyIsValid)]
95
+ fn jb_body_is_valid(a0: f64) -> f64;
96
+ #[wasm_bindgen(js_name = bodyGetPosition)]
97
+ pub(crate) fn jb_body_get_position(a0: f64, a1: f64) -> f64;
98
+ #[wasm_bindgen(js_name = bodyGetRotation)]
99
+ pub(crate) fn jb_body_get_rotation(a0: f64, a1: f64) -> f64;
100
+ #[wasm_bindgen(js_name = bodySetPosition)]
101
+ fn jb_body_set_position(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64);
102
+ #[wasm_bindgen(js_name = bodySetRotation)]
103
+ fn jb_body_set_rotation(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64);
104
+ #[wasm_bindgen(js_name = bodySetTransform)]
105
+ fn jb_body_set_transform(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64);
106
+ #[wasm_bindgen(js_name = bodyMoveKinematic)]
107
+ fn jb_body_move_kinematic(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64);
108
+ #[wasm_bindgen(js_name = bodyGetLinearVelocity)]
109
+ fn jb_body_get_linear_velocity(a0: f64, a1: f64) -> f64;
110
+ #[wasm_bindgen(js_name = bodyGetAngularVelocity)]
111
+ fn jb_body_get_angular_velocity(a0: f64, a1: f64) -> f64;
112
+ #[wasm_bindgen(js_name = bodyGetPointVelocity)]
113
+ fn jb_body_get_point_velocity(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64) -> f64;
114
+ #[wasm_bindgen(js_name = bodySetLinearVelocity)]
115
+ fn jb_body_set_linear_velocity(a0: f64, a1: f64, a2: f64, a3: f64);
116
+ #[wasm_bindgen(js_name = bodySetAngularVelocity)]
117
+ fn jb_body_set_angular_velocity(a0: f64, a1: f64, a2: f64, a3: f64);
118
+ #[wasm_bindgen(js_name = bodyAddForce)]
119
+ fn jb_body_add_force(a0: f64, a1: f64, a2: f64, a3: f64);
120
+ #[wasm_bindgen(js_name = bodyAddImpulse)]
121
+ pub(crate) fn jb_body_add_impulse(a0: f64, a1: f64, a2: f64, a3: f64);
122
+ #[wasm_bindgen(js_name = bodyAddTorque)]
123
+ fn jb_body_add_torque(a0: f64, a1: f64, a2: f64, a3: f64);
124
+ #[wasm_bindgen(js_name = bodyAddAngularImpulse)]
125
+ fn jb_body_add_angular_impulse(a0: f64, a1: f64, a2: f64, a3: f64);
126
+ #[wasm_bindgen(js_name = bodyAddForceAt)]
127
+ fn jb_body_add_force_at(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64);
128
+ #[wasm_bindgen(js_name = bodyAddImpulseAt)]
129
+ fn jb_body_add_impulse_at(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64);
130
+ #[wasm_bindgen(js_name = bodySetFriction)]
131
+ pub(crate) fn jb_body_set_friction(a0: f64, a1: f64);
132
+ #[wasm_bindgen(js_name = bodySetRestitution)]
133
+ pub(crate) fn jb_body_set_restitution(a0: f64, a1: f64);
134
+ #[wasm_bindgen(js_name = bodySetLinearDamping)]
135
+ pub(crate) fn jb_body_set_linear_damping(a0: f64, a1: f64);
136
+ #[wasm_bindgen(js_name = bodySetAngularDamping)]
137
+ pub(crate) fn jb_body_set_angular_damping(a0: f64, a1: f64);
138
+ #[wasm_bindgen(js_name = bodySetGravityFactor)]
139
+ fn jb_body_set_gravity_factor(a0: f64, a1: f64);
140
+ #[wasm_bindgen(js_name = bodySetCcd)]
141
+ fn jb_body_set_ccd(a0: f64, a1: f64);
142
+ #[wasm_bindgen(js_name = bodySetMotionType)]
143
+ fn jb_body_set_motion_type(a0: f64, a1: f64, a2: f64);
144
+ #[wasm_bindgen(js_name = bodySetObjectLayer)]
145
+ fn jb_body_set_object_layer(a0: f64, a1: f64);
146
+ #[wasm_bindgen(js_name = bodySetIsSensor)]
147
+ fn jb_body_set_is_sensor(a0: f64, a1: f64);
148
+ #[wasm_bindgen(js_name = bodySetAllowSleeping)]
149
+ fn jb_body_set_allow_sleeping(a0: f64, a1: f64);
150
+ #[wasm_bindgen(js_name = bodySetShape)]
151
+ fn jb_body_set_shape(a0: f64, a1: f64, a2: f64, a3: f64);
152
+ #[wasm_bindgen(js_name = bodyLockRotationAxes)]
153
+ fn jb_body_lock_rotation_axes(a0: f64, a1: f64, a2: f64, a3: f64);
154
+ #[wasm_bindgen(js_name = bodyLockTranslationAxes)]
155
+ fn jb_body_lock_translation_axes(a0: f64, a1: f64, a2: f64, a3: f64);
156
+ #[wasm_bindgen(js_name = bodyGetMass)]
157
+ fn jb_body_get_mass(a0: f64) -> f64;
158
+ #[wasm_bindgen(js_name = bodyGetFriction)]
159
+ fn jb_body_get_friction(a0: f64) -> f64;
160
+ #[wasm_bindgen(js_name = bodyGetRestitution)]
161
+ fn jb_body_get_restitution(a0: f64) -> f64;
162
+ #[wasm_bindgen(js_name = bodyGetObjectLayer)]
163
+ fn jb_body_get_object_layer(a0: f64) -> f64;
164
+ #[wasm_bindgen(js_name = bodySetUserData)]
165
+ fn jb_body_set_user_data(a0: f64, a1: f64, a2: f64);
166
+ #[wasm_bindgen(js_name = bodyGetUserData)]
167
+ fn jb_body_get_user_data(a0: f64, a1: f64) -> f64;
168
+ #[wasm_bindgen(js_name = raycast)]
169
+ fn jb_raycast(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64) -> f64;
170
+ #[wasm_bindgen(js_name = raycastAll)]
171
+ fn jb_raycast_all(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64) -> f64;
172
+ #[wasm_bindgen(js_name = rayHitCount)]
173
+ fn jb_ray_hit_count() -> f64;
174
+ #[wasm_bindgen(js_name = rayHitBody)]
175
+ fn jb_ray_hit_body(a0: f64) -> f64;
176
+ #[wasm_bindgen(js_name = rayHitAxis)]
177
+ fn jb_ray_hit_axis(a0: f64, a1: f64) -> f64;
178
+ #[wasm_bindgen(js_name = rayHitFraction)]
179
+ fn jb_ray_hit_fraction(a0: f64) -> f64;
180
+ #[wasm_bindgen(js_name = rayHitSubShape)]
181
+ fn jb_ray_hit_sub_shape(a0: f64) -> f64;
182
+ #[wasm_bindgen(js_name = overlapSphere)]
183
+ fn jb_overlap_sphere(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64) -> f64;
184
+ #[wasm_bindgen(js_name = overlapPoint)]
185
+ fn jb_overlap_point(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64) -> f64;
186
+ #[wasm_bindgen(js_name = overlapBox)]
187
+ fn jb_overlap_box(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64) -> f64;
188
+ #[wasm_bindgen(js_name = overlapBody)]
189
+ fn jb_overlap_body(a0: f64) -> f64;
190
+ #[wasm_bindgen(js_name = constraintFixed)]
191
+ fn jb_constraint_fixed(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64) -> f64;
192
+ #[wasm_bindgen(js_name = constraintPoint)]
193
+ fn jb_constraint_point(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64) -> f64;
194
+ #[wasm_bindgen(js_name = constraintHinge)]
195
+ fn jb_constraint_hinge(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64) -> f64;
196
+ #[wasm_bindgen(js_name = constraintSlider)]
197
+ fn jb_constraint_slider(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64) -> f64;
198
+ #[wasm_bindgen(js_name = constraintDistance)]
199
+ fn jb_constraint_distance(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64) -> f64;
200
+ // EN-063: the ragdoll joint — six-DOF with translation locked and
201
+ // per-axis rotation limits. Args: bodyA, bodyB, anchorA(x,y,z),
202
+ // anchorB(x,y,z), rotLimits(xMin,xMax,yMin,yMax,zMin,zMax), worldSpace.
203
+ #[wasm_bindgen(js_name = constraintSixDofLockedTranslation)]
204
+ pub(crate) fn jb_constraint_six_dof(
205
+ a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64,
206
+ a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64, a14: f64,
207
+ ) -> f64;
208
+ #[wasm_bindgen(js_name = constraintDestroy)]
209
+ pub(crate) fn jb_constraint_destroy(a0: f64);
210
+ #[wasm_bindgen(js_name = constraintSetEnabled)]
211
+ fn jb_constraint_set_enabled(a0: f64, a1: f64);
212
+ #[wasm_bindgen(js_name = contactCount)]
213
+ fn jb_contact_count() -> f64;
214
+ #[wasm_bindgen(js_name = contactField)]
215
+ fn jb_contact_field(a0: f64, a1: f64) -> f64;
216
+ #[wasm_bindgen(js_name = clearContacts)]
217
+ fn jb_clear_contacts(a0: f64);
218
+ #[wasm_bindgen(js_name = characterCreate)]
219
+ fn jb_character_create(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64, a14: f64, a15: f64, a16: f64, a17: f64, a18: f64) -> f64;
220
+ #[wasm_bindgen(js_name = characterDestroy)]
221
+ fn jb_character_destroy(a0: f64);
222
+ #[wasm_bindgen(js_name = characterUpdate)]
223
+ fn jb_character_update(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64);
224
+ #[wasm_bindgen(js_name = characterGetPosition)]
225
+ fn jb_character_get_position(a0: f64, a1: f64) -> f64;
226
+ #[wasm_bindgen(js_name = characterGetRotation)]
227
+ fn jb_character_get_rotation(a0: f64, a1: f64) -> f64;
228
+ #[wasm_bindgen(js_name = characterSetPosition)]
229
+ fn jb_character_set_position(a0: f64, a1: f64, a2: f64, a3: f64);
230
+ #[wasm_bindgen(js_name = characterSetRotation)]
231
+ fn jb_character_set_rotation(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64);
232
+ #[wasm_bindgen(js_name = characterGetLinearVelocity)]
233
+ fn jb_character_get_linear_velocity(a0: f64, a1: f64) -> f64;
234
+ #[wasm_bindgen(js_name = characterSetLinearVelocity)]
235
+ fn jb_character_set_linear_velocity(a0: f64, a1: f64, a2: f64, a3: f64);
236
+ #[wasm_bindgen(js_name = characterGetGroundState)]
237
+ fn jb_character_get_ground_state(a0: f64) -> f64;
238
+ #[wasm_bindgen(js_name = characterGetGroundNormal)]
239
+ fn jb_character_get_ground_normal(a0: f64, a1: f64) -> f64;
240
+ #[wasm_bindgen(js_name = characterGetGroundPosition)]
241
+ fn jb_character_get_ground_position(a0: f64, a1: f64) -> f64;
242
+ #[wasm_bindgen(js_name = characterGetGroundBody)]
243
+ fn jb_character_get_ground_body(a0: f64) -> f64;
244
+ #[wasm_bindgen(js_name = characterSetShape)]
245
+ fn jb_character_set_shape(a0: f64, a1: f64);
246
+ #[wasm_bindgen(js_name = softBodyCreate)]
247
+ fn jb_soft_body_create(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64, a14: f64) -> f64;
248
+ #[wasm_bindgen(js_name = softBodyVertexCount)]
249
+ fn jb_soft_body_vertex_count(a0: f64) -> f64;
250
+ #[wasm_bindgen(js_name = softBodyGetVertex)]
251
+ fn jb_soft_body_get_vertex(a0: f64, a1: f64, a2: f64) -> f64;
252
+ #[wasm_bindgen(js_name = softBodySetVertex)]
253
+ fn jb_soft_body_set_vertex(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64);
254
+ #[wasm_bindgen(js_name = softBodySetVertexInvMass)]
255
+ fn jb_soft_body_set_vertex_inv_mass(a0: f64, a1: f64, a2: f64);
256
+ #[wasm_bindgen(js_name = vehicleCreate)]
257
+ fn jb_vehicle_create(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64, a14: f64, a15: f64, a16: f64, a17: f64, a18: f64, a19: f64, a20: f64, a21: f64, a22: f64, a23: f64, a24: f64, a25: f64, a26: f64, a27: f64, a28: f64, a29: f64, a30: f64, a31: f64, a32: f64, a33: f64, a34: f64, a35: f64, a36: f64) -> f64;
258
+ #[wasm_bindgen(js_name = vehicleDestroy)]
259
+ fn jb_vehicle_destroy(a0: f64);
260
+ #[wasm_bindgen(js_name = vehicleGetChassis)]
261
+ fn jb_vehicle_get_chassis(a0: f64) -> f64;
262
+ #[wasm_bindgen(js_name = vehicleSetInput)]
263
+ fn jb_vehicle_set_input(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64);
264
+ #[wasm_bindgen(js_name = vehicleGetWheelTransform)]
265
+ fn jb_vehicle_get_wheel_transform(a0: f64, a1: f64, a2: f64) -> f64;
266
+ #[wasm_bindgen(js_name = vehicleGetEngineRpm)]
267
+ fn jb_vehicle_get_engine_rpm(a0: f64) -> f64;
268
+ #[wasm_bindgen(js_name = vehicleGetWheelAngularVelocity)]
269
+ fn jb_vehicle_get_wheel_angular_velocity(a0: f64, a1: f64) -> f64;
270
+ }
271
+
272
+ #[cfg(feature = "jolt")]
273
+ #[wasm_bindgen]
274
+ pub fn bloom_physics_create_world(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64) -> f64 { jb_create_world(a0, a1, a2, a3, a4) }
275
+ #[cfg(feature = "jolt")]
276
+ #[wasm_bindgen]
277
+ pub fn bloom_physics_destroy_world(a0: f64) { jb_destroy_world(a0) }
278
+ #[cfg(feature = "jolt")]
279
+ #[wasm_bindgen]
280
+ pub fn bloom_physics_set_gravity(a0: f64, a1: f64, a2: f64, a3: f64) { jb_set_gravity(a0, a1, a2, a3) }
281
+ #[cfg(feature = "jolt")]
282
+ #[wasm_bindgen]
283
+ pub fn bloom_physics_get_gravity(a0: f64, a1: f64) -> f64 { jb_get_gravity(a0, a1) }
284
+ #[cfg(feature = "jolt")]
285
+ #[wasm_bindgen]
286
+ pub fn bloom_physics_optimize_broadphase(a0: f64) { jb_optimize_broadphase(a0) }
287
+ #[cfg(feature = "jolt")]
288
+ #[wasm_bindgen]
289
+ pub fn bloom_physics_step(a0: f64, a1: f64, a2: f64) { jb_step(a0, a1, a2) }
290
+ #[cfg(feature = "jolt")]
291
+ #[wasm_bindgen]
292
+ pub fn bloom_physics_step_fixed(a0: f64, a1: f64, a2: f64) -> f64 { jb_step_fixed(a0, a1, a2) }
293
+ #[cfg(feature = "jolt")]
294
+ #[wasm_bindgen]
295
+ pub fn bloom_physics_set_fixed_timestep(a0: f64, a1: f64, a2: f64) { jb_set_fixed_timestep(a0, a1, a2) }
296
+ #[cfg(feature = "jolt")]
297
+ #[wasm_bindgen]
298
+ pub fn bloom_physics_set_interpolation(a0: f64, a1: f64) { jb_set_interpolation(a0, a1) }
299
+ #[cfg(feature = "jolt")]
300
+ #[wasm_bindgen]
301
+ pub fn bloom_physics_get_step_alpha(a0: f64) -> f64 { jb_get_step_alpha(a0) }
302
+ #[cfg(feature = "jolt")]
303
+ #[wasm_bindgen]
304
+ pub fn bloom_physics_set_layer_collides(a0: f64, a1: f64, a2: f64, a3: f64) { jb_set_layer_collides(a0, a1, a2, a3) }
305
+ #[cfg(feature = "jolt")]
306
+ #[wasm_bindgen]
307
+ pub fn bloom_physics_get_layer_collides(a0: f64, a1: f64, a2: f64) -> f64 { jb_get_layer_collides(a0, a1, a2) }
308
+ #[cfg(feature = "jolt")]
309
+ #[wasm_bindgen]
310
+ pub fn bloom_physics_body_count(a0: f64) -> f64 { jb_body_count(a0) }
311
+ #[cfg(feature = "jolt")]
312
+ #[wasm_bindgen]
313
+ pub fn bloom_physics_active_body_count(a0: f64) -> f64 { jb_active_body_count(a0) }
314
+ #[cfg(feature = "jolt")]
315
+ #[wasm_bindgen]
316
+ pub fn bloom_physics_shape_box(a0: f64, a1: f64, a2: f64, a3: f64) -> f64 { jb_shape_box(a0, a1, a2, a3) }
317
+ #[cfg(feature = "jolt")]
318
+ #[wasm_bindgen]
319
+ pub fn bloom_physics_shape_sphere(a0: f64) -> f64 { jb_shape_sphere(a0) }
320
+ #[cfg(feature = "jolt")]
321
+ #[wasm_bindgen]
322
+ pub fn bloom_physics_shape_capsule(a0: f64, a1: f64) -> f64 { jb_shape_capsule(a0, a1) }
323
+ #[cfg(feature = "jolt")]
324
+ #[wasm_bindgen]
325
+ pub fn bloom_physics_shape_cylinder(a0: f64, a1: f64, a2: f64) -> f64 { jb_shape_cylinder(a0, a1, a2) }
326
+ #[cfg(feature = "jolt")]
327
+ #[wasm_bindgen]
328
+ pub fn bloom_physics_shape_scaled(a0: f64, a1: f64, a2: f64, a3: f64) -> f64 { jb_shape_scaled(a0, a1, a2, a3) }
329
+ #[cfg(feature = "jolt")]
330
+ #[wasm_bindgen]
331
+ pub fn bloom_physics_shape_offset_com(a0: f64, a1: f64, a2: f64, a3: f64) -> f64 { jb_shape_offset_com(a0, a1, a2, a3) }
332
+ #[cfg(feature = "jolt")]
333
+ #[wasm_bindgen]
334
+ pub fn bloom_physics_shape_release(a0: f64) { jb_shape_release(a0) }
335
+ #[cfg(feature = "jolt")]
336
+ #[wasm_bindgen]
337
+ pub fn bloom_physics_scratch_reset() { jb_scratch_reset() }
338
+ #[cfg(feature = "jolt")]
339
+ #[wasm_bindgen]
340
+ pub fn bloom_physics_scratch_push_f32(a0: f64) { jb_scratch_push_f32(a0) }
341
+ #[cfg(feature = "jolt")]
342
+ #[wasm_bindgen]
343
+ pub fn bloom_physics_scratch_push_u32(a0: f64) { jb_scratch_push_u32(a0) }
344
+ #[cfg(feature = "jolt")]
345
+ #[wasm_bindgen]
346
+ pub fn bloom_physics_shape_convex_hull(a0: f64, a1: f64) -> f64 { jb_shape_convex_hull(a0, a1) }
347
+ #[cfg(feature = "jolt")]
348
+ #[wasm_bindgen]
349
+ pub fn bloom_physics_shape_mesh(a0: f64, a1: f64) -> f64 { jb_shape_mesh(a0, a1) }
350
+ #[cfg(feature = "jolt")]
351
+ #[wasm_bindgen]
352
+ pub fn bloom_physics_shape_heightfield(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64) -> f64 { jb_shape_heightfield(a0, a1, a2, a3, a4, a5, a6, a7) }
353
+ #[cfg(feature = "jolt")]
354
+ #[wasm_bindgen]
355
+ pub fn bloom_physics_compound_begin() { jb_compound_begin() }
356
+ #[cfg(feature = "jolt")]
357
+ #[wasm_bindgen]
358
+ pub fn bloom_physics_compound_add_child(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64) { jb_compound_add_child(a0, a1, a2, a3, a4, a5, a6, a7) }
359
+ #[cfg(feature = "jolt")]
360
+ #[wasm_bindgen]
361
+ pub fn bloom_physics_compound_end() -> f64 { jb_compound_end() }
362
+ #[cfg(feature = "jolt")]
363
+ #[wasm_bindgen]
364
+ pub fn bloom_physics_shape_bounds(a0: f64, a1: f64) -> f64 { jb_shape_bounds(a0, a1) }
365
+ #[cfg(feature = "jolt")]
366
+ #[wasm_bindgen]
367
+ pub fn bloom_physics_shape_volume(a0: f64) -> f64 { jb_shape_volume(a0) }
368
+ #[cfg(feature = "jolt")]
369
+ #[wasm_bindgen]
370
+ pub fn bloom_physics_body_create(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64) -> f64 { jb_body_create(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) }
371
+ #[cfg(feature = "jolt")]
372
+ #[wasm_bindgen]
373
+ pub fn bloom_physics_body_destroy(a0: f64) { jb_body_destroy(a0) }
374
+ #[cfg(feature = "jolt")]
375
+ #[wasm_bindgen]
376
+ pub fn bloom_physics_body_activate(a0: f64) { jb_body_activate(a0) }
377
+ #[cfg(feature = "jolt")]
378
+ #[wasm_bindgen]
379
+ pub fn bloom_physics_body_deactivate(a0: f64) { jb_body_deactivate(a0) }
380
+ #[cfg(feature = "jolt")]
381
+ #[wasm_bindgen]
382
+ pub fn bloom_physics_body_is_active(a0: f64) -> f64 { jb_body_is_active(a0) }
383
+ #[cfg(feature = "jolt")]
384
+ #[wasm_bindgen]
385
+ pub fn bloom_physics_body_is_valid(a0: f64) -> f64 { jb_body_is_valid(a0) }
386
+ #[cfg(feature = "jolt")]
387
+ #[wasm_bindgen]
388
+ pub fn bloom_physics_body_get_position(a0: f64, a1: f64) -> f64 { jb_body_get_position(a0, a1) }
389
+ #[cfg(feature = "jolt")]
390
+ #[wasm_bindgen]
391
+ pub fn bloom_physics_body_get_rotation(a0: f64, a1: f64) -> f64 { jb_body_get_rotation(a0, a1) }
392
+ #[cfg(feature = "jolt")]
393
+ #[wasm_bindgen]
394
+ pub fn bloom_physics_body_set_position(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64) { jb_body_set_position(a0, a1, a2, a3, a4) }
395
+ #[cfg(feature = "jolt")]
396
+ #[wasm_bindgen]
397
+ pub fn bloom_physics_body_set_rotation(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64) { jb_body_set_rotation(a0, a1, a2, a3, a4, a5) }
398
+ #[cfg(feature = "jolt")]
399
+ #[wasm_bindgen]
400
+ pub fn bloom_physics_body_set_transform(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64) { jb_body_set_transform(a0, a1, a2, a3, a4, a5, a6, a7, a8) }
401
+ #[cfg(feature = "jolt")]
402
+ #[wasm_bindgen]
403
+ pub fn bloom_physics_body_move_kinematic(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64) { jb_body_move_kinematic(a0, a1, a2, a3, a4, a5, a6, a7, a8) }
404
+ #[cfg(feature = "jolt")]
405
+ #[wasm_bindgen]
406
+ pub fn bloom_physics_body_get_linear_velocity(a0: f64, a1: f64) -> f64 { jb_body_get_linear_velocity(a0, a1) }
407
+ #[cfg(feature = "jolt")]
408
+ #[wasm_bindgen]
409
+ pub fn bloom_physics_body_get_angular_velocity(a0: f64, a1: f64) -> f64 { jb_body_get_angular_velocity(a0, a1) }
410
+ #[cfg(feature = "jolt")]
411
+ #[wasm_bindgen]
412
+ pub fn bloom_physics_body_get_point_velocity(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64) -> f64 { jb_body_get_point_velocity(a0, a1, a2, a3, a4) }
413
+ #[cfg(feature = "jolt")]
414
+ #[wasm_bindgen]
415
+ pub fn bloom_physics_body_set_linear_velocity(a0: f64, a1: f64, a2: f64, a3: f64) { jb_body_set_linear_velocity(a0, a1, a2, a3) }
416
+ #[cfg(feature = "jolt")]
417
+ #[wasm_bindgen]
418
+ pub fn bloom_physics_body_set_angular_velocity(a0: f64, a1: f64, a2: f64, a3: f64) { jb_body_set_angular_velocity(a0, a1, a2, a3) }
419
+ #[cfg(feature = "jolt")]
420
+ #[wasm_bindgen]
421
+ pub fn bloom_physics_body_add_force(a0: f64, a1: f64, a2: f64, a3: f64) { jb_body_add_force(a0, a1, a2, a3) }
422
+ #[cfg(feature = "jolt")]
423
+ #[wasm_bindgen]
424
+ pub fn bloom_physics_body_add_impulse(a0: f64, a1: f64, a2: f64, a3: f64) { jb_body_add_impulse(a0, a1, a2, a3) }
425
+ #[cfg(feature = "jolt")]
426
+ #[wasm_bindgen]
427
+ pub fn bloom_physics_body_add_torque(a0: f64, a1: f64, a2: f64, a3: f64) { jb_body_add_torque(a0, a1, a2, a3) }
428
+ #[cfg(feature = "jolt")]
429
+ #[wasm_bindgen]
430
+ pub fn bloom_physics_body_add_angular_impulse(a0: f64, a1: f64, a2: f64, a3: f64) { jb_body_add_angular_impulse(a0, a1, a2, a3) }
431
+ #[cfg(feature = "jolt")]
432
+ #[wasm_bindgen]
433
+ pub fn bloom_physics_body_add_force_at(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64) { jb_body_add_force_at(a0, a1, a2, a3, a4, a5, a6) }
434
+ #[cfg(feature = "jolt")]
435
+ #[wasm_bindgen]
436
+ pub fn bloom_physics_body_add_impulse_at(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64) { jb_body_add_impulse_at(a0, a1, a2, a3, a4, a5, a6) }
437
+ #[cfg(feature = "jolt")]
438
+ #[wasm_bindgen]
439
+ pub fn bloom_physics_body_set_friction(a0: f64, a1: f64) { jb_body_set_friction(a0, a1) }
440
+ #[cfg(feature = "jolt")]
441
+ #[wasm_bindgen]
442
+ pub fn bloom_physics_body_set_restitution(a0: f64, a1: f64) { jb_body_set_restitution(a0, a1) }
443
+ #[cfg(feature = "jolt")]
444
+ #[wasm_bindgen]
445
+ pub fn bloom_physics_body_set_linear_damping(a0: f64, a1: f64) { jb_body_set_linear_damping(a0, a1) }
446
+ #[cfg(feature = "jolt")]
447
+ #[wasm_bindgen]
448
+ pub fn bloom_physics_body_set_angular_damping(a0: f64, a1: f64) { jb_body_set_angular_damping(a0, a1) }
449
+ #[cfg(feature = "jolt")]
450
+ #[wasm_bindgen]
451
+ pub fn bloom_physics_body_set_gravity_factor(a0: f64, a1: f64) { jb_body_set_gravity_factor(a0, a1) }
452
+ #[cfg(feature = "jolt")]
453
+ #[wasm_bindgen]
454
+ pub fn bloom_physics_body_set_ccd(a0: f64, a1: f64) { jb_body_set_ccd(a0, a1) }
455
+ #[cfg(feature = "jolt")]
456
+ #[wasm_bindgen]
457
+ pub fn bloom_physics_body_set_motion_type(a0: f64, a1: f64, a2: f64) { jb_body_set_motion_type(a0, a1, a2) }
458
+ #[cfg(feature = "jolt")]
459
+ #[wasm_bindgen]
460
+ pub fn bloom_physics_body_set_object_layer(a0: f64, a1: f64) { jb_body_set_object_layer(a0, a1) }
461
+ #[cfg(feature = "jolt")]
462
+ #[wasm_bindgen]
463
+ pub fn bloom_physics_body_set_is_sensor(a0: f64, a1: f64) { jb_body_set_is_sensor(a0, a1) }
464
+ #[cfg(feature = "jolt")]
465
+ #[wasm_bindgen]
466
+ pub fn bloom_physics_body_set_allow_sleeping(a0: f64, a1: f64) { jb_body_set_allow_sleeping(a0, a1) }
467
+ #[cfg(feature = "jolt")]
468
+ #[wasm_bindgen]
469
+ pub fn bloom_physics_body_set_shape(a0: f64, a1: f64, a2: f64, a3: f64) { jb_body_set_shape(a0, a1, a2, a3) }
470
+ #[cfg(feature = "jolt")]
471
+ #[wasm_bindgen]
472
+ pub fn bloom_physics_body_lock_rotation_axes(a0: f64, a1: f64, a2: f64, a3: f64) { jb_body_lock_rotation_axes(a0, a1, a2, a3) }
473
+ #[cfg(feature = "jolt")]
474
+ #[wasm_bindgen]
475
+ pub fn bloom_physics_body_lock_translation_axes(a0: f64, a1: f64, a2: f64, a3: f64) { jb_body_lock_translation_axes(a0, a1, a2, a3) }
476
+ #[cfg(feature = "jolt")]
477
+ #[wasm_bindgen]
478
+ pub fn bloom_physics_body_get_mass(a0: f64) -> f64 { jb_body_get_mass(a0) }
479
+ #[cfg(feature = "jolt")]
480
+ #[wasm_bindgen]
481
+ pub fn bloom_physics_body_get_friction(a0: f64) -> f64 { jb_body_get_friction(a0) }
482
+ #[cfg(feature = "jolt")]
483
+ #[wasm_bindgen]
484
+ pub fn bloom_physics_body_get_restitution(a0: f64) -> f64 { jb_body_get_restitution(a0) }
485
+ #[cfg(feature = "jolt")]
486
+ #[wasm_bindgen]
487
+ pub fn bloom_physics_body_get_object_layer(a0: f64) -> f64 { jb_body_get_object_layer(a0) }
488
+ #[cfg(feature = "jolt")]
489
+ #[wasm_bindgen]
490
+ pub fn bloom_physics_body_set_user_data(a0: f64, a1: f64, a2: f64) { jb_body_set_user_data(a0, a1, a2) }
491
+ #[cfg(feature = "jolt")]
492
+ #[wasm_bindgen]
493
+ pub fn bloom_physics_body_get_user_data(a0: f64, a1: f64) -> f64 { jb_body_get_user_data(a0, a1) }
494
+ #[cfg(feature = "jolt")]
495
+ #[wasm_bindgen]
496
+ pub fn bloom_physics_raycast(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64) -> f64 { jb_raycast(a0, a1, a2, a3, a4, a5, a6, a7, a8) }
497
+ #[cfg(feature = "jolt")]
498
+ #[wasm_bindgen]
499
+ pub fn bloom_physics_raycast_all(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64) -> f64 { jb_raycast_all(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) }
500
+ #[cfg(feature = "jolt")]
501
+ #[wasm_bindgen]
502
+ pub fn bloom_physics_ray_hit_count() -> f64 { jb_ray_hit_count() }
503
+ #[cfg(feature = "jolt")]
504
+ #[wasm_bindgen]
505
+ pub fn bloom_physics_ray_hit_body(a0: f64) -> f64 { jb_ray_hit_body(a0) }
506
+ #[cfg(feature = "jolt")]
507
+ #[wasm_bindgen]
508
+ pub fn bloom_physics_ray_hit_axis(a0: f64, a1: f64) -> f64 { jb_ray_hit_axis(a0, a1) }
509
+ #[cfg(feature = "jolt")]
510
+ #[wasm_bindgen]
511
+ pub fn bloom_physics_ray_hit_fraction(a0: f64) -> f64 { jb_ray_hit_fraction(a0) }
512
+ #[cfg(feature = "jolt")]
513
+ #[wasm_bindgen]
514
+ pub fn bloom_physics_ray_hit_sub_shape(a0: f64) -> f64 { jb_ray_hit_sub_shape(a0) }
515
+ #[cfg(feature = "jolt")]
516
+ #[wasm_bindgen]
517
+ pub fn bloom_physics_overlap_sphere(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64) -> f64 { jb_overlap_sphere(a0, a1, a2, a3, a4, a5, a6) }
518
+ #[cfg(feature = "jolt")]
519
+ #[wasm_bindgen]
520
+ pub fn bloom_physics_overlap_point(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64) -> f64 { jb_overlap_point(a0, a1, a2, a3, a4, a5) }
521
+ #[cfg(feature = "jolt")]
522
+ #[wasm_bindgen]
523
+ pub fn bloom_physics_overlap_box(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64) -> f64 { jb_overlap_box(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) }
524
+ #[cfg(feature = "jolt")]
525
+ #[wasm_bindgen]
526
+ pub fn bloom_physics_overlap_body(a0: f64) -> f64 { jb_overlap_body(a0) }
527
+ #[cfg(feature = "jolt")]
528
+ #[wasm_bindgen]
529
+ pub fn bloom_physics_constraint_fixed(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64) -> f64 { jb_constraint_fixed(a0, a1, a2, a3, a4, a5, a6, a7, a8) }
530
+ #[cfg(feature = "jolt")]
531
+ #[wasm_bindgen]
532
+ pub fn bloom_physics_constraint_point(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64) -> f64 { jb_constraint_point(a0, a1, a2, a3, a4, a5, a6, a7, a8) }
533
+ #[cfg(feature = "jolt")]
534
+ #[wasm_bindgen]
535
+ pub fn bloom_physics_constraint_hinge(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64) -> f64 { jb_constraint_hinge(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) }
536
+ #[cfg(feature = "jolt")]
537
+ #[wasm_bindgen]
538
+ pub fn bloom_physics_constraint_slider(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64) -> f64 { jb_constraint_slider(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) }
539
+ #[cfg(feature = "jolt")]
540
+ #[wasm_bindgen]
541
+ pub fn bloom_physics_constraint_distance(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64) -> f64 { jb_constraint_distance(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) }
542
+ #[cfg(feature = "jolt")]
543
+ #[wasm_bindgen]
544
+ pub fn bloom_physics_constraint_destroy(a0: f64) { jb_constraint_destroy(a0) }
545
+ #[cfg(feature = "jolt")]
546
+ #[wasm_bindgen]
547
+ pub fn bloom_physics_constraint_set_enabled(a0: f64, a1: f64) { jb_constraint_set_enabled(a0, a1) }
548
+ #[cfg(feature = "jolt")]
549
+ #[wasm_bindgen]
550
+ pub fn bloom_physics_contact_count() -> f64 { jb_contact_count() }
551
+ #[cfg(feature = "jolt")]
552
+ #[wasm_bindgen]
553
+ pub fn bloom_physics_contact_field(a0: f64, a1: f64) -> f64 { jb_contact_field(a0, a1) }
554
+ #[cfg(feature = "jolt")]
555
+ #[wasm_bindgen]
556
+ pub fn bloom_physics_clear_contacts(a0: f64) { jb_clear_contacts(a0) }
557
+ #[cfg(feature = "jolt")]
558
+ #[wasm_bindgen]
559
+ pub fn bloom_physics_character_create(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64, a14: f64, a15: f64, a16: f64, a17: f64, a18: f64) -> f64 { jb_character_create(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) }
560
+ #[cfg(feature = "jolt")]
561
+ #[wasm_bindgen]
562
+ pub fn bloom_physics_character_destroy(a0: f64) { jb_character_destroy(a0) }
563
+ #[cfg(feature = "jolt")]
564
+ #[wasm_bindgen]
565
+ pub fn bloom_physics_character_update(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64) { jb_character_update(a0, a1, a2, a3, a4) }
566
+ #[cfg(feature = "jolt")]
567
+ #[wasm_bindgen]
568
+ pub fn bloom_physics_character_get_position(a0: f64, a1: f64) -> f64 { jb_character_get_position(a0, a1) }
569
+ #[cfg(feature = "jolt")]
570
+ #[wasm_bindgen]
571
+ pub fn bloom_physics_character_get_rotation(a0: f64, a1: f64) -> f64 { jb_character_get_rotation(a0, a1) }
572
+ #[cfg(feature = "jolt")]
573
+ #[wasm_bindgen]
574
+ pub fn bloom_physics_character_set_position(a0: f64, a1: f64, a2: f64, a3: f64) { jb_character_set_position(a0, a1, a2, a3) }
575
+ #[cfg(feature = "jolt")]
576
+ #[wasm_bindgen]
577
+ pub fn bloom_physics_character_set_rotation(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64) { jb_character_set_rotation(a0, a1, a2, a3, a4) }
578
+ #[cfg(feature = "jolt")]
579
+ #[wasm_bindgen]
580
+ pub fn bloom_physics_character_get_linear_velocity(a0: f64, a1: f64) -> f64 { jb_character_get_linear_velocity(a0, a1) }
581
+ #[cfg(feature = "jolt")]
582
+ #[wasm_bindgen]
583
+ pub fn bloom_physics_character_set_linear_velocity(a0: f64, a1: f64, a2: f64, a3: f64) { jb_character_set_linear_velocity(a0, a1, a2, a3) }
584
+ #[cfg(feature = "jolt")]
585
+ #[wasm_bindgen]
586
+ pub fn bloom_physics_character_get_ground_state(a0: f64) -> f64 { jb_character_get_ground_state(a0) }
587
+ #[cfg(feature = "jolt")]
588
+ #[wasm_bindgen]
589
+ pub fn bloom_physics_character_get_ground_normal(a0: f64, a1: f64) -> f64 { jb_character_get_ground_normal(a0, a1) }
590
+ #[cfg(feature = "jolt")]
591
+ #[wasm_bindgen]
592
+ pub fn bloom_physics_character_get_ground_position(a0: f64, a1: f64) -> f64 { jb_character_get_ground_position(a0, a1) }
593
+ #[cfg(feature = "jolt")]
594
+ #[wasm_bindgen]
595
+ pub fn bloom_physics_character_get_ground_body(a0: f64) -> f64 { jb_character_get_ground_body(a0) }
596
+ #[cfg(feature = "jolt")]
597
+ #[wasm_bindgen]
598
+ pub fn bloom_physics_character_set_shape(a0: f64, a1: f64) { jb_character_set_shape(a0, a1) }
599
+ #[cfg(feature = "jolt")]
600
+ #[wasm_bindgen]
601
+ pub fn bloom_physics_soft_body_create(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64, a14: f64) -> f64 { jb_soft_body_create(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) }
602
+ #[cfg(feature = "jolt")]
603
+ #[wasm_bindgen]
604
+ pub fn bloom_physics_soft_body_vertex_count(a0: f64) -> f64 { jb_soft_body_vertex_count(a0) }
605
+ #[cfg(feature = "jolt")]
606
+ #[wasm_bindgen]
607
+ pub fn bloom_physics_soft_body_get_vertex(a0: f64, a1: f64, a2: f64) -> f64 { jb_soft_body_get_vertex(a0, a1, a2) }
608
+ #[cfg(feature = "jolt")]
609
+ #[wasm_bindgen]
610
+ pub fn bloom_physics_soft_body_set_vertex(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64) { jb_soft_body_set_vertex(a0, a1, a2, a3, a4) }
611
+ #[cfg(feature = "jolt")]
612
+ #[wasm_bindgen]
613
+ pub fn bloom_physics_soft_body_set_vertex_inv_mass(a0: f64, a1: f64, a2: f64) { jb_soft_body_set_vertex_inv_mass(a0, a1, a2) }
614
+ #[cfg(feature = "jolt")]
615
+ #[wasm_bindgen]
616
+ // 37 params, matching the manifest, physics_jolt.rs, and jolt_bridge.js's
617
+ // vehicleCreate. Carried a 38th (trailing, so nothing shifted) that arrived
618
+ // NaN and was dropped on the JS floor.
619
+ pub fn bloom_physics_vehicle_create(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64, a5: f64, a6: f64, a7: f64, a8: f64, a9: f64, a10: f64, a11: f64, a12: f64, a13: f64, a14: f64, a15: f64, a16: f64, a17: f64, a18: f64, a19: f64, a20: f64, a21: f64, a22: f64, a23: f64, a24: f64, a25: f64, a26: f64, a27: f64, a28: f64, a29: f64, a30: f64, a31: f64, a32: f64, a33: f64, a34: f64, a35: f64, a36: f64) -> f64 { jb_vehicle_create(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, a35, a36) }
620
+ #[cfg(feature = "jolt")]
621
+ #[wasm_bindgen]
622
+ pub fn bloom_physics_vehicle_destroy(a0: f64) { jb_vehicle_destroy(a0) }
623
+ #[cfg(feature = "jolt")]
624
+ #[wasm_bindgen]
625
+ pub fn bloom_physics_vehicle_get_chassis(a0: f64) -> f64 { jb_vehicle_get_chassis(a0) }
626
+ #[cfg(feature = "jolt")]
627
+ #[wasm_bindgen]
628
+ pub fn bloom_physics_vehicle_set_input(a0: f64, a1: f64, a2: f64, a3: f64, a4: f64) { jb_vehicle_set_input(a0, a1, a2, a3, a4) }
629
+ #[cfg(feature = "jolt")]
630
+ #[wasm_bindgen]
631
+ pub fn bloom_physics_vehicle_get_wheel_transform(a0: f64, a1: f64, a2: f64) -> f64 { jb_vehicle_get_wheel_transform(a0, a1, a2) }
632
+ #[cfg(feature = "jolt")]
633
+ #[wasm_bindgen]
634
+ pub fn bloom_physics_vehicle_get_engine_rpm(a0: f64) -> f64 { jb_vehicle_get_engine_rpm(a0) }
635
+ #[cfg(feature = "jolt")]
636
+ #[wasm_bindgen]
637
+ pub fn bloom_physics_vehicle_get_wheel_angular_velocity(a0: f64, a1: f64) -> f64 { jb_vehicle_get_wheel_angular_velocity(a0, a1) }
638
+
639
+ #[cfg(feature = "jolt")]
640
+ #[wasm_bindgen]
641
+ pub async fn bloom_physics_init_jolt(factory: JsValue) -> Result<(), JsValue> {
642
+ jb_init_jolt(factory).await.map(|_| ())
643
+ }