Commit graph

3352 commits

Author SHA1 Message Date
Richard Davey
d4b386aa90 Added generics to Container 2022-11-18 22:04:39 +00:00
Richard Davey
84cdbdd560 Added generics. Fix #6140 2022-11-18 21:30:28 +00:00
Richard Davey
e608c2caf1 The CONTEXT_RESTORED Game Event has been removed and the WebGL Renderer no longer listens for the contextrestored DOM event, or has a contextRestoredHandler method. This never actually worked properly, in any version of Phaser 3 - although the WebGLRenderer would be restored, none of the shaders, pipelines or textures were correctly re-created. If a context is now lost, Phaser will display an error in the console and all rendering will halt. It will no longer try to re-create the context, leading to masses of WebGL errors in the console. Instead, it will die gracefully and require a page reload. 2022-11-17 18:04:51 +00:00
Richard Davey
6220d9b18d Fake this flag to allow Bobs to get a physics body. Fix #6284 2022-11-14 21:41:37 +00:00
Dmitry Omelchenko
4f30e0b5b9 fix advancedWordWrap concatenate when wrapping 2022-11-12 17:30:27 +02:00
Richard Davey
465bf07334 The GameObjects.Components.Mask.createBitmapMask method can now accept the x, y, texture and frame parameters new to the BitmapMask constructor. 2022-11-10 15:09:27 +00:00
Richard Davey
6943989f46 The BitmapText Game Object has two new read-only properties displayWidth and displayHeight. This allows the BitmapText to correctly use the GetBounds component.
The `BitmapText` Game Object now has the `GetBounds` component added to it, meaning you can now correctly get its dimensions as part of a Container. Fix #6237
2022-11-08 18:42:05 +00:00
Richard Davey
3b57593e47 When calling GameObject.getPostPipeline and passing in a string for the pipeline name it would error with 'Uncaught TypeError: Right-hand side of 'instanceof' is not an object'. This is now handled correctly internally 2022-11-08 18:10:16 +00:00
Richard Davey
e878cebd16 Force it to return Color object 2022-10-31 22:17:39 +00:00
Richard Davey
4a5f6adfe4 Enable for debugging 2022-10-28 18:22:57 +01:00
Richard Davey
e868c5b284 Fix #6264 2022-10-26 15:24:41 +01:00
Richard Davey
252bc784d7 Fix Ropes for new pipeline batch 2022-10-19 15:34:07 +01:00
Richard Davey
ac2c9c8fb8 Fixed Texture Manager reference. Fix #6250 2022-10-14 13:24:46 +01:00
Richard Davey
fe75fa2a09
Merge pull request #6246 from rexrainbow/RenderTexture-resize
Add resize method back
2022-10-13 21:09:34 +01:00
samme
6960205f46
Docs: correct EdgeZoneSourceCallback return type 2022-10-13 12:59:26 -07:00
Rex
999a68c019 Update hitarea 2022-10-13 12:36:37 +08:00
Rex
d4093765be Add resize method back 2022-10-12 16:58:52 +08:00
Jaro Vanderheijden
e4b3e1ac15 Move BitmapTextCharacter typedef to proper location 2022-10-10 17:05:56 +02:00
Jaro Vanderheijden
f8f8f38715
Merge branch 'photonstorm:master' into master 2022-10-10 16:59:05 +02:00
Richard Davey
cb5d91f596 Fix #6242 2022-10-10 15:31:50 +01:00
Richard Davey
a5b3b91da1
Merge pull request #6236 from samme/feature/group-post-creation-options
Skip the Group createMultiple() post-creation options if not set
2022-10-10 15:18:18 +01:00
Richard Davey
f56499f62b
Merge pull request #6221 from samme/fix/video-load-url
Update video texture after loading
2022-10-10 14:46:06 +01:00
Richard Davey
954eb00fa1 Give Shapes the FX component 2022-10-09 23:16:58 +01:00
Richard Davey
6c2b45d99f Use setQuad 2022-10-09 21:40:22 +01:00
Richard Davey
76ce040bcb Fixed Mesh renderer 2022-10-09 18:04:36 +01:00
Richard Davey
b318cd734f Removed use of UUID from RenderTexture and fixed saveTexture method. 2022-10-09 16:01:06 +01:00
Richard Davey
9d834efb0a Update RenderTexture.js 2022-10-07 15:14:15 +01:00
Richard Davey
9671e54e2b Add Camera property 2022-10-07 12:46:54 +01:00
Richard Davey
f5960bea30 Get the default pipeline from the Pipeline Manager 2022-10-04 18:04:41 +01:00
Richard Davey
20485e1aa2 Added MobilePipeline 2022-10-04 17:08:48 +01:00
Richard Davey
20a40a8844 Updated docs 2022-10-04 15:42:25 +01:00
Richard Davey
56a1af3c05 Updated RenderTexture to just be an Image backed by a DynamicTexture 2022-10-04 14:49:47 +01:00
Richard Davey
17f2d7e072 Update Mask.js 2022-10-03 22:06:16 +01:00
Richard Davey
d9a2c052d8 No longer requires the Scene argument 2022-10-03 18:30:11 +01:00
Richard Davey
18ec3db0ef Update BlendMode.js 2022-09-29 18:51:16 +01:00
Richard Davey
476d117bf9 TransformMatrix.multiply now directly updates the Float32Array, leading to 6 less getter invocations.
`TransformMatrix.setQuad` is a new method that will perform the 8 calculations required to create the vertice positions from the matrix and the given values. The result is stored in the new `TransformMatrix.quad` Float32Array, which is also returned from this method.
2022-09-29 17:20:05 +01:00
Richard Davey
3dff7f07d2 Tween needs to persist 2022-09-27 21:12:47 +01:00
Richard Davey
951006bf8f Create NineSlice.js 2022-09-27 18:42:50 +01:00
Richard Davey
b13232c211 Moved nineslice out, use multi pipeline and make snapshot functions smaller 2022-09-27 16:59:01 +01:00
Richard Davey
35bae05603 Allow negative offsets 2022-09-27 13:29:34 +01:00
Richard Davey
90ad29e958 Renamed frameFill to repeat and made it a lot more flexible.
Added resetStamp and removed un-used methods.
2022-09-26 23:18:07 +01:00
Richard Davey
291f3049e6 RenderTexture.isDrawing is a new read-only flag that tells if the Render Texture is currently batch drawing, or not. 2022-09-26 18:32:31 +01:00
Richard Davey
3d3db60331 Fixed repeating methods 2022-09-26 18:06:28 +01:00
Richard Davey
af66164302 Testing 9-slice 2022-09-26 18:00:15 +01:00
Richard Davey
3d0d2b4d94 The GameObject#setFrame method can now accept a Frame instance as its parameter, which will also automatically update the Texture the Game Object is using. 2022-09-26 17:15:34 +01:00
Richard Davey
023343c789 All events have a type of string. Fix #6136 2022-09-21 22:01:03 +01:00
Richard Davey
10fe5db0a6 Fixed jsdocs
Fix #6195
2022-09-21 21:10:52 +01:00
samme
1a5320dc08 Rope and Video already on update list 2022-09-10 08:44:43 -07:00
samme
ed7c999a0a Update video texture after loading
loadURL() or loadMediaStream()
2022-09-10 08:42:53 -07:00
Artem
754ed600d1
fix function Graphics -> strokeRoundedRect
added max radius
2022-09-03 16:50:29 +03:00
Richard Davey
95d0dbb624 RenderTexture.fillFrame is a new method that will take a given texture and draw it to the Render Texture as a fill-pattern. You can control the offset, alpha and tint of the draw 2022-08-30 22:06:34 +01:00
Jaro Vanderheijden
b271accaf0 Add raw character index to bitmap text bounds 2022-08-20 12:29:47 +02:00
samme
f32043a605 Skip the post-creation options if not set 2022-08-18 12:41:07 -07:00
Richard Davey
e3afb1d159 GameObjects.Text.appendText is a new method that will append the given text, or array of text, to the end of the content already stored in the Text object. 2022-08-18 18:44:40 +01:00
Richard Davey
810cfa587b Added link to SnowBMF 2022-08-17 16:41:40 +01:00
Richard Davey
15c58bc71c Added maxAliveParticles
`maxAliveParticles` is a new Particle Emitter config property that sets the maximum number of _alive_ particles the emitter is allowed to update. When this limit is reached a particle will have to die before another can be spawned.
2022-07-12 16:28:12 +01:00
samme
e2aebec933
Fix JSDoc syntax 2022-06-28 10:50:19 -07:00
Richard Davey
9f78ccf2f5 Error if using compressed texture for TileSprite
fix #6156
2022-06-27 18:11:00 +01:00
Richard Davey
d2f7f220ae
Merge pull request #6141 from Cirras/canvas_antialias_scalemode
Let texture `scaleMode` override the `antialias` setting under `CANVAS`
2022-06-27 17:58:51 +01:00
Richard Davey
1ca0da3221
Merge pull request #6142 from lolimay/patch-1
Fixes GameObjectFactory#group method's signature
2022-06-27 17:56:52 +01:00
Richard Davey
cf94e2cc8e Update Container.js 2022-06-22 17:17:52 +01:00
Richard Davey
e032d573b1 Update Container.js 2022-06-22 16:13:41 +01:00
Richard Davey
e4c520aa9e Update TextStyle.js 2022-06-22 14:22:52 +01:00
Richard Davey
8ad90cc949 When passing a TextStyle configuration object to the Text Game Objects setStyle method, it would ignore any metrics data it may contain and reset it back to the defaults. It will now respect the metrics config and use it, if present. Fix #6149 2022-06-21 17:04:38 +01:00
Richard Davey
b82c01d336 GameObjects.Polygon.setTo is a new method that allows you to change the points being used to render a Polygon Shape Game Object. Fix #6151 2022-06-21 16:27:43 +01:00
Richard Davey
4f652e4c7c Only flip if being used as a sprite textured 2022-06-17 15:14:54 +01:00
Rex
59bf0365c8 Update hitarea when changing frame 2022-06-17 14:46:03 +08:00
Shiqi Mei
a60d0bc4e6
Fixes GameObjectFactory#group method's signature 2022-06-15 15:25:26 +08:00
Jonah Jeleniewski
e8c8be0385
Let texture scaleMode override the antialias setting under CANVAS 2022-06-11 18:07:29 +10:00
Richard Davey
5763f9e76b The DisplayList.addChildCallback method will now check to see if the child has a parent container, and if it does, remove it from there before adding it to the Scene Display List. Fix #6091 2022-06-07 17:17:18 +01:00
Richard Davey
9fb446c7e2 Container.removeAll (which is also called when a Container is destroyed) will now directly destroy the children, if the given parameter is set, rather than doing it after removing them via the event handler. This fixes an issue where nested Containers would add destroyed children back to the Scene as part of their shutdown process. Fix #6078 2022-06-07 17:07:46 +01:00
Richard Davey
bdc3c05a1a Container.removeHandler now specifies the context for Events.DESTROY, fixing an issue where objects moved from one container, to another, then destroyed, would cause sys reference errors. Fix 5846 2022-06-07 16:54:48 +01:00
Richard Davey
a5132b2342 Call addedToScene and removedFromScene
* `Container.addHandler` will now call `GameObject.addedToScene`.
* `Container.removeHandler` will now call `GameObject.removedFromScene`.
2022-06-07 16:44:26 +01:00
Richard Davey
058fb24096 The Transform Component has a new boolean read-only property hasTransformComponent which is set to true by default. 2022-05-31 18:11:17 +01:00
Richard Davey
8a1faddecc The Light Game Object now has the Origin and Transform components, along with 4 new properties: width, height, displayWidth and displayHeight. This allows you to add a Light to a Container, or enable it for physics. Fix #6126 2022-05-31 18:10:25 +01:00
Richard Davey
ddd5e9b671 Typo fix 2022-05-31 00:25:44 +01:00
Richard Davey
695d0d861a
Merge pull request #6125 from samme/feature/particle-frequency
Allow particle frequency smaller than delta
2022-05-30 21:09:56 +01:00
samme
f393cb9c43 Allow particle frequency smaller than delta 2022-05-30 10:55:30 -07:00
Richard Davey
ec029cfaf0 RenderTexture.setIsSpriteTexture is a new method that allows you to flag a Render Texture as being used as the source for Sprite Game Object textures. You can also toggle the new boolean property isSpriteTexture as well. Doing this ensures that images drawn to the Render Texture are correctly inverted for rendering in WebGL. Not doing so can cause inverted frames. If you use this method, you must use it before drawing anything to the Render Texture. Fix #6057 #6017 2022-05-30 18:26:12 +01:00
Richard Davey
a4d8e87095 Fixed lint errors 2022-05-10 17:06:53 +01:00
Richard Davey
919fa39faa
Merge pull request #6067 from TJ09/commonjs-import-change
Don't reassign the return values from require()
2022-05-09 16:49:58 +01:00
Richard Davey
d7074c4e0a Fixed jsdocs 2022-05-06 15:36:53 +01:00
Richard Davey
f8267e4ff8 ContainerCanvasRenderer would pass in a 5th container parameter to the child renderCanvas call, which was breaking the GraphicsCanvasRenderer and isn't needed by any Game Object, so has been removed. Fix #6093 2022-05-06 15:36:48 +01:00
Richard Davey
3d0ff83c51 Updated jsdocs. 2022-05-06 15:27:37 +01:00
Richard Davey
4155daeaf6 Added jsdocs. Fix #6092 2022-05-06 15:16:41 +01:00
Richard Davey
27ebe928b5 Update RenderTexture.js 2022-04-27 22:37:15 +01:00
Richard Davey
1057a18913
Merge pull request #6066 from TJ09/master
Fix kerning for BitmapText on Canvas renderer
2022-04-14 16:08:10 +01:00
Richard Davey
cceb70a937
Merge pull request #6039 from rexrainbow/layer-destroy
Destroy game objects safely in layer.destroy()
2022-04-14 15:42:46 +01:00
Richard Davey
f70296382e
Merge pull request #6044 from samme/patch-11
Docs: correct Rectangle#setSize() description
2022-04-14 15:41:22 +01:00
Richard Davey
da9296eae7
Merge pull request #6038 from samme/patch-10
Docs: correct args in ParticleEmitter#explode()
2022-04-14 15:40:20 +01:00
Richard Davey
4b752aad2e
Merge pull request #6061 from samme/misc/opt-particle-moveTo
Simplify the particle moveTo calculations
2022-04-14 15:39:28 +01:00
Richard Davey
fb6f9d370b
Merge pull request #6060 from samme/feature/particle-moveTo-zero
Allow moving particles to (0, 0)
2022-04-14 15:37:55 +01:00
samme
0b6d26b114
Docs: clarify ParticleEmitter#moveTo
#6046
2022-04-08 09:55:42 -07:00
T.J. L
5e5436c44b Fix copy-paste error in StarRender. 2022-04-02 01:51:12 -07:00
T.J. L
ff4ef2872b Don't overwrite the return values from require() 2022-04-02 01:49:19 -07:00
T.J. L
1551d1b270 Fix kerning for BitmapText on Canvas renderer 2022-04-02 01:33:04 -07:00
samme
d083179cbb Allow moving particles to (0, 0)
moveToX and moveToY are initialized to null instead of 0
2022-03-29 18:20:26 -07:00
samme
8b70cf643d Simplify the moveTo calculation 2022-03-25 11:24:59 -07:00
samme
e12ccfe8a0
Docs: correct Rectangle#setSize() description
Re. #5744 etc.
2022-03-17 11:38:44 -07:00
Rex
24cbfa22bb Add parameter description 2022-03-12 09:48:48 +08:00
Rex
2d1d64047c Destroy game objects safely 2022-03-12 09:43:33 +08:00
samme
0e22b0ecd6
Docs: correct args in ParticleEmitter#explode()
All arguments are optional
2022-03-11 14:00:05 -08:00
Richard Davey
59fbcc5ca3 Updated copyright year 2022-02-28 14:29:51 +00:00
Richard Davey
7aa7187a0f
Merge pull request #5870 from samme/docs/class-types
Add GroupClassTypeConstructor and ParticleClassConstructor types
2022-02-28 13:53:39 +00:00
Richard Davey
42f23045b2
Merge pull request #5953 from schontz/master
destroy game objects during shutdown safely #5520
2022-02-28 13:46:31 +00:00
Richard Davey
bb13fb8e1c
Merge pull request #6023 from spayton/pub-master
Container game object should supply container reference to child rend…
2022-02-28 13:43:38 +00:00
Richard Davey
14c018f862
Merge pull request #6012 from arbassic/fix-bitmaptext-kerning
Fix kerning in BitmapText rendering
2022-02-28 13:41:33 +00:00
Richard Davey
31de3bda5f
Merge pull request #6021 from rexrainbow/video-spritefx
Can add spriteFx pipeline to Video game object
2022-02-28 13:27:40 +00:00
stu
85396d13ab Container game object should supply container reference to child rendering 2022-02-25 17:56:50 +00:00
Rex
7bc14a9f12 Remove space 2022-02-24 13:03:54 +08:00
Rex
65f9228973 Can add spriteFx pipeline to Video game object 2022-02-24 13:01:30 +08:00
Andy Mikulski
b3c4616550
RenderTexture: Use 255-based RGB values when filling a Canvas 2022-02-22 18:33:09 -07:00
Richard Davey
6edbd9df22 Update RenderTexture.js 2022-02-21 18:42:54 +00:00
Richard Davey
6a6590d0dd
Merge pull request #6000 from sjb933/hotfix-rendertexture-blend
Fixed WebGL blending that was broken in 3.50. Fix #5565, fix #5996
2022-02-21 18:41:40 +00:00
arbassic
38f23baaf7
Fix kerning for BitmapText
There was a bug in the GetBitmapTextSize function, causing that kerning was not applied at all to BitmapTexts.
The fix sets 'x' of the character with calculated 'x' local variable (instead of general xAdvance.
Also xAdvance is modified with kerningOffset to provide consistency between proceeding characters
2022-02-15 19:03:13 +01:00
Shane Bammel
1c4c11b527 Fixed WebGL blending that was broken in 3.50. Fix #5565, fix #5996 2022-02-11 16:34:43 -06:00
Richard Davey
3546140b51 Merge branch 'master' of https://github.com/photonstorm/phaser 2022-02-03 21:50:54 +00:00
Richard Davey
c1b36610fb Update TileSprite.js 2022-02-03 21:50:52 +00:00
Richard Davey
a4308cfa3a Skips Canvas drawImage calls if invalid frame sizes given. Fix #5951 2022-02-03 16:44:24 +00:00
Richard Davey
124daba3f5 Lint fix for #5984 2022-02-03 16:09:30 +00:00
Richard Davey
7e5ace5026
Merge pull request #5984 from optimumsuave/bugfix-closepath-polygon-canvas-renderer
Bugfix: PolygonCanvasRenderer: check for closePath when rendering Polygon with Phaser.CANVAS
2022-02-03 16:07:39 +00:00
Richard Davey
23193131f8
Merge pull request #5968 from vforsh/point-to-container-fix
Fix `pointToContainer` issue with `output` parameter
2022-02-03 16:03:21 +00:00
Richard Davey
0100586e52 Fixed jsdocs for #5958 2022-02-03 16:02:08 +00:00
Richard Davey
d193a82376
Merge pull request #5958 from rexrainbow/mesh-tint
Add setTint() method in Mesh GameObject
2022-02-03 15:58:23 +00:00
Richard Davey
f406dd25d3
Merge pull request #5957 from samme/docs/TileSpriteConfig-frame
Docs: correct type for TileSpriteConfig.frame
2022-02-03 15:55:41 +00:00
Connor Nielsen
5823cd70df fix formatting in PolygonCanvasRenderer 2022-01-26 14:26:02 -08:00
Connor Nielsen
9119b776c8 check for closePath in PolygonCanvasRenderer 2022-01-26 14:06:33 -08:00
Vladislav Forsh
7a636379f5 Fix pointToContainer issue with output parameter
provided `output` parameter was ignored when the container didn't have a parent container (was attached directly to the scene)

(cherry picked from commit 0d97dcc1f844f528f2361bfd800dec4885c5edc1)
2022-01-06 13:07:16 +03:00
Phaser Editor 2D
61ef57a399
Tag as optional the Sprite.chain(key) argument.
The `chain()` method accepts no argument to reset the chain of animations.
2022-01-02 17:05:30 -05:00
Rex
38e0323b01 Add setTint() method 2021-12-24 11:47:09 +08:00
samme
f81a047029 Docs: correct type for TileSpriteConfig.frame
Fixes #5955
2021-12-23 13:35:04 -08:00
David Schontzler
daa5e662e7 destroy game objects during shutdown safely #5520 2021-12-21 19:55:35 -08:00
Richard Davey
d51fa15cdf Made docs include mention of post fx. #5942 2021-12-21 17:41:52 +00:00
Richard Davey
ba132ab25c Fixed JSDocs 2021-12-15 22:26:04 +00:00
samme
e9e72a3ea5 Remove GetBounds component from PointLight 2021-12-04 11:55:19 -08:00
Richard Davey
e56391d8ed
Merge pull request #5918 from rexrainbow/shape-gameobject-mask
Allow Shape game object to be a mask
2021-12-01 18:36:04 +00:00
Richard Davey
385800ec2f
Merge pull request #5839 from natureofcode/fix/issue-5828
Fix #5828, improve GameObject#disableInteractive() and InputPlugin#disable()
2021-12-01 17:46:34 +00:00
Richard Davey
7188040d7d The GameObject.willRender method will now factor in the parent displayList, if it has one, to the end result. This fixes issues like that where an invisible Layer will still process input events. Fix #5883 2021-12-01 17:24:12 +00:00
Richard Davey
5b39d22368 Mesh addVertices and addVerticesFromObj will now throw warnings if invalid verts are given. Fix #5922 2021-11-22 16:59:30 +00:00
Rex
784c2bd1ae Allow Shape game object to be a mask 2021-11-05 10:57:17 +08:00
Richard Davey
4b63bd2500 Update Pipeline.js 2021-11-02 17:05:16 +00:00
Richard Davey
aea45bb06d Text with RTL enabled wouldn't factor in the left / right padding correctly, causing the text to be cut off. It will now account for padding in the line width calculations. Fix #5830 2021-11-01 18:44:10 +00:00
Richard Davey
314ff439c9
Merge pull request #5889 from samme/fix/path-follower-end
Fix PathFollower end point when given `to`
2021-11-01 17:07:54 +00:00
samme
ebb27e8ae4 Fix PathFollower end point when given to 2021-10-30 11:13:50 -07:00
Richard Davey
20d4391c29 Calling ParticleEmitter.setScale would set the scaleY property to null, causing calls to setScaleY to throw a runtime error. scaleY is now a required property across both the Particle and Emitter classes and all of the conditional checks for it have been removed 2021-10-28 15:01:51 +01:00
Richard Davey
b3f34a0471 Update Text.js 2021-10-27 15:46:20 +01:00
Richard Davey
50669c7bdf Updated jsdocs. Fix #5880 2021-10-26 14:31:15 +01:00
Richard Davey
9d7a575a4f Added FX component 2021-10-16 15:23:19 +01:00
Richard Davey
43df6de757 Removed duplicate post fx calls 2021-10-16 15:22:30 +01:00
Richard Davey
7a705d757c The Text Game Object would call the pre and post batch functions twice by mistake, potentially applying a post fx twice to it. 2021-10-16 15:08:39 +01:00
Richard Davey
dddf601acb Added onFXCopy 2021-10-15 18:38:57 +01:00
Richard Davey
163978452e Added onFX 2021-10-15 00:58:40 +01:00
samme
ba5e4ffab7 Docs: add Phaser.Types.GameObjects.Particles.ParticleClassConstructor
Fixes #5731 ?
2021-10-13 13:23:31 -07:00
samme
52e402e14e Docs: add Phaser.Types.GameObjects.Group.GroupClassTypeConstructor 2021-10-13 13:22:54 -07:00
Richard Davey
6eebd6c1cf GameObjects.Components.FX is a new component that provides access to FX specific propertis and methods. The Image and Sprite Game Objects have this component by default. 2021-10-12 21:47:24 +01:00
Richard Davey
fd655d054c Added fxPadding property to Image 2021-10-12 01:02:42 +01:00
Richard Davey
c1430f41dc Testing FX padding 2021-10-11 15:10:57 +01:00
Richard Davey
cca537b66b
Merge pull request #5841 from samme/feature/warn-particle-missing-frame
Warn, throw for particle texture frame mistakes
2021-09-24 14:38:20 +01:00
samme
023336f826 Throw an error for missing particle texture frame 2021-09-23 11:15:58 -07:00
samme
da86ea7029 Warn for missing texture frames 2021-09-23 11:15:29 -07:00
Richard Davey
93db763f69
Merge pull request #5340 from 16patsle/Fix_object_types
Add more specific 'object' types, including GO Configs
2021-09-23 15:30:43 +01:00
Richard Davey
a5c0795967
Merge pull request #5772 from sylvainpolletvillard/master
types: complete Phaser.Input.Gamepad.Configs definitions
2021-09-22 11:35:25 +01:00
Richard Davey
cd4baa100d
Merge pull request #5744 from rexrainbow/rectangle-setsize
Update Rectangle shape game object's display origin and default hitArea
2021-09-21 11:46:42 +01:00
Richard Davey
5f2e3f35e1 Fixed code format 2021-09-20 12:18:54 +01:00
Richard Davey
da3e8b5a25
Merge pull request #5788 from martell-ventures/loadURL_crossorigin
Add Crossorigin support
2021-09-20 12:16:14 +01:00
Richard Davey
519a7f99e1 Bumped version 2021-09-20 12:08:56 +01:00
Richard Davey
e26f1dd460
Merge pull request #5800 from samme/fix/nested-layers-error
Add Layer#addToDisplayList(), Layer#removeFromDisplayList()
2021-09-20 12:07:11 +01:00
Richard Davey
e131488a32 Bumped version 2021-09-20 12:05:46 +01:00
Richard Davey
8075c3ab1b
Merge pull request #5819 from samme/fix/dom-element-parent-visibility
Add DOMElement#preRender, remove DOMElement#preUpdate
2021-09-20 12:01:16 +01:00
Richard Davey
5a7ed14b3b Merge branch 'master' of https://github.com/photonstorm/phaser 2021-09-20 11:51:37 +01:00
Richard Davey
929ad23b4e
Merge pull request #5748 from rexrainbow/zone-default-dropzone
Use default hitArea if hitArea parameter is not given
2021-09-20 11:45:18 +01:00
Richard Davey
2f8d6a023d Updated version number 2021-09-20 11:41:47 +01:00
Richard Davey
305fbd1ec6
Merge pull request #5742 from rexrainbow/turn-off-context-restore-event
Turn off context restore event when game object is destroyed
2021-09-20 11:35:34 +01:00
natureofcode
89ff86202b Fix #5828 2021-09-17 12:19:39 +05:00
Richard Davey
535ca66ec6 colr typo in the docs 2021-09-03 12:35:32 +01:00
samme
846ea3fe1d Add DOMElement#preRender, remove DOMElement#preUpdate
Check parent visibility in preRender()

Fixes #5816
2021-08-27 10:43:21 -07:00
samme
728db67a6d Add Layer#addToDisplayList(), Layer#removeFromDisplayList()
Fixes #5799
2021-08-01 14:04:51 -07:00
Ryan Martell
078a94c3e6 Add Crossorigin support 2021-07-20 12:47:45 -06:00
Sylvain Pollet-Villard
2abe9e323f types: fixed duplicate names 2021-07-08 23:54:10 +02:00
Rex
66e322dcd5 Use default hitArea if not hitArea is not ogiven
Default hitArea will resize when `zone.setSize(w, h)`
2021-06-16 11:16:19 +08:00
Rex
3a7557c3f4 Update display origin and default hitArea 2021-06-12 13:41:37 +08:00
Rex
a6c75a36c8 Turn off context restore event when game object is destroyed 2021-06-12 12:44:23 +08:00
Richard Davey
9cd5f56eea Fixed an issue in FillPathWebGL, IsoBoxWebGLRenderer and IsoTriangleWebGLRenderer functions which caused the filled versions of most Shape Game Objects to pick-up the texture of the previous object on the display list. Fix #5720 2021-05-27 14:48:40 +01:00
Richard Davey
55b69e5d98 Made fromScene optional 2021-05-26 15:49:05 +01:00
Richard Davey
5552079c9d
Merge pull request #5717 from rexrainbow/destroy-from-scene
Add 'fromScene' parameter in GameObject.destroy() method, and DESTROY event
2021-05-26 15:29:35 +01:00
Richard Davey
5d9d543ce0 Fixed rendering calls. Fix #5712 2021-05-26 15:24:09 +01:00
Rex
07ff5de1e1 Add 'fromScene' parameter in GameObject.destroy() method, and DESTROY event 2021-05-26 16:25:12 +08:00
Richard Davey
3b160a2e9d Fixed jsdoc tags 2021-05-24 18:23:09 +01:00
Richard Davey
45ccff26e1 Fixed jsdoc name 2021-05-24 17:33:01 +01:00
Richard Davey
048c2772be
Merge pull request #5683 from karbassi/patch-1
GameObjectConfig allow type object
2021-05-24 17:00:38 +01:00
Richard Davey
f562354292
Merge pull request #5656 from valadaptive/faster-measure-text
Improve performance of MeasureText
2021-05-24 16:57:12 +01:00
Richard Davey
4a32a5cdb8
Merge pull request #5664 from rexrainbow/container-input-2
Invoke `addToRenderList()` before leaving render method
2021-05-24 16:54:43 +01:00
Richard Davey
23582a43a2
Merge pull request #5673 from rexrainbow/array-methods
Add MoveAbove, MoveBelow methods of List structure
2021-05-24 16:53:39 +01:00
Richard Davey
06028bb2cd
Merge pull request #5704 from VektreX/master
Fixed video not resuming on regaining focus
2021-05-24 16:51:00 +01:00
Emil Schnedler Vad
9fa971902b fixed type of ParticleEmitterConfig deathCallback to function 2021-05-24 16:42:01 +02:00
VektreX
b63bb53430 Reset _codePaused to false in play handlers to allow video to resume 2021-05-18 01:32:45 +02:00
Ali Karbassi
dd4ef06f97
GameObjectConfig allow type object
GameObjectConfig x, y, rotation, angle, and alpha should allow type object

Fixes #5682
2021-05-05 17:01:56 -05:00
Richard Davey
144924bc61 JSDoc fix 2021-05-03 18:15:29 +01:00
Rex
62ea171971 Add MoveAbove, MoveBelow methods of List structure
MoveAbove: Moves the given array element above another one in the array.
MoveBelow: Moves the given array element below another one in the array.
2021-04-26 15:17:42 +08:00
Richard Davey
7d3970178d The RenderTexture.endDraw method has a new optional boolean erase which allows you to draw all objects in the batch using a blend mode of ERASE. This has the effect of erasing any filled pixels in the objects being drawn. 2021-04-25 20:32:56 +01:00
Richard Davey
6735f7e88e Update Shape.js 2021-04-20 15:15:51 +01:00
Rex
fca1eb1206 Also fix it in CanvasRender 2021-04-20 21:15:46 +08:00
Rex
e6ed148abc Invoke addToRenderList first before leaving render method
Leaving render method when children count is 0
2021-04-20 10:22:59 +08:00
Richard Davey
7a12a205b8
Merge pull request #5661 from Palats/master
Fix Phaser.GameObjects.Components.Pipeline#postPipelines doc
2021-04-19 20:41:29 +01:00
Richard Davey
2156be011b Update Extern.js 2021-04-19 08:52:25 +01:00
Pierre Palatin
93543d650a
Fix Phaser.GameObjects.Components.Pipeline#postPipelines doc
* Updates the Documentation

Describe the changes below:
The `s` was missing in the doc for `postPipelines`, leading to wrong Typescript typing and misleading documentation.
2021-04-18 17:49:32 +02:00
Richard Davey
2712e87ca2 Graphics and Shape now use the new Multi Pipeline 2021-04-16 18:19:39 +01:00
valadaptive
4640874643 Fix check for new text measurement results
actualBoundingBoxDescent is *not* defined on the TextMetrics object
returned from measureText--it's defined on its prototype. This oversight
was causing the slow path to be taken in all browsers.
2021-04-14 22:44:10 -04:00
valadaptive
4cd7706390 Only call getImageData once in MeasureText 2021-04-14 22:38:58 -04:00
Richard Davey
bb1a078243 The GameObjectFactory.existing method will now accept Layer as a TypeScript type. Fix #5642 2021-04-13 13:42:33 +01:00
samme
2856b1ab3a Fix clearing PRE_UPDATE by mistake 2021-04-02 19:02:14 -07:00
Richard Davey
8c47d54e4d Added missing docs. Fix #5629 2021-03-30 10:30:02 +01:00
Richard Davey
b280f3f400 GameObjects.DOMElement.pointerEvents is a new property that allows you to set the pointerEvents attribute on the DOM Element CSS. This is auto by default and should not be changed unless you know what you're doing. 2021-03-30 10:23:23 +01:00
samme
f35ab198f7
Docs: fix generic type for GameObjectFactory#existing 2021-03-24 18:00:44 -07:00
Richard Davey
e9da34e39f Docs update. Fix #5604 2021-03-24 16:30:33 +00:00
Richard Davey
7411c805b8 Version fix 2021-03-24 16:30:33 +00:00
Richard Davey
9aa08a4a4f
Merge pull request #5606 from vforsh/master
Fix #5545
2021-03-24 15:46:41 +00:00
Richard Davey
3da806cdb3
Merge pull request #5601 from masterT/master
Documentation Group#getMatching example fix
2021-03-24 15:44:35 +00:00
Richard Davey
89c9a4caaa
Merge pull request #5598 from samme/patch-7
Docs: fix RenderTexture params
2021-03-24 15:43:57 +00:00
Richard Davey
bd9fbfe077 Adding a Game Object to a Container that already existed in another Container would leave a copy of it on the Display List 2021-03-24 15:39:30 +00:00
Richard Davey
da44c1e3fb JSDoc fix 2021-03-24 15:39:09 +00:00
Vladislav Forsh
ab202efea7 Handle case when fromAtlas could be undefined 2021-03-17 10:26:47 +03:00
Vladislav Forsh
22edb0d95f Update fromAtlas property on font change 2021-03-16 19:44:26 +03:00
Vladislav Forsh
2418b7f484 Fix #5545 2021-03-16 18:04:38 +03:00
Simon Thiboutôt
e15f51c3e0
Fix getMatching example. 2021-03-14 08:49:53 -04:00
samme
43bd8d124c
Docs: fix RenderTexture params 2021-03-11 20:53:59 -08:00
Richard Davey
e2f19617f3 3.53.1 Release 2021-03-08 16:37:16 +00:00
Richard Davey
87868d98b9 Uses new Display List methods and added new parameter to destroy. Fix #5576 2021-03-03 18:05:27 +00:00
Richard Davey
425594cb8e Layer.addChildCallback and removeChildCallback will now use the new addToDisplayList and removeFromDisplayList Game Object methods. 2021-03-03 18:01:18 +00:00
Richard Davey
27806dad9c Container.addHandler will now use the new addToDisplayList and removeFromDisplayList Game Object methods. 2021-03-03 18:00:34 +00:00
Richard Davey
d59a7868a3 DisplayList.addChildCallback will now use the new addToDisplayList and removeFromDisplayList Game Object methods. 2021-03-03 18:00:24 +00:00
Richard Davey
a01ed4ff73 Added addToDisplayList, addToUpdateList, removeFromDisplayList and removeFromUpdateList methods. 2021-03-03 17:58:12 +00:00
Richard Davey
d3536fb138
Merge pull request #5574 from samme/fix/canvas-particle-emitter-follow
Fix wrong particle position when following a sprite with Canvas renderer
2021-02-22 10:29:25 +00:00
samme
3248971411 Fix wrong particle follow position
Fixes #5457
2021-02-21 11:30:32 -08:00
Richard Davey
6b960464b5
Merge pull request #5504 from endel/patch-1
allow to customize pointerEvents for dom elements
2021-02-16 11:29:26 +00:00
Richard Davey
c5766a68a4
Merge pull request #5540 from samme/feature/shape-setDisplaySize
Add Phaser.GameObjects.Shape#setDisplaySize()
2021-02-16 11:18:23 +00:00
Richard Davey
4b3a0009ee
Merge pull request #5559 from mattjennings/fix-5558
Fixes #5558
2021-02-16 10:56:01 +00:00
Richard Davey
a05da72739 DOMElementCSSRenderer will now return early if src.node doesn't exist or is null, rather than trying to extract the style property from it. Fix #5566 2021-02-16 10:48:35 +00:00
Matt Jennings
72fd48abc4 safely check for renderer in TileSprite 2021-02-11 16:00:24 -06:00
Richard Davey
b40010b86b Fixed JSDocs 2021-02-04 16:27:02 +00:00
Richard Davey
aaf51dc7ce The LightsManager.addPointlight method now has full JSDocs and the attenuation parameter. 2021-02-04 16:19:19 +00:00
Richard Davey
79468de255 ESLint fix 2021-02-04 16:11:09 +00:00
samme
a8e05cec3e Add Phaser.GameObjects.Shape#setDisplaySize() 2021-01-30 09:33:21 -08:00
Rex
ee16c63987 Fix parameter name bug 2021-01-29 09:32:45 +08:00
Rex
7f610eef98 Fix input bug 2021-01-21 11:13:33 +08:00
Richard Davey
332d9c85cb BlitterWebGLRenderer was calling an out-dated function setRenderDepth instead of addToRenderList 2021-01-14 17:09:04 +00:00
Endel Dreyer
1919bbdfb8
allow to customize pointerEvents for dom elements 2021-01-14 10:54:29 -03:00
Richard Davey
9116eddf99 Some Bitmap Text fonts were not rendering under Canvas due to the way in which the texture offset was calculated. It now uses the __BASE frame to get the texture offset, rather than the first frame in the set. Fix #5462 #5501 2021-01-14 11:06:04 +00:00
Andrew Cunningham
724c2f59d5
Update Mesh.js documentation around panZ
This adds warnings about orthographic and perspective cameras, documents setOrtho & panZ with sane (ish) default values for the default projection matrix, and updates the example code in the file.

These changes could go further; I would love it if the default mechanisms "agreed" (so that feeding it z=0 vertex values "just worked"), but that's probably a difficult backwards facing change.

Inspired by https://github.com/photonstorm/phaser/issues/5380 .
2021-01-12 14:28:52 -05:00
Richard Davey
15908ce271 getPostPipeline will now return an array of them all if there is more than one instance 2021-01-11 17:17:00 +00:00
Richard Davey
1c8662dc1f Call addToRenderList 2021-01-07 14:52:08 +00:00
Richard Davey
00d8b6a009 Invoke camera.addToRenderList method 2021-01-07 12:31:31 +00:00
Richard Davey
3db77c7a10 Use Scene Display List if not available 2021-01-07 12:22:09 +00:00
Richard Davey
c124d4c0a6
Merge pull request #5467 from rexrainbow/improve-postfx-pipeline
Remove a type of Post Pipeline instances, not only a single instance
2021-01-04 16:14:48 +00:00
Richard Davey
a19e4770df The Layer Game Object has been given all of the missing properties and methods from Game Object to make the class shapes identical. This includes the properties parentContainer, tabIndex, input and body. You cannot set any of these properties, they are ignored by the Layer itself. It also includes the methods: setInteractive, disableInteractive and removeInteractive. A Layer cannot be enabled for input or have a physics body. Fix #5459 2021-01-04 16:11:33 +00:00
Richard Davey
5457e463b1 Use displayList.getIndex 2021-01-04 12:43:34 +00:00
Richard Davey
2a38e78bb4 Layer.destroy will now call destroy on all of its children as well. Layer.destroy will now emit the DESTROY event at the start of the method. Fix #5466 2021-01-04 11:59:00 +00:00
Richard Davey
1b0649ed34 Fixed issue causing Cannot read property 'pipelines' of null to be thrown if using 3.50 with the HEADLESS renderer. Fix #5468 2021-01-04 11:22:00 +00:00
Rex
60c42016b6 Remove a type of Post Pipeline instances, not only a single instance 2020-12-25 17:05:50 +08:00
Richard Davey
3e9350ed05 Added JSDocs 2020-12-14 14:07:57 +00:00
Richard Davey
4fb03907ba Stricter removal 2020-12-14 13:50:44 +00:00
Richard Davey
cbe1a3219a JSDoc improvements 2020-12-14 13:33:42 +00:00
Richard Davey
e08b5386dd Removed follow from render code 2020-12-14 11:51:16 +00:00
Richard Davey
7ff4c5958b Fire particle from follower position. Fix #5437 2020-12-14 11:46:19 +00:00
Richard Davey
f5376b20a4 BitmapText Drop Shadow working. Fix #5446 2020-12-14 09:34:32 +00:00
Richard Davey
0cd192eec8 Swapped for Color component. Fix #5435 2020-12-11 15:56:21 +00:00
Richard Davey
1a65f50a25 Added new renderDirect hook which RenderTexture can use. Fix #5431 2020-12-11 13:40:53 +00:00
Richard Davey
9412a93fdb Remove log 2020-12-11 11:46:28 +00:00
Richard Davey
59e89fa788 All Game Objects will now listen for ADDED_TO_SCENE and REMOVED_FROM_SCENE events and call the handlers. Therefore, removed GO specific implementations. 2020-12-11 11:44:21 +00:00
Richard Davey
32440cb238 Defaults to renderer aspect ratio to help with issues like #5444 2020-12-11 11:05:47 +00:00
Richard Davey
1857c3f2da Send dimensions and reset scissors 2020-12-10 18:07:41 +00:00
Patrick Sletvold
d327a4da34
Add Config types for ParticleEmitterManager and Mesh 2020-12-10 11:40:01 +01:00
Patrick Sletvold
f1836738a0
Merge remote-tracking branch 'origin/master' into Fix_object_types 2020-12-10 11:23:35 +01:00
Richard Davey
73a0c9d2ce Remove unused code 2020-12-09 18:04:53 +00:00
Richard Davey
e03c514b03 Fixed WebGL erase mode 2020-12-09 15:55:11 +00:00
Richard Davey
16d4d11939 Final fixes to blitFrame 2020-12-09 15:20:09 +00:00
Richard Davey
1cb6d525be New blitFrame working. Now to adjust when src > target height. 2020-12-09 14:08:24 +00:00
Richard Davey
827851d02c Update RenderTexture.js 2020-12-08 17:54:37 +00:00
Richard Davey
0c4eec0fd9 Now using new Render Target approach (texture blend still need to be added) 2020-12-08 17:38:42 +00:00
Richard Davey
f18d615b40 Update SpriteWebGLRenderer.js 2020-12-08 16:15:16 +00:00
Richard Davey
3154bf2e6f Update Container.js 2020-12-07 13:11:49 +00:00
Richard Davey
79d252589f Update Rope.js 2020-12-07 13:09:45 +00:00
Richard Davey
d6d5c09552 The Shader Game Object now supports being able to use a Render Texture as a sampler2D texture on the shader. Fix #5423 2020-12-07 12:19:42 +00:00
Richard Davey
15a6f50d2c Fixed functions not appearing in the namespace. Fix #5432 2020-12-07 10:11:47 +00:00
Richard Davey
08b304372c Made the Render Events global, not WebGL specific and allowed Canvas Renderer to emit them too 2020-12-04 15:07:26 +00:00
Richard Davey
a7f246a241 Swap queue order 2020-12-04 12:55:26 +00:00
Richard Davey
e0ae7ef14e Update TransformMatrix.js 2020-12-04 12:00:31 +00:00
Richard Davey
edc076674e New Resize handler. Fix #5412 2020-12-04 11:59:47 +00:00
Richard Davey
4d872e2e9d RenderTexture.erase has never worked when using the Canvas Renderer and a texture frame, only with Game Objects. It now works with both. Fix #5422 2020-12-03 15:46:26 +00:00
Richard Davey
6bb6ff8ef4 Updated JSDocs to clarify issue. Fix #4692 2020-12-03 15:14:34 +00:00
Richard Davey
38b6d83462 Fixed Canvas Alpha RenderTexture issue. Fix #5426 2020-12-03 14:48:21 +00:00
Richard Davey
8ff62d40af Moved event emitter. Fix #5427 2020-12-03 14:34:32 +00:00
Richard Davey
0d6d7848cd No need for dirty property 2020-12-03 14:31:54 +00:00
Richard Davey
103b91a69d Add attenuation parameter and fixed color divisor 2020-12-03 12:52:36 +00:00
Richard Davey
8174ec2daf Fixed light distance and max test 2020-12-03 11:11:41 +00:00
Richard Davey
732b188691 Removed light pool, used RGB object, much better light culling. 2020-12-02 17:57:12 +00:00
Richard Davey
97fd175e73 Extends Circle, because it is! Removed loads of pointless setters. 2020-12-02 17:56:53 +00:00
Richard Davey
639b9bfc84 Added beginDraw, batchDraw, batchDrawFrame and endDraw methods for full batch control over the drawing. 2020-12-02 16:07:58 +00:00
Richard Davey
35146e72ed Removed Light Layer and moved Point Light to its own Game Object 2020-12-02 13:48:38 +00:00
Richard Davey
375d6fa196 Updated docs 2020-12-02 13:15:27 +00:00
Richard Davey
361704f048 Only reset post pipeline if it has one. Fix #5421 2020-12-02 12:23:59 +00:00
Richard Davey
9f8f76c690 Removed unused property 2020-12-02 12:23:40 +00:00
Richard Davey
1868a749cb Enable Lights Plugin again 2020-12-02 11:11:34 +00:00
Richard Davey
e29626ab2c Testing Light Layer 2020-12-01 17:24:30 +00:00
Richard Davey
ce6a81c97d Updated JSDocs 2020-12-01 17:23:53 +00:00
Richard Davey
c1bf08de70 New Point Light class 2020-12-01 17:23:42 +00:00
Richard Davey
35829bcf0d Added removePostPipeline. Fix #5419 2020-11-30 10:07:41 +00:00
Richard Davey
15b47e6a54 Testing new Light Layer 2020-11-30 09:46:28 +00:00
Rex
cdfee008ec Typo 2020-11-29 20:29:38 +08:00
Richard Davey
41a0c192a4 Fix #5413 2020-11-28 15:42:23 +00:00
Richard Davey
6dd40df318 Update LayerCreator.js 2020-11-27 15:14:10 +00:00
Richard Davey
3ec63c6dec Only remove from displayList if set. Fix #5413 2020-11-27 15:14:04 +00:00
Richard Davey
e96cbde8d6 Added new displayList property and Layer documentation 2020-11-27 11:13:59 +00:00
Richard Davey
aa06070644 Added the new Layer Game Object 2020-11-26 16:21:21 +00:00
Richard Davey
fdae90089c Use the new depthList property 2020-11-26 16:21:09 +00:00
Richard Davey
e5f9066072 GameObjects.Components.Depth.depthList is a new property that all Game Objects that have the Depth Component now have. It contains a reference to the List responsible for managing the depth sorting of the Game Object. This is typically the Scene Display List, but can also be a Layer. It allows the Depth component to queue a depth sort directly on the list it belongs to now, rather than just the Scene. 2020-11-26 16:20:54 +00:00
Richard Davey
a2f0a815d6 Reset textures before draw 2020-11-26 14:20:01 +00:00
Richard Davey
c8cdf9fde2 Fixed Render Texture crop 2020-11-26 11:28:25 +00:00
Richard Davey
0ee1338765 Better post pipeline call (less code) 2020-11-26 09:51:40 +00:00
Richard Davey
09c49ac288 Fixed emitter mask pipeline 2020-11-24 14:52:57 +00:00
Richard Davey
d2e2e86ef1 Updated accessor 2020-11-23 16:22:11 +00:00
Richard Davey
2e4cfde102 Updated post pipeline 2020-11-23 16:18:30 +00:00
Richard Davey
ec5da6930c Added post pipeline support to all Game Objects 2020-11-23 16:17:13 +00:00
Richard Davey
28d925b875 JSDoc fixes 2020-11-23 15:06:45 +00:00
Richard Davey
417f7684c3 More integer to number changes 2020-11-23 10:32:00 +00:00
Richard Davey
3f511a73cd Replace integer[] with number[] 2020-11-23 10:23:10 +00:00
Richard Davey
02c34cd64e Replace integer with number 2020-11-23 10:22:13 +00:00
Richard Davey
5ca5a63038 Testing new Lights 2020-11-23 10:19:31 +00:00
Richard Davey
30c2eb5d0e Ability to link Post Pipeline to owner object 2020-11-20 17:29:42 +00:00
Richard Davey
78b75efb8c JSDoc fix 2020-11-20 16:03:03 +00:00
Richard Davey
df3b7d5f79 JSDoc fixes 2020-11-20 15:47:35 +00:00
Richard Davey
ebf6b254dd Fixed JSDocs 2020-11-20 15:31:43 +00:00
Richard Davey
b64f2cc4d0 Added ability to skip post pipeline per object 2020-11-20 15:18:19 +00:00
Richard Davey
e7b85b08af Fixed batchLight 2020-11-20 13:05:32 +00:00
Richard Davey
c603db23ce Fix docs and lint errors #5374 2020-11-20 11:43:45 +00:00
Richard Davey
5233366190
Merge pull request #5374 from pirateksh/patch-2
Added loadMediaStream method
2020-11-20 11:41:10 +00:00
Richard Davey
401487d4b1
Merge pull request #5367 from rexrainbow/bugfix-text.basicWordWrap
Don't add white space when measure last word of a line
2020-11-20 11:37:21 +00:00
Richard Davey
299e105f6e Update RenderTexture.js 2020-11-20 10:05:33 +00:00
Richard Davey
951b284c6e Fixed RenderTexture.fill 2020-11-20 10:05:19 +00:00
Richard Davey
e2f7ca40b2 Fixed camera zoom and origin. draw and drawFrame work now. 2020-11-19 23:04:25 +00:00
Richard Davey
c33a5598ab Trying to align drawFrame 2020-11-19 18:16:18 +00:00
Richard Davey
500d33f6b9 Set camera zoom 2020-11-19 18:07:33 +00:00
Richard Davey
91924be2ee Update RenderTextureWebGLRenderer.js 2020-11-19 16:40:35 +00:00
Richard Davey
7562683cfb Lots of tiny fixes and updates 2020-11-19 16:40:31 +00:00
Richard Davey
216f74bb58 Use Single Pipeline and force texture refresh 2020-11-19 11:43:55 +00:00
Richard Davey
d848a5e2ba Now using new Render Target. Removed lots of out-dated properties and tidied up methods. 2020-11-19 11:38:09 +00:00
Richard Davey
7ad580dd29 Using new Render Target 2020-11-19 11:37:49 +00:00
Richard Davey
e36a086e5d Updated data types 2020-11-17 16:50:36 +00:00
Richard Davey
00c7b1d79e Destroy on reset! 2020-11-17 16:34:52 +00:00
Richard Davey
782a841eeb Added getPostPipeline method 2020-11-17 16:19:40 +00:00
Richard Davey
0658820b79 Clear post pipelines 2020-11-17 16:19:30 +00:00
Richard Davey
26a1d0185a Update RenderTexture.js 2020-11-17 16:19:18 +00:00
Richard Davey
080677f28c Set on creation, not in the component 2020-11-17 14:08:09 +00:00
Richard Davey
dfabaac634 Allow Rope to have post-pipeline 2020-11-10 16:27:12 +00:00
Richard Davey
cccf9bb163 Fixed Rope 2020-11-10 16:17:28 +00:00
Richard Davey
f02325fff0
Merge pull request #5386 from PhaserEditor2D/patch-1
Updates geom, width and height of the Ellipse GO
2020-11-09 17:03:56 +00:00
Richard Davey
eee3feb667 Pass Game Object to batchQuad 2020-11-09 13:19:31 +00:00
Richard Davey
39b381d6cc Clearer responsibility via method parameters 2020-11-09 11:50:41 +00:00
Phaser Editor 2D
60541e861b
Updates geom, width and height of the Ellipse GO
Updates the `width`, `height`, and geometric position of the Ellipse in the `setSize()` method.

This code shows the wrong positioning of the Ellipse: https://codepen.io/phasereditor2d/pen/jOrvexM

To fix it, uncomment lines `21`, `24`, and `25`.
2020-11-07 11:25:30 -05:00
Richard Davey
06c90137c8 Empty parameter means reset pipeline 2020-11-06 15:35:18 +00:00
Richard Davey
d3c70002ea Removed use of _tempMatrix from all renderers 2020-11-06 09:44:29 +00:00
Richard Davey
19f3ae5a81 Testing RT mini refactor 2020-11-05 18:06:33 +00:00
Richard Davey
2b92e95735 Testing new RT draw 2020-11-05 18:06:23 +00:00
Richard Davey
fc84b19d3d Update MeshWebGLRenderer.js 2020-11-05 13:03:36 +00:00
Richard Davey
c65e516e94 Fixed shaders 2020-11-05 12:58:00 +00:00
Richard Davey
e29fc62a98 Handle pre and post pipelines 2020-11-05 10:19:15 +00:00
Richard Davey
fb47d2f9e8 Added Pipeline component 2020-11-05 10:18:53 +00:00
Richard Davey
a00e169400 Added all the handlers needed for the post pipeline feature 2020-11-04 18:00:50 +00:00
Richard Davey
26421bde82 Removed Graphics.setTexture and related commands as no longer supported 2020-11-03 11:47:42 +00:00
Richard Davey
6af80708d0 Fixed all of the Shape WebGL rendering issues 2020-11-03 11:22:30 +00:00
Richard Davey
e0295e8521 Make use of GetCalcMatrix and remove texture related stuff 2020-11-02 22:40:12 +00:00
Richard Davey
881019e55d No longer requires temp matrices 2020-11-02 22:39:42 +00:00
Richard Davey
47ec3d33c7 Remove texture setters 2020-11-02 16:20:22 +00:00
Richard Davey
bf7e7f352a Container can how set a pipeline that overrides all children 2020-10-29 17:22:16 +00:00
Richard Davey
ce69c22e86 Added new private forcePipeline property and pipeline methods 2020-10-29 17:22:04 +00:00
Richard Davey
60c834e2c8 Use the new Graphics Pipeline 2020-10-28 17:39:06 +00:00
Richard Davey
4ba2b0eb7b All swapped to using renderer matrices to make pipelines smaller 2020-10-28 16:52:59 +00:00
Richard Davey
4b3cc7145e Testing new pipelineData object. 2020-10-27 18:06:53 +00:00
Richard Davey
ba9b837739 You can now pass a pipeline instance to the GameObject.setPipeline method, as well as a string. 2020-10-27 14:05:37 +00:00
Richard Davey
d670edd708 No need to reference via game 2020-10-27 13:55:27 +00:00
Richard Davey
371425a5d2 Use new pipeline resize method 2020-10-26 14:04:55 +00:00
Richard Davey
af01b23696 JSDocs fix 2020-10-26 14:03:35 +00:00
Kshitiz Srivastava
4941ca3b64
Added loadMediaStream method 2020-10-25 01:24:55 +05:30
Richard Davey
6ed84e2f34 Added Mesh.ignoreDirtyCache flag. 2020-10-21 10:15:12 +01:00
Rex
34635c582e Don't add white space when measure last word 2020-10-20 14:52:20 +08:00
Richard Davey
8bb1151aca Fixed RenderTexture.fill rgb order. Fix #5364 2020-10-20 00:50:49 +01:00
Richard Davey
48d9eb6321 The GameObjects.Graphics.fillGradientStyle method can now accept a different alpha value for each of the fill colors. The default is still 1. If you only provide a single alpha, it'll be used for all colors. Fix #5044 2020-10-16 18:08:31 +01:00
Richard Davey
85a284d095 Particles.EmitterOp now cleanly separates between the different types of property configuration options. start | end will now ease between the two values, min | max will pick a random value between them and random: [] will pick a random element. They no longer get mixed together. Fix #3608 2020-10-16 17:52:59 +01:00
Richard Davey
1aaecbe703 Particles.EmitterOp.setMethods will now reset both onEmit and onUpdate to their default values. This allows you to reconfigure an emitter op with a new type of value and not have it stuck on the previous one. Fix #3663 2020-10-16 17:32:22 +01:00
Richard Davey
ae6112297a Default tint value should now be 0xffffff. Fix #5358 2020-10-15 12:19:17 +01:00
Richard Davey
0f87981f47 Improved docs 2020-10-15 11:07:22 +01:00
Richard Davey
f17743dadf Changed updateProjectionMatrix to setPerspective and added setOrtho counterpart 2020-10-14 16:32:29 +01:00
Richard Davey
cc167e158f Much better effect from the light shader 2020-10-14 11:57:58 +01:00
Richard Davey
b1a5ce7f55 Testing new batched lights 2020-10-13 18:17:30 +01:00
Richard Davey
61c0e1c499 Moved Text out of 'static' folder, as it doesn't need to be in there 2020-10-13 11:04:46 +01:00
Richard Davey
8708255948 Removed Layer3D Game Object and old MeshPipeline 2020-10-13 10:56:21 +01:00
Richard Davey
9d23735a23 Lint fix 2020-10-13 10:51:17 +01:00
Richard Davey
19f581327e Removed Animation component because it would reset the UV coords every frame, so makes things overly complex 2020-10-13 10:50:42 +01:00
Richard Davey
caa69b673d Better debug rendering 2020-10-09 14:57:07 +01:00
Richard Davey
65e4a7734a Updated docs 2020-10-09 12:07:37 +01:00
Richard Davey
abdd62dd57 Will no longer render Faces it cannot see in the Camera 2020-10-09 11:54:37 +01:00
Richard Davey
88feadb577 Fixed JSDocs, added totalRendered property. 2020-10-09 11:54:19 +01:00
Richard Davey
bf8cd60aab Added ability to rotate data on import 2020-10-08 15:53:13 +01:00
Richard Davey
af0a4dbd37 Updated Mesh to include new functions and docs 2020-10-08 13:24:23 +01:00
Richard Davey
e3f7048e22 Removed moved defs 2020-10-08 13:23:44 +01:00
Richard Davey
2e988801ce Made obj material parsing external 2020-10-08 10:45:03 +01:00
Richard Davey
324fa6a3b2 Removed MeshCamera, updated Mesh to focus on ortho projections 2020-10-07 22:27:04 +01:00
Richard Davey
8f67ffca5f Starting to add materials 2020-10-07 18:06:33 +01:00
Richard Davey
90824e1485 Removed normalMatrix 2020-10-07 18:06:22 +01:00
Richard Davey
dda4431366 Merged the Layer3D Game Object and pipeline back in for now 2020-10-07 17:44:36 +01:00
Richard Davey
75fd64ace7 Modified cam layout 2020-10-07 13:16:24 +01:00
Richard Davey
f6a0a8d96b Transform based on z value 2020-10-07 13:16:10 +01:00
Richard Davey
55d7b36217 Pass in the z value 2020-10-07 13:16:01 +01:00
Richard Davey
8ff78ef08a Fixed addVerts face addition 2020-10-07 12:45:31 +01:00
Richard Davey
caf545d042 Added position, rotation and scale vectors, caching and removed old methods 2020-10-07 12:04:46 +01:00
Richard Davey
7a0b056fef Trying out MeshCamera 2020-10-06 18:05:14 +01:00
Richard Davey
4b7c344497 Added parseOBJMaterial method and set default texture to __WHITE 2020-10-06 16:00:22 +01:00
Richard Davey
dff414fe82 Added Grid Config typedefs 2020-10-06 13:47:49 +01:00
Richard Davey
1f1edd3742 addGrid now takes config object and works with texture frames, with or without repeating 2020-10-06 13:42:44 +01:00
Richard Davey
440c33deb8 Use config object 2020-10-06 11:11:28 +01:00
Richard Davey
7287a760ae Added ParseOBJ type defs 2020-10-06 10:38:21 +01:00
Richard Davey
816c45937d Removed the Quad Game Object. Mesh can do it better now. 2020-10-06 10:16:46 +01:00
Richard Davey
a0020b2ad4 Fixed paths and addGrid 2020-10-05 17:40:42 +01:00
Richard Davey
b774df9426 More documentation 2020-10-05 17:25:24 +01:00
Richard Davey
57974c120a Updated docs 2020-10-05 17:12:18 +01:00
Richard Davey
7aaf77a2c6 Merged the Mesh Game Object back in 2020-10-05 16:52:01 +01:00
Richard Davey
8091f09c10 Don't set OutlineStyle if undefined 2020-10-05 13:53:11 +01:00
Richard Davey
2b99623cdc Group now extends EventEmitter, allowing you to emit custom events from within a Group. 2020-10-03 10:05:38 +01:00
Patrick Sletvold
c1d63d32dd
Add Config typedefs for a bunch of GO Creators 2020-10-03 10:40:24 +02:00
Richard Davey
3baecb19d4 Moved old mesh pipeline and code into own folder 2020-10-01 17:56:49 +01:00
Richard Davey
1907bda5ee Update GameObjectFactory.js 2020-09-30 16:30:12 +01:00
Richard Davey
8823f7f0e4 Removed Layer3D and Quad Game Objects 2020-09-30 11:03:19 +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
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
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
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
Patrick Sletvold
79114a00e5
Add return type for ParseRetroFont 2020-09-25 18:26:44 +02: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
c6f533b872 Fixed legacy interpolation parameters 2020-09-23 17:55:29 +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
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
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
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
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
183e68580f Fixed dirty flag reset 2020-09-22 11:45:49 +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
333945a89e Remove Mesh Game Object and add Layer3D 2020-09-21 18:24: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
Vladislav Forsh
4d7301a4be Improve types for particle emitter deathZone and emitZone 2020-09-21 12:38:29 +03:00
Vladislav Forsh
530c7a3d92 Add reserve property to particle emitter config 2020-09-21 12:06:49 +03: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
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
samme
d4059c8f6e Fix Group#getMatching 2020-09-19 10:10:25 -07: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
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
6ce58ed73b Let them define the orientation 2020-09-17 10:08:15 +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
1d0b5cc6a9 Added Size component 2020-09-16 17:15:37 +01:00
Richard Davey
a38166ce2b Now allows a texture per model, not mesh 2020-09-16 16:39:06 +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
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
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
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
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
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
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
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
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
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
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
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
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
Richard Davey
00b799db23 Use Event const, not string. 2020-09-11 12:23:33 +01:00
Richard Davey
3969d6e45a Updated JSDocs to cover situation in #3858 2020-09-11 10:08:22 +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
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
bd56b0bd59 Updated JSDocs 2020-09-08 12:17:45 +01:00
Richard Davey
cdd612a273 AnimationState has moved namespace to keep things logically together 2020-09-08 09:31:59 +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
24beb01963 Update AnimationState.js 2020-09-07 10:26:16 +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
cebd1d0101 Tidy up order 2020-09-04 11:52:19 +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
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
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
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
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
90fbb0f13d Updated jsdocs for play to show it can take the new config 2020-09-02 17:41:43 +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
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
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
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
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
7e572c3577 Improves JSDocs 2020-08-25 09:54:09 +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
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
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
Richard Davey
1766f66984 Update JSDocs 2020-08-24 14:58:24 +01:00
Richard Davey
0dd07333af Updated to use MultiPipeline 2020-08-21 16:14:59 +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
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
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
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
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
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