2014-02-21 15:37:26 +00:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "utf-8" >
< title > Phaser Class: Body< / title >
<!-- [if lt IE 9]>
< script src = "//html5shiv.googlecode.com/svn/trunk/html5.js" > < / script >
<![endif]-->
< link type = "text/css" rel = "stylesheet" href = "styles/sunlight.default.css" >
< link type = "text/css" rel = "stylesheet" href = "styles/site.cerulean.css" >
< / head >
< body >
< div class = "container-fluid" >
< div class = "navbar navbar-fixed-top navbar-inverse" >
< div class = "navbar-inner" >
< a class = "brand" href = "index.html" > Phaser< / a >
< ul class = "nav" >
< li class = "dropdown" >
< a href = "namespaces.list.html" class = "dropdown-toggle" data-toggle = "dropdown" > Namespaces< b
class="caret">< / b > < / a >
< ul class = "dropdown-menu " >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-0" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.html" > Phaser< / a >
< / li >
< / ul >
< / li >
< li class = "dropdown" >
< a href = "classes.list.html" class = "dropdown-toggle" data-toggle = "dropdown" > Classes< b
class="caret">< / b > < / a >
< ul class = "dropdown-menu " >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Animation.html" > Animation< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.AnimationManager.html" > AnimationManager< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.AnimationParser.html" > AnimationParser< / a >
< / li >
2014-04-29 14:39:02 +00:00
< li class = "class-depth-1" >
< a href = "Phaser.ArrayList.html" > ArrayList< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.BitmapData.html" > BitmapData< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.BitmapText.html" > BitmapText< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Button.html" > Button< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Cache.html" > Cache< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Camera.html" > Camera< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Canvas.html" > Canvas< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Circle.html" > Circle< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Color.html" > Color< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Device.html" > Device< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.html" > Easing< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Back.html" > Back< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Bounce.html" > Bounce< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Circular.html" > Circular< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Cubic.html" > Cubic< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Elastic.html" > Elastic< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Exponential.html" > Exponential< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Linear.html" > Linear< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Quadratic.html" > Quadratic< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Quartic.html" > Quartic< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Quintic.html" > Quintic< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Easing.Sinusoidal.html" > Sinusoidal< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Ellipse.html" > Ellipse< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Events.html" > Events< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Filter.html" > Filter< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Frame.html" > Frame< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.FrameData.html" > FrameData< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Game.html" > Game< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.GameObjectCreator.html" > GameObjectCreator< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.GameObjectFactory.html" > GameObjectFactory< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Gamepad.html" > Gamepad< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.GamepadButton.html" > GamepadButton< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Graphics.html" > Graphics< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Group.html" > Group< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Image.html" > Image< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Input.html" > Input< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.InputHandler.html" > InputHandler< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Key.html" > Key< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Keyboard.html" > Keyboard< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Line.html" > Line< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.LinkedList.html" > LinkedList< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Loader.html" > Loader< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.LoaderParser.html" > LoaderParser< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Math.html" > Math< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Mouse.html" > Mouse< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.MSPointer.html" > MSPointer< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Net.html" > Net< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
< a href = "Phaser.Particle.html" > Particle< / a >
< / li >
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Particles.html" > Particles< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Particles.Arcade.Emitter.html" > Emitter< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Physics.html" > Physics< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Physics.Arcade.html" > Arcade< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Arcade.Body.html" > Body< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Ninja.html" > Ninja< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Ninja.AABB.html" > AABB< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Ninja.Body.html" > Body< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Ninja.Circle.html" > Circle< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Ninja.Tile.html" > Tile< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.html" > P2< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.Body.html" > Body< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.BodyDebug.html" > BodyDebug< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.CollisionGroup.html" > CollisionGroup< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.ContactMaterial.html" > ContactMaterial< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.DistanceConstraint.html" > DistanceConstraint< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-11 12:09:28 +00:00
< li class = "class-depth-3" >
< a href = "Phaser.Physics.P2.FixtureList.html" > FixtureList< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.GearConstraint.html" > GearConstraint< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.InversePointProxy.html" > InversePointProxy< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.LockConstraint.html" > LockConstraint< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.Material.html" > Material< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.PointProxy.html" > PointProxy< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.PrismaticConstraint.html" > PrismaticConstraint< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.RevoluteConstraint.html" > RevoluteConstraint< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.Spring.html" > Spring< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Plugin.html" > Plugin< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.PluginManager.html" > PluginManager< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Point.html" > Point< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Pointer.html" > Pointer< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Polygon.html" > Polygon< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.QuadTree.html" > QuadTree< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.RandomDataGenerator.html" > RandomDataGenerator< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Rectangle.html" > Rectangle< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.RenderTexture.html" > RenderTexture< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.RequestAnimationFrame.html" > RequestAnimationFrame< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.RetroFont.html" > RetroFont< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.ScaleManager.html" > ScaleManager< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Signal.html" > Signal< / a >
< / li >
2014-04-11 12:09:28 +00:00
< li class = "class-depth-1" >
< a href = "Phaser.SignalBinding.html" > SignalBinding< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.SinglePad.html" > SinglePad< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Sound.html" > Sound< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.SoundManager.html" > SoundManager< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Sprite.html" > Sprite< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.SpriteBatch.html" > SpriteBatch< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Stage.html" > Stage< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.State.html" > State< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.StateManager.html" > StateManager< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Text.html" > Text< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Tile.html" > Tile< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Tilemap.html" > Tilemap< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.TilemapLayer.html" > TilemapLayer< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.TilemapParser.html" > TilemapParser< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Tileset.html" > Tileset< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.TileSprite.html" > TileSprite< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Time.html" > Time< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Timer.html" > Timer< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.TimerEvent.html" > TimerEvent< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Touch.html" > Touch< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Tween.html" > Tween< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.TweenManager.html" > TweenManager< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Utils.html" > Utils< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.Utils.Debug.html" > Debug< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-02-21 15:37:26 +00:00
< a href = "Phaser.World.html" > World< / a >
< / li >
< / ul >
< / li >
< / ul >
< / div >
< / div >
< div class = "row-fluid" >
< div class = "span8" >
< div id = "main" >
< h1 class = "page-title" > Class: Body< / h1 >
< section >
< header >
< h2 >
2014-03-14 06:36:05 +00:00
< span class = "ancestors" > < a href = "Phaser.html" > Phaser< / a > < a href = "Phaser.Physics.html" > .Physics< / a > < a href = "Phaser.Physics.P2.html" > .P2< / a > .< / span >
2014-02-21 15:37:26 +00:00
Body
< / h2 >
< div class = "class-description" > < p > Physics Body Constructor< / p > < / div >
< / header >
< article >
< div class = "container-overview" >
< dt >
< h4 class = "name" id = "Body" > < span class = "type-signature" > < / span > new Body< span class = "signature" > (game, < span class = "optional" > sprite< / span > , < span class = "optional" > x< / span > , < span class = "optional" > y< / span > , < span class = "optional" > mass< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated.
These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene.
In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene.
2014-03-14 06:36:05 +00:00
By default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body.
Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > game< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Game.html" > Phaser.Game< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > Game reference to the currently running game.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > sprite< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Sprite.html" > Phaser.Sprite< / a > < / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The Sprite object this physics body belongs to.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > x< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > The x coordinate of this Body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > y< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > The y coordinate of this Body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > mass< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
1
< / td >
< td class = "description last" > < p > The default mass of this Body (0 = static).< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-03-14 06:36:05 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-23" > line 23< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< / div >
< h3 class = "subsection-title" > Members< / h3 >
< dl >
2014-03-24 12:41:45 +00:00
< dt >
< h4 class = "name" id = "DYNAMIC" > < span class = "type-signature" > < static> < / span > DYNAMIC< span class = "type-signature" > :Number< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Dynamic body.< / p >
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > Number< / span >
< / li >
< / ul >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > DYNAMIC< / code > < / td >
< td class = "type" >
< / td >
< td class = "description last" > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1289" > line 1289< / a >
2014-03-24 12:41:45 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "KINEMATIC" > < span class = "type-signature" > < static> < / span > KINEMATIC< span class = "type-signature" > :Number< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Kinematic body.< / p >
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > Number< / span >
< / li >
< / ul >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > KINEMATIC< / code > < / td >
< td class = "type" >
< / td >
< td class = "description last" > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1305" > line 1305< / a >
2014-03-24 12:41:45 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "STATIC" > < span class = "type-signature" > < static> < / span > STATIC< span class = "type-signature" > :Number< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Static body.< / p >
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > Number< / span >
< / li >
< / ul >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > STATIC< / code > < / td >
< td class = "type" >
< / td >
< td class = "description last" > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1297" > line 1297< / a >
2014-03-24 12:41:45 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
2014-02-21 15:37:26 +00:00
< dt >
< h4 class = "name" id = "allowSleep" > < span class = "type-signature" > < / span > allowSleep< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > allowSleep< / code > < / td >
< td class = "type" >
< span class = "param-type" > boolean< / span >
< / td >
< td class = "description last" > < p > -< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1402" > line 1402< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "angle" > < span class = "type-signature" > < / span > angle< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > The angle of the Body in degrees from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement Body.angle = 450 is the same as Body.angle = 90.
If you wish to work in radians instead of degrees use the property Body.rotation instead. Working in radians is faster as it doesn't have to convert values.< / p >
< / div >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > angle< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > The angle of this Body in degrees.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1425" > line 1425< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "angularDamping" > < span class = "type-signature" > < / span > angularDamping< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second.< / p >
< / div >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > angularDamping< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > The angular damping acting acting on the body.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1449" > line 1449< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "angularForce" > < span class = "type-signature" > < / span > angularForce< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > angularForce< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > The angular force acting on the body.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1470" > line 1470< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "angularVelocity" > < span class = "type-signature" > < / span > angularVelocity< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > angularVelocity< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > The angular velocity of the body.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1490" > line 1490< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "collidesWith" > < span class = "type-signature" > < / span > collidesWith< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > collidesWith< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > array< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > Array of CollisionGroups that this Bodies shapes collide with.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-95" > line 95< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "collideWorldBounds" > < span class = "type-signature" > < / span > collideWorldBounds< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-04-11 12:09:28 +00:00
< p > A Body can be set to collide against the World bounds automatically if this is set to true. Otherwise it will leave the World.
Note that this only applies if your World has bounds! The response to the collision should be managed via CollisionMaterials.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > collideWorldBounds< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > Should the Body collide with the World bounds?< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1748" > line 1748< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "damping" > < span class = "type-signature" > < / span > damping< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
2014-04-11 12:09:28 +00:00
< div class = "description" >
< p > Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second.< / p >
< / div >
2014-02-21 15:37:26 +00:00
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > damping< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > The linear damping acting on the body in the velocity direction.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1510" > line 1510< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "data" > < span class = "type-signature" > < protected> < / span > data< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > data< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > The p2 Body data.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-59" > line 59< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "debug" > < span class = "type-signature" > < / span > debug< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > debug< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > Enable or disable debug drawing of this body< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1719" > line 1719< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "debugBody" > < span class = "type-signature" > < / span > debugBody< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > debugBody< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Phaser.Physics.P2.BodyDebug.html" > Phaser.Physics.P2.BodyDebug< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > Reference to the debug body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-105" > line 105< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "dynamic" > < span class = "type-signature" > < / span > dynamic< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > dynamic< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > Returns true if the Body is dynamic. Setting Body.dynamic to 'false' will make it static.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1340" > line 1340< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "fixedRotation" > < span class = "type-signature" > < / span > fixedRotation< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > fixedRotation< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > -< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1531" > line 1531< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "force" > < span class = "type-signature" > < / span > force< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > force< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > Phaser.InversePointProxy< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > The force applied to the body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-71" > line 71< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "game" > < span class = "type-signature" > < / span > game< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > game< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Phaser.Game.html" > Phaser.Game< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > Local reference to game.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-33" > line 33< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "gravity" > < span class = "type-signature" > < / span > gravity< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > gravity< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Phaser.Point.html" > Phaser.Point< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > A locally applied gravity force to the Body. Applied directly before the world step. NOTE: Not currently implemented.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-76" > line 76< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "id" > < span class = "type-signature" > < readonly> < / span > id< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > id< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > The Body ID. Each Body that has been added to the World has a unique ID.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1704" > line 1704< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "inertia" > < span class = "type-signature" > < / span > inertia< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > inertia< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > The inertia of the body around the Z axis..< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1554" > line 1554< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "kinematic" > < span class = "type-signature" > < / span > kinematic< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > kinematic< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > Returns true if the Body is kinematic. Setting Body.kinematic to 'false' will make it static.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1373" > line 1373< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "mass" > < span class = "type-signature" > < / span > mass< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > mass< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > -< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1574" > line 1574< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "motionState" > < span class = "type-signature" > < / span > motionState< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > motionState< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > The type of motion this body has. Should be one of: Body.STATIC (the body does not move), Body.DYNAMIC (body can move and respond to collisions) and Body.KINEMATIC (only moves according to its .velocity).< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1598" > line 1598< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "offset" > < span class = "type-signature" > < / span > offset< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > offset< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Phaser.Point.html" > Phaser.Point< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > The offset of the Physics Body from the Sprite x/y position.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-53" > line 53< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "onBeginContact" > < span class = "type-signature" > < / span > onBeginContact< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< div class = "description" >
2014-04-11 12:09:28 +00:00
< p > Dispatched when a first contact is created between shapes in two bodies. This event is fired during the step, so collision has already taken place.
The event will be sent 4 parameters: The body it is in contact with, the shape from this body that caused the contact, the shape from the contact body and the contact equation data array.< / p >
2014-03-14 06:36:05 +00:00
< / div >
2014-02-21 15:37:26 +00:00
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > onBeginContact< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > < a href = "Phaser.Signal.html" > Phaser.Signal< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-83" > line 83< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "onEndContact" > < span class = "type-signature" > < / span > onEndContact< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< div class = "description" >
2014-04-11 12:09:28 +00:00
< p > Dispatched when contact ends between shapes in two bodies. This event is fired during the step, so collision has already taken place.
The event will be sent 3 parameters: The body it is in contact with, the shape from this body that caused the contact and the shape from the contact body.< / p >
2014-03-14 06:36:05 +00:00
< / div >
2014-02-21 15:37:26 +00:00
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > onEndContact< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > < a href = "Phaser.Signal.html" > Phaser.Signal< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-90" > line 90< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "removeNextStep" > < span class = "type-signature" > < / span > removeNextStep< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > removeNextStep< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > To avoid deleting this body during a physics step, and causing all kinds of problems, set removeNextStep to true to have it removed in the next preUpdate.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-100" > line 100< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "rotation" > < span class = "type-signature" > < / span > rotation< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< div class = "description" >
< p > The angle of the Body in radians.
If you wish to work in degrees instead of radians use the Body.angle property instead. Working in radians is faster as it doesn't have to convert values.< / p >
< / div >
2014-02-21 15:37:26 +00:00
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > rotation< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The angle of this Body in radians.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1621" > line 1621< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "sleepSpeedLimit" > < span class = "type-signature" > < / span > sleepSpeedLimit< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< dl class = "details" >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
2014-02-21 15:37:26 +00:00
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > sleepSpeedLimit< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > .< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1644" > line 1644< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "sprite" > < span class = "type-signature" > < / span > sprite< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > sprite< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > < a href = "Phaser.Sprite.html" > Phaser.Sprite< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Reference to the parent Sprite.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-43" > line 43< / a >
< / li > < / ul > < / dd >
< / dl >
< / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt >
< h4 class = "name" id = "static" > < span class = "type-signature" > < / span > static< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > static< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Returns true if the Body is static. Setting Body.static to 'false' will make it dynamic.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1307" > line 1307< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt >
< h4 class = "name" id = "type" > < span class = "type-signature" > < / span > type< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > type< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The type of physics system this body belongs to.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-48" > line 48< / a >
< / li > < / ul > < / dd >
< / dl >
< / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt >
< h4 class = "name" id = "velocity" > < span class = "type-signature" > < / span > velocity< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > velocity< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > Phaser.InversePointProxy< / span >
< / td >
< td class = "description last" > < p > The velocity of the body. Set velocity.x to a negative value to move to the left, position to the right. velocity.y negative values move up, positive move down.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-66" > line 66< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "world" > < span class = "type-signature" > < / span > world< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< dl class = "details" >
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > world< / code > < / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "type" >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< span class = "param-type" > < a href = "Phaser.Physics.P2.html" > Phaser.Physics.P2< / a > < / span >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Local reference to the P2 World.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
2014-03-14 06:36:05 +00:00
< / dl >
2014-02-21 15:37:26 +00:00
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-03-14 06:36:05 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-38" > line 38< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "x" > < span class = "type-signature" > < / span > x< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< dl class = "details" >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
2014-02-21 15:37:26 +00:00
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > x< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The x coordinate of this Body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< / tbody >
< / table >
< / dl >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1664" > line 1664< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dl >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt >
< h4 class = "name" id = "y" > < span class = "type-signature" > < / span > y< span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl class = "details" >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< h5 class = "subsection-title" > Properties:< / h5 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< table class = "props table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< tbody >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > y< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The y coordinate of this Body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
2014-03-14 06:36:05 +00:00
< / dl >
2014-02-21 15:37:26 +00:00
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1684" > line 1684< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
< / dl >
< / dd >
2014-03-14 06:36:05 +00:00
< / dl >
< h3 class = "subsection-title" > Methods< / h3 >
< dl >
2014-02-21 15:37:26 +00:00
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "addCapsule" > < span class = "type-signature" > < / span > addCapsule< span class = "signature" > (length, radius, < span class = "optional" > offsetX< / span > , < span class = "optional" > offsetY< / span > , < span class = "optional" > rotation< / span > )< / span > < span class = "type-signature" > → {p2.Capsule}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Adds a Capsule shape to this Body.
2014-02-21 15:37:26 +00:00
You can control the offset from the center of the body and the rotation.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > length< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The distance between the end points in pixels.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > radius< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > Radius of the capsule in radians.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
< td class = "name" > < code > offsetX< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local horizontal offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offsetY< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local vertical offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > rotation< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local rotation of the shape relative to the body center of mass, specified in radians.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-903" > line 903< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
2014-03-14 06:36:05 +00:00
< p > The Capsule shape that was added to the Body.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > p2.Capsule< / span >
2014-02-21 15:37:26 +00:00
< / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "addCircle" > < span class = "type-signature" > < / span > addCircle< span class = "signature" > (radius, < span class = "optional" > offsetX< / span > , < span class = "optional" > offsetY< / span > , < span class = "optional" > rotation< / span > )< / span > < span class = "type-signature" > → {p2.Circle}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Adds a Circle shape to this Body. You can control the offset from the center of the body and the rotation.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > radius< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The radius of this circle (in pixels)< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
< tr >
< td class = "name" > < code > offsetX< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local horizontal offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offsetY< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local vertical offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > rotation< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local rotation of the shape relative to the body center of mass, specified in radians.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-812" > line 812< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
2014-03-14 06:36:05 +00:00
< p > The Circle shape that was added to the Body.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > p2.Circle< / span >
2014-02-21 15:37:26 +00:00
< / dd >
< / dl >
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "addFixture" > < span class = "type-signature" > < / span > addFixture< span class = "signature" > (fixtureData)< / span > < span class = "type-signature" > → {array}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-04-29 14:39:02 +00:00
< p > Add a polygon fixture. This is used during #loadPolygon.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
2014-03-14 06:36:05 +00:00
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > fixtureData< / code > < / td >
2014-03-14 06:36:05 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > string< / span >
2014-03-14 06:36:05 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > The data for the fixture. It contains: isSensor, filter (collision) and the actual polygon shapes.< / p > < / td >
2014-03-14 06:36:05 +00:00
< / tr >
2014-04-11 12:09:28 +00:00
< / tbody >
< / table >
2014-03-14 06:36:05 +00:00
2014-04-11 12:09:28 +00:00
< dl class = "details" >
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1133" > line 1133< / a >
< / li > < / ul > < / dd >
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
2014-02-21 15:37:26 +00:00
2014-04-11 12:09:28 +00:00
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > An array containing the generated shapes for the given polygon.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > array< / span >
< / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "addLine" > < span class = "type-signature" > < / span > addLine< span class = "signature" > (length, < span class = "optional" > offsetX< / span > , < span class = "optional" > offsetY< / span > , < span class = "optional" > rotation< / span > )< / span > < span class = "type-signature" > → {p2.Line}< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Adds a Line shape to this Body.
The line shape is along the x direction, and stretches from [-length/2, 0] to [length/2,0].
You can control the offset from the center of the body and the rotation.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > length< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The length of this line (in pixels)< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offsetX< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local horizontal offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offsetY< / code > < / td >
< td class = "type" >
2014-02-21 15:37:26 +00:00
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local vertical offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > rotation< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local rotation of the shape relative to the body center of mass, specified in radians.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-883" > line 883< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
2014-03-14 06:36:05 +00:00
< p > The Line shape that was added to the Body.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > p2.Line< / span >
2014-02-21 15:37:26 +00:00
< / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "addParticle" > < span class = "type-signature" > < / span > addParticle< span class = "signature" > (< span class = "optional" > offsetX< / span > , < span class = "optional" > offsetY< / span > , < span class = "optional" > rotation< / span > )< / span > < span class = "type-signature" > → {p2.Particle}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Adds a Particle shape to this Body. You can control the offset from the center of the body and the rotation.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > offsetX< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
2014-03-14 06:36:05 +00:00
0
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Local horizontal offset of the shape relative to the body center of mass.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > offsetY< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
2014-03-14 06:36:05 +00:00
0
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Local vertical offset of the shape relative to the body center of mass.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > rotation< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< optional>< br >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local rotation of the shape relative to the body center of mass, specified in radians.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-866" > line 866< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
2014-03-14 06:36:05 +00:00
< p > The Particle shape that was added to the Body.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > p2.Particle< / span >
2014-02-21 15:37:26 +00:00
< / dd >
< / dl >
2014-04-11 12:09:28 +00:00
< / dd >
< dt >
< h4 class = "name" id = "addPhaserPolygon" > < span class = "type-signature" > < / span > addPhaserPolygon< span class = "signature" > (key, object)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body.
The shape data format is based on the custom phaser export in.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > key< / code > < / td >
< td class = "type" >
< span class = "param-type" > string< / span >
< / td >
< td class = "description last" > < p > The key of the Physics Data file as stored in Game.Cache.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > object< / code > < / td >
< td class = "type" >
< span class = "param-type" > string< / span >
< / td >
< td class = "description last" > < p > The key of the object within the Physics data file that you wish to load the shape data from.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1096" > line 1096< / a >
< / li > < / ul > < / dd >
< / dl >
2014-02-21 15:37:26 +00:00
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "addPlane" > < span class = "type-signature" > < / span > addPlane< span class = "signature" > (< span class = "optional" > offsetX< / span > , < span class = "optional" > offsetY< / span > , < span class = "optional" > rotation< / span > )< / span > < span class = "type-signature" > → {p2.Plane}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Adds a Plane shape to this Body. The plane is facing in the Y direction. You can control the offset from the center of the body and the rotation.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > offsetX< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local horizontal offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offsetY< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local vertical offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > rotation< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local rotation of the shape relative to the body center of mass, specified in radians.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-849" > line 849< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
2014-03-14 06:36:05 +00:00
< p > The Plane shape that was added to the Body.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > p2.Plane< / span >
2014-02-21 15:37:26 +00:00
< / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "addPolygon" > < span class = "type-signature" > < / span > addPolygon< span class = "signature" > (options, points)< / span > < span class = "type-signature" > → {boolean}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Reads a polygon shape path, and assembles convex shapes from that and puts them at proper offset points. The shape must be simple and without holes.
This function expects the x.y values to be given in pixels. If you want to provide them at p2 world scales then call Body.data.fromPolygon directly.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > options< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > object< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > An object containing the build options:< / p >
< h6 > Properties< / h6 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< tbody >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > optimalDecomp< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
2014-03-14 06:36:05 +00:00
false
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > skipSimpleCheck< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
2014-03-14 06:36:05 +00:00
false
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Set to true if you already know that the path is not intersecting itself.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > removeCollinearPoints< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > boolean< / span >
|
2014-02-21 15:37:26 +00:00
< span class = "param-type" > number< / span >
2014-04-11 12:09:28 +00:00
2014-03-24 12:41:45 +00:00
2014-04-11 12:09:28 +00:00
< / td >
2014-03-24 12:41:45 +00:00
2014-04-11 12:09:28 +00:00
< td class = "attributes" >
< optional>< br >
2014-03-24 12:41:45 +00:00
2014-04-11 12:09:28 +00:00
2014-03-24 12:41:45 +00:00
2014-04-11 12:09:28 +00:00
< / td >
2014-03-24 12:41:45 +00:00
2014-04-11 12:09:28 +00:00
< td class = "default" >
false
< / td >
2014-03-24 12:41:45 +00:00
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > Set to a number (angle threshold value) to remove collinear points, or false to keep all points.< / p > < / td >
< / tr >
2014-03-24 12:41:45 +00:00
2014-04-11 12:09:28 +00:00
< / tbody >
< / table >
< / td >
< / tr >
2014-03-24 12:41:45 +00:00
< tr >
2014-04-11 12:09:28 +00:00
< td class = "name" > < code > points< / code > < / td >
2014-03-24 12:41:45 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Array.html" > Array< / a > .< number>< / span >
|
< span class = "param-type" > number< / span >
2014-03-24 12:41:45 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > An array of 2d vectors that form the convex or concave polygon.
Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...],
or the arguments passed can be flat x,y values e.g. < code > setPolygon(options, x,y, x,y, x,y, ...)< / code > where < code > x< / code > and < code > y< / code > are numbers.< / p > < / td >
2014-03-24 12:41:45 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-923" > line 923< / a >
2014-03-24 12:41:45 +00:00
< / li > < / ul > < / dd >
< / dl >
2014-04-11 12:09:28 +00:00
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > True on success, else false.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > boolean< / span >
< / dd >
< / dl >
2014-03-24 12:41:45 +00:00
2014-02-21 15:37:26 +00:00
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "addRectangle" > < span class = "type-signature" > < / span > addRectangle< span class = "signature" > (width, height, < span class = "optional" > offsetX< / span > , < span class = "optional" > offsetY< / span > , < span class = "optional" > rotation< / span > )< / span > < span class = "type-signature" > → {p2.Rectangle}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Adds a Rectangle shape to this Body. You can control the offset from the center of the body and the rotation.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
2014-03-14 06:36:05 +00:00
< th > Argument< / th >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< th > Default< / th >
2014-02-21 15:37:26 +00:00
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > width< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
< / td >
< td class = "description last" > < p > The width of the rectangle in pixels.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > height< / code > < / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The height of the rectangle in pixels.< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > offsetX< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< optional>< br >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local horizontal offset of the shape relative to the body center of mass.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > offsetY< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< optional>< br >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local vertical offset of the shape relative to the body center of mass.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > rotation< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< optional>< br >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
0
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Local rotation of the shape relative to the body center of mass, specified in radians.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-830" > line 830< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
2014-03-14 06:36:05 +00:00
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > The Rectangle shape that was added to the Body.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > p2.Rectangle< / span >
< / dd >
< / dl >
2014-02-21 15:37:26 +00:00
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "addShape" > < span class = "type-signature" > < / span > addShape< span class = "signature" > (shape, < span class = "optional" > offsetX< / span > , < span class = "optional" > offsetY< / span > , < span class = "optional" > rotation< / span > )< / span > < span class = "type-signature" > → {p2.Shape}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Add a shape to the body. You can pass a local transform when adding a shape, so that the shape gets an offset and an angle relative to the body center of mass.
Will automatically update the mass properties and bounding radius.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > shape< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > p2.Shape< / span >
2014-03-14 06:36:05 +00:00
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The shape to add to the body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offsetX< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
2014-03-14 06:36:05 +00:00
0
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Local horizontal offset of the shape relative to the body center of mass.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > offsetY< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
2014-03-14 06:36:05 +00:00
0
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Local vertical offset of the shape relative to the body center of mass.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > rotation< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
2014-03-14 06:36:05 +00:00
0
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Local rotation of the shape relative to the body center of mass, specified in radians.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-788" > line 788< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
2014-03-14 06:36:05 +00:00
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > The shape that was added to the body.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > p2.Shape< / span >
2014-03-14 06:36:05 +00:00
< / dd >
< / dl >
2014-02-21 15:37:26 +00:00
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "addToWorld" > < span class = "type-signature" > < / span > addToWorld< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Adds this physics body to the world.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-715" > line 715< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "adjustCenterOfMass" > < span class = "type-signature" > < / span > adjustCenterOfMass< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Moves the shape offsets so their center of mass becomes the body center of mass.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-395" > line 395< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "applyDamping" > < span class = "type-signature" > < / span > applyDamping< span class = "signature" > (dt)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
2014-04-11 12:09:28 +00:00
< p > Apply damping, see < a href = "http://code.google.com/p/bullet/issues/detail?id=74" > http://code.google.com/p/bullet/issues/detail?id=74< / a > for details.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > dt< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Current time step.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-406" > line 406< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "applyForce" > < span class = "type-signature" > < / span > applyForce< span class = "signature" > (force, worldX, worldY)< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Apply force to a world point. This could for example be a point on the RigidBody surface. Applying force this way will add to Body.force and Body.angularForce.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > force< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The force to add.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > worldX< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The world x point to apply the force on.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > worldY< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The world y point to apply the force on.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-418" > line 418< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "clearCollision" > < span class = "type-signature" > < / span > clearCollision< span class = "signature" > (< span class = "optional" > clearGroup< / span > , < span class = "optional" > clearMask< / span > , < span class = "optional" > shape< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Clears the collision data from the shapes in this Body. Optionally clears Group and/or Mask.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
2014-03-14 06:36:05 +00:00
< th > Argument< / th >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< th > Default< / th >
2014-02-21 15:37:26 +00:00
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > clearGroup< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< optional>< br >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
true
< / td >
< td class = "description last" > < p > Clear the collisionGroup value from the shape/s?< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > clearMask< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > boolean< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< optional>< br >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
true
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Clear the collisionMask value from the shape/s?< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > shape< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > p2.Shape< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< optional>< br >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
< / td >
< td class = "description last" > < p > An optional Shape. If not provided the collision data will be cleared from all Shapes in this Body.< / p > < / td >
< / tr >
< / tbody >
< / table >
2014-02-21 15:37:26 +00:00
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-295" > line 295< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "clearShapes" > < span class = "type-signature" > < / span > clearShapes< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Removes all Shapes from this Body.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-770" > line 770< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "collides" > < span class = "type-signature" > < / span > collides< span class = "signature" > (group, < span class = "optional" > callback< / span > , < span class = "optional" > callbackContext< / span > , < span class = "optional" > shape< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Adds the given CollisionGroup, or array of CollisionGroups, to the list of groups that this body will collide with and updates the collision masks.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
2014-03-14 06:36:05 +00:00
< th > Argument< / th >
2014-02-21 15:37:26 +00:00
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > group< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > Phaser.Physics.CollisionGroup< / span >
|
< span class = "param-type" > array< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Collision Group or Array of Collision Groups that this Bodies shapes will collide with.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > callback< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > function< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< optional>< br >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Optional callback that will be triggered when this Body impacts with the given Group.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > callbackContext< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > object< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< optional>< br >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The context under which the callback will be called.< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > shape< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > p2.Shape< / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > An optional Shape. If not provided the collision mask will be added to all Shapes in this Body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-340" > line 340< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "createBodyCallback" > < span class = "type-signature" > < / span > createBodyCallback< span class = "signature" > (object, callback, callbackContext)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Sets a callback to be fired any time a shape in this Body impacts with a shape in the given Body. The impact test is performed against body.id values.
The callback will be sent 4 parameters: This body, the body that impacted, the Shape in this body and the shape in the impacting body.
Note that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening.
It also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > object< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > < a href = "Phaser.Sprite.html" > Phaser.Sprite< / a > < / span >
|
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< span class = "param-type" > < a href = "Phaser.TileSprite.html" > Phaser.TileSprite< / a > < / span >
|
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< span class = "param-type" > < a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / span >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The object to send impact events for.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > callback< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > function< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The callback to fire on impact. Set to null to clear a previously set callback.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > callbackContext< / code > < / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "type" >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< span class = "param-type" > object< / span >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The context under which the callback will fire.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-152" > line 152< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "createGroupCallback" > < span class = "type-signature" > < / span > createGroupCallback< span class = "signature" > (group, callback, callbackContext)< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Sets a callback to be fired any time this Body impacts with the given Group. The impact test is performed against shape.collisionGroup values.
The callback will be sent 4 parameters: This body, the body that impacted, the Shape in this body and the shape in the impacting body.
This callback will only fire if this Body has been assigned a collision group.
Note that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening.
It also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > group< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > Phaser.Physics.CollisionGroup< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Group to send impact events for.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > callback< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > function< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The callback to fire on impact. Set to null to clear a previously set callback.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > callbackContext< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > object< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The context under which the callback will fire.< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / tbody >
< / table >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl class = "details" >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-192" > line 192< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dl >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt >
< h4 class = "name" id = "destroy" > < span class = "type-signature" > < / span > destroy< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Destroys this Body and all references it holds to other objects.< / p >
< / div >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl class = "details" >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-743" > line 743< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dl >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt >
< h4 class = "name" id = "getCollisionMask" > < span class = "type-signature" > < / span > getCollisionMask< span class = "signature" > ()< / span > < span class = "type-signature" > → {number}< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Gets the collision bitmask from the groups this body collides with.< / p >
< / div >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-219" > line 219< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
2014-03-14 06:36:05 +00:00
< p > The bitmask.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / dd >
< / dl >
< / dd >
< dt >
2014-04-29 14:39:02 +00:00
< h4 class = "name" id = "loadData" > < span class = "type-signature" > < / span > loadData< span class = "signature" > (key, object)< / span > < span class = "type-signature" > → {boolean}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-04-29 14:39:02 +00:00
< p > DEPRECATED: This method will soon be removed from the API. Please avoid using.
Reads the physics data from a physics data file stored in the Game.Cache.
It will add the shape data to this Body, as well as set the density (mass).< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > key< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > string< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The key of the Physics Data file as stored in Game.Cache.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > object< / code > < / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "type" >
< span class = "param-type" > string< / span >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The key of the object within the Physics data file that you wish to load the shape data from.< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1257" > line 1257< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
2014-03-14 06:36:05 +00:00
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > True on success, else false.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > boolean< / span >
< / dd >
< / dl >
2014-02-21 15:37:26 +00:00
< / dd >
< dt >
2014-04-29 14:39:02 +00:00
< h4 class = "name" id = "loadPolygon" > < span class = "type-signature" > < / span > loadPolygon< span class = "signature" > (key, object)< / span > < span class = "type-signature" > → {boolean}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-04-29 14:39:02 +00:00
< p > Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > key< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > string< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The key of the Physics Data file as stored in Game.Cache.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > object< / code > < / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "type" >
< span class = "param-type" > string< / span >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The key of the object within the Physics data file that you wish to load the shape data from.< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-29 14:39:02 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1205" > line 1205< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
2014-03-14 06:36:05 +00:00
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > True on success, else false.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > boolean< / span >
< / dd >
< / dl >
2014-02-21 15:37:26 +00:00
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "moveBackward" > < span class = "type-signature" > < / span > moveBackward< span class = "signature" > (speed)< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Moves the Body backwards based on its current angle and the given speed.
2014-02-21 15:37:26 +00:00
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > speed< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The speed at which it should move backwards.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-545" > line 545< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "moveDown" > < span class = "type-signature" > < / span > moveDown< span class = "signature" > (speed)< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > If this Body is dynamic then this will move it down by setting its y velocity to the given speed.
2014-02-21 15:37:26 +00:00
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > speed< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The speed at which it should move down, in pixels per second.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-635" > line 635< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "moveForward" > < span class = "type-signature" > < / span > moveForward< span class = "signature" > (speed)< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Moves the Body forwards based on its current angle and the given speed.
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > speed< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The speed at which it should move forwards.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-528" > line 528< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "moveLeft" > < span class = "type-signature" > < / span > moveLeft< span class = "signature" > (speed)< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > If this Body is dynamic then this will move it to the left by setting its x velocity to the given speed.
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > speed< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The speed at which it should move to the left, in pixels per second.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-596" > line 596< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "moveRight" > < span class = "type-signature" > < / span > moveRight< span class = "signature" > (speed)< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > If this Body is dynamic then this will move it to the right by setting its x velocity to the given speed.
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).< / p >
2014-02-21 15:37:26 +00:00
< / div >
2014-03-14 06:36:05 +00:00
< h5 > Parameters:< / h5 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< th > Type< / th >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< th class = "last" > Description< / th >
< / tr >
< / thead >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< tbody >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > speed< / code > < / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The speed at which it should move to the right, in pixels per second.< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / tbody >
< / table >
2014-02-21 15:37:26 +00:00
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-609" > line 609< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "moveUp" > < span class = "type-signature" > < / span > moveUp< span class = "signature" > (speed)< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > If this Body is dynamic then this will move it up by setting its y velocity to the given speed.
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).< / p >
2014-02-21 15:37:26 +00:00
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > speed< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The speed at which it should move up, in pixels per second.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-622" > line 622< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "postUpdate" > < span class = "type-signature" > < protected> < / span > postUpdate< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished.< / p >
2014-02-21 15:37:26 +00:00
< / div >
2014-03-14 06:36:05 +00:00
< dl class = "details" >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-664" > line 664< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt >
< h4 class = "name" id = "preUpdate" > < span class = "type-signature" > < protected> < / span > preUpdate< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished.< / p >
< / div >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-648" > line 648< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "removeFromWorld" > < span class = "type-signature" > < / span > removeFromWorld< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Removes this physics body from the world.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-729" > line 729< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "removeShape" > < span class = "type-signature" > < / span > removeShape< span class = "signature" > (shape)< / span > < span class = "type-signature" > → {boolean}< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Remove a shape from the body. Will automatically update the mass properties and bounding radius.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > shape< / code > < / td >
< td class = "type" >
< span class = "param-type" > p2.Circle< / span >
|
< span class = "param-type" > p2.Rectangle< / span >
|
< span class = "param-type" > p2.Plane< / span >
|
< span class = "param-type" > p2.Line< / span >
|
< span class = "param-type" > p2.Particle< / span >
< / td >
< td class = "description last" > < p > The shape to remove from the body.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-986" > line 986< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > True if the shape was found and removed, else false.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > boolean< / span >
< / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "reset" > < span class = "type-signature" > < / span > reset< span class = "signature" > (x, y, < span class = "optional" > resetDamping< / span > , < span class = "optional" > resetMass< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Resets the Body force, velocity (linear and angular) and rotation. Optionally resets damping and mass.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > x< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The new x position of the Body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > y< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The new x position of the Body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > resetDamping< / code > < / td >
< td class = "type" >
< span class = "param-type" > boolean< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
false
< / td >
< td class = "description last" > < p > Resets the linear and angular damping.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > resetMass< / code > < / td >
< td class = "type" >
< span class = "param-type" > boolean< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
false
< / td >
< td class = "description last" > < p > Sets the Body mass back to 1.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-682" > line 682< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "rever" > < span class = "type-signature" > < / span > rever< span class = "signature" > (speed)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Applies a force to the Body that causes it to 'thrust' backwards (in reverse), based on its current angle and the given speed.
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > speed< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > The speed at which it should reverse.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-579" > line 579< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "rotateLeft" > < span class = "type-signature" > < / span > rotateLeft< span class = "signature" > (speed)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > This will rotate the Body by the given speed to the left (counter-clockwise).< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > speed< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > The speed at which it should rotate.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-504" > line 504< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "rotateRight" > < span class = "type-signature" > < / span > rotateRight< span class = "signature" > (speed)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > This will rotate the Body by the given speed to the left (clockwise).< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > speed< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > The speed at which it should rotate.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-516" > line 516< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "setCircle" > < span class = "type-signature" > < / span > setCircle< span class = "signature" > (radius, < span class = "optional" > offsetX< / span > , < span class = "optional" > offsetY< / span > , < span class = "optional" > rotation< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > radius< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The radius of this circle (in pixels)< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offsetX< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local horizontal offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offsetY< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local vertical offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > rotation< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local rotation of the shape relative to the body center of mass, specified in radians.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-999" > line 999< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "setCollisionGroup" > < span class = "type-signature" > < / span > setCollisionGroup< span class = "signature" > (group, < span class = "optional" > shape< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Sets the given CollisionGroup to be the collision group for all shapes in this Body, unless a shape is specified.
This also resets the collisionMask.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > group< / code > < / td >
< td class = "type" >
2014-03-14 06:36:05 +00:00
< span class = "param-type" > Phaser.Physics.CollisionGroup< / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < p > The Collision Group that this Bodies shapes will use.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > shape< / code > < / td >
< td class = "type" >
< span class = "param-type" > p2.Shape< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > An optional Shape. If not provided the collision group will be added to all Shapes in this Body.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-267" > line 267< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "setMaterial" > < span class = "type-signature" > < / span > setMaterial< span class = "signature" > (material, < span class = "optional" > shape< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Adds the given Material to all Shapes that belong to this Body.
If you only wish to apply it to a specific Shape in this Body then provide that as the 2nd parameter.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > material< / code > < / td >
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Phaser.Physics.P2.Material.html" > Phaser.Physics.P2.Material< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < p > The Material that will be applied.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > shape< / code > < / td >
< td class = "type" >
< span class = "param-type" > p2.Shape< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > An optional Shape. If not provided the Material will be added to all Shapes in this Body.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1058" > line 1058< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "setRectangle" > < span class = "type-signature" > < / span > setRectangle< span class = "signature" > (< span class = "optional" > width< / span > , < span class = "optional" > height< / span > , < span class = "optional" > offsetX< / span > , < span class = "optional" > offsetY< / span > , < span class = "optional" > rotation< / span > )< / span > < span class = "type-signature" > → {p2.Rectangle}< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body.
If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > width< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
16
< / td >
< td class = "description last" > < p > The width of the rectangle in pixels.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > height< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
16
< / td >
< td class = "description last" > < p > The height of the rectangle in pixels.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offsetX< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local horizontal offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offsetY< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local vertical offset of the shape relative to the body center of mass.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > rotation< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > Local rotation of the shape relative to the body center of mass, specified in radians.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1016" > line 1016< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > The Rectangle shape that was added to the Body.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > p2.Rectangle< / span >
< / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "setRectangleFromSprite" > < span class = "type-signature" > < / span > setRectangleFromSprite< span class = "signature" > (< span class = "optional" > sprite< / span > )< / span > < span class = "type-signature" > → {p2.Rectangle}< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Clears any previously set shapes.
Then creates a Rectangle shape sized to match the dimensions and orientation of the Sprite given.
If no Sprite is given it defaults to using the parent of this Body.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > sprite< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Sprite.html" > Phaser.Sprite< / a > < / span >
|
< span class = "param-type" > < a href = "Phaser.Image.html" > Phaser.Image< / a > < / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > The Sprite on which the Rectangle will get its dimensions.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1039" > line 1039< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > The Rectangle shape that was added to the Body.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > p2.Rectangle< / span >
< / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "setZeroDamping" > < span class = "type-signature" > < / span > setZeroDamping< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Sets the Body damping and angularDamping to zero.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-466" > line 466< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "setZeroForce" > < span class = "type-signature" > < / span > setZeroForce< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Sets the force on the body to zero.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-432" > line 432< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "setZeroRotation" > < span class = "type-signature" > < / span > setZeroRotation< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > If this Body is dynamic then this will zero its angular velocity.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-443" > line 443< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "setZeroVelocity" > < span class = "type-signature" > < / span > setZeroVelocity< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > If this Body is dynamic then this will zero its velocity on both axis.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-454" > line 454< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "shapeChanged" > < span class = "type-signature" > < / span > shapeChanged< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Updates the debug draw if any body shapes change.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-1082" > line 1082< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "thrust" > < span class = "type-signature" > < / span > thrust< span class = "signature" > (speed)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Applies a force to the Body that causes it to 'thrust' forwards, based on its current angle and the given speed.
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > speed< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > The speed at which it should thrust.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-562" > line 562< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "toLocalFrame" > < span class = "type-signature" > < / span > toLocalFrame< span class = "signature" > (out, worldPoint)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Transform a world point to local body frame.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > out< / code > < / td >
< td class = "type" >
< span class = "param-type" > Float32Array< / span >
|
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Array.html" > Array< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "description last" > < p > The vector to store the result in.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > worldPoint< / code > < / td >
< td class = "type" >
< span class = "param-type" > Float32Array< / span >
|
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Array.html" > Array< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "description last" > < p > The input world vector.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-478" > line 478< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "toWorldFrame" > < span class = "type-signature" > < / span > toWorldFrame< span class = "signature" > (out, localPoint)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Transform a local point to world frame.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > out< / code > < / td >
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Array.html" > Array< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "description last" > < p > The vector to store the result in.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > localPoint< / code > < / td >
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Array.html" > Array< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "description last" > < p > The input local vector.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-491" > line 491< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "updateCollisionMask" > < span class = "type-signature" > < / span > updateCollisionMask< span class = "signature" > (< span class = "optional" > shape< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Updates the collisionMask.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > shape< / code > < / td >
< td class = "type" >
< span class = "param-type" > p2.Shape< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > An optional Shape. If not provided the collision group will be added to all Shapes in this Body.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "Body.js__.html" > physics/p2/Body.js< / a > , < a href = "Body.js__.html#sunlight-1-line-243" > line 243< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< / dl >
< / article >
< / section >
< / div >
< div class = "clearfix" > < / div >
< footer >
< span class = "copyright" >
Phaser Copyright © 2012-2014 Photon Storm Ltd.
< / span >
< br / >
< span class = "jsdoc-message" >
2014-04-11 12:09:28 +00:00
Documentation generated by < a href = "https://github.com/jsdoc3/jsdoc" > JSDoc 3.3.0-dev< / a >
2014-04-29 14:39:02 +00:00
on Tue Apr 29 2014 14:51:29 GMT+0100 (BST) using the < a href = "https://github.com/terryweiss/docstrap" > DocStrap template< / a > .
2014-02-21 15:37:26 +00:00
< / span >
< / footer >
< / div >
< div class = "span3" >
< div id = "toc" > < / div >
< / div >
< br clear = "both" >
< / div >
< / div >
< script src = "scripts/sunlight.js" > < / script >
< script src = "scripts/sunlight.javascript.js" > < / script >
< script src = "scripts/sunlight-plugin.doclinks.js" > < / script >
< script src = "scripts/sunlight-plugin.linenumbers.js" > < / script >
< script src = "scripts/sunlight-plugin.menu.js" > < / script >
< script src = "scripts/jquery.min.js" > < / script >
< script src = "scripts/jquery.scrollTo.js" > < / script >
< script src = "scripts/jquery.localScroll.js" > < / script >
< script src = "scripts/bootstrap-dropdown.js" > < / script >
< script src = "scripts/toc.js" > < / script >
< script > Sunlight . highlightAll ( { lineNumbers : true , showMenu : true , enableDoclinks : true } ) ; < / script >
< script >
$( function () {
$( "#toc" ).toc( {
2014-04-10 22:13:43 +00:00
anchorName : function(i, heading, prefix) {
2014-03-14 06:36:05 +00:00
return $(heading).attr("id") || ( prefix + i );
},
2014-02-21 15:37:26 +00:00
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
} );
< / script >
< / body >
< / html >