Namespace: Arcade

Phaser.Types.Physics. Arcade

Type Definitions


ArcadeBodyBounds

Type:
  • object
Properties:
Name Type Description
x number

The left edge.

y number

The upper edge.

right number

The right edge.

bottom number

The lower edge.

Since: 3.0.0
Source: src/physics/arcade/typedefs/ArcadeBodyBounds.js (Line 1)

ArcadeBodyCollision

Type:
  • object
Properties:
Name Type Description
none boolean

True if the Body is not colliding.

up boolean

True if the Body is colliding on its upper edge.

down boolean

True if the Body is colliding on its lower edge.

left boolean

True if the Body is colliding on its left edge.

right boolean

True if the Body is colliding on its right edge.

Since: 3.0.0
Source: src/physics/arcade/typedefs/ArcadeBodyCollision.js (Line 1)

ArcadeColliderType

An Arcade Physics Collider Type.

Type:
Since: 3.0.0
Source: src/physics/arcade/typedefs/ArcadeColliderType.js (Line 1)

ArcadeWorldConfig

Type:
  • object
Properties:
Name Type Argument Default Description
fps number <optional>
60

Sets Phaser.Physics.Arcade.World#fps.

fixedStep boolean <optional>
true

Sets Phaser.Physics.Arcade.World#fixedStep.

timeScale number <optional>
1

Sets Phaser.Physics.Arcade.World#timeScale.

gravity Phaser.Types.Math.Vector2Like <optional>

Sets Phaser.Physics.Arcade.World#gravity.

x number <optional>
0

Sets bounds.x.

y number <optional>
0

Sets bounds.y.

width number <optional>
0

Sets bounds.width.

height number <optional>
0

Sets bounds.height.

checkCollision Phaser.Types.Physics.Arcade.CheckCollisionObject <optional>

Sets Phaser.Physics.Arcade.World#checkCollision.

overlapBias number <optional>
4

Sets Phaser.Physics.Arcade.World#OVERLAP_BIAS.

tileBias number <optional>
16

Sets Phaser.Physics.Arcade.World#TILE_BIAS.

forceX boolean <optional>
false

Sets Phaser.Physics.Arcade.World#forceX.

isPaused boolean <optional>
false

Sets Phaser.Physics.Arcade.World#isPaused.

debug boolean <optional>
false

Sets Phaser.Physics.Arcade.World#debug.

debugShowBody boolean <optional>
true

Sets debugShowBody.

debugShowStaticBody boolean <optional>
true

Sets debugShowStaticBody.

debugShowVelocity boolean <optional>
true

Sets debugShowStaticBody.

debugBodyColor number <optional>
0xff00ff

Sets bodyDebugColor.

debugStaticBodyColor number <optional>
0x0000ff

Sets staticBodyDebugColor.

debugVelocityColor number <optional>
0x00ff00

Sets velocityDebugColor.

maxEntries number <optional>
16

Sets Phaser.Physics.Arcade.World#maxEntries.

useTree boolean <optional>
true

Sets Phaser.Physics.Arcade.World#useTree.

customUpdate boolean <optional>
false

If enabled, you need to call World.update yourself.

Since: 3.0.0
Source: src/physics/arcade/typedefs/ArcadeWorldConfig.js (Line 1)

ArcadeWorldDefaults

Type:
  • object
Properties:
Name Type Description
debugShowBody boolean

Set to true to render dynamic body outlines to the debug display.

debugShowStaticBody boolean

Set to true to render static body outlines to the debug display.

debugShowVelocity boolean

Set to true to render body velocity markers to the debug display.

bodyDebugColor number

The color of dynamic body outlines when rendered to the debug display.

staticBodyDebugColor number

The color of static body outlines when rendered to the debug display.

velocityDebugColor number

The color of the velocity markers when rendered to the debug display.

Since: 3.0.0
Source: src/physics/arcade/typedefs/ArcadeWorldDefaults.js (Line 1)

ArcadeWorldTreeMinMax

Type:
  • object
Properties:
Name Type Description
minX number

The minimum x value used in RTree searches.

minY number

The minimum y value used in RTree searches.

maxX number

The maximum x value used in RTree searches.

maxY number

The maximum y value used in RTree searches.

Since: 3.0.0
Source: src/physics/arcade/typedefs/ArcadeWorldTreeMinMax.js (Line 1)

CheckCollisionObject

Type:
  • object
Properties:
Name Type Description
up boolean

Will bodies collide with the top side of the world bounds?

down boolean

Will bodies collide with the bottom side of the world bounds?

left boolean

Will bodies collide with the left side of the world bounds?

right boolean

Will bodies collide with the right side of the world bounds?

Since: 3.0.0
Source: src/physics/arcade/typedefs/CheckCollisionObject.js (Line 1)

GameObjectWithBody

Type:
  • object
Properties:
Name Type Description
body Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody
Source: src/physics/arcade/typedefs/GameObjectWithBody.js (Line 1)

GameObjectWithDynamicBody

Type:
  • object
Properties:
Name Type Description
body Phaser.Physics.Arcade.Body
Source: src/physics/arcade/typedefs/GameObjectWithDynamicBody.js (Line 1)

GameObjectWithStaticBody

Type:
  • object
Properties:
Name Type Description
body Phaser.Physics.Arcade.StaticBody
Source: src/physics/arcade/typedefs/GameObjectWithStaticBody.js (Line 1)

ImageWithDynamicBody

Type:
  • object
Properties:
Name Type Description
body Phaser.Physics.Arcade.Body
Source: src/physics/arcade/typedefs/ImageWithDynamicBody.js (Line 1)

ImageWithStaticBody

Type:
  • object
Properties:
Name Type Description
body Phaser.Physics.Arcade.StaticBody
Source: src/physics/arcade/typedefs/ImageWithStaticBody.js (Line 1)

PhysicsGroupConfig

Type:
  • object
Properties:
Name Type Argument Default Description
collideWorldBounds boolean <optional>
false

Sets Phaser.Physics.Arcade.Body#collideWorldBounds.

customBoundsRectangle Phaser.Geom.Rectangle <optional>
null

Sets setBoundsRectangle.

accelerationX number <optional>
0

Sets acceleration.x.

accelerationY number <optional>
0

Sets acceleration.y.

allowDrag boolean <optional>
true

Sets Phaser.Physics.Arcade.Body#allowDrag.

allowGravity boolean <optional>
true

Sets Phaser.Physics.Arcade.Body#allowGravity.

allowRotation boolean <optional>
true

Sets Phaser.Physics.Arcade.Body#allowRotation.

bounceX number <optional>
0

Sets bounce.x.

bounceY number <optional>
0

Sets bounce.y.

dragX number <optional>
0

Sets drag.x.

dragY number <optional>
0

Sets drag.y.

enable boolean <optional>
true

Sets enable.

gravityX number <optional>
0

Sets gravity.x.

gravityY number <optional>
0

Sets gravity.y.

frictionX number <optional>
0

Sets friction.x.

frictionY number <optional>
0

Sets friction.y.

maxVelocityX number <optional>
10000

Sets maxVelocity.x.

maxVelocityY number <optional>
10000

Sets maxVelocity.y.

velocityX number <optional>
0

Sets velocity.x.

velocityY number <optional>
0

Sets velocity.y.

angularVelocity number <optional>
0

Sets Phaser.Physics.Arcade.Body#angularVelocity.

angularAcceleration number <optional>
0

Sets Phaser.Physics.Arcade.Body#angularAcceleration.

angularDrag number <optional>
0

Sets Phaser.Physics.Arcade.Body#angularDrag.

mass number <optional>
0

Sets Phaser.Physics.Arcade.Body#mass.

immovable boolean <optional>
false

Sets Phaser.Physics.Arcade.Body#immovable.

Since: 3.0.0
Source: src/physics/arcade/typedefs/PhysicsGroupConfig.js (Line 1)

PhysicsGroupDefaults

Type:
  • object
Properties:
Name Type Description
setCollideWorldBounds boolean

As Phaser.Physics.Arcade.Body#setCollideWorldBounds.

setBoundsRectangle Phaser.Geom.Rectangle

As Phaser.Physics.Arcade.Body#setBoundsRectangle.

setAccelerationX number

As Phaser.Physics.Arcade.Body#setAccelerationX.

setAccelerationY number

As Phaser.Physics.Arcade.Body#setAccelerationY.

setAllowDrag boolean

As Phaser.Physics.Arcade.Body#setAllowDrag.

setAllowGravity boolean

As Phaser.Physics.Arcade.Body#setAllowGravity.

setAllowRotation boolean

As Phaser.Physics.Arcade.Body#setAllowRotation.

setBounceX number

As Phaser.Physics.Arcade.Body#setBounceX.

setBounceY number

As Phaser.Physics.Arcade.Body#setBounceY.

setDragX number

As Phaser.Physics.Arcade.Body#setDragX.

setDragY number

As Phaser.Physics.Arcade.Body#setDragY.

setEnable boolean

As Phaser.Physics.Arcade.Body#setEnable.

setGravityX number

As Phaser.Physics.Arcade.Body#setGravityX.

setGravityY number

As Phaser.Physics.Arcade.Body#setGravityY.

setFrictionX number

As Phaser.Physics.Arcade.Body#setFrictionX.

setFrictionY number

As Phaser.Physics.Arcade.Body#setFrictionY.

setVelocityX number

As Phaser.Physics.Arcade.Body#setVelocityX.

setVelocityY number

As Phaser.Physics.Arcade.Body#setVelocityY.

setAngularVelocity number

As Phaser.Physics.Arcade.Body#setAngularVelocity.

setAngularAcceleration number

As Phaser.Physics.Arcade.Body#setAngularAcceleration.

setAngularDrag number

As Phaser.Physics.Arcade.Body#setAngularDrag.

setMass number

As Phaser.Physics.Arcade.Body#setMass.

setImmovable boolean

As Phaser.Physics.Arcade.Body#setImmovable.

Since: 3.0.0
Source: src/physics/arcade/typedefs/PhysicsGroupDefaults.js (Line 1)

SpriteWithDynamicBody

Type:
  • object
Properties:
Name Type Description
body Phaser.Physics.Arcade.Body
Source: src/physics/arcade/typedefs/SpriteWithDynamicBody.js (Line 1)

SpriteWithStaticBody

Type:
  • object
Properties:
Name Type Description
body Phaser.Physics.Arcade.StaticBody
Source: src/physics/arcade/typedefs/SpriteWithStaticBody.js (Line 1)