Difference between revisions of "B2"

From GiderosMobile
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2011.6<br/> === Description === <br /> To load the Box2D library, call `require "box2d"`. A...")
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' <br/>
+
'''Supported platforms:''' android, ios, mac, pc<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
Line 7: Line 7:
 
classes and functions related to Box2D physics library. <br />
 
classes and functions related to Box2D physics library. <br />
 
<br />
 
<br />
 +
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 
{|-
 
{|-
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Methods ===
 
=== Methods ===
 +
[[b2.createDistanceJointDef]] - creates and returns a distance joint definition table<br/>
 +
[[b2.createFrictionJointDef]] - creates and returns a friction joint definition table<br/>
 +
[[b2.createGearJointDef]] - creates and returns a gear joint definition table<br/>
 +
[[b2.createMouseJointDef]] - creates and returns a mouse joint definition table<br/>
 +
[[b2.createPrismaticJointDef]] - creates and returns a prismatic joint definition table<br/>
 +
[[b2.createPulleyJointDef]] - creates and returns a pulley joint definition table<br/>
 +
[[b2.createRevoluteJointDef]] - creates and returns a revolute joint definition table<br/>
 +
[[b2.createRopeJointDef]] - <br/>
 +
[[b2.createWeldJointDef]] - creates and returns a weld joint definition table<br/>
 +
[[b2.createWheelJointDef]] - creates and returns a wheel joint definition table<br/>
 +
[[b2.getScale]] - returns the global pixels to meters scale<br/>
 +
[[b2.setScale]] - sets the global pixels to meters scale<br/>
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===
 +
[[b2.DISTANCE_JOINT]]
 +
[[b2.DYNAMIC_BODY]]
 +
[[b2.FRICTION_JOINT]]
 +
[[b2.GEAR_JOINT]]
 +
[[b2.KINEMATIC_BODY]]
 +
[[b2.MOUSE_JOINT]]
 +
[[b2.PRISMATIC_JOINT]]
 +
[[b2.PULLEY_JOINT]]
 +
[[b2.REVOLUTE_JOINT]]
 +
[[b2.ROPE_JOINT]]
 +
[[b2.STATIC_BODY]]
 +
[[b2.WELD_JOINT]]
 +
[[b2.WHEEL_JOINT]]
 
|}
 
|}

Revision as of 09:56, 23 August 2018

Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6

Description


To load the Box2D library, call `require "box2d"`. After loading Box2D library, `b2` table stores all
classes and functions related to Box2D physics library.
















Methods

b2.createDistanceJointDef - creates and returns a distance joint definition table
b2.createFrictionJointDef - creates and returns a friction joint definition table
b2.createGearJointDef - creates and returns a gear joint definition table
b2.createMouseJointDef - creates and returns a mouse joint definition table
b2.createPrismaticJointDef - creates and returns a prismatic joint definition table
b2.createPulleyJointDef - creates and returns a pulley joint definition table
b2.createRevoluteJointDef - creates and returns a revolute joint definition table
b2.createRopeJointDef -
b2.createWeldJointDef - creates and returns a weld joint definition table
b2.createWheelJointDef - creates and returns a wheel joint definition table
b2.getScale - returns the global pixels to meters scale
b2.setScale - sets the global pixels to meters scale

Events

Constants

b2.DISTANCE_JOINT b2.DYNAMIC_BODY b2.FRICTION_JOINT b2.GEAR_JOINT b2.KINEMATIC_BODY b2.MOUSE_JOINT b2.PRISMATIC_JOINT b2.PULLEY_JOINT b2.REVOLUTE_JOINT b2.ROPE_JOINT b2.STATIC_BODY b2.WELD_JOINT b2.WHEEL_JOINT