Richard Davey
7f3e6798e4
Added multiplyMatrices
and premultiply
methods and removed unused method.
2020-09-30 14:02:16 +01:00
Richard Davey
06d359dc25
Matrix4.transform
is a new method that will generate a transform matrix from the given position and scale vectors and a rotation quaternion.
...
Removed un-used methods.
2020-09-30 13:48:59 +01:00
Richard Davey
d3e318a51c
Added projectViewMatrix
and unprojectViewMatrix
.
2020-09-30 13:39:48 +01:00
Richard Davey
40a808cb50
Matrix4.lookAtRH
is a new method that will generate a right-handed look-at matrix from the given eye, target and up positions.
2020-09-30 13:36:14 +01:00
Richard Davey
51ab68573f
Matrix4.getMaxScaleOnAxis
is a new method that will return the maximum axis scale from the Matrix4.
2020-09-30 13:19:20 +01:00
Richard Davey
7896bb4157
Added new methods.
...
* `Vector3.setFromMatrixPosition` is a new method that will set the components of the Vector3 based on the position of the given Matrix4.
* `Vector3.setFromMatrixColumn` is a new method that will set the components of the Vector3 based on the specified Matrix4 column.
* `Vector3.fromArray` is a new method that will set the components of the Vector3 based on the values in the given array, at the given offset.
* `Vector3.min` is a new method that will set the components of the Vector3 based on the `Main.min` between it and the given Vector3.
* `Vector3.max` is a new method that will set the components of the Vector3 based on the `Main.max` between it and the given Vector3.
* `Vector3.addVectors` is a new method that will set the components of the Vector3 based on the addition of the two Vector3s given.
* `Vector3.addScalar` is a new method that will multiply the components of the Vector3 by the scale value given.
* `Vector3.applyMatrix3` is a new method that will take a Matrix3 and apply it to the Vector3.
* `Vector3.applyMatrix4` is a new method that will take a Matrix4 and apply it to the Vector3.
2020-09-30 13:18:45 +01:00
Richard Davey
c299c9e108
Renamed method to setFromEuler
2020-09-30 11:23:01 +01:00
Richard Davey
3b8c78cca2
Quaternion.fromEuler
is a new method that will set the quaternion from the given Euler
object, optionally calling the onChangeCallback
in the process.
...
The `Quaternion.set` method has a new optional boolean parameter `update` (defaults to `true`), which will call the `onChangeCallback` if set.
2020-09-30 11:21:28 +01:00
Richard Davey
8823f7f0e4
Removed Layer3D and Quad Game Objects
2020-09-30 11:03:19 +01:00
Richard Davey
11e6101f8d
Added Math.Euler class
2020-09-30 11:02:54 +01:00
Richard Davey
368df2acef
Quaternion
now has a new property onChangeCallback
which, if set, will be invoked each time the quaternion is updated. This allows you to link change events to other objects.
...
Internally, the `Quaternion` class now has 4 new private properties: `_x`, `_y`, `_z` and `_w` and 4 new getters and setters for the public versions. It also now passes most methods via `set` to allow for the onChange callback to be invoked. This does not change the public-facing API.
2020-09-30 11:02:33 +01:00
Richard Davey
4dfa49fc05
Fix return states
2020-09-30 09:23:58 +01:00
Richard Davey
0e72b3d3a0
Container doesn't need to be on the updateList, so remove the handler.
2020-09-30 09:20:16 +01:00
Richard Davey
24de03ca96
Added missing ADDED_TO_SCENE
handlers
2020-09-29 20:14:30 +01:00
Richard Davey
12c8ddfd05
Use getXRound
2020-09-29 18:05:39 +01:00
Richard Davey
9619995527
Add to UpdateList if not on Display List
2020-09-29 18:05:29 +01:00
Richard Davey
8119ce7da1
Fixed use of old camera private properties
2020-09-29 16:44:11 +01:00
Richard Davey
76d2630f8b
Fixed Shake effect
2020-09-29 16:43:42 +01:00
Richard Davey
83542ff51d
Merge pull request #5330 from somnolik/fix-render-texture-group
...
Fix drawing Group to RenderTexture
2020-09-29 12:22:07 +01:00
Richard Davey
780e1d9adb
Texture parsed files no longer store their data in the data caches as well.
...
You can now use `TextureManager.remove` to remove a texture and not have to worry about clearing the corresponding JSON or XML cache entry as well in order to reload a new texture using the same key. Fix #5323
2020-09-29 10:38:44 +01:00
Richard Davey
90096a6b64
Added mention about tint to the docs. Fix #5327
2020-09-29 09:31:09 +01:00
samme
e639bb73d8
Correct Arcade Body types
...
For TypeScript
Fixes #5328
2020-09-28 11:42:21 -07:00
Richard Davey
f9803774dd
The Line
Game Object will now default its width and height to 1, rather than zero. This allows you to give Line objects a physics body (although you will still need to re-adjust the center of the body manually). Fix #4596
2020-09-28 17:00:15 +01:00
Richard Davey
1d66284a22
Removed debug logs and finished JSDocs
2020-09-28 15:25:43 +01:00
Richard Davey
34be82a20c
Added processX and processY methods
2020-09-28 15:25:28 +01:00
Richard Davey
4d484e2c0c
Updated to handle face blocking and all possible checks
2020-09-28 13:07:32 +01:00
Richard Davey
731e661d56
No longer needed
2020-09-28 13:07:11 +01:00
Richard Davey
4785953368
Merge branch 'master' of https://github.com/photonstorm/phaser
2020-09-28 08:07:23 +01:00
Richard Davey
09c2a2d622
Testing new separation
2020-09-28 08:07:19 +01:00
Richard Davey
30b514fc58
Merge pull request #5326 from samme/fix/body-setOffset
...
Remove Arcade.Body#updateCenter() in Arcade.Body#setOffset()
2020-09-26 10:19:53 +01:00
Stefan Karner
f4b2b34535
Fix drawing Group to RenderTexture
...
Group children (generic GameObjects) expect a 'camera' argument
in their 'willRender' function
2020-09-26 10:25:22 +02:00
samme
639a93583f
Remove updateCenter() in setOffset()
2020-09-25 14:42:56 -07:00
samme
d0f6070e14
Docs: Arcade.Body#setOffset
2020-09-25 14:37:26 -07:00
samme
13c27064a8
Docs: Arcade.Body#reset
...
Only game object receives the passed coordinates
2020-09-25 14:19:12 -07:00
Richard Davey
bed716e382
X Separation working properly in all cases. Now to adjust Y.
2020-09-25 21:25:01 +01:00
Richard Davey
7630b8e28d
Testing new Separation logic (Y done, X in progress)
2020-09-25 18:01:40 +01:00
Richard Davey
2bcf1f70be
Testing new separation logic (incomplete atm)
2020-09-24 18:10:11 +01:00
Richard Davey
da78d3ee42
Tidy up docs
2020-09-24 18:10:00 +01:00
Richard Davey
69b8458bb8
Added new pushable
component
2020-09-24 18:09:49 +01:00
Richard Davey
b64d63f60e
When running an Arcade Physics overlap
test against a StaticBody
, it will no longer set the blocked
states of the dynamic body. If you are doing a collision test, they will still be set, but they're skipped for overlap-only tests. Fix #4435
2020-09-24 11:04:56 +01:00
Richard Davey
aa3544310c
When taking a snapshot
in WebGL it would often have an extra line of empty pixels at the top of the resulting image, due to a rounding error in the WebGLSnapshot
function. Fix #4956
2020-09-24 10:32:47 +01:00
Richard Davey
6484bc3607
Make it clear in the docs that you cannot mix blend modes and bitmap masks. Fix #4853
2020-09-24 09:36:15 +01:00
Richard Davey
4748c7c7fc
WebGLRenderer.defaultScissor
is a new property that holds the default scissor dimensions for the renderer. This is modified during resize
and avoids continuous array generation in the preRender
loop.
2020-09-24 09:26:41 +01:00
Richard Davey
e004fa47fc
Creating a Bitmap Mask from a texture atlas that was then used to mask another Game Object also using that same texture atlas would throw the error GL_INVALID_OPERATION : glDrawArrays: Source and destination textures of the draw are the same.
. It now renders as expected. Fix #4675
2020-09-23 18:10:12 +01:00
Richard Davey
5f28ff64a2
New clearMask
and createMask
methods and tidied up structure
2020-09-23 17:59:17 +01:00
Richard Davey
c6f533b872
Fixed legacy interpolation parameters
2020-09-23 17:55:29 +01:00
Richard Davey
232f8e0ebc
Updated to use new uniforms and fixed renderWebGL
parameters
2020-09-23 17:55:03 +01:00
Richard Davey
bba88b32d8
Fixed property name
2020-09-23 17:15:32 +01:00
Richard Davey
1f9243fe81
Merge pull request #5322 from samme/feature/setMaxVelocity
...
Set maxVelocity in PhysicsGroupConfig
2020-09-23 13:06:52 +01:00
Richard Davey
63bac3a13d
The Loader.maxParallelDownloads
value is now set to 6 if running on Android, or 32 on any other OS. This avoids net::ERR_FAILED
issues specifically on Android. You can still override this in the Game Config if you wish. Fix #4957
2020-09-23 13:04:18 +01:00
Richard Davey
8d51e8ab2c
Fix #4859
2020-09-23 12:59:03 +01:00
Richard Davey
212e7aa301
The Shape
class now includes the ComputedSize
component properties and methods directly in the class, rather than applying as a mixin. setSize
is now flagged as being private
, because it shouldn't be used on Shape classes, which was leading to confusion as it appeared in the public-facing API. Fix #4811
2020-09-23 12:46:55 +01:00
Richard Davey
f16e1c09f3
Lint fix
2020-09-23 12:39:21 +01:00
Richard Davey
e7926674b8
The Graphics
WebGL Renderer will now default to pathOpen = true
. This fixes issues under WebGL where, for example, adding an arc and calling strokePath
, without first calling beginPath
will no longer cause rendering artefacts when WebGL tries to close the path with a single tri.
2020-09-23 12:34:20 +01:00
Richard Davey
559127a53f
Graphics.strokeRoundedRect
now issues moveTo
commands as part of the drawing sequence, preventing issues under WebGL where on older Android devices it would project additional vertices into the display. Fix #3955
2020-09-23 12:34:06 +01:00
Richard Davey
b86d982c00
The ParticleManagerCanvasRenderer
now calculates its transform matrix differently, splitting out the parent matrix and factoring in the follow offsets separately. It also uses setToContext
internally. This fixes numerous issues with particle emitters being incorrectly offset when added to Containers, or having the Camera zoomed, running under Canvas. Fix #4908 #4531 #4131
2020-09-23 12:06:29 +01:00
Richard Davey
e2d775e083
Remove duplicate code
2020-09-23 12:06:22 +01:00
Richard Davey
a459ec090f
Fixed lint issue
2020-09-23 11:50:07 +01:00
Richard Davey
fb849ae0dc
The ParticleManagerWebGLRenderer
now calculates its transform matrix differently, splitting out the parent matrix and factoring in follow offsets separately. This fixes numerous issues with particle emitters being incorrectly offset when added to Containers. Fix #5319 #5195 #4739 #4691
2020-09-23 11:50:00 +01:00
Richard Davey
b350ebddcc
Removed duplicate code.
2020-09-23 11:42:14 +01:00
svipal
79920709e5
removed useless change
2020-09-23 01:13:20 +02:00
samme
426c9632c7
Set maxVelocity in PhysicsGroupConfig
2020-09-22 16:05:21 -07:00
Richard Davey
76deec0ef6
When destroying an interactive Game Object that had useHandCursor
enabled, it would reset the CSS cursor to default, even if the cursor wasn't over that Game Object. It will now only reset the cursor if it's over the Game Object being destroyed. Fix #5321
...
The `InputPlugin.shutdown` method will now reset the CSS cursor, in case it was set by any Game Objects in the Scene that have since been destroyed.
2020-09-22 22:40:56 +01:00
Richard Davey
aea0e4c925
Pointer.down
will now check if the browser is running under macOS and if the ctrl key was also pressed, if so, it will flag the down event as being a right-click instead of a left-click, as per macOS conventions. Fix #4245
2020-09-22 20:42:38 +01:00
Richard Davey
fe4b706cb0
Setting the pixelArt
config option will now set antialiasGL
to false
, as well as antialias
. Fix #5309
2020-09-22 17:07:46 +01:00
Richard Davey
00b7530d7a
Explain render modes better.
2020-09-22 17:00:02 +01:00
Richard Davey
d5de353890
You can now use setMaxWidth
on DynamicBitmapText
, which wasn't previously possible. Fix #4997
2020-09-22 16:52:36 +01:00
Richard Davey
6bf36083a8
Added setMaxWidth
docs. Fix #4997
2020-09-22 16:48:38 +01:00
Richard Davey
5a6dec237c
Fixed RetroFont Parser. Fix #5310
2020-09-22 16:47:05 +01:00
Richard Davey
4fd46f4d1f
Fixed DynamicBitmapText WebGL Renderer. Fix #5303
2020-09-22 16:38:17 +01:00
Richard Davey
95b9ba55de
Added setPosition and setScale
2020-09-22 15:25:09 +01:00
Richard Davey
b317f89404
Renderer updates the camera
2020-09-22 15:25:09 +01:00
Richard Davey
674966280e
Merge pull request #5320 from vforsh/master
...
Add reserve property to particle emitter config
2020-09-22 15:24:16 +01:00
Richard Davey
6ff21af807
Added start of controls
2020-09-22 12:48:32 +01:00
Richard Davey
fe17dfc022
Updated docs
2020-09-22 12:48:23 +01:00
Richard Davey
6cf95f3548
Updated missing docs
2020-09-22 12:48:15 +01:00
Richard Davey
06b3a01d87
Added layer property
2020-09-22 12:48:03 +01:00
Richard Davey
2143b38dc4
Added destroy method
2020-09-22 12:47:51 +01:00
Richard Davey
183e68580f
Fixed dirty flag reset
2020-09-22 11:45:49 +01:00
Richard Davey
bd25dbc355
Added per-model cull mode
2020-09-22 11:39:26 +01:00
Richard Davey
0410c9f5aa
Updated JSDocs
2020-09-22 11:33:40 +01:00
Richard Davey
7d5adab502
Added JSDocs
2020-09-22 11:17:40 +01:00
Richard Davey
9ec300d618
Updated JSDocs
2020-09-22 11:12:40 +01:00
Richard Davey
820ea7799c
Completed JSDocs
2020-09-22 11:12:32 +01:00
Richard Davey
248d2352b6
Update the camera if dirty
2020-09-22 10:59:36 +01:00
Richard Davey
d08a6c657c
Added all documentation and dirty flag handling
2020-09-22 10:59:28 +01:00
Richard Davey
4945fc95e1
Not yet fixed, but no longer crashes build
2020-09-21 18:25:02 +01:00
Richard Davey
3950191468
Lots of docs and tidying up
2020-09-21 18:24:47 +01:00
Richard Davey
333945a89e
Remove Mesh Game Object and add Layer3D
2020-09-21 18:24:38 +01:00
Richard Davey
afe765a2cf
Fix component properties
2020-09-21 18:24:12 +01:00
Richard Davey
6abeb84ff6
Remove Face and Vertex classes
2020-09-21 18:24:03 +01:00
Richard Davey
d86cde525a
Remove console.log
2020-09-21 18:23:48 +01:00
Richard Davey
d33c69b65c
Updated the shaders
2020-09-21 18:23:41 +01:00
Richard Davey
24f7c2e3df
Updated to use RGB objects, finished missing methods
2020-09-21 15:57:57 +01:00
Richard Davey
893453f840
New uniforms handler, new cache and dirty checks
2020-09-21 15:57:38 +01:00
Richard Davey
33734309f1
Clean the mesh after rendering
2020-09-21 15:57:21 +01:00
Richard Davey
989e3e6e07
Swapped to use RGB objects
2020-09-21 15:57:11 +01:00
Richard Davey
82c8ada236
Added fog, dirty refresh and preUpdate handler
2020-09-21 15:56:58 +01:00
Richard Davey
27eafe3661
New Face and Vertex typedefs
2020-09-21 15:56:21 +01:00
Richard Davey
977054a7c8
Added new RGB class to encapsulate color data
2020-09-21 15:56:09 +01:00
Richard Davey
4549fb4320
Updated type defs
2020-09-21 14:05:51 +01:00
Richard Davey
f2f3aea79a
Shorter errors
2020-09-21 14:05:38 +01:00
Richard Davey
9bb510be0c
Now caches uniform locations and added all of the new set1f
etc uniform methods
2020-09-21 14:05:30 +01:00
Richard Davey
7a8932a3a4
Remove log
2020-09-21 14:04:52 +01:00
Vladislav Forsh
4d7301a4be
Improve types for particle emitter deathZone and emitZone
2020-09-21 12:38:29 +03:00
Richard Davey
7f7d7a1b2e
Can now rotate the model
2020-09-21 10:13:58 +01:00
Richard Davey
1b4af32ec2
The Quaternion
class constructor will now default the values to 0,0,0,1
if they're not provided, making it an identity quaternion, rather than the 0,0,0,0
it was before.
2020-09-21 10:13:50 +01:00
Vladislav Forsh
530c7a3d92
Add reserve property to particle emitter config
2020-09-21 12:06:49 +03:00
Richard Davey
a8df17b622
Corrected JSDocs
2020-09-21 09:54:23 +01:00
Richard Davey
99953b94b6
Merge pull request #5311 from vforsh/master
...
Add ability to use custom easing function(s) with particle emitters
2020-09-21 09:40:26 +01:00
Richard Davey
3672559fc1
Merge pull request #5315 from samme/feature/onWorldBounds
...
Add onWorldBounds argument in Arcade.Body#setCollideWorldBounds()
2020-09-21 09:38:05 +01:00
Richard Davey
e7f6e8aa57
Merge pull request #5317 from samme/docs/cursorKeys
...
Docs: correct CursorKeys
2020-09-21 09:35:31 +01:00
Richard Davey
48272312ed
Merge pull request #5318 from samme/fix/getMatching
...
Fix Group#getMatching()
2020-09-21 09:34:03 +01:00
Richard Davey
78c1eb7934
Removed debug, modified signatuers, added fog
2020-09-21 00:17:58 +01:00
Richard Davey
0ad265da2e
Removed faces and verts arrays as moved to a single ArrayBuffer instance
2020-09-21 00:17:38 +01:00
Richard Davey
56caeb126f
Renders whole buffer in a single draw with no vertex iteration
2020-09-21 00:17:14 +01:00
Richard Davey
1d2a8bc58f
Added fog to shader
2020-09-21 00:16:43 +01:00
samme
d4059c8f6e
Fix Group#getMatching
2020-09-19 10:10:25 -07:00
Svipal
3997cad5a7
same work
2020-09-19 13:05:56 +02:00
Svipal
e25c4a2e6b
made it so github will not list file differences that are not there
2020-09-19 12:58:16 +02:00
Svipal
5fd854fd26
fixed dynamic layer
2020-09-19 11:45:46 +02:00
Svipal
7ca2f9f10b
Merge branch 'master' of https://github.com/svipal/phaser into master
2020-09-19 11:04:49 +02:00
Svipal
a9e8c49bf0
fixed typo
2020-09-19 11:04:28 +02:00
svipal
030a9489cd
Merge pull request #9 from photonstorm/master
...
Final master pull hopefully
2020-09-19 11:01:04 +02:00
Svipal
299f83c13d
fixed conflicts
2020-09-19 10:56:05 +02:00
Richard Davey
8366d90f96
Added material and other new methods
2020-09-18 17:52:53 +01:00
Richard Davey
374cc84be8
Now the pipeline does it all
2020-09-18 17:52:41 +01:00
Richard Davey
561a1b54a2
Handle vertex normals too
2020-09-18 17:52:30 +01:00
Richard Davey
640ce49d93
Update MeshCamera.js
2020-09-18 17:52:20 +01:00
Richard Davey
6e62ada207
Created new MeshLight class
2020-09-18 17:52:15 +01:00
Richard Davey
307cbe130f
New Mesh Shader
2020-09-18 17:51:23 +01:00
Richard Davey
9a1b252a11
Use shouldFlush
2020-09-18 17:50:57 +01:00
Richard Davey
371fb5e68a
Added normals, removed Vec3
2020-09-18 17:50:47 +01:00
Richard Davey
0e2911c4a5
Added fromRotation and mult methods
2020-09-18 17:50:40 +01:00
Richard Davey
0013db3747
Created new Mesh Pipeline
2020-09-18 17:50:20 +01:00
samme
08b2ea467b
Docs: correct CursorKeys
...
Properties not optional
2020-09-18 08:57:05 -07:00
Richard Davey
74f35acad1
Better docs
2020-09-18 16:38:26 +01:00
svipal
79fe9abc6e
finished updating culling system
2020-09-18 17:16:52 +02:00
samme
2eb505c91d
Docs: Arcade.Body#setCollideWorldBounds
2020-09-17 14:20:13 -07:00
samme
7aa8f02d8c
Add onWorldBounds arg in setCollideWorldBounds()
2020-09-17 14:19:57 -07:00
Richard Davey
5b8e490c7e
Flush during render so we can have models with more vertices than the batch allows
2020-09-17 18:08:25 +01:00
Richard Davey
5ff9894925
MeshCamera now supports orbit and pan modes
2020-09-17 18:08:07 +01:00
Richard Davey
d40f99c332
Vertor3.addScale
is a new method that will add the given vector and multiply it in the process.
2020-09-17 18:07:54 +01:00
Richard Davey
6ce58ed73b
Let them define the orientation
2020-09-17 10:08:15 +01:00
Richard Davey
87ed734475
Easier iteration
2020-09-17 10:08:07 +01:00
Richard Davey
f853a2be70
Use the projected coordinates
2020-09-17 10:07:56 +01:00
Richard Davey
38958d025a
We need the z axis
2020-09-17 10:07:19 +01:00
Richard Davey
8ca1730cc1
Remove log
2020-09-16 17:49:00 +01:00
Richard Davey
c5412df09e
Fix docs
2020-09-16 17:48:56 +01:00
Richard Davey
8085952507
Expose MeshCamera
2020-09-16 17:35:54 +01:00
Richard Davey
c306229478
Final JSDocs
2020-09-16 17:33:17 +01:00
Richard Davey
303f09b23e
Final JSDocs
2020-09-16 17:25:42 +01:00
Richard Davey
1d0b5cc6a9
Added Size component
2020-09-16 17:15:37 +01:00
Richard Davey
fcf0867843
Final JSDocs
2020-09-16 17:15:25 +01:00
Richard Davey
a38166ce2b
Now allows a texture per model, not mesh
2020-09-16 16:39:06 +01:00
Richard Davey
fcd1cf96b8
Added dirty handling, drawDebug and destroy
2020-09-16 16:38:53 +01:00
Richard Davey
851775ae19
New MeshCamera class
2020-09-16 16:38:39 +01:00
Richard Davey
8ff008b740
Removed un-used components, refactored method names and added MeshCamera
2020-09-16 16:38:32 +01:00
Richard Davey
da6a300474
Iterates and renders the new models array
2020-09-16 13:51:39 +01:00
Richard Davey
4f7442ee96
Moving all dependencies to the Model object
2020-09-16 13:51:30 +01:00
Richard Davey
113ae646e2
Updated path ref
2020-09-16 13:50:44 +01:00
Richard Davey
a96d380933
Created new Geom.Mesh
namespace for all of the Mesh related functions and classes
2020-09-16 13:50:36 +01:00
Vladislav Forsh
8fd4754b03
Add ability to use custom easing function(s) with particle emitters
2020-09-16 12:43:38 +03:00
Richard Davey
45412157c2
Added JSDocs
2020-09-16 09:50:24 +01:00
Richard Davey
b74928b2f8
Added hideCCW
, addOBJ
, addModel
, sortByDepth
, rotateX
, rotateY
, rotateZ
, depthSort
, addVertex
and addFace
methods.
2020-09-15 18:09:19 +01:00
Richard Davey
431eb69b42
Much cleaner rendering function, skipping invalid faces
2020-09-15 18:07:51 +01:00
Richard Davey
3e133c900a
New method signature order
2020-09-15 18:07:24 +01:00
Richard Davey
a2a199818e
Added contains
and isCounterClockwise
methods and depth
property
2020-09-15 18:07:14 +01:00
Richard Davey
229d27dc9e
Updated docs and added load
method
2020-09-15 18:06:48 +01:00
Richard Davey
dd28a11c93
Loader.OBJFile
is a new File Loader type that can load Wavefront OBJ files, which are then parsed and stored in the OBJ Cache.
2020-09-15 18:06:31 +01:00
Richard Davey
a0b47e8c5f
Geom.ParseObj
is a new function that will parse a Wavefront OBJ file into model data that can be consumed by the Mesh Game Object.
2020-09-15 18:05:47 +01:00
Richard Davey
bd2c56e306
Typo fix
2020-09-15 18:04:26 +01:00
Richard Davey
d8a8aa8448
Added clearVertices
and renamed to addVertices
so you can append on more verts post-creation
2020-09-15 11:57:44 +01:00
Richard Davey
b763fa0f18
The Mesh now renders by iterating through the Faces array, not the vertices. This allows you to use Array methods such as BringToTop
to reposition a Face, thus changing the drawing order without having to repopulate all of the vertices.
2020-09-15 11:57:22 +01:00
Richard Davey
5e5b8c0938
The WebGLPipeline.shouldFlush
method now accepts an optional parameter amount
. If given, it will return true
if when the amount is added to the vertex count it will exceed the vertex capacity. The Multi Pipeline has been updated to now use this method instead of performing the comparison multiple times itself.
2020-09-15 11:54:12 +01:00
Richard Davey
08b4597b72
Improved JSDocs
2020-09-15 10:37:19 +01:00
Richard Davey
99c12540f7
Utils.Array.Matrix.Translate
is a new function that will translate an Array Matrix by horizontally and vertically by the given amounts.
2020-09-15 10:35:53 +01:00
Richard Davey
92982d810b
Added ability to get InCenter. translate and rotate Face
2020-09-14 17:35:06 +01:00
Richard Davey
52d5b00fe5
Added setPosition
and translate
methods
2020-09-14 17:34:47 +01:00
Richard Davey
f97042193f
Beta 7 tag
2020-09-14 15:35:00 +01:00
Richard Davey
6a966e3f3b
Removed interpolationPercentage
parameter from all render methods, as it has never been used.
2020-09-14 15:33:58 +01:00
Richard Davey
83f8f007d1
Now uses GetCalcMatrix
2020-09-14 15:22:16 +01:00
Richard Davey
1057ead114
Dump all of the old mega arrays and replace with an array of Vertex instances.
2020-09-14 15:09:34 +01:00
Richard Davey
36a33745b6
Expose Vertex and Face
2020-09-14 15:09:12 +01:00
Richard Davey
6a3ce21702
GameObject.Face
is a new micro class that consists of references to the three Vertex
instances that construct the single Face.
2020-09-14 15:08:36 +01:00
Richard Davey
8fc969088c
GameObject.Vertex
is a new micro class that encapsulates all of the data required for a single vertex, such as position, uv, color and alpha. This class is now created internally by the Mesh Game Object.
2020-09-14 15:08:25 +01:00
Richard Davey
3fa0070e50
Now uses white texture and tintEffect mode 1
2020-09-14 15:03:04 +01:00
Richard Davey
87c8e75ece
Updated JSDocs
2020-09-14 15:02:21 +01:00
Richard Davey
951457c881
As a result of the change to the shader, all uses of the WebGL Util function getTintAppendFloatAlphaAndSwap
have been replaced with getTintAppendFloatAlpha
instead.
2020-09-14 15:02:13 +01:00
Richard Davey
194257d199
Create GetCalcMatrixResults.js
2020-09-14 15:01:45 +01:00
Richard Davey
8d25510b61
GameObjects.GetCalcMatrix
is a new function that is used to calculate the transformed Game Object matrix, based on the given Game Object, Camera and Parent. This function is now used by the following Game Objects: BitmapText
(Static and Dynamic), Graphics
, Mesh
, Rope
, Shader
, Arc
, Curve
, Ellipse
, Grid
, IsoBox
, IsoTriangle
, Line
, Polygon
, Rectangle
, Star
and Triangle
. This dramatically reduces the amount of duplicate code across the API.
2020-09-14 15:01:40 +01:00
Richard Davey
4795c56d79
Config.images.white
is a new Game Config property that specifies the 4x4 white PNG texture used by Graphics rendering. You can override this via the config, but only do so if needed.
2020-09-14 14:57:08 +01:00
Richard Davey
e368c479a0
The TextureManager
now generates a new texture with the key __WHITE
durings its boot process. This is a pure white 4x4 texture used by the Graphics pipelines.
2020-09-14 14:54:58 +01:00
Richard Davey
81800e0ce2
WebGLRenderer.whiteTexture
is a new property that is a reference to a pure white 4x4 texture that is created during Boot by the Texture Manager. The Multi Pipeline uses this internally for all Graphic, Shape and fill rendering.
2020-09-14 14:44:29 +01:00
Richard Davey
81b63cdf20
The Rope.tintFill
property is now a boolean, not an integer, and can no longer take 2
as a value for a complete fill. Instead, you should provide a solid color texture with no alpha.
2020-09-14 11:12:41 +01:00
Richard Davey
e5ce83aebd
New direct tint value
2020-09-14 11:06:16 +01:00
Richard Davey
0f6cc79cd1
The function GetColorFromValue
has been removed as it's no longer used internally.
2020-09-14 11:05:32 +01:00
Richard Davey
4ade25fc79
No longer read private values for tint
...
The `Multi Pipeline`, `Bitmap Text`, `Render Texture`, `Text`, `TileSprite` and `Camera` now all read the tint values from the public properties instead of the private `_tintTL` etc ones. They also now set the `tintEffect` value directly from the `tintFill` property, removing another conditional check.
2020-09-14 11:05:09 +01:00
Richard Davey
75c5f11aee
Updated shader source RGB to BGR and removed if-else block
...
* The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they now read the color value as `outTint.bgr` instead of `outTint.rgb`. This allows the colors to remain in RGB order within the Tint component.
* The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they no longer have a 3-way check on the `outTintEffect` value.
2020-09-14 11:02:02 +01:00
Richard Davey
6d09f1fe40
Refactored Tint component
...
* `Tint.tintTopLeft` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintTL` which has now been removed.
* `Tint.tintTopRight` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintTR` which has now been removed.
* `Tint.tintBottomLeft` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintBL` which has now been removed.
* `Tint.tintBottomRight` is now a normal property in RGB order, not a setter, and no longer passes through the `GetColorFromValue` function. This directly replaces the private property `_tintBR` which has now been removed.
* The property `Tint._isTinted` has been removed as it's no longer required.
2020-09-14 10:59:32 +01:00
Richard Davey
ea0abc4f69
Tidy up the formatting
2020-09-14 09:44:17 +01:00
Richard Davey
17ed707acb
The Loader.path
was being added to the File URL even if the URL was absolute. This is now checked for and the path is not applied unless the URL is relative #5301
2020-09-14 09:23:59 +01:00
Richard Davey
25b5c2d1d1
Loads of new Mesh updates
...
* `Mesh.setVertices` is a new method that allows you to set the verts of a Mesh Game Object from the given parameters. This allows you to modify a mesh post-creation, or populate it with data at a later stage.
* The Mesh constructor signature has changed to `scene, x, y, vertices, uvs, indicies, colors, alphas, texture, frame`, where `indicies` is the new parameter added to the list. It allows you to provide indexed vertex data to create the Mesh from, where the `indicies` array holds the vertex index information. The final list of vertices is built from this index along with the provided vertices and uvs arrays.
* You can now supply just a single numerical value as the `color` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the color for all vertices created.
* You can now supply just a single numerical value as the `alpha` parameter in the constructor, factory method and `setVertices` method. If a number, instead of an array, it will be used as the alpha for all vertices created.
* The `Mesh` Game Object now extends the `SingleAlpha` component and the alpha value is factored into the final alpha value per vertex during rendering. This means you can now set the whole alpha across the Mesh using the standard `setAlpha` methods. But, if you wish to, you can still control the alpha on a per-vertex basis as well.
* The `Mesh` Game Object now has the Animation State Component. This allows you to create and play animations across the texture of a Mesh, something that previously wasn't possible. As a result, the Mesh now adds itself to the Update List when added to a Scene.
* `Mesh.setDebug` is a new method that allows you to render a debug visualisation of the Mesh vertices to a Graphics Game Object. You can provide your own Graphics instance and optionally callback that is invoked during rendering. This allows you to easily visualise the vertices of your Mesh to help debug UV mapping.
* `Mesh.debugGraphic` is a new property that holds the debug Graphics instance reference.
* `Mesh.debugCallback` is a new property that holds the debug render callback.
* `Mesh.renderDebugVerts` is a new method that acts as the default render callback for `setDebug` if none is provided.
* `Mesh.preDestroy` is a new method that will clean-up the Mesh arrays and debug references on destruction.
2020-09-13 23:11:04 +01:00
Richard Davey
3fd52ecdd3
Added debug draw
2020-09-13 17:16:17 +01:00
Richard Davey
c76b084f2e
Merge branch 'master' of https://github.com/photonstorm/phaser
2020-09-13 15:17:13 +01:00
Richard Davey
cd0a27acfa
Fix #5308
2020-09-13 15:17:07 +01:00
Rex
0cb806c11e
Fix add.existing bug
...
Add game object to updateList if it dose not add to displayList.
( Group game object dose not have `renderCanvas` or `renderWebGL` method)
2020-09-13 17:05:55 +08:00
Richard Davey
b733dbcbe1
The ScaleManager.resolution
property has been removed and all internal use of it.
2020-09-12 11:59:30 +01:00
Richard Davey
68946f3894
The Phaser.Scale.Events#RESIZE
event no longer sends the resolution
as a parameter.
2020-09-12 11:58:50 +01:00
Richard Davey
e4b1093e72
The WebGLRenderer.resize
and onResize
methods no longer receives or uses the resolution
parameter.
2020-09-12 11:58:08 +01:00
Richard Davey
67e49b515c
The PipelineManager.resize
method along with WebGLPipeline.resize
and anything else that extends them no longer receives or uses the resolution
parameter.
2020-09-12 11:57:16 +01:00
Richard Davey
37a9261ac4
The CanvasRenderer
no longer reads or uses the Game Config resolution property.
2020-09-12 11:56:11 +01:00
Richard Davey
b63cc75154
Remove Camera.resolution use
2020-09-12 11:55:38 +01:00
Richard Davey
f2fca49b3f
Remove Camera resolution use
2020-09-12 11:55:26 +01:00
Richard Davey
d6f5aabb7e
The TextStyle.resolution
property is no longer read from the Game Config. You can still set it via the Text Style config to a value other than 1, but it will default to this now.
2020-09-12 11:55:06 +01:00
Richard Davey
0acdf4373f
Formatting update
2020-09-12 11:53:36 +01:00
Richard Davey
c46c3e4c82
The Core.Config.resolution
property has been removed.
2020-09-12 11:53:23 +01:00
Richard Davey
f0f93cde7d
The CameraManager.onResize
method no longer receives or uses the resolution
parameter.
2020-09-12 11:52:40 +01:00
Richard Davey
3579d39fa2
The Camera.preRender
method no longer receives or uses the resolution
parameter.
2020-09-12 11:51:59 +01:00
Richard Davey
d1f2c9239c
Resolution removal
...
* The `BaseCamera.resolution` property has been removed.
* The internal private `BaseCamera._cx`, `_cy`, `_cw` and `_ch` properties has been removed.
* The `BaseCamera.preRender` method no longer receives or uses the `resolution` parameter.
2020-09-12 11:51:37 +01:00
Richard Davey
5d4fe0a466
Fixed a few linting errors
2020-09-12 10:34:57 +01:00
Richard Davey
36cf9c456a
Merge pull request #5270 from rexrainbow/text-measureText
...
Get ascent and descent from context.measureText method
2020-09-12 10:30:19 +01:00
Richard Davey
887e0d8a15
Merge pull request #5302 from samme/feature/copyPosition
...
Add Phaser.GameObjects.Components.Transform#copyPosition
2020-09-12 10:26:51 +01:00
samme
ad0c5ad5db
Docs: since
2020-09-11 10:01:43 -07:00
samme
f05129f30c
Add Transform#copyPosition
...
Needs JSDoc types for Vector3Like, Vector4Like
2020-09-11 09:44:31 -07:00
Emil Schnedler Vad
e1106a0112
Says webglRender but it is in PipelineManager
2020-09-11 18:44:11 +02:00
Richard Davey
9cd4c1bb0a
Refactored to use local vars
2020-09-11 16:27:21 +01:00
Richard Davey
d844402d4d
Merge pull request #5298 from samme/feature/audio-config-default
...
Add default value for Phaser.Core.Config#audio
2020-09-11 16:25:50 +01:00
Richard Davey
7475b15976
Preparing for Beta 6
2020-09-11 15:56:53 +01:00
samme
93b5aebdbe
Fix undefined TimerEvent
...
Fixes #5294
2020-09-11 07:45:22 -07:00
Richard Davey
6c8191f7c5
Fixed Audio and Video type defs. Fix #5295
2020-09-11 15:29:01 +01:00
Richard Davey
1c2a79ac51
The Scale Managers GetScreenOrientation
function will now check for window.orientation
first, because iOS mobile browsers have an incomplete implementation of the Screen API, forcing us to use the window value as a priority. This means the Scale Manager will now emit orientationchange
events correctly on iOS. Fix #4361 #4914
2020-09-11 15:22:53 +01:00
Richard Davey
60e311afe5
Updated JSDocs
2020-09-11 15:16:37 +01:00
Richard Davey
2acfbfbe71
Gamepad._created
is a new private internal property that keeps track of when the instance was created. This is compared to the navigator timestamp in the update loop to avoid event spamming. Fix #4890 .
2020-09-11 14:01:55 +01:00
Richard Davey
5ecdc3b4a2
The GamepadPlugin
will now call refreshPads
as part of its start process. This allows you to use Gamepads across multiple Scenes, without having to wait for a connected event from each one of them. If you've already had a connected event in a previous Scene, you can now just read the pads directly via this.input.gamepad.pad1
and similar. Fix #4890
2020-09-11 14:00:14 +01:00
Richard Davey
00b799db23
Use Event const, not string.
2020-09-11 12:23:33 +01:00
Richard Davey
c90a3847e4
DataManager.Events.DESTROY
is a new event that the Data Manager will _listen_ for from its parent and then call its own destroy
method when received.
2020-09-11 12:21:39 +01:00
Richard Davey
ce236f0d69
ScaleManager.refresh
is now called when the Game.READY
event fires. This fixes a bug where the Scale Manager would have the incorrect canvas bounds, because they were calculated before a previous canvas was removed from the DOM. Fix #4905
2020-09-11 12:10:10 +01:00
Richard Davey
57657ce76c
Updated JSDocs. Fix #5268
2020-09-11 11:08:43 +01:00
Richard Davey
56bbfbcb62
Removed capture
and added preventDefaultDown
, Up
and Move
instead. Also better passive handling and smaller listeners.
2020-09-11 10:59:47 +01:00
Richard Davey
0aea690497
Removed inputMouseCapture
and added configs for inputMousePrventDefaultDown
, Up
and Move
instead.
2020-09-11 10:59:20 +01:00
Richard Davey
3969d6e45a
Updated JSDocs to cover situation in #3858
2020-09-11 10:08:22 +01:00
Richard Davey
a04690d5af
The onMouse
events in the Input Manager didn't reset the activePointer
property to the mouse, meaning on dual-input systems such as Touch Screen devices, the active pointer would become locked to whichever input method was used first. Fix #4615 #5232
2020-09-11 09:48:13 +01:00
samme
ae5182be7d
Default Phaser.Core.Config#audio; and refactor
2020-09-10 09:22:44 -07:00
Richard Davey
65faa34884
Merge branch 'master' of https://github.com/photonstorm/phaser
2020-09-10 17:05:05 +01:00
Richard Davey
205552d69c
Fix namespaces. Fix #5289
2020-09-10 17:04:56 +01:00
Rex
f513f5bf31
Remove duplicated code
...
Adding game object to UpdateList has been invoked in `displayList.add` by new ADDED_TO_SCENE event already.
2020-09-10 23:44:21 +08:00
Richard Davey
8b94cd71d6
Undo #5212 as it breaks all imports in webpack
2020-09-09 17:07:40 +01:00
Richard Davey
ea73a72b73
Restored animation complete key event.
2020-09-09 16:08:59 +01:00
Richard Davey
626a4e08f9
Update release version
2020-09-09 13:33:33 +01:00
Richard Davey
296dafebf5
No need for gl ref
2020-09-09 13:33:25 +01:00
Richard Davey
da4c387d86
Reference fixes
2020-09-09 13:21:38 +01:00
Richard Davey
6734932a32
Update PipelineManager.js
2020-09-09 13:09:25 +01:00
Richard Davey
7e840b2670
Removed all of the pipeline methods and added the Pipeline Manager instance
2020-09-09 13:05:18 +01:00
Richard Davey
52c2312455
Update PipelineManager.js
2020-09-09 13:05:18 +01:00
Richard Davey
2d3edc9512
Use the new Pipeline Manager methods
2020-09-09 13:05:18 +01:00
Richard Davey
e450bf2f1f
Swap to using constants for pipeline names
2020-09-09 13:05:18 +01:00
Richard Davey
d198818d80
Game Objects now call the new Pipeline Manager methods directly
2020-09-09 13:05:18 +01:00
Richard Davey
4ea080e8a8
JSDoc fix
2020-09-09 13:05:17 +01:00
Richard Davey
7765016caa
Pipeline constants so we can avoid using strings elsewhere
2020-09-09 13:05:17 +01:00
Richard Davey
d3e82f2d76
The new Pipeline Manager class
2020-09-09 13:05:17 +01:00
samme
b0ce62e2d8
Docs: correct type for Body#customBoundsRectangle
2020-09-08 18:44:12 -07:00
Svipal
1994185d6f
merged master
2020-09-08 22:17:04 +02:00
Richard Davey
8b2c9edce2
GenerateFrameNames
can now accept the start
and end
parameters in reverse order, meaning you can now do { start: 10, end: 1 }
to create the animation in reverse.
2020-09-08 13:40:20 +01:00
Richard Davey
b8d35d7cf0
Utils.Array.NumerArray
can now accept the start
and end
parameters in reverse order, i.e. 10, 1
will generate a number array running from 10 to 1. Internally it has also been optimized to skip string based returns.
2020-09-08 13:02:16 +01:00
Richard Davey
dfb71fe2a6
Fixes to GenerateFrameNumbers
...
* `GenerateFrameNumbers` would include the __BASE frame by mistake in its calculations. This didn't end up in the final animation, but did cause a cache miss when building the animation.
* `GenerateFrameNumbers` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse.
2020-09-08 13:01:11 +01:00
Richard Davey
bd56b0bd59
Updated JSDocs
2020-09-08 12:17:45 +01:00
Richard Davey
09d96d4e5e
Now only dispatches one single event per action. Also added getFrameName
method.
2020-09-08 12:17:38 +01:00
Richard Davey
d476032e9f
Animation no longer extends the EventEmitter
2020-09-08 12:17:18 +01:00
Richard Davey
bbbae648b9
Deleted un-used events, renamed Sprite events and added lots more documentation.
2020-09-08 12:16:39 +01:00
Richard Davey
cdd612a273
AnimationState has moved namespace to keep things logically together
2020-09-08 09:31:59 +01:00
Richard Davey
5344d39498
Better Group docs. Fix #5011
2020-09-07 16:40:05 +01:00
Richard Davey
4af38a4836
Merge pull request #5285 from samme/feature/arcade-config-fixedstep
...
Add ArcadeWorldConfig.fixedStep
2020-09-07 16:24:49 +01:00
Richard Davey
dc99fd03aa
Don't create if vertices already provided. Fix #5280
2020-09-07 16:03:36 +01:00
Richard Davey
5224985e7f
Update BitmapMaskPipeline.js
2020-09-07 16:03:18 +01:00
Richard Davey
bd19929006
JSDoc fix
2020-09-07 16:03:06 +01:00
Richard Davey
bc694ce4ac
Beta 4
2020-09-07 15:34:04 +01:00
Richard Davey
98dc69ed23
Added in support for blending animations with addMix
, getMix
and removeMix
.
2020-09-07 15:33:57 +01:00
Richard Davey
438fe3c0d1
No Update unless playing
2020-09-07 14:50:33 +01:00
Rex
a9e6604eb2
Support IE
...
IE and Firefox for Android do not have actualBoundingBoxAscent and actualBoundingBoxDescent properties.
Use origin solution to get ascent and descent.
2020-09-07 21:36:27 +08:00
Richard Davey
94298efc4d
Because do/while loops are quite dangerous
2020-09-07 11:54:08 +01:00
Richard Davey
ec06e79b26
Catch stops
2020-09-07 11:52:37 +01:00
Richard Davey
2b374c7e14
AnimationState.skipMissedFrames
is now used when playing an animation, allowing you to create animations that run at frame rates far exceeding the refresh rate, or that will update to the correct frame should the game lag. Close #4232
2020-09-07 11:32:55 +01:00
Richard Davey
ace5b8cafb
Update Animation.js
2020-09-07 11:32:46 +01:00
Richard Davey
24beb01963
Update AnimationState.js
2020-09-07 10:26:16 +01:00
Richard Davey
6eae9ca598
Fixed reference
2020-09-07 10:26:10 +01:00
Richard Davey
70110825da
Console warning if frame doesn't exist
...
* `GenerateFrameNames` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively.
* `GenerateFrameNumbers` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively.
2020-09-07 10:26:04 +01:00
Richard Davey
ad4f0ce0c4
Updated docs
2020-09-05 12:01:11 +01:00
Richard Davey
2cabbbd504
Renamed to AnimationState
for clarity.
2020-09-05 11:45:00 +01:00
Richard Davey
b0872c188a
The Component.Animation.updateFrame
method has now been removed. Everything is handled by setCurrentFrame
instead, which removes one extra step out of the update process.
2020-09-05 11:12:52 +01:00
Richard Davey
af0f207cbb
Update BuildGameObjectAnimation.js
2020-09-04 17:16:51 +01:00
Richard Davey
a2d395661c
GameObjects.Shape.Grid
would render a white fill even if you passed undefined
as the fill color in the constructor. It now doesn't render cells if no fill color is given.
2020-09-04 15:29:22 +01:00
Richard Davey
89332aad5f
You can now create Animations directly on Sprite
...
* `Component.Animation.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations.
* All playback methods: `play`, `playReverse`, `playAfterDelay` and `playAfterRepeat` will now check to see if the given animation key exists locally on the Sprite first. If it does, it's used, otherwise it then checks the global Animation Manager for the key instead.
* `Component.Animation.remove` is a new method that will remove a locally stored Animation instance from a Sprite.
* `Component.Animation.get` is a new method that will return a locally stored Animation instance from the Sprite.
* `Component.Animation.exists` is a new method that will check if a locally stored Animation exists on the Sprite.
* The internal `Component.Animation.remove` method has been renamed to `globalRemove`.
* `Component.Animation.textureManager` is a new property that references the global Texture Manager.
* `Component.Animation.anims` is a new property that contains locally created Animations in a Custom Map.
2020-09-04 14:03:57 +01:00
Richard Davey
cee9ca00eb
Improved docs
2020-09-04 13:58:34 +01:00
Richard Davey
66f4ab69e7
When playing an animation in reverse, if it reached the first frame and had to repeat, it would then jump to the frame before the final frame and carry on, skipping out the final frame.
2020-09-04 13:06:00 +01:00
Richard Davey
cebd1d0101
Tidy up order
2020-09-04 11:52:19 +01:00
Richard Davey
5979864dc4
Use new method name and parameter order
2020-09-04 11:50:13 +01:00
Richard Davey
858ae68841
Removed startFrame
, chain can take arrays, delayedPlay
rename, playAfterRepeat
method and playAfterDelay
method.
2020-09-04 11:49:16 +01:00
Richard Davey
afef6da59c
Exposed all of the new animation methods on a Sprite level
2020-09-04 11:48:17 +01:00
Richard Davey
1d798441f3
Support repeat count for stopping
2020-09-04 11:40:32 +01:00
Richard Davey
1a4b5b2779
AnimationManager.createFromAseprite
is a new method that allows you to use animations created in the Aseprite editor directly in Phaser.
2020-09-04 00:02:51 +01:00
Richard Davey
1515357039
Lots of updates (see full description)
...
* `Component.Animation.timeScale` is a new public property that replaces the old private `_timeScale` property.
* `Component.Animation.delay` is a new public property that replaces the old private `_delay` property.
* `Component.Animation.repeat` is a new public property that replaces the old private `_repeat` property.
* `Component.Animation.repeatDelay` is a new public property that replaces the old private `_repeatDelay` property.
* `Component.Animation.yoyo` is a new public property that replaces the old private `_yoyo` property.
* `Component.Animation.inReverse` is a new public property that replaces the old private `_reverse` property.
* `Component.Animation.startAnimation` is a new public method that replaces the old private `_startAnimation` method.
* The `Component.Animation.getProgress` method has been fixed so it will return correctly if the animation is playing in reverse.
* The `Component.Animation.remove` method will now always be called when an animation is removed, not just once.
* The `Component.Animation.getRepeat` method has now been removed. You can get the value from the `repeat` property.
* The `Component.Animation.setRepeatDelay` method has now been removed. You can set the value using the `repeatDelay` config property, or changing it at run-time.
* `Component.Animation.complete` is a new method that handles the completion in animation playback.
* The `Component.Animation.setTimeScale` method has now been removed. You can set the value using the `timeScale` config property, or changing it at run-time.
* The `Component.Animation.getTimeScale` method has now been removed. You can read the value using the `timeScale` property.
* The `Component.Animation.getTotalFrames` method has been fixed and won't error if called when no animation is loaded.
* The `Component.Animation.setYoyo` method has now been removed. You can set the value using the `yoyo` config property, or changing it at run-time.
* The `Component.Animation.getYoyo` method has now been removed. You can read the value using the `yoyo` property.
2020-09-03 17:56:22 +01:00
Richard Davey
13601ad31b
Removed completeAnimation
, load
and setFrame
and updated other methods to use new component properties.
2020-09-03 17:44:46 +01:00
Richard Davey
96bc2e89d3
Removed load
and fixed staggerPlay
2020-09-03 17:42:10 +01:00
Richard Davey
b4b5338f28
Added playReverse
, delayedPlay
and stop
methods and better docs.
2020-09-03 17:38:36 +01:00
Richard Davey
33cc87121c
The BuildGameObjectAnimation
function now uses the PlayAnimationConfig
object to set the values.
2020-09-03 17:37:21 +01:00
Richard Davey
050c2a61b6
Fixed data-type
2020-09-03 17:36:36 +01:00
Richard Davey
b9e5f3e9bc
GroupCreateConfig
, which is used when calling Group.createMultiple
or Group.createFromConfig
, can now accept the following new properties: setOrigin: { x, y, stepX, stepY }
which are applied to the items created by the Group.
2020-09-03 17:36:05 +01:00
Richard Davey
f505f6a3e3
Actions.setOrigin
will now call updateDisplayOrigin
on the items array, otherwise the effects can't be seen when rendering.
2020-09-03 17:34:16 +01:00
samme
803c300ae4
Add ArcadeWorldConfig.fixedStep
2020-09-03 07:32:44 -07:00
Richard Davey
15c6e7718c
New Animation events
2020-09-03 15:04:09 +01:00
Richard Davey
28c6635ea3
Utils.Array.SortByDigits
is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits.
2020-09-03 15:01:55 +01:00
Richard Davey
bba8285665
Return type fix
2020-09-03 11:27:12 +01:00
Richard Davey
d92195a8b8
Default rotation as well
2020-09-02 22:55:51 +01:00
Richard Davey
1562525a51
When using Camera.setRenderToTexture
its zoom
value would be applied twice. Fix #4221
2020-09-02 22:50:27 +01:00
Richard Davey
cf17dbe7e9
Previously, the easeParams
array within a Tweens props
object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292
2020-09-02 22:27:40 +01:00
Richard Davey
5e9b629a97
Merge pull request #5284 from samme/feature/scene-resume-wake-reset-keys
...
Reset keys when scene sleeps or pauses
2020-09-02 21:50:42 +01:00
Richard Davey
070fc70fe7
Lint fix
2020-09-02 18:07:21 +01:00
Richard Davey
e01f310d16
Added new properties, support for config playback and better delayed handling
2020-09-02 17:56:09 +01:00
Richard Davey
a2f0c2e7e3
Added getTotalFrames
and calculateDuration
methods.
2020-09-02 17:43:44 +01:00
Richard Davey
90fbb0f13d
Updated jsdocs for play
to show it can take the new config
2020-09-02 17:41:43 +01:00
Richard Davey
fe74eb70f7
Create PlayAnimationConfig.js
2020-09-02 17:41:23 +01:00
Richard Davey
f58f94ecf6
Formatting
2020-09-02 14:42:26 +01:00
Richard Davey
ace0ee7bab
Fixed JSDoc event names
2020-09-02 12:34:58 +01:00
Richard Davey
8f8a90bedd
Utils.Array.StableSort
has been recoded. It's now based on Two-Screens stable sort 0.1.8 and has been updated to fit into Phaser better and no longer create any window bound objects. The inplace
function has been removed, just call StableSort(array)
directly now. All classes that used StableSort.inplace
have been updated to call it directly.
2020-09-02 12:24:27 +01:00
Richard Davey
27fd496e8f
Updated to stablesort 0.1.8 and recoded to fit our style. Removed inplace
static function.
2020-09-02 12:21:36 +01:00
Richard Davey
0d934c730e
Every single Tilemap.Component
function has now been made public. This means you can call the Component functions directly, should you need to, outside of the Tilemap system.
2020-09-02 11:54:24 +01:00
Richard Davey
2980a416c9
Merge pull request #5278 from samme/fix/arcade-body-resetFlags
...
Reset flags when resetting an Arcade Body
2020-09-02 11:11:34 +01:00
samme
288d023bab
Reset keys when scene sleeps or pauses #5281
2020-09-01 12:42:57 -07:00
Richard Davey
07865a5823
Final set of namespace changes. Fix #5062
2020-09-01 20:28:42 +01:00
samme
e194e9586f
Add delta arg to WORLD_STEP event
2020-09-01 11:33:31 -07:00
Richard Davey
d2cc809fdb
Exported functions to namespace
2020-09-01 18:56:01 +01:00
Richard Davey
da3f9b22c3
Exposed on the main API namespace
2020-09-01 18:38:57 +01:00
Richard Davey
302a49863b
Improved jsdocs
2020-09-01 18:38:44 +01:00
Richard Davey
5b96ade1c7
Types.GameObjects.Text.GetTextSizeObject
2020-09-01 18:38:35 +01:00
Richard Davey
506426f706
The Color.HSVToRGB
function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089
2020-09-01 18:06:23 +01:00
Richard Davey
02ac6bcb7d
If inputWindowEvents
is set in the Game Config, then the MouseManager
will now listen for the events on window.top
instead of just window
, which should help in situations where the pointer is released outside of an embedded iframe. Fix #4824
2020-09-01 17:51:17 +01:00
Richard Davey
4c353571ca
Removed protected status
2020-09-01 17:44:07 +01:00
Richard Davey
84a867c2ac
ArcadePhysics.disableUpdate
is a new method that will prevent the Arcade Physics World update
method from being called when the Scene updates. By disabling it, you're free to call the update method yourself, passing in your own delta and time values.
...
`ArcadePhysics.enableUpdate` is a new method that will make the Arcade Physics World update in time with the Scene update. This is the default, so only call this if you have specifically disabled it previously.
2020-09-01 17:42:38 +01:00
Richard Davey
d3778bb4bb
ArcadeWorldConfig.customUpdate
is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If true
the World update will never be called, allowing you to call it yourself from your own component. Close #5190
2020-09-01 17:42:19 +01:00
Richard Davey
18cdb5e618
The Animation.play
and playReverse
methods have a new optional parameter timeScale
. This allows you to set the Animations time scale as you're actually playing it, rather than having to chain two calls together. Close #3963
2020-09-01 17:00:16 +01:00
Richard Davey
6aef37572d
WebGLRenderer.previousPipeline
is a new property that is set during a call to clearPipeline
and used during calls to rebindPipeline
, allowing the renderer to rebind any previous pipeline, not just the Multi Pipeline.
...
The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well.
2020-09-01 13:05:31 +01:00
samme
11c0520d36
Clear wasTouching when resetting body
2020-08-29 11:56:15 -07:00
Richard Davey
9451ac0285
Group.getMatching
is a new method that will return any members of the Group that match the given criteria, such as getMatching('visible', true)
2020-08-29 11:00:55 +01:00
samme
57ee895437
Reset flags during reset
2020-08-27 12:35:01 -07:00
Richard Davey
ab83fd7e38
Tween.seek
will no longer issue a console warning for 'Tween.seek duration too long'
, it's now up to you to check on the performance of tween seeking.
2020-08-26 13:50:54 +01:00
Richard Davey
80c571963c
Textures.Parsers.JSONHash
will now perform a hasOwnProperty
check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from JSON.parse
. Fix #4768
2020-08-26 13:06:04 +01:00
Richard Davey
55e56b1eff
Clock.addEvent
can now take an existing TimerEvent
object, as well as a config object. If a TimerEvent
is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115
...
`Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock.
2020-08-26 10:58:06 +01:00
Richard Davey
809b8a41d9
The WebGLRenderer.updateCanvasTexture
method will now set gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL
to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064
2020-08-26 00:19:19 +01:00
Richard Davey
791704febe
WebGLRenderer.finalType
is a new boolean property that signifies if the current Game Object being rendered is the final one in the list.
2020-08-25 18:24:42 +01:00
Richard Davey
0bbe67dafd
When using the GameObjectCreator
for Containers
you can now specify the children
property in the configuration object.
2020-08-25 15:51:11 +01:00
Richard Davey
de0133e3cc
Spine Game Objects can now be rendered to Render Textures. Fix #5184
2020-08-25 14:11:37 +01:00
Richard Davey
ca99c4564f
Added reset
property to Bind to get new vertex attrib locations
2020-08-25 13:24:56 +01:00
Richard Davey
e4ec0bd182
Bumped version (and added source-map)
2020-08-25 13:24:20 +01:00
Richard Davey
7d1ad38b4a
Updated shader names
2020-08-25 13:23:59 +01:00
Richard Davey
7e572c3577
Improves JSDocs
2020-08-25 09:54:09 +01:00
Richard Davey
1f50b49eff
Earcut has now been exposed and is available via Geom.Polygon.Earcut
and is fully documented.
2020-08-25 09:54:03 +01:00
Richard Davey
795a190ce3
The BaseShader
default vertex shader now includes the outTexCoord
vec2 varying, mapped to be the same as that found in the pipeline shaders. Fix #5120
2020-08-24 19:51:20 +01:00
Richard Davey
cda4f05fb9
Merge pull request #5272 from jaabberwocky/fix-animationmanager-docs
...
Fix typo for documentation on create method of AnimationManager
2020-08-24 19:33:33 +01:00
Richard Davey
157be83f7c
The Container
will now test to see if any Game Object added to it is already on the display list, or not, and emit its ADDED and REMOVED events accordingly. Fix #5267 #3876
2020-08-24 19:26:19 +01:00
Richard Davey
3bd91ea3de
Update ParticleManagerCreator.js
2020-08-24 19:24:11 +01:00
Richard Davey
a9072cadf2
Sprite
, Rope
, ParticleEmitterManager
, Extern
and DOMElement
now all override the addedToScene
and removedFromScene
callbacks to handle further set-up tasks.
2020-08-24 19:24:02 +01:00
Richard Davey
f4259deb37
DOMElementFactory
, ExternFactory
, ParticleManagerFactor
, RopeFactory
and SpriteFactory
all no longer add the objects to the Update List, this is now handled by the ADDED events instead.
2020-08-24 19:22:58 +01:00
Richard Davey
7b83d31cae
The Update List
now uses the new checkQueue
property to ensure no duplicate objects are on the active list.
2020-08-24 19:21:35 +01:00
Richard Davey
7f5e4d4538
ProcessQueue.checkQueue
is a new boolean property that will make sure only unique objects are added to the Process Queue.
2020-08-24 19:21:01 +01:00
Richard Davey
19c4980c5b
GameObjectFactory.events
is a new property that references the Scene's Event Emitter. This is now used internally.
2020-08-24 19:20:20 +01:00
Richard Davey
0b9dd4aae7
GameObjectCreator.events
is a new property that references the Scene's Event Emitter. This is now used internally.
2020-08-24 19:19:19 +01:00
Richard Davey
671c92e450
Added addedToScene
and removedFromScene
methods
...
* `GameObject.addedToScene` is a new method that custom Game Objects can use to perform additional set-up when a Game Object is added to a Scene. For example, Sprite uses this to add itself to the Update List.
* `GameObject.removedFromScene` is a new method that custom Game Objects can use to perform additional tear-down when a Game Object is removed from a Scene. For example, Sprite uses this to remove themselves from the Update List.
* Game Objects no longer automatically remove themselves from the Update List during `preDestroy`. This should be handled directly in the `removedFromScene` method now.
2020-08-24 19:18:29 +01:00
Richard Davey
bc93416ec7
Added events property and new add and remove callbacks
...
* `DisplayList.events` is a new property that references the Scene's Event Emitter. This is now used internally.
* `DisplayList.addChildCallback` is a new method that overrides the List callback and fires the new ADDED events.
* `DisplayList.removeChildCallback` is a new method that overrides the List callback and fires the new REMOVED events.
2020-08-24 19:15:53 +01:00
Richard Davey
ae4ed0ac54
Expose the new events
2020-08-24 19:13:18 +01:00
Richard Davey
48f94be449
Scenes.Events.REMOVED_FROM_SCENE
is a new event, emitted by a Scene, when it a Game Object is removed from the display list in the Scene, or a Container that is on the display list.
2020-08-24 19:13:06 +01:00
Richard Davey
1423ade7b3
Scenes.Events.ADDED_TO_SCENE
is a new event, emitted by a Scene, when a new Game Object is added to the display list in the Scene, or a Container that is on the display list.
2020-08-24 19:12:54 +01:00
Richard Davey
98cd70cd6c
GameObjects.Events.REMOVED_FROM_SCENE
is a new event, emitted by a Game Object, when it is removed from a Scene, or a Container that is part of the Scene.
2020-08-24 19:11:22 +01:00
Richard Davey
ef91518da5
GameObjects.Events.ADDED_TO_SCENE
is a new event, emitted by a Game Object, when it is added to a Scene, or a Container that is part of the Scene.
2020-08-24 19:10:50 +01:00
tobias
9f1cd22882
Fix typo for documentation on create method of AnimationManager on line 190
2020-08-25 00:43:22 +08:00
Richard Davey
e93d36f38e
The Pointer.getDuration
method now uses the new Pointer downTime
and upTime
values, meaning it will accurately report the duration of when any button is being held down, not just the primary one. Fix #5112
...
* `Pointer.downTime` now stores the event timestamp of when the first button on the input device was pressed down, not just when button 1 was pressed down.
* `Pointer.upTime` now stores the event timestamp of when the final depressed button on the input device was released, not just when button 1 was released.
2020-08-24 17:32:21 +01:00
Richard Davey
2af65b2a1d
Improved JSDocs and types. Fix #5217
2020-08-24 15:04:00 +01:00
Richard Davey
1766f66984
Update JSDocs
2020-08-24 14:58:24 +01:00
Richard Davey
f586cd472a
global.Phaser = Phaser
has been removed, as it's no longer required by the UMD loader, which should make importing in Angular 10 easier. Fix #5212
2020-08-24 14:47:53 +01:00
halilcakar
7593a80880
Merge branch 'master' of https://github.com/photonstorm/phaser
2020-08-22 13:25:32 +03:00
Richard Davey
3484ded2b7
You can now use this.renderer
from within a Scene, as it's now a Scene-level property and part of the Injection Map.
2020-08-22 10:33:46 +01:00
Richard Davey
0cd4d0fc54
Update WebGLRenderer.js
2020-08-21 16:23:04 +01:00
Richard Davey
9a1dc640f8
Fix gl access
2020-08-21 16:17:29 +01:00
Richard Davey
0dd07333af
Updated to use MultiPipeline
2020-08-21 16:14:59 +01:00
Richard Davey
5c39254f36
Testing new config approach
2020-08-21 16:04:26 +01:00
Richard Davey
209b39b38c
New pipeline names and single texture flag
2020-08-21 16:03:29 +01:00
Richard Davey
468c03dfe5
Much better docs and handling of config values
2020-08-21 16:03:07 +01:00
Richard Davey
4b4af50ca9
Quicker return
2020-08-21 16:02:43 +01:00
Richard Davey
37fdde7911
New typedefs for pipeline configs
2020-08-21 16:02:30 +01:00
Richard Davey
600385ac29
A brand new pipeline for single-texture custom pipelines
2020-08-21 16:01:53 +01:00
Richard Davey
57040554ef
Renamed the pipelines to make them less ambiguous and sorted out lots of config properties
2020-08-21 16:01:39 +01:00
Richard Davey
8f5ee5391f
Removed redundant consts
2020-08-21 15:59:41 +01:00
Richard Davey
6435772646
Shaders renamed to match new pipeline names
2020-08-21 15:41:12 +01:00
Richard Davey
14ad202adc
Use new Utils function
2020-08-21 09:44:52 +01:00
Richard Davey
8edbbb2e2d
Renderer.WebGL.Utils.parseFragmentShaderMaxTextures
is a new function that will take fragment shader source and search it for %count%
and %forloop%
declarations, replacing them with the required GLSL for multi-texture support, returning the modified source.
2020-08-21 09:44:43 +01:00
Rex
29e317db39
Get ascent and descent from context.measureText method
...
Get ascent and descent from context.measureText method instead of scanning image data.
2020-08-21 10:42:24 +08:00
halilcakar
8aa54e86a0
Remove console.log
2020-08-20 23:29:15 +03:00
halilcakar
b4e1b5af77
Fix for #5019
2020-08-20 15:27:29 +03:00
Richard Davey
84ef02743b
The WebGL Renderer will now add the pipelines during the boot
method, instead of init
.
2020-08-20 10:48:30 +01:00
Richard Davey
e3142f313f
WebGLPipeline.hasBooted
is a new boolean property that tracks if the pipeline has been booted or not, which is now far more important in 3.5 than in previous versions. This is checked in the WebGLRenderer.addPipeline
method, and if not set, the pipeline is booted. Fix #5251 #5255
2020-08-20 10:47:21 +01:00
Richard Davey
50c629dca8
Merge branch 'master' of https://github.com/photonstorm/phaser
2020-08-20 10:22:43 +01:00
Richard Davey
8c55fc7ee2
TweenManager.getTweensOf
has a new parameter includePending
. If set, it will also check the pending tweens for the given targets and return those in the results as well. Fix #5260
2020-08-20 10:22:35 +01:00
Richard Davey
ed33253fb1
Merge pull request #5235 from mk360/text-padding
...
[types] allow Text#setPadding to receive an object
2020-08-20 10:04:35 +01:00
Richard Davey
c98a43c9d4
Merge pull request #5258 from khasanovbi/font
...
Allow to pass font in TextStyle
2020-08-20 10:03:02 +01:00
Richard Davey
733de64d46
Merge pull request #5257 from halilcakar/master
...
Fix incorrect event names in ProcessQueue.js#205, 222
2020-08-20 09:57:08 +01:00
Richard Davey
ab605eed78
Remove false import
2020-08-19 13:19:07 +01:00
Richard Davey
b1b8a74cf9
RenderTexture.fill
would fail to fill the correct area under WebGL if the RenderTexture wasn't the same size as the Canvas. It now fills the given region properly.
2020-08-19 13:14:36 +01:00
Richard Davey
2db1496511
Geom.Polygon.Simplify
is a new function that takes a polygon and simplifies the points by running them through a combination of Douglas-Peucker and Radial Distance algorithms, potentially dramatically reducing the number of points while retaining its shape.
2020-08-18 18:05:45 +01:00
Richard Davey
305ea40baf
Update GetRaysFromPointToPolygon.js
2020-08-18 18:05:38 +01:00
Richard Davey
616dbfceb5
Earcut, used for polygon triangulation, has been updated from 2.1.4 to 2.2.2.
2020-08-18 17:24:45 +01:00
Richard Davey
995cfb6271
Expose new function
2020-08-18 17:05:12 +01:00
Richard Davey
74f24a06f3
Use new GetLineToPoints function
2020-08-18 17:05:06 +01:00
Richard Davey
1a1275958f
Only test unique angles
2020-08-18 17:04:55 +01:00
Richard Davey
4678fc7186
Geom.Intersects.GetLineToPoints
is a new function that checks for the closest point of intersection between a line segment and an array of points, where each pair of points form a line segment.
2020-08-18 17:04:32 +01:00
Richard Davey
06c92f9af8
Geom.Intersects.GetRaysFromPointToPolygon
is a new function that emits rays out from the given point and detects for intersection against all given polygons, returning the points of intersection in the results array.
2020-08-17 15:05:46 +01:00
Richard Davey
ceb96665b8
Bumped version
2020-08-17 15:05:39 +01:00
mk360
748e699d43
update setPadding jsdoc
2020-08-10 08:21:26 +03:00
Bulat Khasanov
8e1b5e757d
Allow to pass font in TextStyle
2020-08-09 23:34:31 +03:00
halilcakar
6915fd3420
Fix incorrect event names in ProcessQueue.js#205, 222
2020-08-09 19:55:09 +03:00
Svipal
40a26256c4
oop
2020-08-09 15:55:00 +02:00
Svipal
809d0b7495
merged master
2020-08-09 13:13:09 +02:00
Svipal
241d4193e8
let's try again
2020-08-09 12:33:52 +02:00
Svipal
97bb9b4a8f
bad bad idea
2020-08-09 12:33:26 +02:00
Svipal
c77731d127
bad idea
2020-08-09 12:24:56 +02:00
Svipal
b4a1473fea
test
2020-08-09 12:13:29 +02:00
Svipal
a72efc8ac8
Update ParseTileLayers.js
2020-08-09 11:50:25 +02:00
Richard Davey
7cc616c7b8
Bump version
2020-08-06 17:07:16 +01:00
Richard Davey
75da5b2f22
Reset all textures on rebind, which is what Externs need when finishing
2020-08-06 17:06:26 +01:00
Richard Davey
e77639561b
Use charIndex, not i
2020-08-06 17:06:10 +01:00
Richard Davey
6aaf54e8a7
Don't add frame if empty
2020-08-05 14:15:01 +01:00
Richard Davey
96a64eae4e
ParseXMLBitmapFont
has a new optional parameter texture
. If defined, this Texture is populated with Frame data, one frame per glyph. This happens automatically when loading Bitmap Text data in Phaser.
2020-08-05 12:46:28 +01:00
Richard Davey
d98d305e2f
Frame.setUVs
is a new method that allows you to directly set the canvas and UV data for a frame. Use this if you need to override the values set automatically during frame creation.
2020-08-05 12:45:07 +01:00
Richard Davey
a2c9c3cef6
Fix char right adjustment
2020-08-05 11:48:25 +01:00
Richard Davey
00e5c5fe0f
Update BitmapTextSize.js
2020-08-04 11:25:10 +01:00
Richard Davey
ee01d36918
Update BitmapTextCharacter.js
2020-08-04 11:25:07 +01:00
Richard Davey
1db3ba72f8
Cache shadow values
2020-08-04 11:25:03 +01:00
Richard Davey
50dcc624df
Get Character using char top, right and bottom
2020-08-04 11:24:56 +01:00
Richard Davey
1ae0cfc619
Include char top, right and bottom values
2020-08-04 11:24:43 +01:00
Richard Davey
380cc422b2
The ScaleManager.updateBounds
method is now called every time the browser fires a 'resize' or 'orientationchange' event. This will update the offset of the canvas element Phaser is rendering to, which is responsible for keeping input positions correct. However, if you change the canvas position, or visibility, via any other method (i.e. via an Angular route) you should call the updateBounds
method directly, yourself.
2020-08-04 10:35:29 +01:00
samme
981a4b1a0a
Rename all setInteractive() arguments, and docs
2020-08-03 13:33:30 -07:00
Richard Davey
0d04e40e28
Updated jsdocs
2020-08-03 17:54:40 +01:00
Richard Davey
111a4e1ce2
Calling Rectangle.setSize()
wouldn't change the underlying geometry of the Shape Game Object, causing any stroke to be incorrectly rendered after a size change.
2020-08-03 17:54:29 +01:00
Richard Davey
47a62cd30c
If you apply setSize
to the Dynamic BitmapText the scissor is now calculated based on the parent transforms, not just the local ones, meaning you can crop Bitmap Text objects that exist within Containers. Fix #4653
2020-08-03 11:33:41 +01:00
Richard Davey
2f574070d5
Setting the color
value in the DynamicBitmapText.setDisplayCallback
would inverse the red and blue channels if the color was not properly encoded for WebGL. It is now encoded automatically, meaning you can pass normal hex values as the colors in the display callback. Fix #5225
2020-08-03 10:53:27 +01:00
Richard Davey
0402717834
Expose new function
2020-08-03 10:49:27 +01:00
Richard Davey
ec845ce015
Use GetColorFromValue
2020-08-03 10:49:05 +01:00
Richard Davey
6a32ff56f3
Display.Color.GetColorFromValue
is a new function that will take a hex color value and return it as an integer, for use in WebGL. This is now used internally by the Tint component and other classes.
2020-08-03 10:48:52 +01:00
Richard Davey
0266c7f0a2
Updated docs #5231
2020-08-03 10:37:01 +01:00
Richard Davey
8db2543e27
Merge pull request #5242 from samme/fix/collide-with-friction
...
Fix collisions for objects moved by friction
2020-08-03 10:27:01 +01:00
Richard Davey
08e346952a
Merge pull request #5234 from samme/patch-4
...
Docs: Phaser.Physics.Arcade.Group#defaults
2020-08-03 10:23:15 +01:00
Richard Davey
da05cfa1ad
Merge pull request #5244 from 16patsle/Fix_Text_types
...
Fix types for Text, TextFactory and TextCreator
2020-08-03 10:20:40 +01:00
Richard Davey
c9330fd469
Merge pull request #5241 from samme/docs/add-existing
...
Docs: generic return for add.existing()
2020-08-03 10:19:42 +01:00
Richard Davey
4ac240f280
Added String.RemoveAt
2020-08-02 23:52:45 +01:00
Richard Davey
2810396dc7
The KeyboardPlugin
will now track the key code and timestamp of the previous key pressed and compare it to the current event. If they match, it will skip the event. On some systems if you were to type quickly, you would sometimes get duplicate key events firing (the exact same event firing more than once). This is now prevented from happening.
2020-08-01 21:06:42 +01:00
Richard Davey
c4000843ec
The KeyboardManager
and KeyboardPlugin
were both still checking for the InputManager.useQueue
property, which was removed several versions ago.
2020-08-01 20:54:45 +01:00
Richard Davey
fccd00e8c5
Remove deprecated events
2020-08-01 20:32:50 +01:00
Patrick Sletvold
edf0c17703
Use TextPadding type in Text game object
2020-08-01 13:35:02 +02:00
Patrick Sletvold
87e8eba213
Correctly type style in TextFactory
2020-08-01 13:34:37 +02:00
Patrick Sletvold
a525e43dcf
Add TextConfig type for TextCreator
2020-08-01 13:34:07 +02:00
Richard Davey
42d6456993
Encode dropshadow color
2020-08-01 11:24:26 +01:00
Richard Davey
959645d1f0
Always render drop shadow behind text
2020-08-01 11:24:15 +01:00
Richard Davey
22e8d22e3f
BitmapText.setWordTint
is a new method that allows you to set a tint color (either additive, or fill) on all matching words within a static Bitmap Text. You can specify the word by string, or numeric offset, and the number of replacements to tint.
2020-07-31 18:36:27 +01:00
Richard Davey
b9407967e3
If you give an invalid Bitmap Font key, the Bitmap Text object will now issue a console.warn
.
2020-07-31 18:00:31 +01:00
Richard Davey
79e985dd93
Updated docs
2020-07-31 17:09:40 +01:00
Richard Davey
c0109c1ec9
BatchChar
is a new internal private function for batching a single character of a Bitmap Text to the pipeline.
2020-07-31 16:54:29 +01:00
Richard Davey
2e378b68d1
Apply the dropShadow
2020-07-31 16:39:21 +01:00
Richard Davey
c228dd596a
BitmapText.setDropShadow
is a new method that allows you to apply a drop shadow effect to a Bitmap Text object. You can set the horizontal and vertical offset of the shadow, as well as the color and alpha levels. Call this method with no parameters to clear a shadow.
2020-07-31 16:39:05 +01:00
Richard Davey
aac2276692
BitmapText.preDestroy
is a new method that will tidy-up all of the BitmapText data during object destruction.
2020-07-31 16:22:53 +01:00
Richard Davey
7ce39b991c
Removed un-used properties
2020-07-31 16:17:36 +01:00
Richard Davey
9419606f12
BitmapText.setCharacterTint
is a new method that allows you to set a tint color (either additive, or fill) on a specific range of characters within a static Bitmap Text. You can specify the start and length offsets and a per-corner tint color.
2020-07-31 16:17:23 +01:00
Richard Davey
fc6e7ef759
Removed un-used properties
2020-07-31 15:46:05 +01:00
Richard Davey
2ef28cd0e4
Added getXRound
and getYRound
2020-07-31 15:45:55 +01:00
Richard Davey
4baa0522b9
Bumping to 3.50
2020-07-31 13:41:29 +01:00
Richard Davey
d16d8dc9ce
BitmapTextWebGLRenderer
has been rewritten from scratch to make use of the new pre-cached WebGL uv texture and character location data generated by GetBitmapTextSize
. This has reduced the number of calculations made in the function dramatically, as it no longer has work out glyph advancing or offsets during render, but only when the text content updates.
2020-07-31 13:39:49 +01:00
Richard Davey
49682e744d
Update BitmapText.js
2020-07-31 13:34:50 +01:00
Richard Davey
72654e04d3
Fixed bounds sizes
2020-07-31 13:34:28 +01:00
Richard Davey
c166976fcc
Update BitmapTextCharacter.js
2020-07-31 12:06:57 +01:00
Richard Davey
a4577e2135
The GetBitmapTextSize
function has a new boolean parameter updateOrigin
, which will adjust the origin of the parent BitmapText if set, based on the new bounds calculations.
2020-07-31 12:06:45 +01:00
Richard Davey
a682b83b7c
BitmapText.getCharacterAt
is a new method that will return the character data from the BitmapText at the given x
and y
corodinates. The character data includes the code, position, dimensions and glyph information.
2020-07-31 11:36:48 +01:00
Richard Davey
a72fdd44f8
Bumping to 3.50
2020-07-31 11:32:47 +01:00
Richard Davey
e195aac919
ParseXMLBitmapFont
will now calculate the WebGL uv data for the glyphs during parsing. This avoids it having to be done during rendering, saving CPU cycles on an operation that never changes.
2020-07-31 11:32:37 +01:00
Richard Davey
0385d108a8
Transform.getLocalPoint
is a new method, available on all Game Objects, that takes an x
/ y
pair and translates them into the local space of the Game Object, factoring in parent transforms and display origins.
2020-07-31 10:28:09 +01:00
Richard Davey
214b383fcd
Use correct scale and added start of getCharacterAt method
2020-07-30 23:59:06 +01:00
Richard Davey
a39bcfe69a
Always return chars
2020-07-30 22:38:06 +01:00
Richard Davey
a678f723c6
Always calculate includeChars
2020-07-30 22:37:34 +01:00
Richard Davey
1579069c50
Pixel accurate character data
2020-07-30 18:24:04 +01:00
Richard Davey
eef67b6c11
Update BitmapTextWebGLRenderer.js
2020-07-30 18:23:50 +01:00
Richard Davey
77feb773fd
Fixed descriptions
2020-07-30 18:23:45 +01:00
Richard Davey
bf4c475e85
Floor drawFillRect values
2020-07-30 18:10:23 +01:00
Richard Davey
b108cd03f0
Fix call to GetBitmapTextSize
2020-07-30 15:43:43 +01:00
Richard Davey
408a545aac
BitmapTextWord
, BitmapTextCharacter
and BitmapTextLines
are three new type defs that are now part of the BitmapTextSize
config object, as returned by getTextBounds
. This improves the TypeScript defs and JS Docs for this object.
2020-07-30 15:24:49 +01:00
Richard Davey
286be7df49
The GetBitmapTextSize
and BitmapText.getTextBounds
functions have a new boolean parameter includeChars
. When set to true
it will include a characters
array in the returned bounds object that contains the scaled position coordinates of each character in the BitmapText, which you could use for tasks such as determining which character of the object was clicked.
2020-07-30 15:14:25 +01:00
Richard Davey
cc3d3f7da3
The GetBitmapTextSize
function used Math.round
on the values, if the round
parameter was true
, which didn't create integers. It now uses Math.ceil
instead to give integer results.
2020-07-30 14:47:31 +01:00
Richard Davey
841389628e
The BitmapText.getTextBounds
method was being called every frame, even if the bounds didn't change, potentially costing a lot of CPU depending on the text length and quantity of them. It now only updates the bounds if they change.
2020-07-30 14:46:32 +01:00
Richard Davey
ce9c750175
Geom.Polygon.Translate
is a new function that allows you to translate all the points of a polygon by the given values.
2020-07-30 12:58:35 +01:00
samme
f653a51cc0
Docs: generic return for add.existing()
2020-07-29 12:19:09 -07:00
Richard Davey
ee92d1dac9
Geom.Intersects.GetLineToPolygon
is a new function that checks for the closest point of intersection between a line segment and an array of polygons.
2020-07-29 18:12:40 +01:00
Richard Davey
771509d6c2
Phaser.Types.Math.Vector4Like
is a new data type representing as Vector 4 like object.
2020-07-29 17:42:12 +01:00
Richard Davey
23c00d148d
Phaser.Types.Math.Vector3Like
is a new data type representing as Vector 3 like object.
2020-07-29 17:41:59 +01:00
Richard Davey
517183fd2e
Geom.Intersects.GetLineToLine
is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the z
property holding the distance value.
2020-07-29 17:15:57 +01:00
mk360
a7371b9a85
[types] allow Text#setPadding to receive an object
2020-07-24 18:48:17 +03:00
Richard Davey
41c76d88b1
Beta tag
2020-07-24 15:34:00 +01:00
Richard Davey
fb1306e8f2
The MatterAttractors
plugin, which enables attractors between bodies, has been fixed. The original plugin only worked if the body with the attractor was _first_ in the world bodies list. It can now attract any body, no matter where in the world list it is. Fix #5160
2020-07-23 18:06:17 +01:00
samme
7685067310
Docs: Phaser.Physics.Arcade.Group#defaults
...
#4171 , #5153
2020-07-23 09:48:53 -07:00
Richard Davey
86f35ef9cf
Updated docs
2020-07-23 17:35:47 +01:00
Richard Davey
b6b570fb91
Merge pull request #5233 from samme/patch-3
...
Docs: protect ScaleManager#onFullScreenChange
2020-07-23 17:10:14 +01:00
Richard Davey
b51a40c1a1
Update RenderTexture.js
2020-07-23 17:01:37 +01:00
Richard Davey
bb3b67c16f
Update RenderTextureWebGLRenderer.js
2020-07-23 17:01:25 +01:00
Richard Davey
c31a9ad4e5
WebGLRenderer.unbindTextures
is a new method that will activate and then null bind all WebGL textures.
2020-07-23 16:24:44 +01:00
Richard Davey
556b5b05be
Update TextureSource.js
2020-07-23 16:23:14 +01:00
Richard Davey
9607ce89c7
Update RenderTextureWebGLRenderer.js
2020-07-23 16:22:46 +01:00
Richard Davey
9b278554d3
RenderTexture.resize
(which is called from setSize
) wouldn't correctly set the TextureSource.glTexture
property, leading to bindTexture: attempt to use a deleted object
errors under WebGL.
2020-07-23 16:22:38 +01:00
samme
02f6c51ff5
Docs: protect ScaleManager#onFullScreenChange
...
#5229
2020-07-22 11:22:43 -07:00
Richard Davey
27426dd0b6
Testing RenderTextures (currently broken, will fix next week)
2020-07-17 18:08:39 +01:00
Richard Davey
0ff08a2994
Update RopeWebGLRenderer.js
2020-07-17 17:07:34 +01:00
Richard Davey
1eb3464f30
Use multi-texturing
2020-07-17 17:05:05 +01:00
Richard Davey
8210700124
Enable the pipelines again
2020-07-17 17:04:49 +01:00
Richard Davey
491ca62373
The TextureTintStripPipeline
now extends TextureTintPipeline
and just changes the topolgy, vastly reducing the filesize.
2020-07-17 17:04:40 +01:00
Richard Davey
8d976d6ed5
WebGLRenderer.textureFlush
is a new property that keeps track of the total texture flushes per frame.
2020-07-17 16:36:18 +01:00
Richard Davey
f3ebada1e0
Tidy up everything after rendering
2020-07-17 15:49:03 +01:00
Richard Davey
9280a73bf9
StaticTilemapLayer
now includes the ModelViewProjection
mixin, so it doesn't need to modify the pipeline during rendering.
2020-07-17 15:48:53 +01:00
Richard Davey
10c19bd24d
StaticTilemapLayer.upload
will now set the vertex attributes and buffer the data, and handles internal checks more efficiently.
2020-07-17 13:58:38 +01:00
Richard Davey
6e15f6b77d
Refactored to tidy it up and also now works with Light2D pipeline
2020-07-17 13:56:56 +01:00
Richard Davey
8bb49332a9
Always set rotation
2020-07-17 13:55:50 +01:00
Richard Davey
d11a16deaa
Added forceZero
and setAttribPointers
...
`WebGLPipeline.forceZero` is a new property that informs Game Objects if the pipeline requires a zero bound texture unit.
* `WebGLPipeline.setAttribPointers` is a new method that will set the vertex attribute pointers for the pipeline.
2020-07-17 13:55:39 +01:00
Richard Davey
dc04949d3d
Needs fixing tomorrow
2020-07-16 18:10:40 +01:00
Richard Davey
f89d53ca0d
Update DynamicTilemapLayerWebGLRenderer.js
2020-07-16 17:43:14 +01:00
Richard Davey
97f601f378
LightsManager.cull
now takes the viewport height from the renderer instead of the game config
2020-07-16 17:42:58 +01:00
Richard Davey
d942e2bd47
Update TextWebGLRenderer.js
2020-07-16 16:59:59 +01:00
Richard Davey
848377b8d8
The TileSprite Game Objects now support rendering with normal maps.
2020-07-16 16:59:53 +01:00
Richard Davey
fea1ade5b7
Update WebGLRenderer.js
2020-07-16 16:59:45 +01:00
Richard Davey
12fc51e2e2
If normal map set, advance the current active texture
2020-07-16 16:17:16 +01:00
Richard Davey
3dd6d8a1a4
Remove forceZero and added textureUnit
2020-07-16 16:16:57 +01:00
Richard Davey
5e8c28d468
Removed batchTexture as it's no longer needed
2020-07-16 16:16:42 +01:00
Richard Davey
68585f1718
The Text Game Object now supports rendering in Light2d, no matter which font, stroke or style it is using.
2020-07-16 16:16:26 +01:00
Richard Davey
76de5c246a
Update ForwardDiffuseLightPipeline.js
2020-07-16 15:51:12 +01:00
Richard Davey
6aba9e71b1
All Shape Game Objects (Rectangle, IsoBox, Star, Polygon, etc) now support rendering in Light2d.
2020-07-16 15:51:07 +01:00
Richard Davey
786f78e91d
Particle Emitter Game Objects now support rendering in Light2d.
2020-07-16 15:32:06 +01:00
Richard Davey
71d85be0df
Mesh and Quad Game Objects now support rendering with normal maps.
2020-07-16 15:25:06 +01:00
Richard Davey
e7957b9380
Added getNormalMap and setGameObject
2020-07-16 15:18:02 +01:00
Richard Davey
f7e6847027
Added setGameObject method and currentUnit property
2020-07-16 15:16:17 +01:00
Richard Davey
5986f8f080
Tidying
2020-07-16 15:16:01 +01:00
Richard Davey
6c9a5f62a6
Uses setGameObject
to support Light2D
2020-07-16 15:15:48 +01:00
Richard Davey
b4f0c9fde2
Uses setGameObject
to support Light2D
2020-07-16 15:15:33 +01:00
Richard Davey
0c411e9e7e
Removed currentUnit and batchSprite forceZero
2020-07-16 15:13:47 +01:00
Richard Davey
85f63c4a19
WebGLRenderer.isNewNormalMap
is a new method that returns a boolean if the given parameters are not currently used.
2020-07-16 15:11:43 +01:00
Richard Davey
5db55a85d7
The Graphics Game Objects now support rendering in Light2d. You can even use normal map textures for the texture fills.
2020-07-16 15:10:45 +01:00
Richard Davey
38e7495b61
Fixed default normal map so all Game Objects will now render
...
* The pipeline now works with Game Objects that do not have a normal map. They will be rendered using the new default normal map, which allows for a flat light effect to pass over them and merge with their diffuse map colors.
2020-07-16 11:04:10 +01:00
Richard Davey
93d0378143
Added missing jsdocs
2020-07-16 11:03:49 +01:00
Richard Davey
c973f41fcc
Added setters and dirty check
...
* `Light.dirty` is a new property that controls if the light is dirty, or not, and needs its uniforms updating.
* `Light` has been recoded so that all of its properties are now setters that activate its `dirty` flag.
2020-07-16 03:26:32 +01:00
Richard Davey
1146e6f7a3
LightsManager.destroy
will now clear the lightPool
array when destroyed, where-as previously it didn't.
2020-07-16 03:25:25 +01:00
Richard Davey
84968f502f
Update ForwardDiffuseLightPipeline.js
...
* The pipeline will no longer look-up and set all of the light uniforms unless the `Light` is dirty.
* The pipeline will no longer reset all of the lights unless the quantity of lights has changed.
2020-07-16 03:24:19 +01:00
Richard Davey
3b9d115d0c
Reset just units 0 and 1
2020-07-16 03:13:47 +01:00
Richard Davey
d7cf9da819
Added location cache
2020-07-16 03:13:10 +01:00
Richard Davey
5059045c76
Cache attribute location
...
* `WebGLPipeline.boot` will now check all of the attributes and store the pointer location within the attribute entry.
* `WebGLPipeline.bind` no longer looks-up and enables every attribute, every frame. Instead it uses the cached pointer location stored in the attribute entry, cutting down on redundant WebGL operations.
2020-07-16 03:12:53 +01:00
Richard Davey
4ab9604102
Lots of updates to this pipeline
...
* The `ForwardDiffuseLightPipeline.defaultNormalMap` property has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.boot` method has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.onBind` method has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.setNormalMap` method has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.bind` is a new method that handles setting-up the shader uniforms.
* The `ForwardDiffuseLightPipeline.batchTexture` method has been rewritten to use the Texture Tint Pipeline function instead.
* The `ForwardDiffuseLightPipeline.batchSprite` method has been rewritten to use the Texture Tint Pipeline function instead.
2020-07-16 02:15:53 +01:00
Richard Davey
1f3b79cf11
Normal map additions
...
* `WebGLRenderer.normalTexture` is a new property that holds the currently bound normal map (texture unit one).
* `WebGLRenderer.setNormalMap` is a new method that sets the current normal map texture.
* `WebGLRenderer.clearNormalMap` is a new method that clears the current normal map texture.
* `WebGLRenderer.resetTextures` is a new method that flushes the pipeline, resets all textures back to the temporary ones and resets the active texture counter.
2020-07-16 02:15:01 +01:00
Richard Davey
c6ffa0620e
TextureTintPipeline.batchSprite
and batchTexture
has new parameters forceZero
which forces use of texture unit zero.
2020-07-16 02:13:08 +01:00
Richard Davey
0b3f125ee0
Removed the Deferred Diffuse fragment and vertex shaders from the project, as they're not used.
2020-07-16 00:21:44 +01:00
Richard Davey
94d333ee1e
Use new texture unit
2020-07-16 00:00:49 +01:00
Richard Davey
d34d52550d
Renders using setTextureZero
2020-07-15 18:03:57 +01:00
Richard Davey
99af20aa68
The Particle Emitter Game Object WebGL Renderer function has been updated to support multi-texture units.
2020-07-15 18:03:36 +01:00
Richard Davey
9e9e45261f
Added setTextureZero and clearTextureZero
...
* `WebGLRenderer.setTextureZero` is a new method that activates texture zero and binds the given texture to it. Useful for fbo backed game objects.
* `WebGLRenderer.clearTextureZero` is a new method that clears the texture tha was bound to unit zero.
* `WebGLRenderer.textureZero` is a new property that holds the currently bound unit zero texture.
2020-07-15 18:03:03 +01:00
Richard Davey
216d7cb1fa
Updated WebGLRenderer to support new texture assignment
...
* The property `WebGLRenderer.currentActiveTextureUnit` has been renamed to `currentActiveTexture`.
* `WebGLRenderer.startActiveTexture` is a new read-only property contains the current starting active texture unit.
* `WebGLRenderer.maxTextures` is a new read-only property that contains the maximum number of texture units WebGL can use.
* `WebGLRenderer.textureIndexes` is a new read-only array that contains all of the available WebGL texture units.
* `WebGLRenderer.tempTextures` is a new read-only array that contains temporary WebGL textures.
* The `WebGLRenderer.currentTextures` property has been removed, as it's no longer used.
* `WebGLRenderer.currentTextures` has been removed, as it's no longer used internally.
* `WebGLRenderer.setBlankTexture` no longer has a `force` parameter, as it's set by default.
* `WebGLRenderer.setTextureSource` is a new method, used by pipelines and Game Objects, that will assign a texture unit to the given Texture Source.
* The `WebGLRenderer.setTexture2D` method has been updated to use the new texture unit assignment. It no longer takes the `textureUnit` or `flush` parameters and these have been removed from its method signature.
2020-07-15 17:11:01 +01:00
Richard Davey
9c76ec0389
Large TextureTintPipeline refactor
...
* The Texture Tint vertex and fragment shaders have been updated to support the `inTexId` float attribute and dynamic generation.
* The Texture Tint Pipeline has a new attribute, `inTexId` which is a `gl.FLOAT`.
* `TextureTintPipeline.bind` is a new method that sets the `uMainSampler` uniform.
* The `TextureTintPipeline.requireTextureBatch` method has been removed, as it's no longer required.
* The `TextureTintPipeline.pushBatch` method has been removed, as it's no longer required.
* The `TextureTintPipeline.maxQuads` property has been removed, as it's no longer required.
* The `TextureTintPipeline.batches` property has been removed, as it's no longer required.
* `TextureTintPipeline.flush` has been rewritten to support multi-textures.
* `TextureTintPipeline.flush` no longer creates a sub-array if the batch is full, but instead uses `bufferData` for speed.
* `TextureTintPipeline.currentUnit` is a new property that holds the most recently assigned texture unit. Treat as read-only.
2020-07-15 17:05:55 +01:00
Richard Davey
3ede28230b
Update WebGLPipeline.js
2020-07-15 16:54:18 +01:00
Richard Davey
a21641e19b
The Dynamic Bitmap Text Game Object WebGL Renderer function has been updated to support multi-texture units.
2020-07-15 16:54:04 +01:00
Richard Davey
50f10b3d4b
The Bitmap Text Game Object WebGL Renderer function has been updated to support multi-texture units.
2020-07-15 16:53:48 +01:00
Richard Davey
446389bb4d
The Blitter Game Object WebGL Renderer function has been updated to support multi-texture units.
2020-07-15 16:53:25 +01:00
Richard Davey
ec0914cd0f
The Mesh Game Object WebGL Renderer function has been updated to support multi-texture units.
2020-07-15 16:53:09 +01:00
Richard Davey
c0504e4fc1
WebGL.Utils.checkShaderMax
is a new function, used internally by the renderer, to determine the maximum number of texture units the GPU + browser supports.
2020-07-15 16:52:26 +01:00
Richard Davey
fd305591ec
Added glIndex and glIndexCounter properties
2020-07-15 16:52:01 +01:00
Richard Davey
477b847f13
Config.render.maxTextures
is a new game config setting that allows you to control how many texture units will be used in WebGL.
2020-07-15 16:51:40 +01:00
Richard Davey
7c742f95d2
Generate multi-texture shader source
2020-07-14 17:44:26 +01:00
Richard Davey
9a45517efd
Pass max textures to pipeline (disable other pipelines for now)
2020-07-14 17:44:17 +01:00
Richard Davey
587c23ec3c
Added maxGPUTextures
property
2020-07-14 17:43:56 +01:00
Richard Davey
76689942c0
Add texture ID to shaders
2020-07-14 17:43:29 +01:00
Richard Davey
43beca7bab
Create CheckShaderMax.js
2020-07-14 17:43:05 +01:00
Richard Davey
0003d278fd
Updated to use new external MVP functions
2020-07-14 16:49:30 +01:00
Richard Davey
06c1336f41
Removed all functions from MVP except init and update and made them all external
2020-07-14 16:49:16 +01:00
Richard Davey
a8faef6692
Created new Model View Projection functions
2020-07-14 16:48:01 +01:00
Richard Davey
5cc387b7df
Preparing for 3.25.0 dev
2020-07-14 16:47:43 +01:00
Richard Davey
dc13060042
Fixed namespace
2020-07-14 09:45:37 +01:00
Richard Davey
bbdf9b9853
Fixed data type
2020-07-14 09:45:30 +01:00
Richard Davey
d5296287b1
Fixed url type
2020-07-14 09:03:07 +01:00
Richard Davey
44f96de1fd
Bump version
2020-07-14 09:02:46 +01:00
Richard Davey
2a2a2eafe8
Reverted PR #5219 because it breaks camera zooming on tilemaps
2020-07-14 08:47:52 +01:00
Richard Davey
14c1a3ad99
The ISO Triangle shape would skip rendering the left side of the first triangle in the batch. It now renders all ISO Triangles correctly. Fix #5164
2020-07-13 14:45:58 +01:00
Richard Davey
af1198dcf5
Arcade.Components.Size.setBodySize
is a new method available on Arcade Physics Game Objects that allows you to set the body size. This replaces setSize
which is now deprecated. Fix #4786
2020-07-13 14:34:23 +01:00
Richard Davey
7d1ca6815f
Lint fixes
2020-07-13 14:16:52 +01:00
Richard Davey
40929a57e3
Calling getTextBounds
on a BitmapText object would return the incorrect values if the origin had been changed, but the text itself had not, as it was using out of date dimensions. Changing the origin now automatically triggers BitmapText to be dirty, forcing the bounds to be refreshed. Fix #5121
2020-07-13 14:06:06 +01:00
Richard Davey
64c58bc592
Updated docs. Fix #5128
2020-07-13 13:36:24 +01:00
Richard Davey
dea68135fd
Correct texture type. Fix #5199
2020-07-13 13:29:01 +01:00
Richard Davey
cbba26e08c
Merge pull request #5215 from cruzdanilo/layer-webgl-transform
...
StaticTilemapLayerWebGLRenderer: apply rotation and parent transform
2020-07-13 13:18:02 +01:00
Richard Davey
7fae62cbc8
Merge pull request #5213 from samme/fix/matter-setCrop
...
Fix setCrop() for Matter.Image and Matter.Sprite
2020-07-13 13:14:59 +01:00
Richard Davey
8080196800
Merge pull request #5207 from samme/feature/display-getBounds
...
Add Phaser.Display.Bounds.GetBounds()
2020-07-13 13:14:30 +01:00
Richard Davey
34edcff3fe
Merge pull request #5206 from samme/feature/math-RotateTo
...
Add Phaser.Math#RotateTo
2020-07-13 13:13:30 +01:00
Richard Davey
ab8ad19b1e
Merge pull request #5208 from samme/fix/arcade-physics-body-prev
...
Fix incorrect Arcade Body delta
2020-07-13 13:10:51 +01:00
Richard Davey
6bd24ded25
Merge pull request #5202 from samme/fix/arcade-physics-circular-collisions
...
separateCircle fixes
2020-07-13 13:07:39 +01:00
Richard Davey
6c7437cdc4
Merge pull request #5198 from samme/feature/KeyboardPlugin-removeAllKeys
...
Add KeyboardPlugin#removeAllKeys
2020-07-13 13:04:53 +01:00
Richard Davey
672c08ce99
Merge pull request #5197 from samme/x/startFullscreen
...
Fix startFullscreen() failure in Safari
2020-07-13 13:02:16 +01:00
Richard Davey
f7af980b1e
Fixed version number
2020-07-13 13:01:41 +01:00
Richard Davey
be158f48e6
Merge pull request #5194 from mikewesthad/types-fix-wordwrap
...
Update TextStyle to have jsdocs for word wrap related properties
2020-07-13 12:57:29 +01:00
Richard Davey
6374da052f
Fixed lint errors with PR #5193
2020-07-13 12:55:49 +01:00
Richard Davey
259b702df8
Merge pull request #5193 from scott20145/master
...
Fix nested mask behaviour for Phaser.CANVAS mode
2020-07-13 12:54:14 +01:00
Richard Davey
85e6c229b3
Updated docs for #5191
2020-07-13 12:51:36 +01:00
Richard Davey
60baaf7708
Made sure array was cleared on destroy #5159
2020-07-13 12:51:36 +01:00
Richard Davey
b8d12916e9
Merge pull request #5192 from MerganThePirate/master
...
Fixed bug from issue #5191
2020-07-13 12:47:23 +01:00
Richard Davey
1e0a25705e
Merge pull request #5186 from samme/feature/empty-timeline-config
...
Configure timeline without tweens
2020-07-13 12:45:08 +01:00
Richard Davey
7b7d897858
Merge pull request #5185 from samme/feature/tween-stop-event
...
Add tween 'stop' event and 'onStop' callback
2020-07-13 12:44:26 +01:00
Richard Davey
853feea355
Merge pull request #5183 from samme/feature/body-updateFromGameObject
...
Add Arcade.Body#updateFromGameObject
2020-07-13 12:39:45 +01:00
Richard Davey
31cdeac1ee
Merge pull request #5180 from rexrainbow/BugFix-EllipseCurve
...
Fix bug about setting xRadius/yRadius by width/height
2020-07-13 12:38:05 +01:00
Richard Davey
bdc206ab6d
Merge pull request #5175 from mikewesthad/master
...
Fix return type in Text#getTextMetrics: object -> TextMetric
2020-07-13 12:37:25 +01:00
Richard Davey
56084dfa89
Merge pull request #5172 from lozzajp/quick-doc-fix
...
Add info to the scene manager method headers where optional data goes.
2020-07-13 12:36:51 +01:00
Richard Davey
3d856fab51
Merge pull request #5169 from samme/misc/createSceneFromInstance
...
Refactor createSceneFromInstance()
2020-07-13 12:35:46 +01:00
Richard Davey
d83b14274d
Merge pull request #5166 from samme/feature/group-setActive-setName
...
Add Group#setActive(), Group#setName()
2020-07-13 12:34:03 +01:00
Richard Davey
0ecaed42ec
Merge pull request #5163 from samme/fix/headless-renderTexture
...
Fix error adding a Render Texture with Headless renderer
2020-07-13 12:32:53 +01:00
Richard Davey
f0cbfba8e5
Merge pull request #5161 from samme/fix/stopAndReleaseAudioTag
...
Fix error stopping HTML5AudioSound after page blur
2020-07-13 12:31:28 +01:00
Richard Davey
54841002eb
Merge pull request #5162 from samme/docs/arcade-physics-types
...
Add Arcade Physics types
2020-07-13 12:27:54 +01:00
Richard Davey
818343f452
Fixed lint errors with PR #5159
2020-07-13 12:20:10 +01:00
Richard Davey
8951211c74
Merge pull request #5159 from tgroborsch/feature/multi-anims-chain
...
Allow chaining of multible animations
2020-07-13 12:19:03 +01:00
Richard Davey
17e9a762a0
Merge pull request #5154 from samme/feature/camera-cull-opt
...
Tiny optimization for BaseCamera#cull
2020-07-13 12:18:04 +01:00
Richard Davey
bafae8424d
Merge pull request #5153 from samme/fix/create-group-from-children
...
Fix problems passing `children` to created group
2020-07-13 12:15:26 +01:00
Richard Davey
7fa6d17e17
Merge pull request #5150 from samme/fix/static-body-from-scaled-sprite
...
Fix static body position from scaled sprite
2020-07-13 12:13:13 +01:00
Richard Davey
b6fd158986
Container.getBounds
will no longer set the temp rect bounds to the first child of the Container by default (which would error if the child had no bounds, like a Graphics object) and instead sets it as it iterates the children
2020-07-13 12:12:28 +01:00
Richard Davey
a7ded1ee21
KeyboardPlugin.checkDown
didn't set the duration
to zero if the parameter was omitted, causing it to always return false. Fix #5146
2020-07-13 12:12:28 +01:00
Richard Davey
fe1f5f8eaf
Merge pull request #5139 from samme/feature/spritesheet-no-frames-warning
...
Print texture key in warning for zero frames
2020-07-13 12:07:12 +01:00
Richard Davey
6fddce1ef8
Merge pull request #5137 from samme/fix/decode-audio-error-msg
...
Fix 'Error decoding audio' message
2020-07-13 12:06:17 +01:00
Richard Davey
5b4423d6f3
Merge pull request #5135 from samme/feature/collide-use-static-tree
...
Always use static tree for collision checks
2020-07-13 12:03:18 +01:00
Richard Davey
2f48e5ee00
Merge pull request #5134 from samme/feature/arcade-physics-collisions-perf
...
Arcade Physics collisions optimizations
2020-07-13 12:02:38 +01:00
Richard Davey
feaaf04c40
Merge pull request #5131 from samme/fix/loader-file-state
...
Set file states FILE_LOADING and FILE_LOADED
2020-07-13 12:00:55 +01:00
Richard Davey
8c977bc391
Merge pull request #5127 from samme/fix/TimeStep-wake
...
Fix TimeStep#wake() when running
2020-07-13 11:52:10 +01:00
Richard Davey
4dfe40fa9a
Merge pull request #5126 from samme/fix/file-url
...
Fix TypeError when loading JSON objects in `url` argument
2020-07-13 11:49:37 +01:00
Richard Davey
b1ae96eb76
Merge pull request #5130 from samme/docs/gameobject-body-type
...
Correct types for GameObject#body
2020-07-13 11:48:35 +01:00
Richard Davey
b2a67754df
Merge pull request #5115 from samme/docs/body-drag-type
...
Correct docs corrections
2020-07-13 11:47:18 +01:00
Richard Davey
fc3a89a816
Merge pull request #5158 from mooreInteractive/patch-1
...
Update Docs for render config pixelArt to be more specific
2020-07-13 11:44:44 +01:00
Richard Davey
9a34fa9197
Merge pull request #5171 from samme/fix/input-noop
...
Fix NOOP import
2020-07-13 11:42:32 +01:00
Richard Davey
9bb3a4ba19
Merge pull request #5178 from samme/docs/misc-7
...
Docs
2020-07-13 11:41:28 +01:00
Richard Davey
3f13071368
Merge pull request #5214 from SirJosh3917/SirJosh3917-sys-add-container-jsdoc
...
Update ContainerFactory.js
2020-07-13 11:40:25 +01:00
Richard Davey
d00632232d
Merge pull request #5216 from SanderVanhove/master
...
Fix Path moveTo optional y param
2020-07-13 11:37:28 +01:00
Richard Davey
bc0c289550
Merge pull request #5218 from braindx/drag-transform-fix
...
Fix drag coordinates with camera zoom (issue #4755 )
2020-07-13 11:36:29 +01:00
Richard Davey
d4ff957f02
Preparing for v3.24.0
2020-07-13 11:25:27 +01:00
Jay Mattis
c5cfae0118
Fix drag coordinates with camera zoom (issue 4755)
...
The dragX and dragY passed to 'dragStart' and 'drag' events are supported to be in world coordinates (as specified by the docs) but the coordinates used (pointer.x and pointer.y) were not transformed by the camera into world space. The drags now use pointer.worldX and pointer.worldY which are the post-transform coordinates.
2020-07-12 21:13:33 -07:00
SanderVanhove
b4dcc9b17a
Fix Path moveTo optional y param
2020-07-10 19:49:45 +00:00
danilo neves cruz
7302ad1041
StaticTilemapLayerWebGLRenderer: apply rotation and parent transform
2020-07-11 02:35:20 +07:00
SirJosh3917
f2e8a83691
Update ContainerFactory.js
...
Given that Container's constructor allows x and y to be optional, the JSDoc should match that.
2020-07-09 23:32:54 -04:00
samme
01ca4293e4
Fix missing _crop property
...
Fixes #5211
2020-07-08 12:04:23 -07:00
samme
1c2e15ac98
Update _dx and _dy during friction movement
2020-07-07 15:44:56 -07:00
samme
807aeed20c
Correct prev and prevFrame
2020-07-03 14:02:10 -07:00
samme
3c239abf78
Add Display.Bounds.GetBounds()
2020-07-03 11:17:21 -07:00