just_jolt 0.1.0
just_jolt: ^0.1.0 copied to clipboard
Jolt Physics v5.6.0 for Dart: joltc's C API and a C layer for batched reads, events, queries, characters and joints, compiled from source by a native build hook.
0.1.0 #
- Jolt Physics v5.6.0 for Dart.
Jolt(inpackage:just_jolt/just_jolt.dart, safe on the web) starts Jolt's job system once and says whether the library is in the build;package:just_jolt/ffi.dartadds the bindings. - Compiled only when the app asks:
hooks: user_defines: just_jolt: build: truein its pubspec. An app that has just_jolt through another package builds and ships nothing. - Jolt Physics v5.6.0 and joltc (
886e088) compiled from source by a two-stage build hook (unity files, one shared defines map, no CMake). Windows x64 and Android arm64-v8a / x86_64; a dev flavour (dev: true) adds Jolt's debug renderer and asserts. jj_*C layer: worlds with layers from a 16 × 16 grid on Jolt's table filters, a per-world temporary allocator and one job system for the process; buffered contact/sensor/activation events; batch reads of the moving bodies; raycasts, shape casts and overlaps;CharacterVirtualcharacters; fixed, point, hinge, slider, distance and six-DOF joints; int64 handles with a world registry and validity guards; teardown in any order andjj_destroy_allfor hot restart.JJ_WorldSettings.restitutionCombine: Jolt's own rule (the bouncier, the default), min, max or average. No axis convention: a character's up of zero means Jolt's +Y.- Windows: every thread that runs Jolt commits its stack once, so Dart's sampling profiler (debug and profile builds), which follows RBP through MSVC code that keeps no frame pointers, never reads uncommitted stack and crashes the process.
- Static compound shapes: the bindings include
JPH_StaticCompoundShape*andJPH_CompoundShapeSettings_AddShape2. - Web, compiled to JavaScript or to WebAssembly:
package:just_jolt/just_jolt.dartcompiles, andJolt.startsays Jolt cannot run. - On Windows, a build whose paths would pass the 259 characters MSVC and Dart's directory listing can open stops with a message that names the path, rather than a "cannot open" error for a file that is there.
- An example,
example/example.dart: a ball dropped on a floor. jj.hdocuments every function and struct field, and the generated bindings carry the comments.LICENSEcarries the Jolt and joltc MIT texts beside ours, in the form Flutter's licence page reads.- Bindings generated by ffigen (
ffi-native, assetpackage:just_jolt/just_jolt) for thejj_*layer and joltc's shapes and body interface.