2014-02-21 15:37:26 +00:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "utf-8" >
2014-03-14 06:36:05 +00:00
< title > Phaser Class: P2< / title >
2014-02-21 15:37:26 +00:00
<!-- [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-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" >
2014-03-14 06:36:05 +00:00
< h1 class = "page-title" > Class: P2< / h1 >
2014-02-21 15:37:26 +00:00
< section >
< header >
< h2 >
< span class = "ancestors" > < a href = "Phaser.html" > Phaser< / a > < a href = "Phaser.Physics.html" > .Physics< / a > .< / span >
2014-03-14 06:36:05 +00:00
P2
2014-02-21 15:37:26 +00:00
< / h2 >
2014-03-14 06:36:05 +00:00
< div class = "class-description" > < p > Physics World Constructor< / p > < / div >
2014-02-21 15:37:26 +00:00
< / header >
< article >
< div class = "container-overview" >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "P2" > < span class = "type-signature" > < / span > new P2< span class = "signature" > (game, < span class = "optional" > config< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< 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 > game< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Game.html" > Phaser.Game< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Reference to the current game instance.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > config< / 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 >
< td class = "attributes" >
< optional>< br >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Physics configuration object passed in from the game constructor.< / 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-03-14 06:36:05 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-18" > line 18< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< / div >
2014-03-14 06:36:05 +00:00
< h3 class = "subsection-title" > Classes< / h3 >
< dl >
2014-04-10 22:13:43 +00:00
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.Body.html" > Body< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.BodyDebug.html" > BodyDebug< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.CollisionGroup.html" > CollisionGroup< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.ContactMaterial.html" > ContactMaterial< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.DistanceConstraint.html" > DistanceConstraint< / a >
< / dt >
< dd >
< / dd >
2014-04-11 12:09:28 +00:00
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.FixtureList.html" > FixtureList< / a >
< / dt >
< dd >
< / dd >
2014-04-10 22:13:43 +00:00
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.GearConstraint.html" > GearConstraint< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.InversePointProxy.html" > InversePointProxy< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.LockConstraint.html" > LockConstraint< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.Material.html" > Material< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.PointProxy.html" > PointProxy< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.PrismaticConstraint.html" > PrismaticConstraint< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.RevoluteConstraint.html" > RevoluteConstraint< / a >
< / dt >
< dd >
< / dd >
< dt class = "class-depth-3" >
< a href = "Phaser.Physics.P2.Spring.html" > Spring< / a >
< / dt >
< dd >
< / dd >
2014-03-14 06:36:05 +00:00
< / dl >
2014-02-21 15:37:26 +00:00
< h3 class = "subsection-title" > Members< / h3 >
< dl >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "applyDamping" > < span class = "type-signature" > < / span > applyDamping< 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 > applyDamping< / 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 to automatically apply body damping each step.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1713" > line 1713< / 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 = "applyGravity" > < span class = "type-signature" > < / span > applyGravity< 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 > applyGravity< / 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 > Enable to automatically apply gravity each step.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1733" > line 1733< / 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 = "applySpringForces" > < span class = "type-signature" > < / span > applySpringForces< 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 > applySpringForces< / 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 > Enable to automatically apply spring forces each step.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1693" > line 1693< / 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 = "boundsCollidesWith" > < span class = "type-signature" > < / span > boundsCollidesWith< 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 > boundsCollidesWith< / 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 > An array of the bodies the world bounds collides with.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-160" > line 160< / a >
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "boundsCollisionGroup" > < span class = "type-signature" > < / span > boundsCollisionGroup< 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 > boundsCollisionGroup< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Physics.P2.CollisionGroup.html" > Phaser.Physics.P2.CollisionGroup< / a > < / span >
< / td >
< td class = "description last" > < p > A default collision group.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-150" > line 150< / a >
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "callbackContext" > < span class = "type-signature" > < / span > callbackContext< 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 > callbackContext< / code > < / td >
< td class = "type" >
< span class = "param-type" > object< / span >
< / td >
< td class = "description last" > < p > The context under which the callbacks are fired.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-112" > line 112< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-10 22:13:43 +00:00
< h4 class = "name" id = "collisionGroups" > < span class = "type-signature" > < / span > collisionGroups< 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-10 22:13:43 +00:00
< td class = "name" > < code > collisionGroups< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-10 22:13:43 +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 > An array containing the collision groups that have been defined in the World.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-140" > line 140< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-10 22:13:43 +00:00
< h4 class = "name" id = "contactMaterial" > < span class = "type-signature" > < / span > contactMaterial< 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-10 22:13:43 +00:00
< td class = "name" > < code > contactMaterial< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-10 22:13:43 +00:00
< span class = "param-type" > p2.ContactMaterial< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-10 22:13:43 +00:00
< td class = "description last" > < p > The default Contact Material being used by the World.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1673" > line 1673< / a >
2014-04-10 22:13:43 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "defaultFriction" > < span class = "type-signature" > < / span > defaultFriction< 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 > defaultFriction< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > DEPRECATED: Use World.friction instead.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1613" > line 1613< / a >
2014-04-10 22:13:43 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "defaultRestitution" > < span class = "type-signature" > < / span > defaultRestitution< 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 > defaultRestitution< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > DEPRECATED: Use World.restitution instead.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1653" > line 1653< / 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 = "emitImpactEvent" > < span class = "type-signature" > < / span > emitImpactEvent< 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 > emitImpactEvent< / 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 > Set to true if you want to the world to emit the " impact" event. Turning this off could improve performance.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1788" > line 1788< / 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 = "enableBodySleeping" > < span class = "type-signature" > < / span > enableBodySleeping< 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 > enableBodySleeping< / 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 > Enable / disable automatic body sleeping.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1808" > line 1808< / a >
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "everythingCollisionGroup" > < span class = "type-signature" > < / span > everythingCollisionGroup< 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 > everythingCollisionGroup< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Physics.P2.CollisionGroup.html" > Phaser.Physics.P2.CollisionGroup< / a > < / span >
< / td >
< td class = "description last" > < p > A default collision group.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-155" > line 155< / 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 = "frameRate" > < span class = "type-signature" > < / span > frameRate< 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 > frameRate< / 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 frame rate the world will be stepped at. Defaults to 1 / 60, but you can change here. Also see useElapsedTime property.< / 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-03-14 06:36:05 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-40" > line 40< / 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 = "friction" > < span class = "type-signature" > < / span > friction< 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 > friction< / 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 > Friction between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1593" > line 1593< / 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 = "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-03-14 06:36:05 +00:00
< td class = "name" > < code > game< / 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.Game.html" > Phaser.Game< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +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-03-14 06:36:05 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-23" > line 23< / 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 = "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-03-14 06:36:05 +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.Physics.P2.InversePointProxy.html" > Phaser.Physics.P2.InversePointProxy< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The gravity applied to all bodies each step.< / 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-03-14 06:36:05 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-57" > line 57< / 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 = "materials" > < span class = "type-signature" > < protected> < / span > materials< 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 > materials< / 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.< < a href = "Phaser.Physics.P2.Material.html" > Phaser.Physics.P2.Material< / 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 local array of all created Materials.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-52" > line 52< / 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 = "nothingCollisionGroup" > < span class = "type-signature" > < / span > nothingCollisionGroup< 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 > nothingCollisionGroup< / 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.CollisionGroup.html" > Phaser.Physics.P2.CollisionGroup< / 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 default collision group.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-145" > line 145< / 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 = "onBeginContact" > < span class = "type-signature" > < / span > onBeginContact< 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 > 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" > < p > Dispatched when a first contact is created between two bodies. This event is fired before the step has been done.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-117" > line 117< / 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 = "onBodyAdded" > < span class = "type-signature" > < / span > onBodyAdded< 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 > onBodyAdded< / 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" > < p > Dispatched when a new Body is added to the World.< / 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-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-67" > line 67< / 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 = "onBodyRemoved" > < span class = "type-signature" > < / span > onBodyRemoved< 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 > onBodyRemoved< / 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" > < p > Dispatched when a Body is removed from the World.< / 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-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-72" > line 72< / 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 = "onConstraintAdded" > < span class = "type-signature" > < / span > onConstraintAdded< 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 > onConstraintAdded< / 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" > < p > Dispatched when a new Constraint is added to the World.< / 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-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-87" > line 87< / 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 = "onConstraintRemoved" > < span class = "type-signature" > < / span > onConstraintRemoved< 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 > onConstraintRemoved< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Signal.html" > Phaser.Signal< / a > < / span >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Dispatched when a Constraint is removed from the World.< / 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-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-92" > line 92< / 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 = "onContactMaterialAdded" > < span class = "type-signature" > < / span > onContactMaterialAdded< 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 > onContactMaterialAdded< / 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" > < p > Dispatched when a new ContactMaterial is added to the World.< / 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-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-97" > line 97< / 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 = "onContactMaterialRemoved" > < span class = "type-signature" > < / span > onContactMaterialRemoved< 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 > onContactMaterialRemoved< / 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" > < p > Dispatched when a ContactMaterial is removed from the World.< / 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-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-102" > line 102< / 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 = "onEndContact" > < span class = "type-signature" > < / span > onEndContact< 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 > 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" > < p > Dispatched when final contact occurs between two bodies. This event is fired before the step has been done.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-122" > line 122< / 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 = "onSpringAdded" > < span class = "type-signature" > < / span > onSpringAdded< 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 > onSpringAdded< / 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" > < p > Dispatched when a new Spring is added to the World.< / 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-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-77" > line 77< / 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 = "onSpringRemoved" > < span class = "type-signature" > < / span > onSpringRemoved< 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 > onSpringRemoved< / 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" > < p > Dispatched when a Spring is removed from the World.< / 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-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-82" > line 82< / 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 = "postBroadphaseCallback" > < span class = "type-signature" > < / span > postBroadphaseCallback< 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 > postBroadphaseCallback< / 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" > function< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-11 12:09:28 +00:00
< td class = "description last" > < p > A postBroadphase callback.< / 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-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-107" > line 107< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-10 22:13:43 +00:00
< h4 class = "name" id = "restitution" > < span class = "type-signature" > < / span > restitution< 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 > restitution< / 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 > Default coefficient of restitution between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1633" > line 1633< / 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 = "solveConstraints" > < span class = "type-signature" > < / span > solveConstraints< 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 > solveConstraints< / 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 > Enable/disable constraint solving in each step.< / 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-11 12:09:28 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1753" > line 1753< / 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 = "time" > < span class = "type-signature" > < readonly> < / span > time< 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 >
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
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > time< / 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 > The World time.< / 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-11 12:09:28 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1773" > line 1773< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
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 = "total" > < span class = "type-signature" > < readonly> < / span > total< span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dt >
< 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 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" >
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 > total< / 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 total number of bodies in the world.< / 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-11 12:09:28 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1828" > line 1828< / 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 = "useElapsedTime" > < span class = "type-signature" > < / span > useElapsedTime< 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 > useElapsedTime< / 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 > If true the frameRate value will be ignored and instead p2 will step with the value of Game.Time.physicsElapsed, which is a delta time value.< / 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
2014-03-14 06:36:05 +00:00
< dt class = "tag-default" > Default Value:< / dt >
< dd class = "tag-default" > < ul class = "dummy" > < li > false< / li > < / ul > < / dd >
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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-46" > line 46< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-04-10 22:13:43 +00:00
< h4 class = "name" id = "walls" > < span class = "type-signature" > < / span > walls< 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-04-10 22:13:43 +00:00
< td class = "name" > < code > walls< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-10 22:13:43 +00:00
< span class = "param-type" > object< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-10 22:13:43 +00:00
< td class = "description last" > < p > An object containing the 4 wall bodies that bound the physics world.< / 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-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-62" > line 62< / 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 >
2014-04-10 22:13:43 +00:00
< h4 class = "name" id = "world" > < span class = "type-signature" > < protected> < / span > world< span class = "type-signature" > < / span > < / h4 >
2014-03-14 06:36:05 +00:00
< / dt >
< dd >
2014-04-10 22:13:43 +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 > world< / code > < / td >
2014-04-10 22:13:43 +00:00
< td class = "type" >
2014-02-21 15:37:26 +00:00
2014-04-10 22:13:43 +00:00
< span class = "param-type" > p2.World< / span >
2014-02-21 15:37:26 +00:00
2014-04-10 22:13:43 +00:00
< / td >
< td class = "description last" > < p > The p2 World in which the simulation is run.< / p > < / td >
< / tr >
< / tbody >
< / table >
< / dl >
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-10 22:13:43 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-34" > line 34< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
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
< / dl >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< h3 class = "subsection-title" > Methods< / h3 >
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
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "addBody" > < span class = "type-signature" > < / span > addBody< span class = "signature" > (body)< / 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 > Add a body to the world.< / 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 > body< / 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.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Body to add to the World.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-682" > line 682< / 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 > True if the Body was added successfully, otherwise false.< / 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" > boolean< / 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 = "addConstraint" > < span class = "type-signature" > < / span > addConstraint< span class = "signature" > (constraint)< / span > < span class = "type-signature" > → {Phaser.Physics.P2.Constraint}< / 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 Constraint to the world.< / 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 > constraint< / 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.P2.Constraint< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Constraint to add to the World.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
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
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-897" > line 897< / 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
< h5 > Returns:< / h5 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< div class = "param-desc" >
< p > The Constraint that was added.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Phaser.Physics.P2.Constraint< / span >
< / dd >
< / dl >
< / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt >
< h4 class = "name" id = "addContactMaterial" > < span class = "type-signature" > < / span > addContactMaterial< span class = "signature" > (material)< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.ContactMaterial.html" > Phaser.Physics.P2.ContactMaterial< / a > }< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Adds a Contact Material to the world.< / p >
< / div >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< h5 > Parameters:< / h5 >
< table class = "params 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 > material< / 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.Physics.P2.ContactMaterial.html" > Phaser.Physics.P2.ContactMaterial< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Contact Material to be added to the World.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-931" > line 931< / 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 Contact Material that was added.< / 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" > < a href = "Phaser.Physics.P2.ContactMaterial.html" > Phaser.Physics.P2.ContactMaterial< / a > < / 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 = "addSpring" > < span class = "type-signature" > < / span > addSpring< span class = "signature" > (spring)< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.Spring.html" > Phaser.Physics.P2.Spring< / a > }< / 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 Spring to the world.< / 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 > spring< / 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.Physics.P2.Spring.html" > Phaser.Physics.P2.Spring< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Spring to add to the World.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-726" > line 726< / 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
< h5 > Returns:< / h5 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< div class = "param-desc" >
< p > The Spring that was added.< / p >
< / div >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.Spring.html" > Phaser.Physics.P2.Spring< / a > < / span >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dd >
< / 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 = "beginContactHandler" > < span class = "type-signature" > < / span > beginContactHandler< span class = "signature" > (event)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Handles a p2 begin contact event.< / p >
< / div >
2014-02-21 15:37:26 +00:00
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
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > event< / 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 > The event data.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-397" > line 397< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
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 = "clear" > < span class = "type-signature" > < / span > clear< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
2014-03-24 12:41:45 +00:00
< p > Clears all bodies from the simulation, resets callbacks and resets the collision bitmask.< / p >
2014-03-14 06:36:05 +00:00
< / 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
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
2014-04-11 12:09:28 +00:00
< a href = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-646" > line 646< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
2014-02-21 15:37:26 +00:00
< / dl >
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
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "clearTilemapLayerBodies" > < span class = "type-signature" > < / span > clearTilemapLayerBodies< span class = "signature" > (map, < span class = "optional" > layer< / 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 all physics bodies from the given TilemapLayer that were created with < code > World.convertTilemap< / code > .< / 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 class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > map< / 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.Tilemap.html" > Phaser.Tilemap< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Tilemap to get the map data from.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > layer< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
2014-03-14 06:36:05 +00:00
|
< span class = "param-type" > string< / span >
|
< span class = "param-type" > < a href = "Phaser.TilemapLayer.html" > Phaser.TilemapLayer< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
2014-03-14 06:36:05 +00:00
< optional>< br >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The layer to operate on. If not given will default to map.currentLayer.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1420" > line 1420< / 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 = "convertCollisionObjects" > < span class = "type-signature" > < / span > convertCollisionObjects< span class = "signature" > (map, < span class = "optional" > layer< / span > , < span class = "optional" > addToWorld< / span > )< / span > < span class = "type-signature" > → {array}< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Converts all of the polylines objects inside a Tiled ObjectGroup into physics bodies that are added to the world.
Note that the polylines must be created in such a way that they can withstand polygon decomposition.< / 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 > map< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Tilemap.html" > Phaser.Tilemap< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The Tilemap to get the map data from.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > layer< / code > < / td >
< td class = "type" >
2014-02-21 15:37:26 +00:00
< span class = "param-type" > number< / span >
2014-03-14 06:36:05 +00:00
|
< span class = "param-type" > string< / span >
|
< span class = "param-type" > < a href = "Phaser.TilemapLayer.html" > Phaser.TilemapLayer< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The layer to operate on. If not given will default to map.currentLayer.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > addToWorld< / 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
true
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > If true it will automatically add each body to the world.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1378" > line 1378< / 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 > An array of the Phaser.Physics.Body objects that have been created.< / 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" > array< / 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 = "convertTilemap" > < span class = "type-signature" > < / span > convertTilemap< span class = "signature" > (map, < span class = "optional" > layer< / span > , < span class = "optional" > addToWorld< / span > , < span class = "optional" > optimize< / span > )< / span > < span class = "type-signature" > → {array}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics bodies.
Only call this < em > after< / em > you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc.
Every time you call this method it will destroy any previously created bodies and remove them from the world.
Therefore understand it's a very expensive operation and not to be done in a core game update loop.< / 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 > map< / 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.Tilemap.html" > Phaser.Tilemap< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Tilemap to get the map data from.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > layer< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
2014-03-14 06:36:05 +00:00
|
< span class = "param-type" > string< / span >
|
< span class = "param-type" > < a href = "Phaser.TilemapLayer.html" > Phaser.TilemapLayer< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The layer to operate on. If not given will default to map.currentLayer.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > addToWorld< / 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
true
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > If true it will automatically add each body to the world, otherwise it's up to you to do so.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > optimize< / 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
true
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > If true adjacent colliding tiles will be combined into a single body to save processing. However it means you cannot perform specific Tile to Body collision responses.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1442" > line 1442< / 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 > An array of the Phaser.Physics.P2.Body objects that were created.< / 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" > array< / 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 = "createBody" > < span class = "type-signature" > < / span > createBody< span class = "signature" > (x, y, mass, < span class = "optional" > addToWorld< / span > , options, points)< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > }< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Creates a new Body and adds it to the World.< / 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
< 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
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 > x< / 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 x coordinate of Body.< / 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
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > y< / 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
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The y coordinate of 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" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The mass of the Body. A mass of 0 means a 'static' Body is created.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > addToWorld< / 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 > Automatically add this Body to the world? (usually false as it won't have any shapes on construction).< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > options< / code > < / td >
< td class = "type" >
< span class = "param-type" > object< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > An object containing the build options:< / p >
< h6 > Properties< / h6 >
< 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 > optimalDecomp< / 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 > Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > skipSimpleCheck< / 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 > Set to true if you already know that the path is not intersecting itself.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > removeCollinearPoints< / code > < / td >
< td class = "type" >
< span class = "param-type" > boolean< / span >
|
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
false
< / td >
< 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 >
< / tbody >
< / table >
< / td >
< / tr >
< tr >
< td class = "name" > < code > points< / code > < / td >
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Array.html" > Array< / a > .< number>< / span >
2014-03-14 06:36:05 +00:00
|
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
2014-03-28 01:42:49 +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, ...],
2014-03-14 06:36:05 +00:00
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 >
< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1295" > line 1295< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > The body< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
< / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "createCollisionGroup" > < span class = "type-signature" > < protected> < / span > createCollisionGroup< span class = "signature" > (< span class = "optional" > object< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Creates a new Collision Group and optionally applies it to the given object.
Collision Groups are handled using bitmasks, therefore you have a fixed limit you can create before you need to re-use older groups.< / 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 > object< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Group.html" > Phaser.Group< / a > < / span >
|
< span class = "param-type" > < a href = "Phaser.Sprite.html" > Phaser.Sprite< / a > < / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > An optional Sprite or Group to apply the Collision Group to. If a Group is given it will be applied to all top-level children.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1187" > line 1187< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "createContactMaterial" > < span class = "type-signature" > < / span > createContactMaterial< span class = "signature" > (< span class = "optional" > materialA< / span > , < span class = "optional" > materialB< / span > , < span class = "optional" > options< / span > )< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.ContactMaterial.html" > Phaser.Physics.P2.ContactMaterial< / a > }< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Creates a Contact Material from the two given Materials. You can then edit the properties of the Contact Material directly.< / 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 > materialA< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Physics.P2.Material.html" > Phaser.Physics.P2.Material< / a > < / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > The first Material to create the ContactMaterial from. If undefined it will create a new Material object first.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > materialB< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Physics.P2.Material.html" > Phaser.Physics.P2.Material< / a > < / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > The second Material to create the ContactMaterial from. If undefined it will create a new Material object first.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > options< / code > < / td >
< td class = "type" >
< span class = "param-type" > object< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > Material options object.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1024" > line 1024< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > The Contact Material that was created.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.ContactMaterial.html" > Phaser.Physics.P2.ContactMaterial< / a > < / span >
< / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "createDistanceConstraint" > < span class = "type-signature" > < / span > createDistanceConstraint< span class = "signature" > (bodyA, bodyB, distance, < span class = "optional" > maxForce< / span > )< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.DistanceConstraint.html" > Phaser.Physics.P2.DistanceConstraint< / a > }< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Creates a constraint that tries to keep the distance between two bodies constant.< / 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 > bodyA< / 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.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < p > First connected body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > bodyB< / 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.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < p > Second connected body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > distance< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < p > The distance to keep between the bodies.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > maxForce< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > The maximum force that should be applied to constrain the bodies.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-760" > line 760< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > The constraint< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.DistanceConstraint.html" > Phaser.Physics.P2.DistanceConstraint< / a > < / span >
< / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "createGearConstraint" > < span class = "type-signature" > < / span > createGearConstraint< span class = "signature" > (bodyA, bodyB, < span class = "optional" > angle< / span > , < span class = "optional" > ratio< / span > )< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.GearConstraint.html" > Phaser.Physics.P2.GearConstraint< / a > }< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Creates a constraint that tries to keep the distance between two bodies constant.< / 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 > bodyA< / 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.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > First connected body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > bodyB< / 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.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > Second connected body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > angle< / 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 relative angle< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > ratio< / 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 gear ratio.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-786" > line 786< / a >
2014-03-14 06:36:05 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > The constraint< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.GearConstraint.html" > Phaser.Physics.P2.GearConstraint< / a > < / span >
< / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "createLockConstraint" > < span class = "type-signature" > < / span > createLockConstraint< span class = "signature" > (bodyA, bodyB, < span class = "optional" > offset< / span > , < span class = "optional" > angle< / span > , < span class = "optional" > maxForce< / span > )< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.LockConstraint.html" > Phaser.Physics.P2.LockConstraint< / a > }< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Locks the relative position between two bodies.< / 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 > bodyA< / 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.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > First connected body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > bodyB< / 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.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > Second connected body.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > offset< / 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-03-14 06:36:05 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > angle< / 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 angle of bodyB in bodyA's frame.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > maxForce< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The maximum force that should be applied to constrain the bodies.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
2014-02-21 15:37:26 +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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-840" > line 840< / 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 constraint< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.LockConstraint.html" > Phaser.Physics.P2.LockConstraint< / a > < / 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 = "createMaterial" > < span class = "type-signature" > < / span > createMaterial< span class = "signature" > (< span class = "optional" > name< / span > , < span class = "optional" > body< / span > )< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.Material.html" > Phaser.Physics.P2.Material< / a > }< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Creates a Material. Materials are applied to Shapes owned by a Body and can be set with Body.setMaterial().
Materials are a way to control what happens when Shapes collide. Combine unique Materials together to create Contact Materials.
Contact Materials have properties such as friction and restitution that allow for fine-grained collision control between different Materials.< / 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 > name< / 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 >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > Optional name of the Material. Each Material has a unique ID but string names are handy for debugging.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > body< / code > < / td >
< td class = "type" >
< 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
< / 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 Body. If given it will assign the newly created Material to the Body shapes.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-997" > line 997< / 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 Material that was created. This is also stored in Phaser.Physics.P2.materials.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.Material.html" > Phaser.Physics.P2.Material< / a > < / 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 = "createParticle" > < span class = "type-signature" > < / span > createParticle< span class = "signature" > (x, y, mass, < span class = "optional" > addToWorld< / span > , options, points)< / 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 > Creates a new Particle and adds it to the World.< / 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 > 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 = "attributes" >
< / 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 x coordinate of Body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< 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 = "attributes" >
< / 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 y coordinate of Body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +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-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 = "default" >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The mass of the Body. A mass of 0 means a 'static' Body is created.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > addToWorld< / 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" > boolean< / 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" >
< 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" >
false
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Automatically add this Body to the world? (usually false as it won't have any shapes on construction).< / 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
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > options< / 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" > object< / span >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / td >
< 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 > An object containing the build options:< / p >
< h6 > Properties< / h6 >
2014-02-21 15:37:26 +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 >
< tbody >
< 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" >
< span class = "param-type" > boolean< / span >
< / 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" >
< span class = "param-type" > boolean< / span >
< / 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 >
|
< 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
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 a number (angle threshold value) to remove collinear points, or false to keep all points.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
2014-03-14 06:36:05 +00:00
< / 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
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > points< / code > < / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +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 >
2014-03-14 06:36:05 +00:00
|
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< 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-28 01:42:49 +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, ...],
2014-03-14 06:36:05 +00:00
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 >
< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1337" > line 1337< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-03-24 12:41:45 +00:00
< h4 class = "name" id = "createPrismaticConstraint" > < span class = "type-signature" > < / span > createPrismaticConstraint< span class = "signature" > (bodyA, bodyB, < span class = "optional" > lockRotation< / span > , < span class = "optional" > anchorA< / span > , < span class = "optional" > anchorB< / span > , < span class = "optional" > axis< / span > , < span class = "optional" > maxForce< / span > )< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.PrismaticConstraint.html" > Phaser.Physics.P2.PrismaticConstraint< / a > }< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Constraint that only allows bodies to move along a line, relative to each other.
2014-04-11 12:09:28 +00:00
See < a href = "http://www.iforce2d.net/b2dtut/joints-prismatic" > http://www.iforce2d.net/b2dtut/joints-prismatic< / a > < / 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 >
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 > bodyA< / 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.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< / td >
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 > First connected body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > bodyB< / 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 >
|
< span class = "param-type" > < a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< / td >
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 > Second connected body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-24 12:41:45 +00:00
< td class = "name" > < code > lockRotation< / 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 >
2014-03-14 06:36:05 +00:00
< td class = "default" >
2014-02-21 15:37:26 +00:00
2014-03-24 12:41:45 +00:00
true
2014-02-21 15:37:26 +00:00
< / td >
2014-03-24 12:41:45 +00:00
< td class = "description last" > < p > If set to false, bodyB will be free to rotate around its anchor point.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > anchorA< / 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
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
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" >
< 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 > Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > anchorB< / 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 = "Array.html" > Array< / a > < / 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" >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32].< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > axis< / 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 = "Array.html" > Array< / a > < / 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" >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32].< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > maxForce< / 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 = "attributes" >
< optional>< br >
< / 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 maximum force that should be applied to constrain the bodies.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-867" > line 867< / 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 constraint< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.PrismaticConstraint.html" > Phaser.Physics.P2.PrismaticConstraint< / a > < / 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 = "createRevoluteConstraint" > < span class = "type-signature" > < / span > createRevoluteConstraint< span class = "signature" > (bodyA, pivotA, bodyB, pivotB, < span class = "optional" > maxForce< / span > )< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.RevoluteConstraint.html" > Phaser.Physics.P2.RevoluteConstraint< / a > }< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Connects two bodies at given offset points, letting them rotate relative to each other around this point.
The pivot points are given in world (pixel) coordinates.< / 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 > bodyA< / 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 >
|
< span class = "param-type" > < a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / 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 = "default" >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > First connected body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > pivotA< / 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 = "Array.html" > Array< / a > < / 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 = "default" >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > bodyB< / 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 >
|
< span class = "param-type" > < a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
|
< span class = "param-type" > < a href = "p2.Body.html" > p2.Body< / a > < / 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 = "default" >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Second connected body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > pivotB< / code > < / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< 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
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 point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32].< / 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
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > maxForce< / 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" >
< 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" >
0
< / td >
< td class = "description last" > < p > The maximum force that should be applied to constrain the bodies.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.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 constraint< / 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" > < a href = "Phaser.Physics.P2.RevoluteConstraint.html" > Phaser.Physics.P2.RevoluteConstraint< / a > < / 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 = "createSpring" > < span class = "type-signature" > < / span > createSpring< span class = "signature" > (bodyA, bodyB, < span class = "optional" > restLength< / span > , < span class = "optional" > stiffness< / span > , < span class = "optional" > damping< / span > , < span class = "optional" > restLength< / span > , < span class = "optional" > stiffness< / span > , < span class = "optional" > damping< / span > , < span class = "optional" > worldA< / span > , < span class = "optional" > worldB< / span > , < span class = "optional" > localA< / span > , < span class = "optional" > localB< / span > )< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.Spring.html" > Phaser.Physics.P2.Spring< / a > }< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Creates a spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.< / 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 > bodyA< / 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.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 = "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 > First connected body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > bodyB< / 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.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
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Second connected body.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > restLength< / 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
1
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Rest length of the spring. A number > 0.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > stiffness< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
2014-03-14 06:36:05 +00:00
100
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Stiffness of the spring. A number > = 0.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > damping< / 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" >
< 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" >
1
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Damping of the spring. A number > = 0.< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > restLength< / 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 = "attributes" >
< optional>< br >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
1
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Rest length of the spring. A number > 0.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > stiffness< / 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 = "attributes" >
< optional>< br >
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "default" >
100
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Stiffness of the spring. A number > = 0.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > damping< / 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 = "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" >
1
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Damping of the spring. A number > = 0.< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > worldA< / 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 = "Array.html" > Array< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Where to hook the spring to body A in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > worldB< / 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 = "Array.html" > Array< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Where to hook the spring to body B in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > localA< / 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 = "Array.html" > Array< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > Where to hook the spring to body A in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > localB< / 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-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > Where to hook the spring to body B in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32].< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1261" > line 1261< / 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 spring< / 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" > < a href = "Phaser.Physics.P2.Spring.html" > Phaser.Physics.P2.Spring< / a > < / 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 = "destroy" > < span class = "type-signature" > < / span > destroy< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dt >
< dd >
< div class = "description" >
< p > Clears all bodies from the simulation and unlinks World from Game. Should only be called on game shutdown. Call < code > clear< / code > on a State change.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-669" > line 669< / 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 = "enable" > < span class = "type-signature" > < / span > enable< span class = "signature" > (object, < span class = "optional" > debug< / span > , < span class = "optional" > children< / 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 > This will create a P2 Physics body on the given game object or array of game objects.
A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.< / 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 > 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" > object< / span >
|
< span class = "param-type" > array< / span >
|
< span class = "param-type" > < a href = "Phaser.Group.html" > Phaser.Group< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a < code > body< / code > property.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > debug< / 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 > Create a debug object to go with this body?< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > children< / code > < / td >
< td class = "type" >
< 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 > Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-211" > line 211< / 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 = "enableBody" > < span class = "type-signature" > < / span > enableBody< span class = "signature" > (object, debug)< / 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 > Creates a P2 Physics body on the given game object.
A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.< / 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 > 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" > object< / span >
< / td >
< td class = "description last" > < p > The game object to create the physics body on. A body will only be created if this object has a null < code > body< / code > property.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > debug< / code > < / td >
< td class = "type" >
< 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 > Create a debug object to go with this body?< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-269" > line 269< / 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 = "endContactHandler" > < span class = "type-signature" > < / span > endContactHandler< span class = "signature" > (event)< / 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 > Handles a p2 end contact event.< / 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 > event< / 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 > The event data.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-419" > line 419< / 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 = "getBodies" > < span class = "type-signature" > < / span > getBodies< span class = "signature" > ()< / span > < span class = "type-signature" > → {array.< < a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > >}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Populates and returns an array with references to of all current Bodies in 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1044" > line 1044< / 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 > An array containing all current Bodies in the world.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > array.< < a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > >< / 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 = "getBody" > < span class = "type-signature" > < / span > getBody< span class = "signature" > (object)< / span > < span class = "type-signature" > → {< a href = "p2.Body.html" > p2.Body< / a > }< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Checks the given object to see if it has a p2.Body and if so returns it.< / 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 > 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" > object< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The object to check for a p2.Body 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1064" > line 1064< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
2014-03-14 06:36:05 +00:00
< h5 > Returns:< / h5 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< div class = "param-desc" >
< p > The p2.Body, or null if not found.< / p >
< / div >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl >
< dt >
Type
< / dt >
< dd >
< 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
< / dd >
< / dl >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dd >
< dt >
< h4 class = "name" id = "getConstraints" > < span class = "type-signature" > < / span > getConstraints< span class = "signature" > ()< / span > < span class = "type-signature" > → {array.< Phaser.Physics.P2.Constraint>}< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Populates and returns an array of all current Constraints in the world.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1113" > line 1113< / 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 > An array containing all current Constraints in the world.< / 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" > array.< Phaser.Physics.P2.Constraint>< / 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 = "getContactMaterial" > < span class = "type-signature" > < / span > getContactMaterial< span class = "signature" > (materialA, materialB)< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.ContactMaterial.html" > Phaser.Physics.P2.ContactMaterial< / a > |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 > Gets a Contact Material based on the two given Materials.< / 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 > materialA< / 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.Physics.P2.Material.html" > Phaser.Physics.P2.Material< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The first Material to search for.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > materialB< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Physics.P2.Material.html" > Phaser.Physics.P2.Material< / a > < / span >
< / td >
< td class = "description last" > < p > The second Material to search for.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-965" > line 965< / 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 Contact Material or false if none was found matching the Materials given.< / 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" > < a href = "Phaser.Physics.P2.ContactMaterial.html" > Phaser.Physics.P2.ContactMaterial< / a > < / span >
|
< span class = "param-type" > boolean< / 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 = "getSprings" > < span class = "type-signature" > < / span > getSprings< span class = "signature" > ()< / span > < span class = "type-signature" > → {array.< < a href = "Phaser.Physics.P2.Spring.html" > Phaser.Physics.P2.Spring< / a > >}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Populates and returns an array of all current Springs in 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1093" > line 1093< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
2014-03-14 06:36:05 +00:00
< h5 > Returns:< / h5 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< div class = "param-desc" >
< p > An array containing all current Springs in the world.< / p >
< / div >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > array.< < a href = "Phaser.Physics.P2.Spring.html" > Phaser.Physics.P2.Spring< / a > >< / span >
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
< / dl >
2014-03-14 06:36:05 +00:00
2014-02-21 15:37:26 +00:00
< / dd >
< dt >
2014-04-11 12:09:28 +00:00
< h4 class = "name" id = "hitTest" > < span class = "type-signature" > < / span > hitTest< span class = "signature" > (worldPoint, < span class = "optional" > bodies< / span > , < span class = "optional" > precision< / span > , < span class = "optional" > filterStatic< / span > )< / span > < span class = "type-signature" > → {< a href = "Array.html" > Array< / a > }< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Test if a world point overlaps bodies. You will get an array of actual P2 bodies back. You can find out which Sprite a Body belongs to
(if any) by checking the Body.parent.sprite property. Body.parent is a Phaser.Physics.P2.Body property.< / 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 > worldPoint< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Point.html" > Phaser.Point< / a > < / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > Point to use for intersection tests. The points values must be in world (pixel) coordinates.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > bodies< / code > < / td >
< td class = "type" >
2014-04-11 12:09:28 +00:00
< span class = "param-type" > < a href = "Array.html" > Array< / a > .< (< a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > |< a href = "Phaser.Sprite.html" > Phaser.Sprite< / a > |< a href = "p2.Body.html" > p2.Body< / a > )>< / span >
2014-03-14 06:36:05 +00:00
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > A list of objects to check for intersection. If not given it will check Phaser.Physics.P2.world.bodies (i.e. all world bodies)< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > precision< / 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 >
< td class = "default" >
5
< / td >
< td class = "description last" > < p > Used for matching against particles and lines. Adds some margin to these infinitesimal objects.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > filterStatic< / code > < / td >
< td class = "type" >
< span class = "param-type" > boolean< / span >
< / td >
< 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" >
false
< / td >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > If true all Static objects will be removed from the results array.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1133" > line 1133< / 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 > Array of bodies that overlap the point.< / p >
2014-02-21 15:37:26 +00:00
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
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
< / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "mpx" > < span class = "type-signature" > < / span > mpx< span class = "signature" > (v)< / span > < span class = "type-signature" > → {number}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Convert p2 physics value (meters) to pixel scale.
By default Phaser uses a scale of 20px per meter.
If you need to modify this you can over-ride these functions via the Physics Configuration object.< / 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 >
< td class = "name" > < code > v< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > The value to convert.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1531" > line 1531< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > The scaled value.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > number< / span >
< / dd >
< / dl >
< / dd >
< dt >
2014-03-14 06:36:05 +00:00
< h4 class = "name" id = "mpxi" > < span class = "type-signature" > < / span > mpxi< span class = "signature" > (v)< / span > < span class = "type-signature" > → {number}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Convert p2 physics value (meters) to pixel scale and inverses it.
By default Phaser uses a scale of 20px per meter.
If you need to modify this you can over-ride these functions via the Physics Configuration object.< / 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 > v< / 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 value to convert.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1561" > line 1561< / 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 scaled value.< / 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-03-14 06:36:05 +00:00
< h4 class = "name" id = "preUpdate" > < span class = "type-signature" > < / span > preUpdate< 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 > Called at the start of the core update loop. Purges flagged bodies from the world.< / 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
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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-193" > line 193< / 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 = "pxm" > < span class = "type-signature" > < / span > pxm< span class = "signature" > (v)< / span > < span class = "type-signature" > → {number}< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Convert pixel value to p2 physics scale (meters).
By default Phaser uses a scale of 20px per meter.
If you need to modify this you can over-ride these functions via the Physics Configuration object.< / p >
< / div >
2014-02-21 15:37:26 +00:00
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
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > v< / 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 value to convert.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1546" > line 1546< / 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 scaled value.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > number< / 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 = "pxmi" > < span class = "type-signature" > < / span > pxmi< span class = "signature" > (v)< / span > < span class = "type-signature" > → {number}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Convert pixel value to p2 physics scale (meters) and inverses it.
By default Phaser uses a scale of 20px per meter.
If you need to modify this you can over-ride these functions via the Physics Configuration object.< / 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 > v< / 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 value to convert.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1576" > line 1576< / 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 scaled value.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > number< / 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 = "removeBody" > < span class = "type-signature" > < / span > removeBody< span class = "signature" > (body)< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > }< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-24 12:41:45 +00:00
< p > Removes a body from the world. This will silently fail if the body wasn't part of the world to begin with.< / 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 > body< / 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.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Body to remove from the World.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-706" > line 706< / 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 Body that was removed.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / 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 = "removeBodyNextStep" > < span class = "type-signature" > < / span > removeBodyNextStep< span class = "signature" > (body)< / 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 > This will add a P2 Physics body into the removal list for the next step.< / 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 > body< / 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.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The body to remove at the start of the next 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-181" > line 181< / 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 = "removeConstraint" > < span class = "type-signature" > < / span > removeConstraint< span class = "signature" > (constraint)< / span > < span class = "type-signature" > → {Phaser.Physics.P2.Constraint}< / 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 a Constraint from the world.< / 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 > constraint< / 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.P2.Constraint< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Constraint to be removed from the World.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-914" > line 914< / 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
< h5 > Returns:< / h5 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< div class = "param-desc" >
< p > The Constraint that was removed.< / p >
< / div >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Phaser.Physics.P2.Constraint< / span >
< / dd >
< / dl >
< / dd >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dt >
< h4 class = "name" id = "removeContactMaterial" > < span class = "type-signature" > < / span > removeContactMaterial< span class = "signature" > (material)< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.ContactMaterial.html" > Phaser.Physics.P2.ContactMaterial< / a > }< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Removes a Contact Material from the world.< / p >
< / div >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< h5 > Parameters:< / h5 >
< table class = "params 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 > material< / 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.Physics.P2.ContactMaterial.html" > Phaser.Physics.P2.ContactMaterial< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Contact Material to be removed from the World.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-948" > line 948< / 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 Contact Material that was removed.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.ContactMaterial.html" > Phaser.Physics.P2.ContactMaterial< / a > < / 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 = "removeSpring" > < span class = "type-signature" > < / span > removeSpring< span class = "signature" > (spring)< / span > < span class = "type-signature" > → {< a href = "Phaser.Physics.P2.Spring.html" > Phaser.Physics.P2.Spring< / a > }< / 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 a Spring from the world.< / 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 > spring< / 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.Physics.P2.Spring.html" > Phaser.Physics.P2.Spring< / a > < / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > The Spring to remove from the World.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-743" > line 743< / 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 Spring that was removed.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > < a href = "Phaser.Physics.P2.Spring.html" > Phaser.Physics.P2.Spring< / a > < / 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 = "setBounds" > < span class = "type-signature" > < / span > setBounds< span class = "signature" > (x, y, width, height, < span class = "optional" > left< / span > , < span class = "optional" > right< / span > , < span class = "optional" > top< / span > , < span class = "optional" > bottom< / span > , < span class = "optional" > setCollisionGroup< / 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 > Sets the bounds of the Physics world to match the given world pixel dimensions.
You can optionally set which 'walls' to create: left, right, top or bottom.< / 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 >
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 > x< / 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" >
< / td >
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 x coordinate of the top-left corner of the bounds.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< 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" >
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" >
< / td >
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 y coordinate of the top-left corner of the bounds.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
2014-03-14 06:36:05 +00:00
< tr >
< td class = "name" > < code > width< / 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 width of the bounds.< / 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
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 bounds.< / p > < / td >
< / tr >
2014-02-21 15:37:26 +00:00
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > left< / 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
true
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > If true will create the left bounds wall.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > right< / 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
true
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > If true will create the right bounds wall.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > top< / 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
true
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > If true will create the top bounds wall.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > bottom< / 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
true
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > If true will create the bottom bounds wall.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > setCollisionGroup< / 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
true
2014-02-21 15:37:26 +00:00
< / td >
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > If true the Bounds will be set to use its own Collision Group.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-533" > line 533< / 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 = "setImpactEvents" > < span class = "type-signature" > < / span > setImpactEvents< span class = "signature" > (state)< / 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 > Impact event handling is disabled by default. Enable it before any impact events will be dispatched.
In a busy world hundreds of impact events can be generated every step, so only enable this if you cannot do what you need via beginContact or 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 >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-03-14 06:36:05 +00:00
< td class = "name" > < code > state< / 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
2014-03-14 06:36:05 +00:00
< / td >
< td class = "description last" > < p > Set to true to enable impact events, or false to disable.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-288" > line 288< / 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 = "setMaterial" > < span class = "type-signature" > < / span > setMaterial< span class = "signature" > (material, bodies)< / 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 the given Material against all Shapes owned by all the Bodies in the given array.< / p >
2014-02-21 15:37:26 +00:00
< / div >
2014-03-14 06:36:05 +00:00
< 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 > material< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Physics.P2.Material.html" > Phaser.Physics.P2.Material< / a > < / span >
< / td >
< td class = "description last" > < p > The Material to be applied to the given Bodies.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > bodies< / code > < / td >
< td class = "type" >
< span class = "param-type" > array.< < a href = "Phaser.Physics.P2.Body.html" > Phaser.Physics.P2.Body< / a > >< / span >
< / td >
< td class = "description last" > < p > An Array of Body objects that the given Material will be set on.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-979" > line 979< / 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 = "setPostBroadphaseCallback" > < span class = "type-signature" > < / span > setPostBroadphaseCallback< span class = "signature" > (callback, context)< / 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 after the Broadphase has collected collision pairs in the world.
Just because a pair exists it doesn't mean they < em > will< / em > collide, just that they potentially could do.
If your calback returns < code > false< / code > the pair will be removed from the narrowphase. This will stop them testing for collision this step.
Returning < code > true< / code > from the callback will ensure they are checked in the narrowphase.< / 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 > 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 that will receive the postBroadphase event data. It must return a boolean. Set to null to disable an existing callback.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > context< / code > < / td >
< td class = "type" >
< span class = "param-type" > object< / span >
< / td >
< td class = "description last" > < p > The context under which the callback will be fired.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-308" > line 308< / 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 = "toJSON" > < span class = "type-signature" > < / span > toJSON< span class = "signature" > ()< / span > < span class = "type-signature" > → {object}< / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-03-14 06:36:05 +00:00
< p > Converts the current world into a JSON object.< / 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
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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-1175" > line 1175< / 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
< h5 > Returns:< / h5 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< div class = "param-desc" >
< p > A JSON representation of the world.< / p >
< / div >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > object< / span >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< / dd >
< / 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
< dt >
< h4 class = "name" id = "update" > < span class = "type-signature" > < / span > update< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< 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
< 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-630" > line 630< / 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 = "updateBoundsCollisionGroup" > < span class = "type-signature" > < / span > updateBoundsCollisionGroup< span class = "signature" > (< span class = "optional" > setCollisionGroup< / 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 > By default the World will be set to collide everything with everything. The bounds of the world is a Body with 4 shapes, one for each face.
If you start to use your own collision groups then your objects will no longer collide with the bounds.
To fix this you need to adjust the bounds to use its own collision group first BEFORE changing your Sprites collision group.< / 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 > setCollisionGroup< / 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
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 >
2014-02-21 15:37:26 +00:00
2014-03-14 06:36:05 +00:00
< td class = "description last" > < p > If true the Bounds will be set to use its own Collision Group.< / 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 = "World.js.html" > physics/p2/World.js< / a > , < a href = "World.js.html#sunlight-1-line-497" > line 497< / 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 >
on Fri Apr 11 2014 13:08:33 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 >