Difference between revisions of "B2"

From GiderosMobile
Line 4: Line 4:
 
=== Description ===
 
=== Description ===
 
<translate><br />
 
<translate><br />
To load the Box2D library, call [[require &quot;box2d&quot;]]. After loading Box2D library, [[b2]] table stores all <br />
+
To load the Box2D library, call [[Special:MyLanguage/require &quot;box2d&quot;|require &quot;box2d&quot;]]. After loading Box2D library, [[Special:MyLanguage/b2|b2]] table stores all <br />
 
classes and functions related to Box2D physics library. <br />
 
classes and functions related to Box2D physics library. <br />
 
<br /></translate>
 
<br /></translate>
Line 10: Line 10:
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Methods ===
 
=== Methods ===
[[b2.createDistanceJointDef]] ''<translate>creates and returns a distance joint definition table</translate>''<br/>
+
[[Special:MyLanguage/b2.createDistanceJointDef|b2.createDistanceJointDef]] ''<translate>creates and returns a distance joint definition table</translate>''<br/>
[[b2.createFrictionJointDef]] ''<translate>creates and returns a friction joint definition table</translate>''<br/>
+
[[Special:MyLanguage/b2.createFrictionJointDef|b2.createFrictionJointDef]] ''<translate>creates and returns a friction joint definition table</translate>''<br/>
[[b2.createGearJointDef]] ''<translate>creates and returns a gear joint definition table</translate>''<br/>
+
[[Special:MyLanguage/b2.createGearJointDef|b2.createGearJointDef]] ''<translate>creates and returns a gear joint definition table</translate>''<br/>
[[b2.createMouseJointDef]] ''<translate>creates and returns a mouse joint definition table</translate>''<br/>
+
[[Special:MyLanguage/b2.createMouseJointDef|b2.createMouseJointDef]] ''<translate>creates and returns a mouse joint definition table</translate>''<br/>
[[b2.createPrismaticJointDef]] ''<translate>creates and returns a prismatic joint definition table</translate>''<br/>
+
[[Special:MyLanguage/b2.createPrismaticJointDef|b2.createPrismaticJointDef]] ''<translate>creates and returns a prismatic joint definition table</translate>''<br/>
[[b2.createPulleyJointDef]] ''<translate>creates and returns a pulley joint definition table</translate>''<br/>
+
[[Special:MyLanguage/b2.createPulleyJointDef|b2.createPulleyJointDef]] ''<translate>creates and returns a pulley joint definition table</translate>''<br/>
[[b2.createRevoluteJointDef]] ''<translate>creates and returns a revolute joint definition table</translate>''<br/>
+
[[Special:MyLanguage/b2.createRevoluteJointDef|b2.createRevoluteJointDef]] ''<translate>creates and returns a revolute joint definition table</translate>''<br/>
[[b2.createRopeJointDef]] <br/>
+
[[Special:MyLanguage/b2.createRopeJointDef|b2.createRopeJointDef]] <br/>
[[b2.createWeldJointDef]] ''<translate>creates and returns a weld joint definition table</translate>''<br/>
+
[[Special:MyLanguage/b2.createWeldJointDef|b2.createWeldJointDef]] ''<translate>creates and returns a weld joint definition table</translate>''<br/>
[[b2.createWheelJointDef]] ''<translate>creates and returns a wheel joint definition table</translate>''<br/>
+
[[Special:MyLanguage/b2.createWheelJointDef|b2.createWheelJointDef]] ''<translate>creates and returns a wheel joint definition table</translate>''<br/>
[[b2.getScale]] ''<translate>returns the global pixels to meters scale</translate>''<br/>
+
[[Special:MyLanguage/b2.getScale|b2.getScale]] ''<translate>returns the global pixels to meters scale</translate>''<br/>
[[b2.setScale]] ''<translate>sets the global pixels to meters scale</translate>''<br/>
+
[[Special:MyLanguage/b2.setScale|b2.setScale]] ''<translate>sets the global pixels to meters scale</translate>''<br/>
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===
[[b2.DISTANCE_JOINT]]<br/>
+
[[Special:MyLanguage/b2.DISTANCE_JOINT|b2.DISTANCE_JOINT]]<br/>
[[b2.DYNAMIC_BODY]]<br/>
+
[[Special:MyLanguage/b2.DYNAMIC_BODY|b2.DYNAMIC_BODY]]<br/>
[[b2.FRICTION_JOINT]]<br/>
+
[[Special:MyLanguage/b2.FRICTION_JOINT|b2.FRICTION_JOINT]]<br/>
[[b2.GEAR_JOINT]]<br/>
+
[[Special:MyLanguage/b2.GEAR_JOINT|b2.GEAR_JOINT]]<br/>
[[b2.KINEMATIC_BODY]]<br/>
+
[[Special:MyLanguage/b2.KINEMATIC_BODY|b2.KINEMATIC_BODY]]<br/>
[[b2.MOUSE_JOINT]]<br/>
+
[[Special:MyLanguage/b2.MOUSE_JOINT|b2.MOUSE_JOINT]]<br/>
[[b2.PRISMATIC_JOINT]]<br/>
+
[[Special:MyLanguage/b2.PRISMATIC_JOINT|b2.PRISMATIC_JOINT]]<br/>
[[b2.PULLEY_JOINT]]<br/>
+
[[Special:MyLanguage/b2.PULLEY_JOINT|b2.PULLEY_JOINT]]<br/>
[[b2.REVOLUTE_JOINT]]<br/>
+
[[Special:MyLanguage/b2.REVOLUTE_JOINT|b2.REVOLUTE_JOINT]]<br/>
[[b2.ROPE_JOINT]]<br/>
+
[[Special:MyLanguage/b2.ROPE_JOINT|b2.ROPE_JOINT]]<br/>
[[b2.STATIC_BODY]]<br/>
+
[[Special:MyLanguage/b2.STATIC_BODY|b2.STATIC_BODY]]<br/>
[[b2.WELD_JOINT]]<br/>
+
[[Special:MyLanguage/b2.WELD_JOINT|b2.WELD_JOINT]]<br/>
[[b2.WHEEL_JOINT]]<br/>
+
[[Special:MyLanguage/b2.WHEEL_JOINT|b2.WHEEL_JOINT]]<br/>
 
|}
 
|}

Revision as of 16:34, 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