Difference between revisions of "B2"
Line 12: | Line 12: | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== <translate>Methods</translate> === | === <translate>Methods</translate> === | ||
− | [[Special:MyLanguage/b2.createDistanceJointDef|b2.createDistanceJointDef]] ''<translate>creates and returns a distance joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createDistanceJointDef --> | + | [[Special:MyLanguage/b2.createDistanceJointDef|b2.createDistanceJointDef]] ''<translate>creates and returns a distance joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createDistanceJointDef(bodyA,bodyB,anchorAx,anchorAy,anchorBx,anchorBy) creates and returns a distance joint definition table --> |
− | [[Special:MyLanguage/b2.createFrictionJointDef|b2.createFrictionJointDef]] ''<translate>creates and returns a friction joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createFrictionJointDef --> | + | [[Special:MyLanguage/b2.createFrictionJointDef|b2.createFrictionJointDef]] ''<translate>creates and returns a friction joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createFrictionJointDef(bodyA,bodyB,anchorx,anchory) creates and returns a friction joint definition table --> |
− | [[Special:MyLanguage/b2.createGearJointDef|b2.createGearJointDef]] ''<translate>creates and returns a gear joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createGearJointDef --> | + | [[Special:MyLanguage/b2.createGearJointDef|b2.createGearJointDef]] ''<translate>creates and returns a gear joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createGearJointDef(bodyA,bodyB,joint1,joint2,ratio) creates and returns a gear joint definition table --> |
− | [[Special:MyLanguage/b2.createMouseJointDef|b2.createMouseJointDef]] ''<translate>creates and returns a mouse joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createMouseJointDef --> | + | [[Special:MyLanguage/b2.createMouseJointDef|b2.createMouseJointDef]] ''<translate>creates and returns a mouse joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createMouseJointDef(bodyA,bodyB,targetx,targety,maxForce,frequencyHz,dampingRatio) creates and returns a mouse joint definition table --> |
− | [[Special:MyLanguage/b2.createPrismaticJointDef|b2.createPrismaticJointDef]] ''<translate>creates and returns a prismatic joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createPrismaticJointDef --> | + | [[Special:MyLanguage/b2.createPrismaticJointDef|b2.createPrismaticJointDef]] ''<translate>creates and returns a prismatic joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createPrismaticJointDef(bodyA,bodyB,anchorx,anchory,axisx,axisy) creates and returns a prismatic joint definition table --> |
− | [[Special:MyLanguage/b2.createPulleyJointDef|b2.createPulleyJointDef]] ''<translate>creates and returns a pulley joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createPulleyJointDef --> | + | [[Special:MyLanguage/b2.createPulleyJointDef|b2.createPulleyJointDef]] ''<translate>creates and returns a pulley joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createPulleyJointDef(bodyA,bodyB,groundAnchorAx,groundAnchorAy,groundAnchorBx,groundAnchorBy,anchorAx,anchorAy,anchorBx,anchorBy,ratio) creates and returns a pulley joint definition table --> |
− | [[Special:MyLanguage/b2.createRevoluteJointDef|b2.createRevoluteJointDef]] ''<translate>creates and returns a revolute joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createRevoluteJointDef --> | + | [[Special:MyLanguage/b2.createRevoluteJointDef|b2.createRevoluteJointDef]] ''<translate>creates and returns a revolute joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createRevoluteJointDef(bodyA,bodyB,anchorx,anchory) creates and returns a revolute joint definition table --> |
− | [[Special:MyLanguage/b2.createRopeJointDef|b2.createRopeJointDef]] <br/><!-- GIDEROSMTD:b2.createRopeJointDef --> | + | [[Special:MyLanguage/b2.createRopeJointDef|b2.createRopeJointDef]] <br/><!-- GIDEROSMTD:b2.createRopeJointDef(bodyA,bodyB,anchorAx,anchorAy,anchorBx,anchorBy,maxLength) --> |
− | [[Special:MyLanguage/b2.createWeldJointDef|b2.createWeldJointDef]] ''<translate>creates and returns a weld joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createWeldJointDef --> | + | [[Special:MyLanguage/b2.createWeldJointDef|b2.createWeldJointDef]] ''<translate>creates and returns a weld joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createWeldJointDef(bodyA,bodyB,anchorAx,anchorAy,anchorBx,anchorBy) creates and returns a weld joint definition table --> |
− | [[Special:MyLanguage/b2.createWheelJointDef|b2.createWheelJointDef]] ''<translate>creates and returns a wheel joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createWheelJointDef --> | + | [[Special:MyLanguage/b2.createWheelJointDef|b2.createWheelJointDef]] ''<translate>creates and returns a wheel joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createWheelJointDef(bodyA,bodyB,anchorx,anchory,axisx,axisy) creates and returns a wheel joint definition table --> |
− | [[Special:MyLanguage/b2.getScale|b2.getScale]] ''<translate>returns the global pixels to meters scale</translate>''<br/><!-- GIDEROSMTD:b2.getScale --> | + | [[Special:MyLanguage/b2.getScale|b2.getScale]] ''<translate>returns the global pixels to meters scale</translate>''<br/><!-- GIDEROSMTD:b2.getScale() returns the global pixels to meters scale --> |
− | [[Special:MyLanguage/b2.setScale|b2.setScale]] ''<translate>sets the global pixels to meters scale</translate>''<br/><!-- GIDEROSMTD:b2.setScale --> | + | [[Special:MyLanguage/b2.setScale|b2.setScale]] ''<translate>sets the global pixels to meters scale</translate>''<br/><!-- GIDEROSMTD:b2.setScale(scale) sets the global pixels to meters scale --> |
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
=== <translate>Events</translate> === | === <translate>Events</translate> === | ||
=== <translate>Constants</translate> === | === <translate>Constants</translate> === | ||
− | [[Special:MyLanguage/b2.DISTANCE_JOINT|b2.DISTANCE_JOINT]]<br/><!-- GIDEROSCST:b2.DISTANCE_JOINT --> | + | [[Special:MyLanguage/b2.DISTANCE_JOINT|b2.DISTANCE_JOINT]]<br/><!-- GIDEROSCST:b2.DISTANCE_JOINT 3--> |
− | [[Special:MyLanguage/b2.DYNAMIC_BODY|b2.DYNAMIC_BODY]]<br/><!-- GIDEROSCST:b2.DYNAMIC_BODY --> | + | [[Special:MyLanguage/b2.DYNAMIC_BODY|b2.DYNAMIC_BODY]]<br/><!-- GIDEROSCST:b2.DYNAMIC_BODY 2--> |
− | [[Special:MyLanguage/b2.FRICTION_JOINT|b2.FRICTION_JOINT]]<br/><!-- GIDEROSCST:b2.FRICTION_JOINT --> | + | [[Special:MyLanguage/b2.FRICTION_JOINT|b2.FRICTION_JOINT]]<br/><!-- GIDEROSCST:b2.FRICTION_JOINT 9--> |
− | [[Special:MyLanguage/b2.GEAR_JOINT|b2.GEAR_JOINT]]<br/><!-- GIDEROSCST:b2.GEAR_JOINT --> | + | [[Special:MyLanguage/b2.GEAR_JOINT|b2.GEAR_JOINT]]<br/><!-- GIDEROSCST:b2.GEAR_JOINT 6--> |
− | [[Special:MyLanguage/b2.KINEMATIC_BODY|b2.KINEMATIC_BODY]]<br/><!-- GIDEROSCST:b2.KINEMATIC_BODY --> | + | [[Special:MyLanguage/b2.KINEMATIC_BODY|b2.KINEMATIC_BODY]]<br/><!-- GIDEROSCST:b2.KINEMATIC_BODY 1--> |
− | [[Special:MyLanguage/b2.MOUSE_JOINT|b2.MOUSE_JOINT]]<br/><!-- GIDEROSCST:b2.MOUSE_JOINT --> | + | [[Special:MyLanguage/b2.MOUSE_JOINT|b2.MOUSE_JOINT]]<br/><!-- GIDEROSCST:b2.MOUSE_JOINT 5--> |
− | [[Special:MyLanguage/b2.PRISMATIC_JOINT|b2.PRISMATIC_JOINT]]<br/><!-- GIDEROSCST:b2.PRISMATIC_JOINT --> | + | [[Special:MyLanguage/b2.PRISMATIC_JOINT|b2.PRISMATIC_JOINT]]<br/><!-- GIDEROSCST:b2.PRISMATIC_JOINT 2--> |
− | [[Special:MyLanguage/b2.PULLEY_JOINT|b2.PULLEY_JOINT]]<br/><!-- GIDEROSCST:b2.PULLEY_JOINT --> | + | [[Special:MyLanguage/b2.PULLEY_JOINT|b2.PULLEY_JOINT]]<br/><!-- GIDEROSCST:b2.PULLEY_JOINT 4--> |
− | [[Special:MyLanguage/b2.REVOLUTE_JOINT|b2.REVOLUTE_JOINT]]<br/><!-- GIDEROSCST:b2.REVOLUTE_JOINT --> | + | [[Special:MyLanguage/b2.REVOLUTE_JOINT|b2.REVOLUTE_JOINT]]<br/><!-- GIDEROSCST:b2.REVOLUTE_JOINT 1--> |
− | [[Special:MyLanguage/b2.ROPE_JOINT|b2.ROPE_JOINT]]<br/><!-- GIDEROSCST:b2.ROPE_JOINT --> | + | [[Special:MyLanguage/b2.ROPE_JOINT|b2.ROPE_JOINT]]<br/><!-- GIDEROSCST:b2.ROPE_JOINT 10--> |
− | [[Special:MyLanguage/b2.STATIC_BODY|b2.STATIC_BODY]]<br/><!-- GIDEROSCST:b2.STATIC_BODY --> | + | [[Special:MyLanguage/b2.STATIC_BODY|b2.STATIC_BODY]]<br/><!-- GIDEROSCST:b2.STATIC_BODY 0--> |
− | [[Special:MyLanguage/b2.WELD_JOINT|b2.WELD_JOINT]]<br/><!-- GIDEROSCST:b2.WELD_JOINT --> | + | [[Special:MyLanguage/b2.WELD_JOINT|b2.WELD_JOINT]]<br/><!-- GIDEROSCST:b2.WELD_JOINT 8--> |
− | [[Special:MyLanguage/b2.WHEEL_JOINT|b2.WHEEL_JOINT]]<br/><!-- GIDEROSCST:b2.WHEEL_JOINT --> | + | [[Special:MyLanguage/b2.WHEEL_JOINT|b2.WHEEL_JOINT]]<br/><!-- GIDEROSCST:b2.WHEEL_JOINT 7--> |
|} | |} |
Revision as of 15:33, 13 September 2018
Supported platforms:
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.
Methodsb2.createDistanceJointDef creates and returns a distance joint definition table |
EventsConstantsb2.DISTANCE_JOINT |