Commit graph

8230 commits

Author SHA1 Message Date
Richard Davey
8ecab7a1a1 JSDocs fix 2019-06-25 16:56:56 +01:00
Richard Davey
280e0e2744 Abort filter checks if renderToTexture 2019-06-25 10:10:00 +01:00
Richard Davey
63ac456c45 Flag swap 2019-06-24 14:42:34 +01:00
Richard Davey
a3763d1468 Added setSampler2DBuffer method and willRender override. 2019-06-24 12:31:47 +01:00
Richard Davey
839e298c4e Pointer.getDuration would return a negative / static value on desktop, or NaN on mobile, because the base time wasn't being pulled in from the Input Manager properly. Fix #4612 2019-06-24 10:58:44 +01:00
Richard Davey
f323097714 Sprites need to flip the UV if the source is a GLTexture 2019-06-23 22:12:14 +01:00
Richard Davey
33e15dca48 Marked argument as optional. Fix #4607 2019-06-22 11:38:24 +01:00
Richard Davey
7fc6424c37
Merge pull request #4608 from rexrainbow/master
Set customHitArea to false if shape is not defined
2019-06-22 11:33:26 +01:00
Richard Davey
a83b59d860 Merge branch 'master' of https://github.com/photonstorm/phaser 2019-06-22 11:20:09 +01:00
Richard Davey
bb29aed88a Matter.Factory.constraint wouldn't allow a zero length constraint to be created due to a falsey check of the length argument. You can now set length to be any value, including zero, or leave it undefined to have it automatically calculated 2019-06-22 11:19:56 +01:00
Fabadiculous
255232dd2a Fix bug where graphics methods were not renamed 2019-06-22 16:55:50 +10:00
Rex
16a038674f Set customHitArea to false if shape is not defined
In setHitArea method, use setHitAreaFromTexture if shape is undefined. Suppose that it is not a case of `customHitArea`
2019-06-22 09:37:49 +08:00
Richard Davey
96f96a7258 Opps! Clear the texture :) 2019-06-21 17:20:15 +01:00
Richard Davey
9d94e35e91 If a GLTexture is given as a sampler2D it will extract the textureData from it correctly 2019-06-21 16:35:31 +01:00
Richard Davey
c33cf85456 Added isGLTexture property 2019-06-21 16:34:47 +01:00
Richard Davey
1e9ef314c9 Added addGLTexture method to save WebGL Textures directly into the Texture Manager. 2019-06-21 16:10:26 +01:00
Richard Davey
b0b5f202fe Fixed some jsdocs and added WebGLTexture support 2019-06-21 16:08:47 +01:00
Richard Davey
ba0c380109 Support rendering a shader to a texture instead of the display list 2019-06-21 16:08:29 +01:00
Richard Davey
22b107b903 Added setRenderToTexture method and supporting properties 2019-06-21 16:08:14 +01:00
Richard Davey
9a6fe49000 Typo 2019-06-21 12:25:08 +01:00
Richard Davey
67b28d6764 The Scale Manager would throw the error 'TypeError: this.removeFullscreenTarget is not a function' when entering full-screen mode. It would still enter fullscreen, but the error would appear in the console. Fix #4605 2019-06-21 10:53:27 +01:00
Richard Davey
d811713905 Moving to 3.19.0 dev 2019-06-20 10:09:09 +01:00
Richard Davey
f999e640e1 3.18.1 release 2019-06-20 09:59:17 +01:00
Richard Davey
6004237d37 Get the correct time value 2019-06-20 09:58:59 +01:00
Richard Davey
8837cb3fd1 JSDocs fix 2019-06-20 09:58:48 +01:00
Richard Davey
db433656c3 Preparing for 3.19 dev 2019-06-19 17:02:27 +01:00
Richard Davey
8fe4b37a94 JSDoc fix 2019-06-19 15:52:08 +01:00
Richard Davey
6c575ca20e Arcade.Events.WORLD_STEP is a new event you can listen to. It is emitted by the Arcade Physics World every time the world steps once. It is emitted _after_ the bodies and colliders have been updated. Fix #4289 2019-06-19 15:41:45 +01:00
Richard Davey
ef4b3cfe89 Improved update handler to cut down on body iteration and stepping without an update due. Fix #4529 2019-06-19 15:32:17 +01:00
Richard Davey
96298cf920 Added new resetFlags method and willStep and delta arguments to preUpdate. 2019-06-19 15:31:29 +01:00
Richard Davey
ae591c1c34 Timeline.setTimeScale would only impact the Timeline loop and completion delays, not the actively running Tweens. It now scales the time for all child tweens as well. Fix #4164 2019-06-19 12:34:41 +01:00
Richard Davey
6d173434eb Looped Tween Timelines would mess-up the tween values on every loop repeat, causing the loop to fail. They now loop correctly due to a fix in the Tween.play method. Fix #4558 2019-06-19 12:23:24 +01:00
Richard Davey
bb27213f12 Improved jsdocs 2019-06-19 11:25:33 +01:00
Richard Davey
8f22f37dca Tween.restart wouldn't restart the tween properly. Fix #4594 2019-06-19 11:05:27 +01:00
Richard Davey
1676f22360 Automatically handle the drag values in rotated containers 2019-06-19 10:41:48 +01:00
Richard Davey
4a91b1e560 Added dragStartXGlobal and dragStartYGlobal properties 2019-06-19 10:41:26 +01:00
Richard Davey
5fa4264219 Added new Transform.getParentRotation method 2019-06-19 10:40:47 +01:00
Richard Davey
b917a0611f ESLint fix 2019-06-19 09:46:38 +01:00
Richard Davey
f5cae5a48b Added in Text justification feature. Fix #4291 2019-06-19 09:46:32 +01:00
Richard Davey
61827f3539 Preparing for 3.18 release 2019-06-19 09:29:02 +01:00
Richard Davey
57fd8c9ce1
Merge pull request #4540 from BdR76/patch-2
drawDebug, display checkCollision sides
2019-06-19 09:28:31 +01:00
Richard Davey
2e64f4c5cc
Merge pull request #4588 from rexrainbow/master
Update displayOriginX, displayOriginY after size changed
2019-06-19 09:25:38 +01:00
Richard Davey
aa7f4da0d9
Merge pull request #4587 from samme/fix/emitter-op-random
Fix EmitterOp config with { random: false }
2019-06-19 09:24:20 +01:00
Richard Davey
932583402c
Merge pull request #4589 from samme/x/arcade-static-body-setSize
Change arguments to Arcade.StaticBody#setSize
2019-06-19 09:21:00 +01:00
ldd
4cd8787212 Fix some JSDoc descriptions 2019-06-17 16:03:22 -04:00
samme
9a3340ff7c Exit if scene was removed during create() 2019-06-14 13:00:13 -07:00
Richard Davey
89fe81a5ab Merge branch 'master' of https://github.com/photonstorm/phaser 2019-06-12 23:20:25 +01:00
Richard Davey
a786298c66 Updated Line docs. #4590 2019-06-12 23:20:22 +01:00
samme
7bba56be16 Change arguments to StaticBody#setSize
`center` replaces `offsetX`, `offsetY`
2019-06-12 10:59:07 -07:00
Richard Davey
ea8bb89554 Exposed all of the Tilemap Parser functions. Fix #4318 2019-06-12 12:35:41 +01:00
Richard Davey
0f592ba91a Moved the Pick function to the object utils 2019-06-12 12:35:03 +01:00
Richard Davey
9c7b26260e StaticPhysicsGroup can now take a classType property in its Group Config and will use the value of it, rather than override it. If none is provided it'll default to ArcadeSprite. Fix #4401 2019-06-12 12:06:40 +01:00
Richard Davey
0791ae10d2 Added button property and methods for leftButtonReleased, rightButtonReleased and so on. 2019-06-12 11:19:00 +01:00
Hua
da617f364d Update displayOriginX, displayOriginY after size changed 2019-06-12 13:54:27 +08:00
samme
df3953e604 Require truthy random value for randomness 2019-06-11 11:38:29 -07:00
Richard Davey
77859b1cdf Calling Arcade Physics Body.reset on a Game Object that doesn't have any bounds, like a Container, would throw an error about being unable to access getTopLeft. If this is the case, it will now set the position to the given x/y values 2019-06-11 18:20:56 +01:00
Richard Davey
13180b9a9a If you had a Graphics object in the display list immediately after an object with a Bitmap Mask it would throw an error Uncaught TypeError: Cannot set property 'TL' of undefined. Fix #4581 2019-06-11 17:58:57 +01:00
Richard Davey
423a9e5003 Implent Grid canvas rendering! Fix #4585 2019-06-11 16:45:13 +01:00
Richard Davey
eb73b51cd8 Allow for color and alpha overrides 2019-06-11 16:44:55 +01:00
Richard Davey
69877548c9
Merge pull request #4586 from rexrainbow/master
Set (width,height) of arc/circle to (diameter,diameter)
2019-06-11 15:58:34 +01:00
Richard Davey
e7a6c9f211
Merge pull request #4582 from Sun0fABeach/patch-1
Correct docs of arcade physics body member
2019-06-11 15:57:41 +01:00
Richard Davey
dfdba323fb New decodeAudio method for decoding base64 audio into webaudio 2019-06-11 14:31:43 +01:00
Richard Davey
a124580930 New Audio Decode type 2019-06-11 14:31:17 +01:00
Richard Davey
f2c2c93499 Added new DECODE and DECODE_ALL events 2019-06-11 14:29:29 +01:00
Richard Davey
b1e3ee4eec Added base64 to ArrayBuffer and ArrayBuffer to base64 2019-06-11 14:14:31 +01:00
Hua
382afd6945 Set (width,height) of arc/cicle to (diameter,diameter)
Set (width,height) of arc/cicle to (diameter,diameter), not (radius,radius).
2019-06-11 12:38:26 +08:00
Markus Appel
5ff9b20668
Correct docs of arcade physics body member 2019-06-09 12:22:15 +02:00
samme
c55ee432ce Docs for easedValueEmit() 2019-06-07 13:32:12 -07:00
samme
cf627a07e1 Correct emitOnly values for angle, lifespan, x, y 2019-06-07 13:31:01 -07:00
Richard Davey
0dfc9806cc Fixed lots of jsdos and moved the frame.cutX/Y addition into each function, allowing the x/y defaults to work again. Fix #4528 2019-06-06 17:45:18 +01:00
Richard Davey
2c8a5d3446 Renamed translate, rotate and scale to make them more explicit 2019-06-06 17:41:42 +01:00
Richard Davey
6b5b751134 Handle sending previous size to event and updating canvas size in setGameSize. Cleaned-up workflow. 2019-06-06 15:58:23 +01:00
Richard Davey
dc2375de70 Camera Manager will now listen for RESIZE event and resize full-sized cameras automatically 2019-06-06 15:57:51 +01:00
Richard Davey
254eef9787 Use the event constant instead of a string 2019-06-06 15:56:45 +01:00
Richard Davey
0a761e104c Added new arguments to RESIZE event 2019-06-06 15:56:26 +01:00
Richard Davey
89fe081f74 Added new Tiled Object and Object Layer defs. Fix #4364 2019-06-06 11:20:40 +01:00
Richard Davey
3da69ade29 Tilemap.createDynamicLayer would fail if you called it without setting the x and y arguments, even though they were flagged as being optional. Fix #4508 2019-06-06 10:43:46 +01:00
Richard Davey
04ec7b26a1 Tilemap.createBlankDynamicLayer would fail if you provided a string for the tileset as the base tile width and height were incorrectly read from the tileset argument. Fix #4495 2019-06-06 10:29:28 +01:00
Richard Davey
11d845a77e Specifically state this is a render flag only #4574 2019-06-06 09:52:19 +01:00
Richard Davey
2cdb672d36 Added new Text Padding typedef 2019-06-05 23:40:27 +01:00
Richard Davey
2446e2f3fc Setting padding in a Text style configuration object would cause an error about calling split on undefined. Padding can now be applied both in the config and via setPadding 2019-06-05 23:40:10 +01:00
Richard Davey
458c592596 Changing the radius of an Arc Game Object wouldn't update the size, causing origin issues. It now updates the size and origin correctly in WebGL. Fix #4542 2019-06-05 23:02:59 +01:00
Richard Davey
515adc737d Fixed typo 2019-06-05 22:48:22 +01:00
Richard Davey
ab17888c18
Merge pull request #4577 from samme/feature/group-name
Add Group#name
2019-06-05 22:45:58 +01:00
Richard Davey
3947fe38cf
Merge pull request #4576 from samme/fix/StaticBody-drawDebug
Use defaultStrokeWidth in drawDebug()
2019-06-05 22:43:39 +01:00
Richard Davey
9327351e86 Added deltaX, Y, Z and wheel method. 2019-06-05 15:31:25 +01:00
Richard Davey
98be6adfda Native support for wheel events 2019-06-05 15:31:13 +01:00
Richard Davey
62cb5c68a8 Added 3 new Wheel input events 2019-06-05 15:30:54 +01:00
Richard Davey
700c9daaa1 New input const (and changed order to be numeric order) 2019-06-05 15:30:42 +01:00
Richard Davey
8968b2179c Added GameObject.scale transform property for a unified scale setter 2019-06-05 15:30:23 +01:00
Richard Davey
af3efc9e2f Added more docs to make #4575 clearer 2019-06-05 14:08:01 +01:00
samme
6a2c476557 Use defaultStrokeWidth in drawDebug() 2019-06-04 13:27:02 -07:00
Richard Davey
12bcda98a6 Added support for a desynchronized context and alpha support in 2D 2019-06-04 19:13:49 +01:00
Richard Davey
4ed0f90bf7 Merged touch handler methods into one 2019-06-04 18:54:35 +01:00
Richard Davey
befbc788a3 Added new TouchCancelWindow handler 2019-06-04 18:54:00 +01:00
Richard Davey
15654be545 update motion automatically 2019-06-04 18:53:48 +01:00
Richard Davey
d82b46c4d2 Updates TS Parser to handle Function[]
Fix #4522
2019-06-04 18:14:58 +01:00
samme
04384f78a6 Add Group#name 2019-06-04 09:33:08 -07:00
Richard Davey
558f6aea55 JSDoc fixes 2019-06-04 16:01:37 +01:00
Richard Davey
7f2feea4ae All the touch handlers now store the full TouchEvent, not just the Touch List entry 2019-06-04 15:46:16 +01:00
Richard Davey
bf48c53103 Added new over and out handlers for touch events 2019-06-04 15:43:02 +01:00
Richard Davey
9b93ad9985 Removed changed pointers IIFE and un-needed method methods 2019-06-04 15:40:05 +01:00
samme
d9ecd70f59 Add TimelineBuilderConfig type and callbacks 2019-06-03 12:12:01 -07:00
samme
3ebd1839eb Docs for Tween 2019-06-03 12:09:04 -07:00
samme
0306aab176 Docs for Timeline 2019-06-03 12:08:45 -07:00
Richard Davey
77626d854d
Merge pull request #4568 from samme/types/tween-configs-2
Add types for tween `props` configs
2019-06-02 14:06:58 +01:00
samme
d3407c5e44 Add EmitterOpOnEmitType and EmitterOpOnUpdateType
Also some corrections in ParticleEmitterConfig docs
2019-06-01 13:33:06 -07:00
samme
8410f6b131 Add types for tween props configs 2019-06-01 10:24:15 -07:00
Richard Davey
17ad54b35b You can pass in a Body for a Matter Game Object to use 2019-06-01 10:53:05 +01:00
Richard Davey
63ead0cbc1 Added Matter.bodies 2019-05-31 19:42:49 +01:00
BdR76
717c89d79b
Changed if-statements to multiple lines
Changed the if-statements to multiple lines as per ESLint config
2019-05-31 13:15:23 +02:00
Richard Davey
a67d0ab3c3
Merge pull request #4565 from samme/types/tween-configs-ease
Correct types for NumberTweenBuilderConfig.ease and TweenBuilderConfig.ease
2019-05-31 11:46:39 +01:00
samme
8f2e774c4b Correct ease type 2019-05-30 16:11:34 -07:00
Richard Davey
278bde236b lint fix 2019-05-30 23:05:06 +01:00
Richard Davey
ec6bbdeebd Added typedefs for the Text Game Object. Fix #4551 2019-05-30 23:01:53 +01:00
Richard Davey
a7fbd0bcfe
Merge pull request #4545 from samme/feature/warn-for-missing-plugin-in-boot
Warn when plugin entry is missing `plugin` property
2019-05-30 22:29:39 +01:00
Richard Davey
114b7b570d
Merge pull request #4552 from rexrainbow/master
Set canvas size equal to text object size
2019-05-30 22:24:51 +01:00
Richard Davey
5b85cd49a7
Merge pull request #4547 from Nallebeorn/master
JSDoc: Make createDynamicLayer() position optional
2019-05-30 22:14:25 +01:00
Richard Davey
897de33a64
Merge pull request #4554 from samme/types/group-classType
Remove GroupClassTypeConstructor type
2019-05-30 22:05:55 +01:00
Richard Davey
90e04c7e90
Merge pull request #4563 from samme/types/tween-configs
Add types for tween configs
2019-05-30 22:00:37 +01:00
samme
7a98fe6d8a Add tween callbacks 2019-05-29 11:42:19 -07:00
samme
d6b3141b8b Add the remaining tween config properties 2019-05-29 10:45:55 -07:00
samme
a1e8668aee Extra properties for tween configs 2019-05-29 10:42:30 -07:00
Richard Davey
df0b474638 Added getTopCenter, getBottomCenter, getLeftCenter and getRightCenter 2019-05-29 16:27:31 +01:00
Richard Davey
09318530a4 Matter.Factory.fromVertices can now take a vertices path string as its vertexSets argument, as well as an array of vertices. 2019-05-29 14:50:57 +01:00
samme
777f436aa3 Add NumberTweenBuilderConfig to path configs 2019-05-28 14:11:28 -07:00
samme
7125334677 Duration is optional 2019-05-28 14:08:03 -07:00
Richard Davey
78d15b0b0f Fixed arguments 2019-05-28 21:41:04 +01:00
Richard Davey
3c52a3b27a Pass the pointers array in directly, no need to iterate them all every time 2019-05-28 21:31:54 +01:00
samme
5018061751 Add NumberTweenBuilderConfig type 2019-05-28 13:13:39 -07:00
samme
c7af250100 Add TweenBuilderConfig type 2019-05-28 11:44:43 -07:00
Richard Davey
d87cb43a7f Removed touch limit on over/out 2019-05-28 17:26:31 +01:00
Richard Davey
e12002bf74 Use a switch instead 2019-05-28 17:21:40 +01:00
samme
c3c11652ef Merge branch 'master' of https://github.com/photonstorm/phaser into types/group-classType 2019-05-28 09:16:27 -07:00
Richard Davey
520e2e621f Catch poll zero 2019-05-28 17:08:30 +01:00
Richard Davey
95f69bbd9e Split the drag method up into different parts, removed un-used properties and tided up the loop 2019-05-28 16:58:52 +01:00
Richard Davey
7142319f24 Removed un-used methods and properties 2019-05-28 16:58:31 +01:00
Richard Davey
094541d968 Removed dirty and just properties as no longer required, also removed reset method 2019-05-28 16:57:08 +01:00
samme
84e476762a Docs description for GroupCreateConfig 2019-05-27 09:05:16 -07:00
samme
e879ec7703 Correct types for GroupCreateConfig.key, GroupCreateConfig.frame 2019-05-27 09:03:28 -07:00
Rex
9a958631fc Don't draw text only when width or height is 0
It can fix this issue:
Text is empty string '', but have fixedWidth and fixedHeight, with backgroundColor setting.
2019-05-26 20:58:40 +08:00
Richard Davey
961e858cbf Working through making the Input system DOM responsive and not reliant on the game step 2019-05-24 19:30:13 +01:00
Richard Davey
9a2b8b966d Use getFrame 2019-05-24 15:28:38 +01:00
Richard Davey
7aa3b3b07b TimeStep.now is a new property that holds the exact performance.now value, as set at the start of the current game step. Also, completed jsdocs. 2019-05-24 15:27:45 +01:00
Richard Davey
b86d737e2e Game.getTime would return NaN because it incorrectly accessed the time value from the TimeStep. 2019-05-24 15:27:33 +01:00
Richard Davey
ec5f3d3a33 The TimeStep.step method no longer uses the time value passed to the raf callback, as it's not actually the current point in time, but rather the time that the main thread began at. Which doesn't help if we're comparing it to event timestamps. 2019-05-24 14:40:11 +01:00
samme
8e717d5588 Remove GroupClassTypeConstructor type 2019-05-23 15:10:40 -07:00
Richard Davey
7073f39a19 Removed all of the DOM Callbacks, input queue and legacy input handling. Renamed methods from 'queue' to 'on' and tidied up internal content 2019-05-23 17:19:30 +01:00
Richard Davey
1d1c4e6543 Removed all input queue elements 2019-05-23 17:19:03 +01:00
Richard Davey
186887c920 Added lastAction property and self-invoke the reset method 2019-05-23 17:18:49 +01:00