photonstorm
f40cfbe2ae
2015 - 2016.
2016-04-04 22:16:16 +01:00
Richard Davey
6a50e18bf0
Merge pull request #1610 from yigitozdemir/dev
...
On Ceiling Method Addition
2016-02-01 21:14:12 +02:00
photonstorm
f15fe6706c
All undefined argument checks were changed from if (typeof x === 'undefined')
to if (x === undefined)
removing the typeof check and saving some bytes across the codebase in the process.
2015-07-22 10:37:15 +01:00
Richard Davey
9e38bf974a
World.stateChange is a new method that is called whenever the state changes or restarts. It resets the world x/y coordinates back to zero and then resets the Camera.
...
Sprites with Arcade Physics bodies that had `collideWorldBounds` enabled would be moved to the wrong position if you restarted a State (or swapped to a new State) that reset the world bounds (thanks @vulvulune #1775 )
2015-07-22 01:24:26 +01:00
photonstorm
19f8a7316e
ArcadePhysics.Body.syncBounds is a new property that if true forces the Body to check itself against the Sprite.getBounds() dimensions and adjust its width and height accordingly. If false it will compare its dimensions against the Sprite scale instead, and adjust its width height if the scale has changed. Typically you would need to enable syncBounds
if your sprite is the child of a responsive display object such as a FlexLayer, or in any situation where the sprite scale doesn't change, but its parents scale is effecting the dimensions regardless.
2015-04-29 13:13:26 +01:00
photonstorm
35bfe5fb2a
Body.destroy now automatically calls Group.removeFromHash
.
2015-04-13 16:27:43 +01:00
photonstorm
b07ce89236
sourceWidth / Height now only set from the texture if the object has a texture.
2015-03-23 15:05:39 +00:00
photonstorm
3f30a3d0d2
jsdocs updates.
2015-03-23 10:11:39 +00:00
breakosaur
bb600b4319
Fixed a few documentation typos.
2015-03-18 21:07:36 +00:00
photonstorm
2483cd5df4
Various readonly Body properties flagged as 'readonly' in the jsdocs ( #1643 )
2015-02-26 23:32:14 +00:00
photonstorm
a69e53f901
Copyright date change.
2015-02-25 03:36:23 +00:00
photonstorm
c799dfe7da
Fixed physics postUpdate issue causing particles and all kinds of things to go awry.
2015-02-25 02:18:05 +00:00
photonstorm
0588f95f4c
Body.phase renamed to Body.dirty.
2015-02-17 05:13:36 +00:00
photonstorm
8483eac6aa
Removing all use of _cache from all Game Objects.
2015-02-16 17:22:51 +00:00
yigitozdemir
9ad1230257
On Ceiling Method Added
2015-02-11 01:36:35 +02:00
photonstorm
d710caed9e
Body.reset now resets the Body.speed value to zero.
2015-02-05 05:12:31 +00:00
photonstorm
d6ea8fb956
jsdoc updates (spelling mistakes, code formatting, etc)
2015-01-28 17:18:33 +00:00
photonstorm
587c3e5f6a
Arcade.Body.friction
allows you to have more fine-grained control over the amount of velocity passed between bodies on collision.
2015-01-18 12:24:00 +00:00
photonstorm
0f42b530eb
Physics.Arcade.isPaused
allows you to toggle Arcade Physics processing on and off. If true
the Body.preUpdate
method will be skipped, halting all motion for all bodies. Note that other methods such as collide
will still work, so be careful not to call them on paused bodies.
2015-01-10 00:30:02 +00:00
photonstorm
15d5b54c26
Removed redundant updateTransform call.
2015-01-02 04:15:27 +00:00
Richard Davey
3c4a9720c6
Body updateTransform patch re: #1493 and #1490
2015-01-01 12:33:43 +00:00
photonstorm
20551f9129
Lots of jsdocs fixes ready for the new doc generator.
2014-09-16 17:35:08 +01:00
photonstorm
0f207c47a7
Calling P2.Body.destroy or ArcadePhysics.Body.destroy wouldn't null the parent sprite body, causing it to error in the next update (thanks @jonathanhooker #1077 )
2014-08-28 03:44:02 +01:00
photonstorm
36ecd81f29
Arcade Physics Body.skipQuadTree is a new boolean that if set to true
when you collide the Sprite against a Group it will tell Phaser to skip using a QuadTree for that collision. This is handy if this Body is especially large.
...
Arcade Physics World.skipQuadTree will disable the use of all QuadTrees in collision methods, which can help performance in tightly packed scenes.
2014-08-04 13:04:11 +01:00
Paul Salaets
79f550bc89
updating comments: default color and method name
2014-07-05 18:08:00 -04:00
Paul Salaets
0694dab909
reorder param list to be consistent with comment's ordering and other code
2014-07-05 17:50:13 -04:00
Phaiax
00bf349ff5
Body.enable only exists in Arcade physics, so move conditions concerning this into arcarde
2014-06-30 12:49:53 +02:00
photonstorm
50e47d89ee
ArcadePhysics.Body.setSize if you set offset x/y values previously and then passed zero values they would be ignored (thanks @casensiom fix #889 )
2014-06-11 00:21:04 +01:00
photonstorm
9c35dfde0c
ArcadePhysics.Body has a new boolean property enable
. If false
the body won't be checked for any collision or overlaps, or have its pre or post update methods called. Use this for easy toggling of physics bodies without having to destroy or re-create the Body object itself.
2014-05-27 11:22:58 +01:00
photonstorm
3b73c17997
ArcadePhysics.Body.phase is checked in postUpdate to prevent it from being called multiple times in a single frame.
2014-04-15 02:50:25 +01:00
photonstorm
439cefd481
ArcadePhysics.Body.hitTest(x, y) will return a boolean based on if the given world coordinate are within the Body or not.
...
Fixed jsdoc method tags in Body.
2014-04-01 03:54:20 +01:00
photonstorm
5b73bb21bb
Sprite would glitch if it had an ArcadePhysics Body that was re-positioned out of loop.
...
Sprite would "fly off" if it had an ArcadePhysics Body that was re-positioned during an input handler.
Newly generated docs
2014-03-28 01:42:49 +00:00
Richard Davey
06c953a293
Merge pull request #647 from xtian/grunt-jshint
...
Run jshint as part of build process and fix jshint errors
2014-03-26 15:46:35 +00:00
photonstorm
fc0e239719
ArcadePhysics.Body preUpdate has been modified to stop Sprites with non-1 scaling from gaining delta and moving off the screen ( fix #644 ).
...
Lots of ArcadePhysics.World methods have been marked as private where they shouldn't be called directly (separateX, etc)
2014-03-26 10:48:30 +00:00
Christian Wesselhoeft
5f267baeb0
Fix jshint issues in src/physics/arcade
2014-03-25 14:56:04 -07:00
Christian Wesselhoeft
61f18b675c
Trim trailing whitespace.
2014-03-25 14:56:04 -07:00
photonstorm
634b1d1093
Emitter.friction property removed and replaced with Emitter.particleDrag, which is now correctly applied.
...
ArcadePhysics.Body.reset incorrectly set the Body.rotation to Sprite.rotation instead of angle.
Emitter.emitParticle resets the rotation on the particle to zero before emitting it.
Lots of fixes to the TypeScript definitions file (thanks as always to clark-stevenson for his tireless work on these)
Emitters now bring the particle they are about to emit to the top of the Group before doing so. Avoids particles hidden behind others.
ArcadePhysics.Body.setSize corrected to take the parameters as positive, not negative values.
ArcadePhysics.Body now checks the Sprite scale automatically and adjusts the body size accordingly (fix #608 )
Emitter.particleClass can now be set to any object that extends Phaser.Sprite, which will be emitted instead of a regular Sprite.
2014-03-20 03:48:54 +00:00
photonstorm
684ee9c064
ArcadePhysics.Body has a deltaMax object, which allows you to cap the delta applied to the position to +- this value.
...
ArcadePhysics.Body now checks the Sprite scale automatically and adjusts the body size accordingly (fix #608 )
2014-03-20 00:20:02 +00:00
photonstorm
0a42ac39b9
ArcadePhysics.World now has a checkCollision object which can be used to toggle collision against the 4 walls of its bounds.
2014-03-19 04:03:21 +00:00
photonstorm
2cc1a45f9a
Fixed SpriteBounds camera placement in Debug (again).
...
Removed un-needed cache vars from ArcadePhysics.World.
Tidied up ArcadePhysics.Body and fixed rotation parameters.
Every single Arcade Physics Example now runs perfectly under this release.
2014-03-19 03:55:44 +00:00
photonstorm
79ffda3f18
ArcadePhysics.separate doesn't pass over to seperateX/Y if overlapOnly is true ( fix #604 )
...
ArcadePhysics.collideSpriteVsSprite checks if both objects have bodies before processing.
ArcadePhysics.Body now checks the ArcadePhysics.World bounds, not the game bounds.
ArcadePhysics.Body has reverted to the 1.1.3 method of preUpdate, so you can now position sprites with x/y, drag them, etc, regardless of the Body.moves flag (issue #606 )
ArcadePhysics.World now has setBounds and setBoundsToWorld methods, which are called automatically on world resizing.
ArcadePhysics.Body no longer sets the offset to match the anchor.
2014-03-19 02:28:20 +00:00
Richard Davey
fc5504f8d8
Fixed Sprite.destroy with an arcade body
2014-03-15 01:06:01 +00:00
photonstorm
44a5741148
Fixed games. Updated Body.moves handling.
2014-03-14 04:49:55 +00:00
photonstorm
f3ff9c197f
Fixed all the tilemap examples.
2014-03-14 03:26:06 +00:00
photonstorm
a83a76bc5d
Line.coordinatesOnLine will return all coordinates on the line using Bresenhams line algorithm.
2014-03-14 00:05:03 +00:00
photonstorm
ec0b22268d
Added Body.tilePadding to help with small/fast moving bodies vs. tile collision.
2014-03-13 23:15:32 +00:00
photonstorm
5297497632
Tilemap collision finally getting closer.
2014-03-13 22:49:08 +00:00
photonstorm
e955145707
Added p2 kill and reset test + nearing completion on tilemap collision.
2014-03-13 21:14:18 +00:00
photonstorm
b666874592
Fixed Body.reset and Tanks game.
2014-03-13 15:57:49 +00:00
photonstorm
dc434dd1ff
Render Debug moved into Arcade class.
2014-03-13 15:41:56 +00:00