photonstorm
47e1d16a6d
jshint fix.
2015-07-08 16:00:03 +01:00
photonstorm
3012e49937
Text.addColor would incorrectly color the text stroke if set (thanks @llevkin #1893
...
Text.addStrokeColor works in the same way as `Text.addColor` but allows you to define a color stop for the stroke color instead of the fill color.
2015-07-08 12:52:39 +01:00
Richard Davey
86cac2085c
BitmapData.move(x, y) allows you to shift the contents of the BitmapData horizontally and vertically by the given amounts. The image wraps-around the edges of the BitmapData.
...
BitmapData.moveH(distance) allows you to horizontally shift the BitmapData with wrap-around the edges.
BitmapData.moveV(distance) allows you to vertically shift the BitmapData with wrap-around the edges.
2015-07-08 04:26:28 +01:00
Richard Davey
a7e18137d1
Text has a new style property: tabs. This allows you to specify a pixel value (or values) that allows you to space out text that contains tab characters within it. Text.tabs
can be either an integer, in which case all tabs share the same spacing, or an array of pixel values corresponding exactly to the number of tabs per line of text. This allows you to easily align columns of data in a single Text object.
2015-07-08 01:15:31 +01:00
Richard Davey
3066f60f11
parseList support added.
2015-07-08 00:03:03 +01:00
Richard Davey
2e447ec01d
Tidied up tab handling a little.
2015-07-07 23:41:37 +01:00
Richard Davey
ae08b9ac02
Text tab support working. Now to add varying tab sizing.
2015-07-07 23:31:44 +01:00
Richard Davey
b8cc4d9d53
Updated Text resolution handling.
2015-07-07 20:48:00 +01:00
photonstorm
9548fb9856
Final textBounds updates.
2015-07-07 15:16:23 +01:00
photonstorm
a89d48b9a6
Text.autoRound allows you to control if the text is allowed to render at sub-pixel coordinates or not. Set to true
to round the coordinates, often eliminating anti-aliasing from certain font types ( #1867 )
2015-07-02 13:39:59 +01:00
Richard Davey
2b7666e22d
Added toString to the constructor parameter.
2015-07-01 23:37:48 +01:00
photonstorm
8356aacaa8
Trying out new Text pivot and mute handling.
2015-06-24 19:57:40 +01:00
photonstorm
a69c156526
The Text Bounds is a rectangular region that allows you to align your text within it, regardless of the number of lines of text or position within the world. For example in an 800x600 sized game if you set the textBounds to be 0,0,800,600 and text alignment to 'left' and vertical alignment to 'bottom' then the text will render in the bottom-right hand corner of the game, regardless of the size of font you're using or the number of lines in the text itself.
...
Set the Style properties `boundsAlignH` and `boundsAlignV` or adjust them via the Text setters to change the alignment.
It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts have additional padding around them which you can mitigate by tweaking the Text.padding property.
Setting a textBounds _doesn't_ update the wordWrapWidth, so be aware of the relationship between the two.
Call this method with nothing defined for any of the parameters to reset an existing textBounds.
#1824
2015-06-17 17:18:04 +01:00
photonstorm
0258245f12
Phaser.Text no longer extends PIXI.Text but replaces it entirely. Phaser.Text now natively extends a Phaser Sprite, meaning it can be enabled for physics, damaged, etc.
2015-06-17 13:21:28 +01:00
photonstorm
102c74e121
Deprecated the following:
...
* Camera.screenView
* ScaleManager.maxIterations
* ScaleManager.enterPortrait (see onOrientationChange)
* ScaleManager.enterLandscape (see onOrientationChange)
* ScaleManager.enterFullScreen (see onFullScreenChange)
* ScaleManager.leaveFullScreen (see onFullScreenChange)
* ScaleManager.fullScreenFailed (see onFullScreenError)
* ScaleManager.checkResize
* ScaleManager.checkOrientation
* ScaleManager.setScreenSize (see updateLayout)
* ScaleManager.setSize (see reflowCanvas)
* ScaleManager.checkOrientationState (see reflowCanvas)
* ScaleManager.orientation (see screenOrientation)
* Gamepad.disabled (see enabled)
* Input.currentPointers (see totalActivePointers)
* Input.disabled (see enabled)
* Keyboard.disabled (see enabled)
* Mouse.disabled (see enabled)
* Mouse.mouseMoveCallback (see Input.addMoveCallback)
* MSPointer.disabled (see enabled)
* Touch.disabled (see enabled)
* Cache.getUrl (see getURL)
* Math.truncate (see Math.trunc)
* Math.snapToInArray (see Phaser.ArrayUtils.findClosest)
* Math.interpolateFloat (see Math.linear)
* Math.normalizeLatitude (use Phaser.Math.clamp(lat, -90, 90))
* Math.normalizeLongitude (use Phaser.Math.wrap(lng, -180, 180))
* Math.chanceRoll (use Phaser.Utils.chanceRoll)
* Math.numberArray (use Phaser.ArrayUtils.numberArray)
* Math.numberArrayStep (use Phaser.ArrayUtils.numberArrayStep)
* Math.limitValue (use Phaser.Math.clamp)
* Math.randomSign (use Phaser.Utils.randomChoice(-1, 1))
* Math.angleLimit (use Phaser.Math.clamp)
* Math.getRandom (use Phaser.ArrayUtils.getRandomItem)
* Math.removeRandom (use Phaser.ArrayUtils.removeRandomItem)
* Math.floor (use Math.trunc)
* Math.ceil (use Phaser.Math.roundAwayFromZero)
* Math.shift (use Phaser.ArrayUtils.rotate)
* Math.shuffleArray (use Phaser.ArrayUtils.shuffle)
* Math.distanceRounded (do the rounding locally)
* Canvas.getOffset (see Phaser.DOM.getOffset)
* Canvas.getAspectRatio (see Phaser.DOM.getAspectRatio)
* TilemapLayer.tileColor (use TilemapLayer.debugSettings.missingImageFill)
* Phaser.ArrayList alias removed, now use Phaser.ArraySet
* Utils.transposeArray (see Phaser.ArrayUtils.transposeMatrix)
* Utils.rotateArray (see Phaser.ArrayUtils.rotateMatrix)
* Utils.shuffle (see Phaser.ArrayUtils.shuffle)
2015-06-17 03:14:31 +01:00
photonstorm
8cf28fede7
maxHealth is a new property that Game Objects with the Health component receive and works in combination with the heal
method to ensure a health limit cap.
2015-06-17 02:00:04 +01:00
photonstorm
b725c25702
Button game objects now have Input.useHandCursor
set to true
by default.
2015-06-17 01:55:36 +01:00
Richard Davey
0b82a68717
Merge pull request #1794 from stephandesouza/patch-1
...
Add a Heal Method to Phaser.Components.Health
2015-06-17 01:54:14 +01:00
Richard Davey
a7a74550a5
Merge pull request #1837 from Feenposhleen/dev
...
JSON support for BitmapFont atlases
2015-06-17 01:49:23 +01:00
photonstorm
40802314dd
TileSprite now fully supports animation again, having been broken for several versions due to a Pixi upgrade. We've updated the way TileSprites generate their textures internally considerably and animation support is back across both Canvas and WebGL as a result ( #1653 )
2015-06-17 01:25:56 +01:00
photonstorm
d931cedb69
Fixed issue with long text dropping to be shorter again.
2015-06-16 12:45:26 +01:00
photonstorm
70cf7a32bc
Fixed jshint errors.
2015-06-13 02:31:21 +01:00
photonstorm
f216313582
jsdoc and debug removal.
2015-06-12 19:21:06 +01:00
photonstorm
fa469b85e1
Added GameObjectFactory.video url parameter.
2015-06-12 19:20:50 +01:00
photonstorm
10a3df1ef5
Set the Video baseTexture to __default until the stream starts.
2015-06-10 14:21:58 +01:00
photonstorm
5458097006
Renamed createVideoStream to startMediaStream.
...
Refactored Video constructor significantly - you can no longer create a webcam stream from the constructor, as it doesn't give you time to respond to onAccess and onError signals in Firefox. Instead call startMediaStream directly having set-up your signal listeners first.
startMediaStream now has a chance to dispatch the onError signal if the webcam has been blocked entirely by the browser (auto-block or remembered block). autoPlay attribute removed to stop Firefox throwing a "Invalid URI. Load of media resource failed" error.
Tidied up Video.destroy to properly remove video element from the DOM.
2015-06-10 00:59:24 +01:00
Charlo
17a8116382
Added JSON support for BitmapFont
2015-06-06 12:35:08 +02:00
photonstorm
2b0abb67dd
onDragUpdate is a new signal that is dispatched whenever a Game object enabled for input and drag is moved by a pointer (i.e. during a drag event). See the Phaser.InputHandler.enableDrag
docs for parameter details and the new Phaser Example.
2015-06-04 20:58:00 +01:00
photonstorm
a971928bbc
jshint fixes.
2015-06-03 13:22:29 +01:00
photonstorm
560fed484f
Added BitmapText.purgeGlyphs method.
2015-06-03 05:28:24 +01:00
photonstorm
03a7b6a708
Updated Destroy component to deal with BitmapText glyphs pool.
2015-06-03 05:28:24 +01:00
photonstorm
5e265bbe86
Re-ordered carriage-return detection.
2015-06-03 05:28:24 +01:00
photonstorm
90d08fbf24
Updated jsdocs and added align parameter to method call.
2015-06-03 05:28:24 +01:00
photonstorm
fa7259fd75
Removed debug calls.
2015-06-03 05:28:24 +01:00
photonstorm
2484ced06d
Typo.
2015-06-03 05:28:24 +01:00
photonstorm
cf5238c749
Removed use of PIXI.BitmapText entirely. Moved all update and support functions to Phaser.
2015-06-03 05:28:23 +01:00
photonstorm
5054344668
The LoadTexture component has a new property: customRender which is checked for in the Core postUpdate to know when to render custom elements like Videos.
2015-05-21 15:24:39 +01:00
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