- Source: src/physics/impact/typedefs/index.js (Line 7)
Type Definitions
-
BodyUpdateCallback(body)
-
Parameters:
Name Type Description bodyPhaser.Physics.Impact.Body [description]
- Since: 3.0.0
- Source: src/physics/impact/Body.js (Line 13)
-
CollisionOptions
-
Type:
- object
- Since: 3.0.0
- Source: src/physics/impact/typedefs/CollisionOptions.js (Line 1)
Properties:
Name Type Argument Default Description slopeTilePropertystring <optional>
null Slope IDs can be stored on tiles directly using Impacts tileset editor. If a tile has a property with the given slopeTileProperty string name, the value of that property for the tile will be used for its slope mapping. E.g. a 45 degree slope upward could be given a "slope" property with a value of 2.
slopeMapobject <optional>
null A tile index to slope definition map.
defaultCollidingSlopeinteger <optional>
null If specified, the default slope ID to assign to a colliding tile. If not specified, the tile's index is used.
defaultNonCollidingSlopeinteger <optional>
0 The default slope ID to assign to a non-colliding tile.
-
JSONImpactBody
-
Type:
- object
- Since: 3.0.0
- Source: src/physics/impact/typedefs/JSONImpactBody.js (Line 1)
Properties:
Name Type Description namestring [description]
sizePhaser.Types.Math.Vector2Like [description]
posPhaser.Types.Math.Vector2Like The entity's position in the game world.
velPhaser.Types.Math.Vector2Like Current velocity in pixels per second.
accelPhaser.Types.Math.Vector2Like Current acceleration to be added to the entity's velocity per second. E.g. an entity with a
vel.xof 0 andaccel.xof 10 will have avel.xof 100 ten seconds later.frictionPhaser.Types.Math.Vector2Like Deceleration to be subtracted from the entity's velocity per second. Only applies if
accelis 0.maxVelPhaser.Types.Math.Vector2Like The maximum velocity a body can move.
gravityFactornumber [description]
bouncinessnumber [description]
minBounceVelocitynumber [description]
typePhaser.Physics.Impact.TYPE [description]
checkAgainstPhaser.Physics.Impact.TYPE [description]
collidesPhaser.Physics.Impact.COLLIDES [description]
-
WorldConfig
-
Type:
- object
- Since: 3.0.0
- Source: src/physics/impact/typedefs/WorldConfig.js (Line 1)
Properties:
Name Type Argument Default Description gravitynumber <optional>
0 cellSizenumber <optional>
64 The size of the cells used for the broadphase pass. Increase this value if you have lots of large objects in the world.
timeScalenumber <optional>
1 A number that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed.
maxStepnumber <optional>
0.05 [description]
debugboolean <optional>
false Sets Phaser.Physics.Impact.World#debug.
maxVelocitynumber <optional>
100 The maximum velocity a body can move.
debugShowBodyboolean <optional>
true Whether the Body's boundary is drawn to the debug display.
debugShowVelocityboolean <optional>
true Whether the Body's velocity is drawn to the debug display.
debugBodyColornumber <optional>
0xff00ff The color of this Body on the debug display.
debugVelocityColornumber <optional>
0x00ff00 The color of the Body's velocity on the debug display.
maxVelocityXnumber <optional>
maxVelocity Maximum X velocity objects can move.
maxVelocityYnumber <optional>
maxVelocity Maximum Y velocity objects can move.
minBounceVelocitynumber <optional>
40 The minimum velocity an object can be moving at to be considered for bounce.
gravityFactornumber <optional>
1 Gravity multiplier. Set to 0 for no gravity.
bouncinessnumber <optional>
0 The default bounce, or restitution, of bodies in the world.
setBoundsobject | boolean <optional>
Should the world have bounds enabled by default?
Properties
Name Type Argument Default Description xnumber <optional>
0 The x coordinate of the world bounds.
ynumber <optional>
0 The y coordinate of the world bounds.
widthnumber <optional>
The width of the world bounds.
heightnumber <optional>
The height of the world bounds.
thicknessnumber <optional>
64 The thickness of the walls of the world bounds.
leftboolean <optional>
true Should the left-side world bounds wall be created?
rightboolean <optional>
true Should the right-side world bounds wall be created?
topboolean <optional>
true Should the top world bounds wall be created?
bottomboolean <optional>
true Should the bottom world bounds wall be created?
-
WorldDefaults
-
An object containing the 4 wall bodies that bound the physics world.
Type:
- object
- Since: 3.0.0
- Source: src/physics/impact/typedefs/WorldDefaults.js (Line 1)
Properties:
Name Type Description debugShowBodyboolean Whether the Body's boundary is drawn to the debug display.
debugShowVelocityboolean Whether the Body's velocity is drawn to the debug display.
bodyDebugColornumber The color of this Body on the debug display.
velocityDebugColornumber The color of the Body's velocity on the debug display.
maxVelocityXnumber Maximum X velocity objects can move.
maxVelocityYnumber Maximum Y velocity objects can move.
minBounceVelocitynumber The minimum velocity an object can be moving at to be considered for bounce.
gravityFactornumber Gravity multiplier. Set to 0 for no gravity.
bouncinessnumber The default bounce, or restitution, of bodies in the world.
-
WorldWalls
-
Type:
- object
- Since: 3.0.0
- Source: src/physics/impact/typedefs/WorldWalls.js (Line 1)
Properties:
Name Type Argument Description leftPhaser.Physics.Impact.Body <nullable>
The left-side wall of the world bounds.
rightPhaser.Physics.Impact.Body <nullable>
The right-side wall of the world bounds.
topPhaser.Physics.Impact.Body <nullable>
The top wall of the world bounds.
bottomPhaser.Physics.Impact.Body <nullable>
The bottom wall of the world bounds.
