forked from LeenkxTeam/LNXSDK
HaxeJolt
This commit is contained in:
26
lib/haxejolt/README.md
Normal file
26
lib/haxejolt/README.md
Normal file
@ -0,0 +1,26 @@
|
||||
# HaxeJolt - Jolt Physics Bindings for Haxe and Leenkx SDK
|
||||
|
||||
Haxe bindings for [Jolt Physics](https://github.com/jrouwe/JoltPhysics), a multi-core friendly rigid body physics and collision detection library.
|
||||
|
||||
## Targets
|
||||
|
||||
- **HashLink (HL)**: Native C++ bindings via `hl/jolt.cpp`
|
||||
- **JavaScript/HTML5**: Uses [JoltPhysics.js](https://github.com/jrouwe/JoltPhysics.js) (WASM)
|
||||
- **RunT**: Direct C++ integration
|
||||
|
||||
## Usage
|
||||
|
||||
```haxe
|
||||
import jolt.Jt;
|
||||
|
||||
var system = new Jt.PhysicsSystem();
|
||||
system.Init(1024, 0, 1024, 1024, broadPhaseLayer, objectVsBroadPhase, objectLayerPair);
|
||||
|
||||
var shape = new Jt.BoxShape(new Jt.Vec3(1, 1, 1));
|
||||
var settings = new Jt.BodyCreationSettings(shape, new Jt.Vec3(0, 10, 0), Jt.Quat.sIdentity(), EMotionType_Dynamic, 1);
|
||||
var body = system.GetBodyInterface().CreateBody(settings);
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT License - Same as Jolt Physics
|
||||
Reference in New Issue
Block a user