Gionatan Iasio
1bbb3bb903
Fix Rope.js
...
Rope creation key parameter didn't work, because PIXI.Rope requires a texture, not string.
Changed it like Sprite.
2015-05-16 19:59:12 +02:00
photonstorm
f78a4cb337
jshint fixes.
2015-05-15 01:35:20 +01:00
photonstorm
f725ac48ae
Removed all the debug information.
2015-05-15 01:27:42 +01:00
photonstorm
f2e2039009
Invalidate the texture while we wait for the new one to load (crashes IE11 otherwise)
2015-05-15 01:17:44 +01:00
photonstorm
ce27da362b
Stacks of fixes to the video stream support to get it working in Firefox.
2015-05-14 23:23:38 +01:00
photonstorm
aabeccbdac
Working but needs refining.
2015-05-14 19:10:36 +01:00
photonstorm
63887faffe
Loads of changes to deal with invalid textures and videos pending playback (i.e. Firefox)
2015-05-14 16:52:09 +01:00
photonstorm
ad4cf34d05
LoadTexture remembers texture valid state.
2015-05-14 16:52:09 +01:00
Stephan de Souza
cb89b9c293
Missed comma
2015-05-14 10:04:37 -03:00
Stephan de Souza
7fb555e70e
Adds Heal Method to Phaser.Components.Health
...
Ideal when used in games with health packs, bonus items, or healing sprites.
In fact: Doing a negative damage causes the same effect, but as a new method is better for documentation.
2015-05-13 16:55:17 -03:00
photonstorm
e6f71e959a
Graphics constructor now sets x/y parameters to zero if undefined. Before it would set them to undefined as the type check wasn't strict.
2015-05-12 13:03:26 +01:00
photonstorm
4aa22e22a1
Check texture property.
2015-05-12 13:03:26 +01:00
photonstorm
a1102d4d4d
Added re-tint reset.
2015-05-08 04:12:20 +01:00
photonstorm
2cd59bbf32
Tidying up docs and formatting.
2015-05-08 04:12:07 +01:00
photonstorm
6f351ff0c1
Texture.requiresReTint is a new property that controls if a texture requires the display object to be re-tinted having been updated internally. The LoadTexture component now sets this.
2015-05-08 04:11:48 +01:00
photonstorm
164039d7e7
Sets the re-tint state to true.
...
Removed un-needed clear call.
2015-05-08 04:10:39 +01:00
photonstorm
326cb759cf
Docs fixes.
2015-05-08 02:28:46 +01:00
photonstorm
855831e4c2
BitmapData.update now validates the width
and height
values to ensure they aren't lower than 1, which would previously cause a context error.
2015-05-08 01:49:59 +01:00
photonstorm
d2b9bfe7b8
RetroFont has been updated to use RenderTexture.renderXY, removing the need for creating a Point object each update.
...
RetroFont no longer puts any entries into the TextureCache or generates any UUIDs on instantiation, speeding up creation and lowering memory use.
2015-05-08 01:49:11 +01:00
photonstorm
e3b8fe3401
Proper setFrame call.
2015-05-07 02:45:33 +01:00
photonstorm
67704d0136
Updated Frame handling for Videos so sprites have their own frames, not a reference to the Videos frame.
2015-05-07 02:44:48 +01:00
photonstorm
af66b49f31
If a BitmapData is created with a width or height set to zero then the width and/or height are set to a default value (256) instead to avoid getContext errors.
2015-05-06 16:50:10 +01:00
photonstorm
303929a3ce
Added Video.snapshot and Video.grab support.
2015-05-06 16:47:46 +01:00
photonstorm
7cd89eedd6
jshint fixes.
2015-05-06 08:13:55 +01:00
photonstorm
7f89a3de60
Fixed video event.
2015-05-06 07:57:52 +01:00
photonstorm
d14d9f4f64
Added onAccess and onError signals and tidied up the stream handling.
2015-05-06 07:25:34 +01:00
photonstorm
a24a22742a
Enabled Stream stopping.
2015-05-06 06:11:09 +01:00
photonstorm
37304c7cc7
Added Video.createVideoStream support.
2015-05-06 06:06:02 +01:00
photonstorm
535b56bc4a
Got changeSource working properly on iOS and tidied up lots of docs.
2015-05-06 01:12:02 +01:00
photonstorm
927c14536d
Destroy will remove the listener from Video.onChangeSource.
2015-05-06 00:42:01 +01:00
photonstorm
bf25e67f5a
LoadTexture.resizeFrame lets you resize the Frame dimensions that the Game Object uses for rendering. You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData it can be useful to adjust the dimensions directly in this way.
2015-05-06 00:41:40 +01:00
photonstorm
9a563f20b9
Updated video locked status.
2015-05-05 17:03:39 +01:00
photonstorm
0cde8f874d
Mobile touch lock support done.
2015-05-05 16:25:51 +01:00
photonstorm
cc1c90d782
Removed videoSprite placeholder.
2015-05-05 14:01:47 +01:00
photonstorm
2e2d1c6bc2
Lots of updates to the Phaser.Video object.
2015-05-05 14:00:59 +01:00
photonstorm
f33082caf2
Support for Video texture updates.
2015-05-05 14:00:18 +01:00
photonstorm
90a7a3e15c
Create video + added Video to config.
2015-05-04 03:00:45 +01:00
photonstorm
8a9e0c266a
Added currentTime and duration getters.
2015-05-04 03:00:22 +01:00
photonstorm
c1ab5a3345
The first pass at the new Phaser.Video object.
2015-05-03 13:53:03 +01:00
photonstorm
f092101531
Added in support for Phaser.Video to LoadTexture component.
2015-05-03 13:53:03 +01:00
photonstorm
3578cd097c
jsdocs fix.
2015-05-03 13:53:02 +01:00
photonstorm
8290e8c371
Text.setShadow has two new optional parameters: shadowStroke
and shadowFill
. These allow you to set if the drop shadow is applied to the Text stroke, the Text fill or both of them (thanks @qdrj #1766 )
...
Text.shadowStroke and Text.shadowFill allow you to toggle if the drop shadow is applied to the Text stroke or fill independently.
2015-04-27 16:22:36 +01:00
photonstorm
cc46212d5b
Refreshes a tiling texture on change of frame.
2015-04-21 15:55:58 +01:00
photonstorm
12f8454d62
close #1755
2015-04-19 01:35:15 +01:00
photonstorm
3a61fa35f0
RenderTexture.render now takes a Matrix as its second parameter, not a Point object. This brings it in line with Pixi and allows you to perform much more complex transformations on the object being rendered. If you need to replicate the old behavior please use RenderTexture.renderXY(sprite, point.x, point.y) instead.
...
RenderTexture.render and `renderXY` would ignore the Sprites rotation or scale. The full Sprite transform is now used correctly when the Sprite is drawn to the texture. If you wish to replicate the old behavior please use `RenderTexture.renderRawXY` instead.
RenderTexture.matrix has been removed as it's no longer used.
Fixed bug in Pixi where RenderTexture.render would ignore the given matrix.
Fixed a bug in Pixi where drawing a Sprite to a RenderTexture would reset the Sprites transform to an identity Matrix.
2015-04-17 03:22:07 +01:00
photonstorm
b0e1b8facb
jsdoc fixes.
2015-04-15 01:36:25 +01:00
photonstorm
8f06991527
Added support for the [Creature Automated Animation Tool]( http://www.kestrelmoon.com/creature/ ). You can now create a Phaser.Creature object which uses json data and a texture atlas for the animations. Creature is a powerful animation tool, similar to Spriter or Spine. It is currently limited to WebGL games only, but the new libs should prove a solid starting point for anyone wanting to incorporate Creature animations into their games.
2015-04-13 23:16:29 +01:00
photonstorm
0aaa77a84d
Strict check.
2015-04-13 11:58:45 +01:00
photonstorm
0ccb3515d5
Removed dirty flag.
2015-04-13 11:58:44 +01:00
photonstorm
36c064511c
Added guards around context.getImageData
calls in BitmapData, Text and Canvas Tinting classes to avoid crashing restricted browsers like Epic Browser. Please understand that several Phaser features won't work correctly with this browser (thanks @Erik3000 #1714 )
2015-04-02 14:47:44 +01:00
photonstorm
645723f939
Sprite was missing the Health and InCamera components.
2015-03-30 13:51:47 +01:00
photonstorm
5fb1130175
The LoadTexture component has had a redundant dirty
call removed from it.
...
TileSprites were missing a `physicsType` property, causing them to not collide with anything (thanks @numbofathma #1702 )
2015-03-28 00:56:02 +00:00
photonstorm
57474c0d44
Trying out removal of dirty flag.
2015-03-27 10:47:45 +00:00
photonstorm
83adc51698
Fixed the FixedToCamera :)
2015-03-24 21:35:09 +00:00
photonstorm
12fc424305
Huge amount of jsdoc updates.
2015-03-23 23:46:09 +00:00
photonstorm
08c9513f98
Improving the Component documentation.
2015-03-23 19:56:23 +00:00
photonstorm
85c8f60d7c
Removed 'global' component arrays.
2015-03-23 19:19:07 +00:00
photonstorm
b7b622a556
Text style has a new optional property: backgroundColor
which is a Canvas fill style that is set behind all Text in the Text object. It allows you to set a background color without having to use an additional Graphics object.
...
Text.lineSpacing can now accept negative values without cutting the bottom of the Text object off. The value can never be less than the height of a single line of text.
Text.lineSpacing is no longer applied to the first line of Text, which prevents text from being cut off further down the Text object.
2015-03-23 16:12:23 +00:00
photonstorm
1486e166bd
Added physicsType property.
2015-03-23 15:04:27 +00:00
photonstorm
55048a4b25
BitmapText objects now have an anchor
property. This works in a similar way to Sprite.anchor except that it offsets the position of each letter of the BitmapText by the given amount, based on the overall BitmapText width - whereas Sprite.anchor offsets the position the texture is drawn at.
2015-03-23 15:03:53 +00:00
photonstorm
cb9ef4f12e
Text.padding specifies a padding value which is added to the line width and height when calculating the Text size. ALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions ( #1561 #1518 )
2015-03-19 01:54:14 +00:00
breakosaur
bb600b4319
Fixed a few documentation typos.
2015-03-18 21:07:36 +00:00
photonstorm
165e5935c2
JSDoc fixes.
2015-03-18 19:14:58 +00:00
photonstorm
6cf982a4a0
Fixed to Destroy component if still in render loop.
2015-03-11 01:44:46 +00:00
photonstorm
0516167c3d
Finally tracked down the rogue bug causing Graphics objects to not work with various components ( fix #1654 )
2015-03-10 14:23:49 +00:00
photonstorm
ed3afed2ff
Fixed spelling mistake.
2015-03-05 14:00:57 +00:00
Richard Davey
7eb73e99a8
Merge pull request #1648 from pnstickne/wip-components-docs
...
Component documentation
2015-03-01 10:46:55 +00:00
Paul
4de95c09b5
Component documentation
...
- Required changes for documentation to show up correctly
- Uses multiple @extends, which currently [mostly] works in jsdoc
and like closure compiler
2015-02-28 23:00:17 -08:00
Paul
ee34327c93
Components: bug fixes
...
- Use property check ('in') to avoid property access
- Promoted 'body' property for physics
2015-02-28 17:49:45 -08:00
Paul
0e5272b217
Merge remote-tracking branch 'upstream/dev' into wip-components-toproto
...
Conflicts:
src/gameobjects/Image.js
src/gameobjects/Rope.js
src/gameobjects/Sprite.js
src/gameobjects/Text.js
src/gameobjects/TileSprite.js
src/gameobjects/components/Core.js
2015-02-28 15:51:47 -08:00
photonstorm
a69e53f901
Copyright date change.
2015-02-25 03:36:23 +00:00
photonstorm
ae7a1fda05
Optimised preUpdate callbacks.
2015-02-25 02:49:50 +00:00
photonstorm
72530d963b
Default exists should be true!
2015-02-25 02:49:19 +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
ec19abb91c
Component preUpdate changes.
2015-02-25 00:59:27 +00:00
photonstorm
c9939f8691
Tilemap fix #1635
2015-02-24 22:57:59 +00:00
Paul
4f747a1c00
Components - moving install to prototype
...
- This ensures the components are regsitered once per type
instead of once per instance (which is duplicate work)
2015-02-22 20:44:11 -08:00
photonstorm
8b7085e20a
RenderTexture guards.
2015-02-22 19:30:43 +00:00
photonstorm
3d0bc682f0
Moved Events.
2015-02-19 05:00:55 +00:00
photonstorm
88f10f7f89
Updated fixedToCamera docs to reflect non-nesting ( #1596 )
2015-02-18 22:58:48 +00:00
photonstorm
58d37b51fe
Fixed canvas destroy if undefined.
2015-02-18 14:54:11 +00:00
photonstorm
f59d7e3430
Working through Graphics class updates.
2015-02-17 16:40:41 +00:00
photonstorm
77a3bfea23
loadTexture guard.
2015-02-17 15:48:54 +00:00
photonstorm
5b0c751647
Animation component guard.
2015-02-17 15:48:43 +00:00
photonstorm
167bbde8d4
Game Objects all now using the new Components mixins.
2015-02-17 06:00:41 +00:00
photonstorm
166c0363fc
jshint fixes
2015-02-17 05:59:54 +00:00
photonstorm
bf4c1d0620
Split out all the common GameObject features into components.
2015-02-17 05:15:04 +00:00
photonstorm
8483eac6aa
Removing all use of _cache from all Game Objects.
2015-02-16 17:22:51 +00:00
photonstorm
8c23bca62d
Sprite.left, Sprite.right, Sprite.top, Sprite.bottom are new properties that contain the totals of the Sprite position and dimensions, adjusted for the anchor.
...
Sprite.offsetX and Sprite.offsetY contain the offsets from the Sprite.x/y coordinates to the top-left of the Sprite, taking anchor into consideration.
2015-02-16 15:47:55 +00:00
photonstorm
c243222889
Docs update #1231
2015-02-11 16:41:56 +00:00
Richard Davey
b560af992f
Merge pull request #1375 from pnstickne/wip-text-consistency
...
Text - font components can be specified as part of "style"
2015-02-11 15:06:48 +00:00
photonstorm
cc7096b045
jsdoc fix #1543
2015-02-10 21:22:36 +00:00
photonstorm
dfc8ff32d2
You can now tint animated Sprites in Canvas mode. Or change the texture atlas frame of a tinted Sprite or Image. Please note that this is pretty expensive (depending in the browser), as the tint is re-applied every time the *frame changes*. The Pixi tint cache has also been removed to allow for subtle tint color shifts and to avoid blowing up memory. So use this feature sparingly! But at least it does now work ( #1070 )
2015-02-10 14:53:55 +00:00
photonstorm
4489a12fd8
Sprite.loadTexture and Image.loadTexture now no longer call updateTexture
if the texture given is a RenderTexture. This fixes issues with RetroFonts in IE11 WebGL as well as other RenderTexture related IE11 problems ( #1310 #1381 #1523 )
2015-02-10 12:27:55 +00:00
photonstorm
e85be1f1d8
BitmapText.font wouldn't update an internal Pixi property (fontName) causing the text to fail to change font (thanks @starnut #1602 )
2015-02-08 22:07:36 +00:00
photonstorm
336fdfa672
TileSprites weren't destroying WebGL textures, leading to eventual out of memory errors (thanks @chacal #1563 )
2015-02-03 21:32:39 +00:00
Richard Davey
21823f65e3
Merge pull request #1576 from vulvulune/jsdoc
...
Correct comments
2015-02-03 20:47:32 +00:00
photonstorm
d6ea8fb956
jsdoc updates (spelling mistakes, code formatting, etc)
2015-01-28 17:18:33 +00:00
vulvulune
8ef32f044c
Correct comments
...
Correct comments:
-Phaser.Camera: checkWorldBounds =>checkBounds
-Phaser.RetroFont: Set correct @name for name and smoothed
-Phaser.DOM: inViewport => inLayoutViewport
2015-01-27 13:46:18 +01:00
photonstorm
a67d2df6f0
BitmapData.text will render the given string to the BitmapData, with optional font, color and shadow settings.
2015-01-18 12:24:00 +00:00
photonstorm
741131312a
BitmapData.drawGroup draws the immediate children of a Phaser.Group to a BitmapData. Children are only drawn if they have their exists
property set to true
. The children will be drawn at their x
and y
world space coordinates. When drawing it will take into account the child's rotation, scale and alpha values. No iteration takes place. Groups nested inside other Groups will not be iterated through.
...
BitmapData.copy `tx` parameter if `null` and `source` is a Display Object, it will default to `source.x`.
BitmapData.copy `ty` parameter if `null` and `source` is a Display Object, it will default to `source.y`.
2015-01-05 14:28:16 +00:00
Richard Davey
b3f322469b
Added Events.onEnterBounds to the destroy method (thanks @legendary-mich #1497 )
2015-01-02 21:53:20 +00:00
Paul
a070e8db8f
Fix for Event changes
...
This replaces 'eval' with closures (that should have probably
been used to begin with) to avoid warnings generated by some tools.
This change does not affect the approach used.
- Ref. #1494
2015-01-01 13:50:07 -08:00
photonstorm
c6c5856dec
Phaser.Graphics.drawCircle now overrides PIXI.drawCircle which means the docs are now correct re: diameter not radius (thanks @ethankaminski #1454 )
2014-12-17 13:44:12 +00:00
photonstorm
028943baad
Moved the updateTransform to a Game level update on Stage and replaced the Pixi version.
...
Added a boolean check, so it can be either updated from updateLogic or render without duplicating the process.
#1424
2014-12-10 10:37:37 +00:00
photonstorm
4ad6df9a29
A test to try for #1424
2014-12-09 23:38:23 +00:00
photonstorm
def662f28f
Text.setShadow has had the default color
value changed from rgba(0,0,0,0)
to rgba(0,0,0,1)
so it appears as a black shadow by default - before the alpha channel made it invisible.
2014-12-02 09:03:55 +00:00
Richard Davey
152b26a668
Merge pull request #1378 from pnstickne/wip-minor-updatelogic-fix
...
Minor logic fix for Sprite life update
2014-12-01 12:07:56 +00:00
Richard Davey
81f356c235
Merge pull request #1386 from pnstickne/wip-docs-1130
...
Assorted documentation/consistency updates
2014-12-01 12:07:10 +00:00
Paul
d15037e283
Event-Signal object count optimization
...
There are a bunch of signals added for Sprites; more when input is
enabled. However, very few of these signals are ever actually used. While
the previous performance update related to Signals addressed the size of
each Signal object, this update is to reduce the number of Signal objects
as used by the Events type.
As a comparison the "Particle: Random Sprite" demo creates 3200+ Signals;
with this change there less than 70 signals created when running the same
demo. (Each Event creates at 8 signals by default, and there is an Event
for each of the 400 particles.) While this is an idealized scenario, a
huge amount (of albeit small) object reduction should be expected.
It does this by creating a signal proxy property getter and a signal
dispatch proxy. When the event property (eg. `onEvent`) is accessed a new
Signal object is created (and cached in `_onEvent`) as required. This
ensures that no user code has to perform an existance-check on the event
property first: it just continues to use the signal property as normal.
When the Phaser game code needs to dispatch the event it uses
`event.onEvent$dispath(..)` instead of `event.onEvent.dispatch(..)`. This
special auto-generated method automatically takes care of checking for if
the Signal has been created and only dispatches the event if this is the
case. (If the game code used the `onEvent` property itself the event
deferal approach would be defeated.)
This approach is designed to require minimal changes, not negatively
affect performance, and reduce the number of Signal objects and
corresponding Signal/Event resource usage.
The only known user-code change is that code can add to signal (eg.
onInput) events even when input is not enabled - this will allow some
previously invalid code run without throwing an exception.
2014-11-30 21:39:25 -08:00
Paul
dab8772de0
Documentation - consistency updates
...
- Updated `readOnly` doclet to `readonly`
- `array` refined to `type[]`, where such information was immediately
determinable.
- Updated {Any}/{*} to {any}; {...*} is standard exception
- Udated {Object} to {object}
2014-11-30 04:03:35 -08:00
photonstorm
cfbad72881
Documentation - general
...
Updated some documentation for formatting, consistency, and minor
corrections.
2014-11-30 04:02:45 -08:00
Paul
3299588326
Sprite - removed comment
...
The comment was no longer valid after the previos changes.
2014-11-29 14:12:14 -08:00
photonstorm
d5dfa464c0
Added alpha setting to getContext.
2014-11-29 19:40:50 +00:00
Paul
dfe7279090
Minor logic fix for Sprite life update
...
The substraction of `physicsElapsedMS` needs to be done for all individual
updates. (When current FPS ~ target FPS this is a 1-1 mapping, but catchup
updates can throw off the calculations.)
Also renamed `Game#updateNumber` (a poor initial name on my part) to
`currentUpdateID`. This matches the naming of
`Stage#currentRenderOrderID`.
2014-11-28 23:02:31 -08:00
Paul
83cbbf1d21
Text - font component cleanup
...
Some minor cleanup of font component handling and comments.
Also adds a warning if an "unparsable font" string is encountered. Might
save someone some trouble.
2014-11-28 03:50:52 -08:00
Paul
bf3d5aa22e
Text - consistency updates
...
Added `cssFont`, `fontStyle`, and `fontVariant` properties for better
consistency and control.
2014-11-28 02:56:44 -08:00
Paul
8eb7594b29
Text - font size/weight can be specified as style
...
Fulfills: https://github.com/photonstorm/phaser/issues/1370
This allows `fontSize` and `fontWeight` to be specified as part of the
style as supplied to the Text constructor (and `setStyle` method). In
addition the `fontStyle` and `fontVariant` properties can also be set -
although these are not exposed later.
This also fixes edge cases that could be caused if `Text#fontSize` was
used without `Text#fontWeight`, where the applied style defaults would be
overwritten/reset.
2014-11-28 02:20:18 -08:00
Paul
5fbbeca7ab
Text - documentation updates
2014-11-28 00:12:10 -08:00
photonstorm
471ad20b4a
Added Time.physicsElapsedMS and used in Sprite lifespan and Tweens.
2014-11-26 13:13:25 +00:00
photonstorm
e86f00eb55
Text.lineSpacing works correctly again. Before no space was added between the lines (thanks @intimidate #1367 and @brejep #1366 )
2014-11-25 17:06:17 +00:00
Tim van den Eijnden
990867547e
fix issue with lineSpacing, no space was added between the lines. The complete text moved down instead
2014-11-25 16:45:29 +01:00
photonstorm
72eaee3139
Adjusted Sprite.preUpdate to remove the lifespan calculation.
2014-11-25 14:18:18 +00:00
photonstorm
1068563914
jsdoc fixes.
2014-11-25 14:15:55 +00:00
Paul
e2f65f58a8
Merge commit '0d9678e512f9037b686ca480907c90f82d5b631e' into wip-time-clarify
2014-11-25 00:35:31 -08:00
Paul
5f9025f800
Sprite/Time - lifespan based on physicsTime
...
- Lifespan is updated based on physics time which makes this consistent
with fixed-step updates and tweens, etc.
2014-11-25 00:33:13 -08:00
photonstorm
0d9678e512
Promoted Game time loop count to protected public var. Checked in Sprite.lifespan decrement to avoid over-decreasing the lifespan ( #1358 )
2014-11-25 02:50:39 +00:00
photonstorm
c4b81ff6ea
jsdoc fixes.
2014-11-25 00:24:28 +00:00
photonstorm
2d50334cd3
Updated lifeSpan to use elapsedMS instead.
2014-11-24 12:54:39 +00:00
photonstorm
06b2a2c6a0
Added Tween.generateData back in, now all the Particles and Tween examples work properly.
2014-11-24 12:34:42 +00:00
photonstorm
21479acd8e
Sprite.autoCull now properly works if the camera moves around the world.
...
Sprite.inCamera uses a much faster check if auto culling or world bounds checks are enabled and properly adjusts for camera position.
2014-11-18 12:29:55 +00:00
photonstorm
497b00d781
Tidying up a little.
2014-11-13 00:27:47 +00:00
photonstorm
d6297884e6
Added Sprite.setScaleMinMax for testing.
2014-11-08 13:31:35 +00:00
Paul
60268dd048
Changes to preserve original API
...
- Added @deprecated/@readonly to various some properties but public properties maintain the same semantics
- Also removed some "cleverness"
- Still same good fixes ..
2014-10-29 19:31:03 -07:00
Paul
5d04c62b33
Button - bug fixes, issue #1246
...
- Fix incorrect passing of "was clicked" to processInteractiveObjects
- Button would not return to Over/Out state because of strict too check to catch `undefined`
- Removed [undocumented] property usage from processInteractiveObjects and slight reformatting
- Update Button state frames/sounds to remove duplication
- Updated documentation in Button for consistency
2014-10-28 23:26:35 -07:00
spayton
a942a03631
Texture width is recalculated larger on subsequent call to updateText() when text has a stroke thickness > 1
...
In function override Phaser.Text.prototype.updateText(), don't include this.context.lineWidth in width calculation as it's already incorporated by this.style.strokeThickness.
2014-10-28 11:48:57 +00:00
photonstorm
26a1a080d2
Buttons are now waiting to be told when they're removed from the World.
2014-10-28 01:49:14 +00:00
photonstorm
d050b8471b
Added onRemovedFromWorld signal. Not currently used anywhere, but will be.
2014-10-28 01:48:42 +00:00
photonstorm
d22f2bd89b
Small fix for Text wordWrapping #1247
2014-10-23 16:03:29 +01:00
photonstorm
bebb83bad4
Removed methods that Pixi now offers directly.
2014-10-22 23:53:02 +01:00
photonstorm
b56c3bf54e
jshint fixes
2014-10-22 22:49:20 +01:00
photonstorm
1bc1d2eb94
Fixed Text class for Pixi v2 changes.
2014-10-22 22:35:21 +01:00
photonstorm
73f210257a
Removed duplicate Pixi classes and updated the build manifests to pull-in the correct Pixi Matrix class.
2014-10-22 21:20:38 +01:00
photonstorm
96fd0ade74
JSDoc fixes.
2014-10-21 22:43:42 +01:00
photonstorm
9d58297eb9
Button.setSounds now works if given an AudioSprite as the sound source.
2014-10-20 23:17:05 +01:00
photonstorm
35d29170d0
Lots of small jsdoc fixes and DocGen updates.
2014-10-20 00:54:56 +01:00
photonstorm
c960ab5d44
Typo fix.
2014-10-17 17:07:43 +01:00
photonstorm
5e734a6bb6
Pixi v2 UV update fixes.
2014-10-17 16:52:47 +01:00
photonstorm
4f1ba99120
BitmapData.getFirstPixel will scan the BitmapData and return the color and location of the first non-transparent pixel encountered. You can specify one of 4 scan directions: top to bottom, bottom to top, left to right and right to left.
...
BitmapData.getBounds will return a `Rectangle` object that encompasses the full extent of the non-transparent pixels in the BitmapData. This can be useful if you wish to trim away transparent pixels from the sides of a BitmapData down to size before saving.
2014-10-17 16:51:50 +01:00
photonstorm
fbfb107146
JSDoc fixes in the Rope class (thanks @Rovanion)
2014-10-15 22:05:38 +01:00
Richard Davey
837a035194
Merge pull request #1228 from Rovanion/dev
...
Corrected documentation for Phaser.Rope
2014-10-15 22:04:17 +01:00
Richard Davey
86cfc7111e
Fixed UV updates for WebGL textures.
2014-10-15 11:36:35 +01:00
photonstorm
d206dd0dad
Updates for Pixi v2
2014-10-13 12:20:25 +01:00
photonstorm
ac27f12c95
Fixes for Pixi update WebGL UV calls.
2014-10-11 04:18:42 +01:00
Rovanion Luckey
3ec5f2e0d3
Was able to figure out what the Array was made of through an example.
2014-10-10 17:16:53 +02:00
Rovanion Luckey
1cfbb31937
Figured out that it's supposed to be an array of some sort from the pixi source.
2014-10-10 17:16:53 +02:00
Rovanion Luckey
9023ec1609
Corrected the docs for Rope somewhat.
2014-10-10 17:16:53 +02:00
photonstorm
08c6106c35
Fixed issue with textureLine creating white blocks in iOS.
2014-10-09 02:30:31 +01:00
Richard Davey
e6812cffa6
Added BMD frame checks.
2014-10-05 12:35:40 +01:00
photonstorm
ff034b5077
Fixed textureLine and added repeat parameter.
2014-10-03 03:57:49 +01:00
photonstorm
ab78710daa
BitmapData.textureLine takes a Phaser.Line object and an image in the image cache. It then accurately draws the image as a repeating texture for the full length of the line.
2014-10-03 02:21:09 +01:00
photonstorm
d65c526184
Cache.addBitmapData has a new parameter: frameData
allowing you to pass a Phaser.FrameData
object along with the BitmapData.
...
Cache.getFrameData has a new parameter: `map` which allows you to specify which cache to get the FrameData from, i.e. `Phaser.Cache.IMAGE` or `Phaser.Cache.BITMAPDATA`.
Sprite.loadTexture if given a BitmapData as the texture will now query the cache to see if it has any associated FrameData, and if so it will load that into the AnimationManager.
2014-10-01 03:10:13 +01:00
photonstorm
26f9e05dca
BitmapData.shadow(color, blur, x, y) provides a quick way to set all the relevant shadow settings, which are then be used in future draw calls.
2014-09-30 22:50:08 +01:00
photonstorm
ef85b8415d
If you pass a tinted Sprite to BitmapData.draw
or BitmapData.copy
it will now draw the tinted version of the Sprite to the BitmapData and not the original texture.
2014-09-30 21:07:57 +01:00
photonstorm
415c7fe578
Added the sourceRect
and maskRect
parameters back into BitmapData.alphaMask
as they were accidentally removed in 2.1 (thanks seejay92)
2014-09-25 15:30:03 +01:00
photonstorm
7f196a01e7
Text.addColor allows you to set specific colors within the Text. It works by taking a color value, which is a typical HTML string such as #ff0000
or rgb(255,0,0)
and a position. The position value is the index of the character in the Text string to start applying this color to. Once set the color remains in use until either another color or the end of the string is encountered. For example if the Text was Photon Storm
and you did Text.addColor('#ffff00', 6)
it would color in the word Storm
in yellow.
...
Text.clearColors resets any previously set colors from `Text.addColor`.
2014-09-24 17:10:02 +01:00
photonstorm
dd74e3b0b4
Changing any of the Text properties such as font, lineSpacing and fontSize on a Text object that wasn't already on the display list would cause an updateTransform error. Parent is now checked first in all setters.
2014-09-24 01:10:36 +01:00
Richard Davey
abe6f5ace2
Point.parse updated to allow either/or x/y setting and default values.
...
Point.parse will return a new Point object based on the x and y properties of the object given to Point.parse (thanks @codevinsky #1198 )
2014-09-23 22:23:01 +01:00
Richard Davey
01fd3df434
AudioSprite support is now built into the Loader and SoundManager. AudioSprites are like sprite sheets, only they consist of a selection of audio files and markers in a json configuration. You can find more details at https://github.com/tonistiigi/audiosprite (thanks @codevinsky #1205 )
...
Fixed AudioSprite jsdoc, casing and formatting issues.
2014-09-23 22:15:09 +01:00
Jeremy Dowell
7cce1366f2
jshint cleanup
2014-09-23 10:25:49 -05:00
Jeremy Dowell
dd0d1729ad
Phaser.AudioSprite
...
AudioSprite implementation for phaser.
Loads audio sprites based on the file format created with: https://github.com/tonistiigi/audiosprite
2014-09-23 10:21:29 -05:00
photonstorm
d18f523d93
jsdoc fixes.
2014-09-18 16:58:25 +01:00
photonstorm
20551f9129
Lots of jsdocs fixes ready for the new doc generator.
2014-09-16 17:35:08 +01:00
photonstorm
60acef2f97
If Game Objects change their frame, such as with an animated Sprite, and the change goes from a previously trimmed frame to a non-trimmed (full size) one, then the previous trim values were still left active, causing it to glitch (thanks stupot)
2014-09-11 20:56:01 +01:00
photonstorm
052e5042ed
jsdoc fix.
2014-09-08 22:34:53 +01:00
photonstorm
9fa3f8f2b1
alphaMask update.
2014-09-04 16:53:19 +01:00
photonstorm
3a69ed944d
Fixed TypeScript defs for BitmapData.
2014-09-04 16:52:10 +01:00
photonstorm
9aaa8d80ca
jsdocs, fixes to load, draw, copy and addToWorld.
2014-09-04 05:05:30 +01:00
photonstorm
7d9a4f4100
Phaser.Text wouldn't render the text to its local canvas if you passed the text on the constructor and didn't add it to the display list. If a string is given it now updates the local canvas on creation.
2014-09-04 02:18:12 +01:00
Richard Davey
fe0c03d5d7
Phaser.Text.destroy will now destroy the base texture by default ( #1162 )
2014-09-03 22:34:10 +01:00
Richard Davey
68368357ba
jshint fix
2014-09-03 22:26:05 +01:00
photonstorm
804eea9ca3
Optimised BitmapData.copy and refactoring continues.
2014-09-03 20:56:31 +01:00
photonstorm
15e6edc56b
BitmapData.copy no longer creates any temporary variables. It also accurately copies over Sprite/Image values before drawing them.
...
Creation now defaults to a texture size of 256x256.
2014-09-03 12:53:07 +01:00
photonstorm
f5ad22399f
BitmapData.copy is now the new uber copy function. Helper methods coming.
2014-09-03 11:12:06 +01:00
photonstorm
3b28d568e9
Ironed out the issues in BitmapData.fastCopy.
2014-09-03 01:28:58 +01:00
Richard Davey
773be312ce
BitmapData.fastCopy test.
2014-09-02 23:16:10 +01:00
photonstorm
de07f5b649
Testing out Frame and Animation clone features.
2014-09-02 21:03:16 +01:00
photonstorm
d26f937f1c
RetroFont has a new property called frameData which contains the Frame objects for each of the letters in the font, which can be used by Sprites.
2014-09-02 00:41:53 +01:00
photonstorm
8f7141ca3f
New blit op
2014-09-01 20:22:47 +01:00
photonstorm
9047e4d5ca
Sorted out the issue with Images not working properly with texture atlases.
2014-08-29 15:55:23 +01:00
photonstorm
b4ba7958c6
Added missing copy parameter to Image.crop, fixing jshint in the process.
2014-08-28 23:26:27 +01:00
photonstorm
e3f73b87ba
Fixed some jsdocs issues and added the Image.alive property.
2014-08-28 17:04:59 +01:00
photonstorm
05922d6fb0
Lots of fixes to the Image class to restore texture loading and fix cropping so it works exactly the same as the Sprite now.
2014-08-28 17:04:59 +01:00
photonstorm
ec687868de
Input.setMoveCallback has been removed due to deprecation.
...
BitmapData.refreshBuffer has been removed and replaced with BitmapData.update.
BitmapData.drawSprite has been removed due to deprecation. Use BitmapData.draw instead.
Pointer.moveCallback has been removed due to deprecation.
SinglePad.addButton has been removed due to deprecation.
P2.Body.loadData has been removed due to deprecation.
P2.World.defaultFriction and defaultRestitution have been removed due to deprecation.
Canvas.create noCocoon parameter has been removed due to deprecation.
Color.getColorInfo, RGBtoHexstring, RGBtoWebstring and colorToHexstring has been removed due to deprecation.
2014-08-28 03:40:59 +01:00
photonstorm
fa45d7feff
Events.onDestroy is a new signal that is dispatched whenever the parent is being destroyed. It's dispatched at the start of the destroy process, allowing you to perform any additional house cleaning needed (thanks @jonkelling #1084 )
...
Group.onDestroy is a new signal that is dispatched whenever the Group is being destroyed. It's dispatched at the start of the destroy process, allowing you to perform any additional house cleaning needed (thanks @jonkelling #1084 )
2014-08-28 02:56:06 +01:00
photonstorm
6b4510f693
TileSprite now has the alive
property, which should help with some Group operations (thanks @jonkelling #1085 )
2014-08-28 02:36:30 +01:00
Richard Davey
9941942941
Merge pull request #1030 from codevinsky/rope
...
Phaser.Rope
2014-08-28 01:56:02 +01:00
Richard Davey
7fe4abc5c4
Merge pull request #1059 from lucbloom/spritesheet-to-framecount
...
Sprite Sheet => frame count
2014-08-28 01:49:15 +01:00
photonstorm
33c52eaf09
BitmapData alpha option added.
...
Pointer return type added.
pixi manifest updated to remove need for geom classes.
2014-08-27 21:26:29 +01:00
Alvin
6da5831f73
Merge pull request #1099 from kay-is/master
...
Method documentation was missing parameters.
2014-08-08 09:56:39 +02:00
Kay Plößer
9ac06c44ba
Method documentation was missing parameters.
2014-08-07 14:47:54 +02:00
photonstorm
9bbc8ecce3
Phaser.Physics.P2.addPolygon now takes a nested array again (thanks @wayfu #1060 )
2014-07-31 13:39:26 +01:00
Luc Bloom
7f3b542fdd
Removed the notion of Sprite Sheets vs single frame images
...
Instead of making a distinction between single frame images and Sprite
Sheets, I added a simple FrameData with one Frame to every image that
gets loaded. This way, a lot of the engine code can be simplified.
For instance, you can play animations on any Sprite without having to
check the “frame count” of its image anymore.
The engine doesn’t have to check for non-existing .frameData anymore.
An animation can keep on playing when an image happens to be set with 1
frame, continuing its animation when after that, another image is set
with multiple frames.
Think of it this way: an image with one frame is an animation of just
one frame.
2014-07-22 10:24:53 +02:00
jackrugile
05d856d4ea
remove escaping backslashes from retro font text set documentation
2014-07-20 15:15:02 -06:00
photonstorm
883c11e377
BitmapData.resize fixed to update the crop property too, resolves issues with images getting cut off with BitmapData.load.
2014-07-18 03:33:17 +01:00
photonstorm
f6935c01f8
Sprite.loadTexture will store the smoothed
property of the Sprite and re-apply it once the new texture is loaded.
2014-07-16 00:56:26 +01:00
photonstorm
aaf82f9d3a
Sprite.loadTexture has a new optional stopAnimation
boolean parameter which will halt the currently running animation (if any) after changing the texture (based on #1029 ).
2014-07-16 00:29:43 +01:00
photonstorm
d10dea27b0
Pixi updated worldTransform from an Array to an Object and Phaser Image, BitmapText, Text and Graphics were still using array access to populate the world property, giving it incorrect results (thanks @alvinsight)
2014-07-15 22:44:02 +01:00
jdowell
f969c15aea
fixed: replaced 'snake' with key
2014-07-15 14:24:47 -05:00
jdowell
6432817c7f
added: Rope debug, segments, updateAnimation
2014-07-15 14:01:15 -05:00
jdowell
5a35e1a61d
Initial Rope Commit
2014-07-15 11:40:40 -05:00
Charles Black
6363b35e26
docs typo
2014-07-14 11:01:21 -04:00
photonstorm
2c421d27ce
GameObjectFactory.spriteBatch now lets you specify null
as a parameter for the parent and automatically adds the batch to game.world
as a result. Also fixed jsdocs issues (@petarov #1000 )
2014-07-14 12:56:05 +01:00
photonstorm
22462566b4
Restored old Image object.
2014-07-11 18:02:40 +01:00
photonstorm
26fb6cb866
Temporary fix for #997
2014-07-11 16:04:15 +01:00
Richard Davey
435fab5205
Merge pull request #990 from lucbloom/warn-texture-not-found
...
Warn about missing textures and show the key that the author was trying to use.
2014-07-10 19:16:07 +01:00
photonstorm
0d0a16ee2c
loadTexture fix.
2014-07-10 19:13:17 +01:00
photonstorm
a3cf246aee
Image.loadTexture fix and new dist files.
2014-07-10 19:03:17 +01:00
Luc Bloom
3f5bde89fc
Warn about missing textures
...
And show the key that the author was trying to use. It can be very
helpful for debugging which image a sprite was trying to load exactly.
2014-07-10 18:49:16 +02:00
photonstorm
a7124cb44c
Swapped back to camera.screenView as that's the correct check for inCamera.
2014-07-10 16:38:15 +01:00
photonstorm
0966971427
jshint fixes and tidying up for release
2014-07-10 16:21:50 +01:00
photonstorm
25e7e6ffc4
Pretty huge refactoring to cut down on duplicated code.
2014-07-10 16:07:02 +01:00
photonstorm
34efa223cb
Small conditional check in case someone has removed the animations property.
2014-07-10 16:06:47 +01:00
photonstorm
6a0b8b5e73
Fixed and working Sprite.crop - removed lots of _cache vars no longer required and added two new private vars.
2014-07-10 14:47:12 +01:00
photonstorm
813de7c125
More crop work.
2014-07-10 10:46:19 +01:00
photonstorm
0ff2eb2fb9
jshint fixes
2014-07-09 11:36:45 +01:00
photonstorm
ffd51479e4
Crop test
2014-07-09 05:43:15 +01:00
photonstorm
4fc26e4a26
Updated to the latest version of Pixi.
2014-07-09 05:40:50 +01:00
photonstorm
3ff8b9f999
On-going crop tests.
2014-07-08 12:59:36 +01:00
photonstorm
2a106473b4
Added more detail to the Tween docs.
2014-07-08 12:59:36 +01:00
photonstorm
2d676b00b4
Working through crop issues.
2014-07-08 12:59:36 +01:00
Alvin
7031d9ccc1
Fixed typo
2014-07-07 18:19:02 +02:00
Alvin
f6f70d35a4
Added game.add.plugin, a shotcut for game.plugins.add
2014-07-07 18:18:00 +02:00
photonstorm
da822ab207
Fixing anchor issue :)
2014-07-03 17:21:06 +01: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
3888653022
Added new loadTexture and setFrame calls. Will test crop support.
2014-06-11 14:38:14 +01:00
Richard Davey
bf48b1a6c3
Merge pull request #894 from lstor/dev
...
Fix getPixel for pixels with zero red value.
2014-06-10 23:52:26 +01:00
photonstorm
7c7d9153e6
Sprite.crop (and Image.crop) has been completely overhauled. You can now crop animated sprites (sprite sheet and texture atlas), you can define the x/y crop offset and the crop rectangle is exposed in the Sprite.cropRect property.
...
Sprite.updateCrop is available if you wish to update an externally referenced crop rectangle.
Sprites and Images now have their own textures objects, they are no longer references to those stored in the global Pixi.TextureCache. This allows you to redefine the texture frame dynamically without messing up any other Sprites in your game, such as via cropping. They still share global Base Textures, so image references are kept to a minimum.
Sprite.resetFrame will revert the Sprites texture frame back to its defaults dimensions. This is called when you call Sprite.crop with no rectangle, to reset the crop effect, but can be userful in other situations so we've left it as a public method.
2014-06-10 23:37:33 +01:00
Lars Storjord
38e971c819
Fix getPixel for pixels with zero red value.
...
Remove an erroneous if that causes getPixel() to fail if the red value
of the pixel is zero.
Fixes #881 .
2014-06-09 23:34:06 +02:00
photonstorm
b3baaba1a1
setFrame updates.
2014-06-09 15:23:18 +01:00
photonstorm
622978fa77
Finally managed to get crop x/y/width/height working across all texture types. Needs optimising for the trim rect, but works.
2014-06-06 04:12:16 +01:00
photonstorm
b63900f669
Testing frame crop support.
2014-06-05 02:33:29 +01:00
photonstorm
1e9d0b2438
Tidying up.
2014-05-30 05:33:30 +01:00
photonstorm
af1508de8f
BitmapData.addToWorld will create a new Phaser.Image object, assign the BitmapData to be its texture, add it to the world then return it.
...
BitmapData.copyPixels now accepts a Sprite, Image, BitmapData, HTMLImage or string as its source.
2014-05-29 03:30:21 +01:00
photonstorm
30cf226fc2
Rebuild on offset change.
2014-05-28 01:08:28 +01:00
photonstorm
0c76e9aada
Sprite animation data wasn't reset when going from a sprite sheet to a single frame in Sprite.loadTexture (thanks @lucbloom, fix #850 )
2014-05-27 14:23:41 +01:00
photonstorm
5a0d5b4887
RetroFont now uses Phaser.scaleModes.NEAREST by default for its RenderTexture to preserve scaling.
2014-05-27 13:36:38 +01:00
photonstorm
cdde45a292
Phaser.RenderTexture incorrectly passed the scaleMode to Pixi.RenderTexture, causing the renderer to error.
2014-05-27 13:35:47 +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
5b9bd96583
RetroFont.updateOffset allows you to modify the offsetX/Y values used by the font during rendering.
2014-05-27 05:23:34 +01:00
photonstorm
68f1bbd9a5
RetroFont charsPerRow paramters is now optional. If not given it will take the image width and divide it by the characterWidth value.
2014-05-27 04:26:23 +01:00
photonstorm
cd963242cd
jshint fix + draw sprite fix
2014-05-26 20:15:11 +01:00
photonstorm
c5d9f12858
BitmapData.alphaMask has 2 new optional parameters: sourceRect and maskRect to give more fine-grained control over where the source and mask are drawn and their size
...
BitmapData.draw now has two optional parameters: width and height, to let you stretch the image being drawn if needed.
2014-05-24 03:58:00 +01:00
photonstorm
7846da7c90
BitmapData.alphaMask 'mask' parameter is now optional, if not given it will use itself as the mask.
...
BitmapData.alphaMask now calls BitmapData.update after running.
2014-05-24 03:17:58 +01:00
photonstorm
6e9c9c10b8
BitmapData.alphaMask can now also take a Phaser.Sprite, Phaser.Image or BitmapData object as a source type.
...
BitmapData.alphaMask has 4 new optional parameters: x, y, x2 and y2 to control exactly where the source and mask images are drawn.
2014-05-24 03:15:13 +01:00
photonstorm
be66a694a8
jsdoc and jshint fixes.
2014-05-24 02:53:48 +01:00
photonstorm
f3ef3aed19
BitmapData.draw can now take a BitmapData object as a source type.
2014-05-24 02:43:59 +01:00
photonstorm
934f6a816c
BitmapData.resize now properly updates the baseTexture and texture dimensions.
2014-05-24 02:02:49 +01:00
photonstorm
7b696dddfe
BitmapData.extract has 4 new parameters: r2, g2, b2, a2 which let you re-color the extract pixels as they are drawn to the new BitmapData.
...
BitmapData.load will take a game object or string and resize the BitmapData to match it and then draw the pixels in.
2014-05-24 01:29:47 +01:00
photonstorm
bcddfc83c0
Sprite.alive property now explicitly defined on the Sprite prototype (thanks @lewster32, #841 )
2014-05-21 21:48:29 +01:00
photonstorm
2650e6c47e
RetroFont.text would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
...
RenderTexture.resize would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
2014-05-15 15:32:59 +01:00
photonstorm
bdcc9fcbc4
Updated jsdocs re: Image/Sprite.crop ( #820 )
2014-05-14 02:18:18 +01:00
photonstorm
b2c68c1369
Graphics.drawTriangles will draw an array of vertices to the Graphics object (thanks @codevinsky, #795 )
...
Polygon.area will calculate the area of the Polygon (thanks @codevinsky, #795 )
2014-05-14 00:04:31 +01:00
photonstorm
5047606118
Button.onOverMouseOnly is a boolean that causes onOver events to fire only if the pointer was a mouse (i.e. stops onOver sounds triggering on touch)
2014-05-13 23:43:44 +01:00
Richard Davey
e3f834314e
Merge pull request #795 from codevinsky/graphics-drawTriangles
...
Graphics.drawTriangles and Polygon.area
2014-05-13 23:43:16 +01:00
Samuel Batista
d5366972bc
Typo fix
2014-05-10 02:15:16 -04:00
photonstorm
8b1e736418
BitmapData.rect provides a quick way to draw a Rectangle to a BitmapData.
2014-05-09 16:39:45 +01:00
Richard Davey
aac4ff2226
Merge pull request #808 from muclemente/dev
...
Added undefined check processPixelRGB
2014-05-07 23:48:28 +01:00
Richard Davey
570e8acabb
Joystick updates.
2014-05-07 18:10:13 +01:00
Murilo Clemente
c882ebef2f
Added undefined check processPixelRGB
...
Phaser.BitmapData#processPixelRGB:
I was getting an undefined error when phaser tried to call setPixel32
using “result.r”.
With this additional undefined check the problem stopped and I’m able
to run this method with all my needed images.
2014-05-06 22:43:35 -03:00
jdowell
f10c772ff3
Graphics.drawTriangles && Polygon.area
...
Demo:
http://phaser-triangles.herokuapp.com
2014-05-02 12:30:49 -05:00
photonstorm
fd9d454bc6
Documentation updates.
2014-05-01 02:38:12 +01:00
photonstorm
9fd4ac5950
Fixed and tested on IE9.
2014-04-29 15:38:33 +01:00
photonstorm
1d37cde66f
Updated p2 to latest build and patched for Float32Array + UMD issues.
2014-04-29 02:34:16 +01:00
photonstorm
e85bbf8bc5
Text.updateText now sets the lineCap to round
to avoid occassional font glitching issues in Chrome.
2014-04-28 15:17:47 +01:00
photonstorm
f12168a888
Fixed jshint error.
2014-04-28 13:48:23 +01:00
photonstorm
95fe57e4fe
BitmapData.extract working :)
2014-04-28 05:33:52 +01:00
photonstorm
de9fc08e7d
Color.updateColor - updates an existing color object to update the rgba property.
...
Color.HSVColorWheel will return an array with 360 color objects for each segment of an HSV color wheel, you can optionally set the saturation and value amounts.
Color.HSLColorWheel will return an array with 360 color objects for each segment of an HSL color wheel, you can optionally set the saturation and lightness amounts.
2014-04-28 04:19:26 +01:00
photonstorm
54b71ddc23
Phaser.ArrayList is a new iterative object, similar in principal to a linked list but operating on a single array without modifying the object structure.
...
Input and Pointer now use the new ArrayList instead of a LinkedList, which resolve list item removable during callback issues.
Input.reset no longer resets every interactive item it knows of, because they are removed during the destroy phase and can now persist between States if needed.
2014-04-25 15:11:54 +01:00
photonstorm
45aa486e27
Found better way of specifying region.
2014-04-25 04:13:59 +01:00
photonstorm
11ca2deaf6
Finally - fully working setHSL and shiftHSL.
2014-04-25 02:45:35 +01:00
photonstorm
6fb4ad06d7
Added in various new methods such as hslToRgb.
2014-04-25 02:45:35 +01:00
photonstorm
387ff4f0fa
BitmapData.processPixelRGB lets you perform a custom callback on every pixel in the BitmapData.
2014-04-24 05:20:45 +01:00
photonstorm
c88fa2bd91
Loads of BitmapData updates. More details soon.
2014-04-24 03:49:49 +01:00
photonstorm
0f1e0a3d4e
Updated the Device little / big endianess check.
2014-04-23 23:35:36 +01:00
photonstorm
0b1fb5a637
Destroying an object with an input handler during its onDown event would throw Signals dispatch errors (thanks @jflowers45, fix #746 )
...
InputHandler._setHandCursor private var wasn't properly set, meaning the hand cursor could sometimes remain (during destroy sequence for example)
All Game Objects have a new property: destroyPhase (boolean) which is true if the object is in the process of being destroyed, otherwise false.
The PIXI.AbstractFilter is now included in the Phaser Pixi build by default, allowing for easier use of external Pixi Filters.
2014-04-22 01:43:22 +01:00
photonstorm
a582f21a02
Fixed jsdoc and started extractAlpha
2014-04-20 21:17:01 +01:00
photonstorm
eb23903174
Corrected initial particle scale.
2014-04-11 03:26:14 +01:00
photonstorm
78aa24f04b
Emitter.setScale now allows you to scale the x and y axis of the particles independently.
2014-04-10 05:18:06 +01:00
photonstorm
8c434a83ab
Fixed issue with Particles not being updated by the Emitter and rebuilt the dist files.
2014-04-10 04:19:43 +01:00
photonstorm
8bb22551aa
Added jsdocs to Particle and Emitter. Fixed p2 UMD.
2014-04-10 01:48:55 +01:00
photonstorm
95b0532f59
Emitter.setScale has a new 'rate' parameter which allows particles to change in scale over time, using any Easing value or timescale.
...
Emitter.setAlpha has a new 'rate' parameter which allows particles to change alpha over time, using any Easing value or timescale.
Emitter.bringToTop and Emitter.sendToBack are booleans that let you optionally set the display order of the Particle when emitted.
2014-04-10 01:36:05 +01:00
photonstorm
50981fd729
Emitter now has minParticleAlpha and maxParticleAlpha values for setting a random alpha on emitted particles.
...
Emitter.particleAnchor allows you to control the anchor of emitted Particles. Defaults to 0.5 (same as before) but now under your control.
Emitter now emits Phaser.Particle objects instead of Phaser.Sprites, which can be extended as required.
Emitter has had various local properties removed that were already declared in Phaser.Group which it extends.
2014-04-09 14:29:23 +01:00
photonstorm
01eec6cef5
Keyboard.stop nulls the function references after removing the event listeners (thanks @bmceldowney, #691 )
2014-04-07 12:29:26 +01:00
nickryall
76736a666e
Rounded lineJoins for text stroke
2014-04-01 09:03:14 +13:00
nickryall
5f7d38e9fd
Rounded lineJoins for text stroke
2014-04-01 09:00:35 +13:00
nickryall
772d9ca9f2
Renable input on Phaser.Image fix
2014-04-01 08:54:08 +13:00
nickryall
8400df1b33
Renable input on Phaser.Image fix
2014-03-31 21:29:35 +13: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
bdbf2783ad
Fix jshint issues in src/gameobjects
2014-03-25 14:56:05 -07:00
Christian Wesselhoeft
61f18b675c
Trim trailing whitespace.
2014-03-25 14:56:04 -07:00
photonstorm
21c0be4d02
BitmapDatas when used as Game Object textures in WebGL now update themselves properly.
...
Timer.ms now correctly reports the ms time even if the Timer has been paused (thanks Nambew, fix #624 )
2014-03-21 18:37:54 +00:00
photonstorm
0fa54b0b24
TileSprites now emit outOfBounds and enterBounds events accordingly.
...
TileSprites working with physics bodies again.
2014-03-21 18:04:24 +00: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
96365a3a1f
The StateManager is now responsible for clearing down input, timers, tweens, physics, camera and the World display list.
...
Removed the use of Int16Array from all Game Objects, swapped for standard Array. Phaser now runs on Android 2.x again (fix #590 )
2014-03-19 12:05:19 +00:00
photonstorm
84df7bf320
Sprite.events.onEnterBounds added. This is dispatched if the Sprite leaves the bounds but then returns. The opposite of onOutOfBounds.
2014-03-19 04:17:37 +00:00
photonstorm
11fdd62436
World.destroy incorrectly clashed with the Group.destroy method it over-rode, renamed to World.shutdown and updated StateManager accordingly.
...
World.shutdown now removes all children iteratively, calling destroy on each one, ultimately performing a soft reset of the World.
Objects with a scale.x or y of 0 are no longer considered valid for input (fix #602 )
InputHandler will set the browser pointer back to default if destroyed while over (fix #602 )
Group.destroy has a new parameter: `soft`. A soft destruction won't remove the Group from its parent or null game references. Default is `false`.
InputHandler.validForInput is a new method that checks if the handler and its owner should be considered for Pointer input handling or not.
Group.replace will now return the old child, the one that was replaced in the Group.
2014-03-19 00:54:49 +00:00
photonstorm
4a407f12a1
Button.onInputUpHandler wouldn't set an upFrame for a frame ID of zero, made the check more strict.
2014-03-17 23:57:27 +00:00
photonstorm
e955145707
Added p2 kill and reset test + nearing completion on tilemap collision.
2014-03-13 21:14:18 +00:00
photonstorm
c8e63582a4
Lots of small tweaks to pass jshint.
2014-03-13 16:49:52 +00:00
photonstorm
dc434dd1ff
Render Debug moved into Arcade class.
2014-03-13 15:41:56 +00:00
photonstorm
39add47ac3
enableBody added to Group constructor. Also: game.add.physicsGroup(Phaser.Physics.ARCADE) is a thing :)
2014-03-13 11:45:55 +00:00
photonstorm
8318a58f69
Fixed bug causing Text with empty or no given text to break. Added World.createSpring.
2014-03-13 09:43:00 +00:00
photonstorm
94448d2497
P2 postBroadphase example and handler done. Group.enableBodyDebug added. Sprites no longer remove bodies from the world if exists = false, instead they set safeDestroy to true, which removes the body on the next preUpdate, to avoid mid-step destruction issues.
2014-03-13 07:29:23 +00:00
photonstorm
84741f065f
New P2 examples. And fixed Camera.atLimit value.
2014-03-12 16:33:53 +00:00
photonstorm
8683d41c76
New Text examples.
2014-03-11 20:21:07 +00:00
photonstorm
6bddf1a914
The main Game class has been modified so that the update methods no longer have any if/else checks in them. Now split into coreUpdate, etc.
...
Put QuadTree back into Debug class.
Debug class now clears down on WebGL.
Updated RetroFont.type.
Fixed QuadTree example.
2014-03-11 16:14:01 +00:00
photonstorm
6ef9e30753
Added z property to remaining game objects and updated TypeScript defs.
2014-03-10 23:16:49 +00:00
photonstorm
53797171a3
Fixed Group.sort. Added z-depth property to all core game objects. Fixed P2 const overwrite.
2014-03-10 23:01:10 +00:00
photonstorm
c73b4eaea0
json is now the default tilemap format when not defined (thanks RyanDansie, #528 )
...
Updated docstrap
2014-03-10 00:50:06 +00:00
photonstorm
f22af81653
TileSprites now have a physics body property and call it in the pre and post updates. As with all physics bodies it's null by default.
2014-03-07 03:23:32 +00:00
photonstorm
3b2573de9a
Objects that are 'fixedToCamera' are now still correctly placed even if the camera is scaled ( #512 )
2014-03-06 17:12:12 +00:00
photonstorm
3e93f24583
New split physics system is implemented. Still tidying-up, but ArcadePhysics, P2 and Ninja Physics are in and configured. Lots more examples required, and tilemap collision mostly broken in Arcade at the moment. Time to implement in Ninja.
2014-03-06 06:29:19 +00:00
photonstorm
22b1ce9b9d
Added Phasers new Physics Manager and restored the pre-1.1.4 ArcadePhysics system. The new manager can handle multiple physics systems running in parallel, which could be extremely useful for lots of games.
2014-03-05 02:36:08 +00:00
photonstorm
67ad898294
Tween.generateData(frameRate) allows you to generate tween data into an array, which can then be used however you wish (see new examples)
...
Added new Retro Font examples.
2014-03-03 22:43:35 +00:00
photonstorm
7183322259
Renamed Phaser.BitmapFont to Phaser.RetroFont because I believe it will cause confusion otherwise. Also tidied up the asset fonts folder.
2014-03-03 17:05:28 +00:00
photonstorm
833960b3c8
Animation.looped has been renamed to Animation.loop. It's a boolean you can toggle at run-time to turn on/off animation looping.
...
A single Animation object now has 3 new events: onStart, onLoop and onComplete.
Animation.loopCount holds the number of times the animation has looped since it last started.
Animation.stop has a new parameter: dispatchComplete. If true it'll dispatch an Animation.onComplete event.
2014-03-03 16:05:55 +00:00
photonstorm
4a370c82cf
You can now load in CSV Tilemaps again and they get created properly ( fixes #391 )
...
You can now create blank Tilemaps and then populate them with data later.
2014-03-03 13:45:47 +00:00
photonstorm
d8f5832fa2
Completely empty Tilemaps can now be created. This allows for dynamic map generation at runtime.
...
Loads of updates across most the Tilemap files. Not finished yet, still CSV loading to do and a multi-tileset issue to resolve, but it's a lot more flexible now.
2014-03-03 05:19:46 +00:00
photonstorm
c4a68e3e87
The Debug panel now works in WebGL mode. Pay attention to the warning at the top of the Debug docs (feature request #499 )
...
All the Debug methods have had the word 'render' removed from the start. So where you did `debug.renderSpriteInfo` before, it's now just `debug.spriteInfo`.
Debug methods that rendered geometry (Rectangle, Circle, Line, Point) have been merged into the single method: `Debug.geom`.
2014-03-03 00:46:03 +00:00
photonstorm
418a161b46
Testing webgl debug overlay.
2014-03-02 20:51:44 +00:00
photonstorm
664d5b3e2c
Fixed issue where Image, Sprite, etc wouldn't call preUpdate or postUpdate of its children.
...
Fixed issue where renderOrderID wasn't being assigned correctly, causing the Input Handler to be unable to select the "top" item on a display list (would all default to zero)
Fixed issue where Stage would assign renderOrderIDs in reverse, should be in sequence.
Fixed issue where objects where checking World for the currentRenderOrderID by mistake instead of Stage.
Basically, input handling works a lot better now for Groups and nested objects :)
2014-02-28 19:45:15 +00:00
photonstorm
8662cd2fd4
Brand new Grunt task - creates each core library as its own file and a combined phaser.js.
...
New build script now cleanly splits Phaser, Pixi and p2 so they are each UMD wrapped and each available in the global scope (now more requireJS friendly!).
phaser-no-libs.js allows you to use your own version of p2.js or pixi.js with Phaser. Warning: This is totally unsupported. If you hit bugs, you fix them yourself.
Fixed silly instanceof bug in game objects (sorry guys).
2014-02-28 09:30:53 +00:00
photonstorm
4562939e4e
Fixed stupid error in destroy().
2014-02-28 06:17:18 +00:00
photonstorm
09d4a35b7f
Fixed issue where Phaser.Canvas.create would always make a screencanvas for CocoonJS, but that should only happen once. New parameter toggles it.
2014-02-28 03:55:06 +00:00
photonstorm
a8bd5db7ba
Fixed smoothed value in Sprite and Image too.
2014-02-27 21:57:57 +00:00
photonstorm
7e12075be1
Buttons are now cleanly destroyed if part of a Group without leaving their InputHandler running.
...
You can now safely destroy a Group and the 'destroyChildren' boolean will propogate fully down the display list.
Calling destroy on an already destroyed object would throw a run-time error. Now checked for and aborted.
Calling destroy while in an Input Event callback now works for either the parent Group or the calling object itself.
In Group.destroy the default for 'destroyChildren' was false. It's now `true` as this is a far more likely requirement when destroying a Group.
All GameObjects now have a 'destroyChildren' boolean as a parameter to their destroy method. It's default is true and the value propogates down its children.
2014-02-27 20:05:16 +00:00
photonstorm
a1b502fc06
Stage.smoothed allows you to set if sprites will be smoothed when rendered. Set to false if you're using pixel art in your game. Default is true. Works in Canvas and WebGL. Setting the game anti-aliased parameter now works properly too.
...
Sprite.smoothed and Image.smoothed allows you to set per-Sprite smoothing, perfect if you just want to keep a few sprites smoothed (or not).
Fixes #381 .
2014-02-25 04:41:57 +00:00
photonstorm
57796a60be
TileSprites can now receive full Input events, dragging, etc and be positioned in-world and fixed to cameras ( fixes #321 )
2014-02-21 19:21:00 +00:00
photonstorm
5a00a0ad97
TilemapParser will now throw a warning if the tileset image isn't the right size for the tile dimensions ( fixes #377 )
2014-02-21 16:57:45 +00:00
photonstorm
d7ababa398
BitmapData.alphaMask will draw the given image onto a BitmapData using an image as an alpha mask.
2014-02-21 15:09:04 +00:00
photonstorm
07af06fc4e
Fixing up documentation, missing functions, examples and alpha masks.
2014-02-21 14:50:18 +00:00
photonstorm
eb38ae35f8
renderXY added back into RenderTexture.
2014-02-21 13:44:39 +00:00
photonstorm
a61d030256
Display Objects now clean-up their children properly on destroy.
2014-02-21 13:25:08 +00:00
photonstorm
dd8a393bc9
Updated version of p2
2014-02-21 12:40:49 +00:00
photonstorm
efd760479d
Sprite and Image now remove any masks that may have been set when they are destroyed.
2014-02-21 12:18:23 +00:00
photonstorm
9fcab5ef26
Lots of doc fixes (thanks nhowell)
2014-02-20 03:44:44 +00:00