Richard Davey
9bc6237831
TS defs fix
2018-04-11 16:58:32 +01:00
Richard Davey
82e99bf130
All now using SafeRange to cut down on duplicated code
2018-04-10 15:21:30 +01:00
Richard Davey
a6303aad8c
Renamed files
2018-04-10 04:01:24 +01:00
Richard Davey
330eac1ebc
List is now internally using all of the new Utils.Array functions.
2018-04-10 04:00:39 +01:00
Evan Cobb
12c521d4d7
documenting UppercaseFirst
2018-04-07 17:18:30 -05:00
Evan
582a742373
filling in most of the jsdocs for GetFastValue and SpriteSheetFromAtlas
2018-04-05 14:21:40 -05:00
Richard Davey
9f85c0f61e
new optional argument key
which will allow you to scan a top-level property of any object in the given sorted array and get the closest match to it.
2018-04-04 17:11:41 +01:00
Evan
ab004d1626
filling in docs for utils.object.clone, hasAll, and hasAny
2018-04-03 12:42:27 -05:00
orblazer
90cf919b10
Fix "object" types on Sound and Time
2018-03-21 15:02:10 +01:00
orblazer
7fba122321
Fix "any" types
2018-03-20 17:15:49 +01:00
orblazer
44103dc475
Fix remaining multiple types
2018-03-20 16:12:42 +01:00
orblazer
253f3b1896
Fix import on array utils
2018-03-19 02:14:22 +01:00
orblazer
454849d67d
Update JSDoc on Tweens and Utils
2018-03-19 02:07:03 +01:00
Richard Davey
46e9dbd05a
Fixed left / right rotation and exposed via namespace
...
Phaser.Utils.Array.Matrix.RotateLeft actually rotated to the right (thanks @Tomas2h)
Phaser.Utils.Array.Matrix.RotateRight actually rotated to the left (thanks @Tomas2h)
2018-03-17 17:03:15 +00:00
samme
b625cc1ff6
Remove extra assignment
2018-03-07 16:59:41 -08:00
samme
cad8a5ce64
Fix Phaser.Utils.String.Format
...
Replacements were lost.
2018-03-07 12:13:53 -08:00
Richard Davey
e1554c34d6
eslint fixes
2018-02-16 18:07:49 +00:00
Richard Davey
d1f5f8a82b
Added jsdocs
2018-02-12 16:01:21 +00:00
Richard Davey
203a0ee98c
Added jsdocs
2018-01-31 17:48:30 +00:00
Richard Davey
2a86400a28
Added in jsdocs
2018-01-31 13:54:44 +00:00
Richard Davey
a4e9ae5fdd
Added jsdocs.
2018-01-26 14:23:00 +00:00
Richard Davey
5461471bf3
Added ucfirst equivalent
2018-01-18 05:33:42 +00:00
Richard Davey
d8f1ba03e9
Moved repository location
2018-01-09 21:43:56 +00:00
Richard Davey
0d90f75b5f
Splitting the dev branch up into versions.
2016-11-22 01:36:56 +00:00
Richard Davey
120b6eb2bd
Blend Modes work. More optimisations in the batch manager.
2016-10-25 03:57:34 +01:00
Richard Davey
591bf828a9
Phaser.ArrayUtils.numberArray now has optional prefix
and suffix
arguments, allowing you to do: numberArray(1, 4, 'Level ')
and the Array will contain ["Level 1", "Level 2", "Level 3", "Level 4"]
.
2016-10-11 17:42:58 +01:00
Richard Davey
380e717e52
Finished off missing factories. Moved over the docs. Changed rogue @returns to @return everywhere.
2016-10-08 16:17:46 +01:00
Richard Davey
98d2bdf03b
Fixed rotation! and setting Canvas tint modes.
2016-10-07 03:08:51 +01:00
Richard Davey
b5ef896448
Device.arora has been removed.
...
Device.epiphany has been removed.
Device.midori has been removed.
Device.css3D has been removed, and the function that tested it is no longer run.
Device.isConsoleOpen has been removed. The function only worked on a very limited set of old browsers.
Device.littleEndian has been removed, you can use Device.LITTLE_ENDIAN instead.
2016-09-29 03:09:49 +01:00
photonstorm
e1370f3549
Ignore EarCut from jshint. Too many errors.
2016-09-28 15:40:30 +01:00
photonstorm
b0f27b3f3c
Color.hexToRGBArray converts a hex color value to an [R, G, B] array.
...
Color.RGBArrayToHex converts an RGB color array, in the format: [R, G, B], to a hex color value.
2016-09-28 13:57:29 +01:00
photonstorm
bffdb8fbc5
Moved the Canvas tests into the Phaser.Device class.
2016-09-28 13:39:30 +01:00
photonstorm
ae9460c80e
Docs fix.
2016-09-28 13:39:05 +01:00
photonstorm
2cf447c151
PIXI.EarCut has been moved into the Phaser utils
folder, and renamed to Phaser.EarCut
. All references to PIXI.EarCut have been updated to match the new namespace.
2016-09-28 13:38:59 +01:00
photonstorm
1e15012a91
PIXI.CanvasPool has been moved into the Phaser utils
folder, and renamed to Phaser.CanvasPool
. All references to PIXI.CanvasPool have been updated to match the new namespace.
2016-09-28 12:53:04 +01:00
Richard Davey
6caec0d14d
Updated the pointer check code in the Device class, to get rid of the message Navigator.pointerEnabled is a non-standard API added for experiments only. It will be removed in near future.
in Chrome.
2016-09-19 23:10:42 +01:00
photonstorm
ad0e4aca2e
Large batch of jshint fixes.
2016-08-25 13:03:41 +01:00
Richard Davey
265501b4af
The src/system folder has been removed and all files relocated to the src/utils folder. This doesn't change anything from an API point of view, but did change the grunt build scripts slightly.
2016-07-11 22:38:09 +01:00
Richard Davey
97bba5f3c7
toABGR updated.
2016-07-06 22:40:05 +01:00
Richard Davey
3642ff0489
Phaser.Color.toABGR converts RGBA components to a 32 bit integer in AABBGGRR format.
2016-07-04 18:50:42 +01:00
photonstorm
e08e0861d0
Phaser.ArrayUtils.rotate is now deprecated. Please use Phaser.ArrayUtils.rotateLeft instead.
2016-07-04 13:09:36 +01:00
photonstorm
cb0861d881
The canvas created by Phaser.Debug for use when displaying debug data is no longer stored in the CanvasPool, and is instead a stand-alone canvas, free from ever being re-used by another game object.
2016-07-04 12:56:52 +01:00
Richard Davey
fdcbb9229b
Phaser.ArrayUtils.shift is the opposite of ArrayUtils.rotate. It takes an array, removes the element from the end of the array, and inserts it at the start, shifting everything else 1 space in the process.
2016-06-29 02:08:42 +01:00
Richard Davey
1f570b49e8
Phaser.Utils.pad now calls toString
on the input given, which means you can pass in common data typs such as numbers and have them padded and returned as strings.
2016-06-29 00:04:22 +01:00
Richard Davey
fbd1ba05f7
Phaser.Utils.reverseString will take the given string, reverse it, and then return it.
2016-06-27 22:43:53 +01:00
Richard Davey
e050c39357
Gamedevs do it in the render method.
2016-06-22 19:30:30 +01:00
photonstorm
28331c4f7f
Comment fix.
2016-06-09 15:37:03 +01:00
photonstorm
90e1460320
Added new Debug.displayList function.
2016-06-09 14:58:58 +01:00
photonstorm
8ad7b25595
The Debug canvas now listens for the ScaleManager.onSizeChange signal and resizes itself accordingly when running under WebGL. This means if your game size changes the Debug canvas won't be clipped off (thanks @francisberesford #1919 )
2016-04-05 21:52:11 +01:00
photonstorm
f40cfbe2ae
2015 - 2016.
2016-04-04 22:16:16 +01:00
Richard Davey
e6c508edcd
Color.updateColor would pass color.a
to the getColor32
method without first putting the value into the range 0 - 255 (thanks @mainpsyhos #2327 )
2016-02-17 03:50:06 +00:00
photonstorm
59ff0b0a57
Docs fix.
2016-02-12 14:49:37 +00:00
photonstorm
5f77c70309
jsdoc fix.
2015-09-15 13:33:42 +01:00
Paul
26a6338072
Change splice.call(arguments, ..) to use slice
...
- Bypasses issue of usage incorrectly omitting 2nd argument to `splice`
- More clear of intent; `slice` does not modifify `arguments`
- `slice` is faster across all desktop browsers, by varying degrees
- Probably due to parameter-aliasing and de-opts when modified.
- Both `slice` and `splice` create a new Array object
2015-08-26 23:50:16 -07:00
photonstorm
4ab5a07abf
jsdocs fix.
2015-08-24 12:03:03 +01:00
photonstorm
a9354d4a3f
Added withinGame to Pointer Debug.
2015-08-20 12:48:09 +01:00
photonstorm
e901fb80f6
Merging in the CanvasPool changes to the core.
2015-08-03 14:46:55 +01:00
photonstorm
78fdb224ce
ArrayUtils.numberArrayStep would return an empty array if a single parameter was given, instead of a single step array (thanks @pooya72 #1958 )
2015-07-31 16:21:10 +01: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
photonstorm
64b1794d67
Rope.segments used the wrong vertices property, causing a runtime error.
...
Debug.ropeSegments didn't take the scale of the Rope object into consideration, causing incorrect debug rendering.
2015-07-08 16:40:26 +01:00
Richard Davey
6a9fd4de8d
Debug.currentAlpha wasn't being used to set the alpha of the Debug context at all (was always set to 1) but now updates the alpha of the Debug context before anything is rendered to it (thanks @wayfu #1888 )
2015-07-07 03:32:11 +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
f216313582
jsdoc and debug removal.
2015-06-12 19:21:06 +01:00
photonstorm
76e2b00c82
Fixed pad jsdoc and ts defs ( #1823 )
2015-06-02 19:53:30 +01:00
Richard Davey
86f155da80
Merge pull request #1804 from asyncanup/patch-1
...
Fixed spelling error in 'rotation'
2015-05-30 20:02:09 +01:00
photonstorm
312c31b778
jsdoc and formatting fixes.
2015-05-21 11:53:18 +01:00
Anup Bishnoi
ac92e3c58e
Fixed spelling error in 'rotation'
2015-05-19 22:48:03 -04:00
photonstorm
399cf3f804
jshint fix.
2015-05-06 02:02:49 +01:00
photonstorm
1a7450e126
Added blend modes to Color class for testing.
2015-05-04 03:01:09 +01:00
photonstorm
4c0e34e788
jsdoc fixes.
2015-04-29 13:13:47 +01:00
cuixiping
d0ec5e4060
Fix bug of Color.webToColor and Color.updateColor
...
Color.webToColor and Color.updateColor should update out.color and out.color32 property.
2015-04-09 12:14:20 +08:00
photonstorm
5a9b509b44
ArraySet.removeAll allows you to remove all members of an ArraySet and optionally call destroy
on them as well.
...
GameObject.input.dragStartPoint now stores the coordinates the object was at when the drag started. This value is populated when the drag starts. It can be used to return an object to its pre-drag position, for example if it was dropped in an invalid place in-game.
2015-03-19 00:51:13 +00:00
photonstorm
6cf982a4a0
Fixed to Destroy component if still in render loop.
2015-03-11 01:44:46 +00: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
photonstorm
a69e53f901
Copyright date change.
2015-02-25 03:36:23 +00:00
photonstorm
5fd066c610
ArraySet.getByKey gets an item from the set based on the property strictly equaling the value given.
2015-02-22 19:30:23 +00:00
photonstorm
17e2d22962
mixinPrototype can now clone objects that support it.
2015-02-17 15:45:37 +00:00
photonstorm
52f4a037a3
Added 'replace' parameter to mixinPrototype.
2015-02-17 06:01:25 +00:00
photonstorm
f64f9c1d15
Added mixinPrototype.
2015-02-17 05:14:23 +00:00
photonstorm
ff76cf75ad
jsdoc fixes.
2015-02-11 05:19:09 +00:00
vulvulune
8dcd61aebb
Correct comments Phaser.ArrayUtils
...
Replace Phaser.Math => Phaser.ArrayUtils in the comments of the class
Phaser.ArrayUtils
2015-01-27 13:59:15 +01:00
Paul
fb9eab76e7
Utils - cleanup
...
- Updated linked documentation
- Also updated `removeRandomItem` per the contract and for consistency with
`getRandomItem`.
2014-12-01 23:19:32 -08:00
Paul
bdacef8170
ArrayUtils - minor corrections
...
- Corrected off-by-one issue; the effect is the same but it is arguably
more correct.
- Fixed getRandomItem; it would previously return null for false'y values
(false/''/0) which was against the defined contract.
- Updated documentation / documented types
2014-12-01 23:06:06 -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
1ef0f0a9fe
Rounded off bounds.
2014-11-25 02:49:34 +00:00
photonstorm
7e4a494f13
Keyboard.justPressed has bee renamed to Keyboard.downDuration which is a much clearer name for what the method actually does.
...
Keyboard.justReleased has bee renamed to Keyboard.upDuration which is a much clearer name for what the method actually does.
Keyboard.downDuration, Keyboard.upDuration and Keyboard.isDown now all return `null` if the Key wasn't found in the local keys array.
2014-11-20 20:55:51 +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
Paul
3c57773710
ArraySet - documentation
...
(rest of changes..)
2014-11-17 19:55:23 -08:00
Paul
5ec4c4cbe8
ArraySet - documentation
...
No breaking changes.
- Fixed jsdoc error `*[]` with documentation
- Also corrected documentation to align with behavior and changed
`callback` to `key` in callAll for consistency
2014-11-17 19:52:13 -08:00
Paul
aa3c21ade7
ArraySet/LinkedList - minor updates
...
- Renamed ArrayList to ArraySet
- Added ArrayList is a deprecated proxy for compatibility
- Updated internal code to use ArraySet
- ArraySet can be constructed with an array; if the caller is willing to
accept some responsibility this can remove the O(n^2) behavior of
repeatedly calling `add`.
- Updated Group.filter to take advantage of this
- ArraySet.total is read-only proxy for for list.length
- Fixes ArraySet.setAll where it would only set properties with truthy
values
- Updated documentation
2014-11-13 01:41:08 -08:00
Paul
794c9f65fe
ArrayList/LinkedList - moved from core to utils
...
- ArrayList is also renamed to ArraySet to better reflect the nature
2014-11-13 00:59:42 -08:00
Paul
ae6cba5928
Math/Utils - various cleanup and deprecations/moves
...
- FIX/CHANGE - Math.wrapAngle over radians; it would convert radians to degrees
- No internal code relies on unexpected the radians-to-degrees behavior
- Moved additional methods over to ArrayUtils, only marked deprecated in Math
- Removed some private annotations; e.g. linear / factorial public, but bernstein / catmullRom still protected
- Marked additional duplicates deprecated; e.g linearValue, angleLimit
- Documentation updates
- Fixed some accidental "Utils.Arrays" usage (oops!)
- Bumped deprecations from 2.1.4 to 2.2.0
2014-11-11 21:28:25 -08:00
Paul
d941e285a3
Math/Utils - various cleanup and deprecations/moves
...
- And one last before..
2014-11-09 17:40:54 -08:00
Paul
a35d032238
Math/Utils - various cleanup and deprecations/moves
...
- Put in the missing changes..
2014-11-09 17:26:07 -08:00
Paul
a6d2da2a8a
Math/Utils - various cleanup and deprecations/moves
...
There are no known breaking changes.
- Timer
- Uses standard Math.min/Math.max (it's better 2, 3 items).
- Math
- Updated documentation
- Marked various Math functions as deprecated, proxying as appropriate
- Array-based functions -> ArrayUtils
- RNG-based functions -> Utils
- Updated core-usage
- floor/ceil should not be used (alternatives provided)
- Altered for some equivalencies
- Also fixes some assorted issues
- Marked a few internal functions as private
- Utils
- Moved polyfills to their own file for better visibility
- Moved array functions to ArrayUtils and marked proxies as deprecated
- Created Phaser.ArrayUtils for array-related functions
- polyfills moved to their own file
- Functions given function names
- Added Math.trunc
2014-11-09 16:17:18 -08:00
Paul
e08e99ea6a
Updated Color.webToColor to accept [more] spaces
...
- webToColor now accepts arbitrary spaces, which are allowed per CSS rules (percents still not supported)
2014-10-28 06:25:20 -07:00
Paul
3cfe200ed1
Minor documentation cleanup
2014-10-28 06:12:48 -07:00
Paul
37a77c674f
Add support for "rgba" to Phaser.Stage.backgroundColor
...
- backgroundColor now uses valueToColor which supports hex strings, web/rgba strings, and hex numbers.
- valueToColor normalizes across hexToColor/webToColor/getRGB; see comments
- hexToColor now documents the prefix being optional and allows the `0x` prefix.
- webToColor now exctracts an alpha channel if present - as a slight misfeature it will also accept `rgb(..,a)`.
2014-10-28 05:45:00 -07:00
photonstorm
9cb42a933d
Fixed for Pixi v2 new method of batching.
2014-10-23 12:27:25 +01:00
photonstorm
96fd0ade74
JSDoc fixes.
2014-10-21 22:43:42 +01:00