Skip to content

Releases: d954mas/defold-box2d

1.0.3

05 May 09:00
Compare
Choose a tag to compare

Update for defold 1.8.0

1.0.2

28 Jan 11:29
Compare
Choose a tag to compare

Fixed #19

1.0.1

20 Sep 07:56
fcefce3
Compare
Choose a tag to compare

Remove appmanifest(remove box2d in ext.manifest)
Add M1 support

1.0.0

08 Oct 19:59
2455911
Compare
Choose a tag to compare

1.Replace b2assert with dmLogError
2.Refactor wrapper for b2Contact
3.Fixed wrappers for box2dObjects was not delete.
4.Add old_manifold and impulse to contact listener
5.Add Box2dContact:GetNext()
6.Add Box2dWorld:GetContactList()
7.Add Box2dBody:GetJointList()
8.Add Box2dBody:GetContactList()

0.9.3

06 Oct 15:32
Compare
Choose a tag to compare

1.Refactor(add base class for b2objects wrappers, fixed some memory leaks)
2.Replace lua_error with luaL_error(luaL_error show line number)
3.Add Box2dWorld:SetDestructionListener(listener)
4.Replace b2assert with printf

0.9.2

22 Jul 11:23
Compare
Choose a tag to compare
  1. Add binding for b2Shape.(Now you can create and manipulate box2d shapes)

  2. body:GetTransform() return b2Transform table. Prev was position and angle.

  3. fixed debug render not draw transform(center of mass)

  4. Add Box2dFixture function.(Box2dFixture full binding done)
    -Box2dFixture:GetAABB()
    -Box2dFixture:GetShape()
    -Box2dFixture:RayCast()

0.9.1

14 Jul 20:35
a705147
Compare
Choose a tag to compare

Add binding for b2Filter

0.9

13 Jul 17:19
Compare
Choose a tag to compare
0.9

1)add Box2dContact:GetManifold()

--- Get the local manifold.
---@return Box2dManifold
function Box2dContact:GetManifold() end

2)add Box2dContact:GetWorldManifold()

--- Get the world manifold.
---@return Box2dWorldManifold
function Box2dContact:GetWorldManifold() end

3)move all native code to namespace box2dDefoldNE

0.89

08 Jul 20:03
b21b09f
Compare
Choose a tag to compare

1)add world:RayCast

--- Ray-cast the world for all fixtures in the path of the ray. Your callback
--- controls whether you get the closest point, any point, or n-points.
--- The ray-cast ignores shapes that contain the starting point.
--- @param callback function(Box2dFixture fixture, vector3 point, vector3 normal, float fraction)
--- @param point1 vector3 ray starting point
--- @param point2 vector3 ray ending point
function Box2dWorld:RayCast(callback, point1, point2) end

2)add world:QueryAABB

--- Query the world for all fixtures that potentially overlap the
--- provided AABB.
---@param callback function(Box2dFixture fixture)
---@param aabb table the query box. {lowerBound = vmath.vector3(0), upperBound = vmath.vector3(0)}
function Box2dWorld:QueryAABB(callback, aabb) end

3)add world:SetContactListener
no old_manifold in PreSolve
no impulse in PostSolve

--- Register a contact event listener.
--- listener = {
---    BeginContact = function (contact) end,
---    EndContact = function(contact) end,
---    PreSolve = function(contact, old_manifold) end,
---    PostSolve = function(contact,impulse) end
--- }
---@param listener table|nil
function Box2dWorld:SetContactListener(listener) end

4)add binding for b2Contact.
18 functions

0.85

03 Jul 16:28
9db4276
Compare
Choose a tag to compare

1)Refactor example scene get debug draw.
2)Fixed android/ios builds. The dump function can't create a file on mobile.
3)[Breaking change] Refactor jointDef initialize method
-Make initializeJoint method for every joint in box2d. This method return joint def lua table.
function box2d.InitializePrismaticJointDef(bodyA, bodyB, anchor, axis) end
...
-Remove initialize call when create joint from table. In world:CreateJoint()
So you can use initialize method if you need it. Or not use it, and create table manually.