Richard Davey
051dadd02a
Add 'willReadFrequently' to CanvasTexture
2022-10-14 13:25:01 +01:00
Richard Davey
ac2c9c8fb8
Fixed Texture Manager reference. Fix #6250
2022-10-14 13:24:46 +01:00
Richard Davey
e722904139
Merge branch 'master' of https://github.com/photonstorm/phaser
2022-10-13 22:03:37 +01:00
Richard Davey
bd1adbd67e
Clear TEXTURE1. Fix #6248
2022-10-13 22:03:33 +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
Richard Davey
ac79cea3bc
Update TweenManager.js
2022-10-13 14:56:53 +01: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
Richard Davey
4bd64129e9
Only checkWorldBounds in Body.reset if the Body collides with it
2022-10-11 01:45:21 +01:00
Richard Davey
0301922bdc
Preparing for Beta 13
2022-10-10 17:59:52 +01:00
Richard Davey
07e0753e74
Fixed type def
2022-10-10 17:54:34 +01:00
Richard Davey
ead9de5c04
Drawing a frame via draw
, drawFrame
or batchDrawFrame
and specifying a tint
value would inverse the Red and Blue channels. These are now handled properly. Fix #5509
2022-10-10 17:44:00 +01:00
Richard Davey
f3c804805f
Update MultiPipeline.js
2022-10-10 17:43:53 +01:00
Richard Davey
3bb2a51f85
Merge pull request #6193 from JaroVDH/master
...
Add raw character index to BitmapText text bounds
2022-10-10 16:34:21 +01:00
Richard Davey
205dab8794
Abort update if stuck in a countdown
2022-10-10 16:32:54 +01: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
a970e0bcfb
Using DynamicTexture.fill
in CANVAS mode only, after using the erase
method, wouldn't reset the global composite operation correctly, resulting in fills. Fix #6124
2022-10-10 15:39:16 +01:00
Richard Davey
cb5d91f596
Fix #6242
2022-10-10 15:31:50 +01:00
Richard Davey
346aff2858
Don't get targets from destroyed tweens. Fix #6244
2022-10-10 15:28:11 +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
d68b0b7c91
Merge pull request #6155 from ef4/better-closest-type
...
Improve types for ArcdePhysics.closest
2022-10-10 14:50:36 +01:00
Richard Davey
8f4b57a018
Merge pull request #6007 from rexrainbow/scene-transition-onstart
...
Add onStart parameter into scene.transition(config)
2022-10-10 14:47:23 +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
a6a83ca592
Testing customSampler
2022-10-10 13:27:33 +01:00
Richard Davey
ed679fc023
Don't try and stop destroyed tweens
2022-10-10 01:29:06 +01:00
Richard Davey
954eb00fa1
Give Shapes the FX component
2022-10-09 23:16:58 +01:00
Richard Davey
52f7ec621a
Added destroy method back in again
2022-10-09 23:16:48 +01:00
Richard Davey
d0cc5f17d5
Extend the MultiPipeline and use new batch system
2022-10-09 23:16:38 +01:00
Richard Davey
6c2b45d99f
Use setQuad
2022-10-09 21:40:22 +01:00
Richard Davey
2e2c6528b6
Preparing for beta 12
2022-10-09 18:25:34 +01:00
Richard Davey
5dd3a40342
Fixed data types
2022-10-09 18:11:00 +01:00
Richard Davey
76ce040bcb
Fixed Mesh renderer
2022-10-09 18:04:36 +01:00
Richard Davey
01150a6efc
Removed un-needed method
2022-10-09 17:49:21 +01:00
Richard Davey
6ff216d832
Create WebGLPipelineBatchEntry.js
2022-10-09 17:49:11 +01:00
Richard Davey
7600f2f6b6
Added all new jsdocs
2022-10-09 17:49:08 +01:00
Richard Davey
a2d5f25a55
Added new method
2022-10-09 17:30:36 +01:00
Richard Davey
3c54c852dc
Don't forget to update the batch count
2022-10-09 17:30:27 +01:00
Richard Davey
70ef38c03c
Fixed rendering
2022-10-09 17:29:37 +01:00
Richard Davey
e44a148882
Store actual WebGLTextures
2022-10-09 17:29:29 +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
57f2f7abd7
Broken for now
2022-10-07 18:03:16 +01:00
Richard Davey
5908eea4ce
Use new methods
2022-10-07 16:24:07 +01:00
Richard Davey
496882fbd2
Inc count on batchVert
2022-10-07 16:23:57 +01:00
Richard Davey
4a44bd6024
Update Texture.js
2022-10-07 16:23:34 +01:00
Richard Davey
c9e37ed373
Remove calls to resetTextures
2022-10-07 16:09:23 +01:00
Richard Davey
bfa0a7298a
Update TextureSource.js
...
* The `Textures.TextureSource.glIndex` property has been removed.
* The `Textures.TextureSource.glIndexCounter` property has been removed.
2022-10-07 16:08:50 +01:00
Richard Davey
080242f928
Due to all of the changes with how WebGL texture batching works a lot of mostly internal methods and properties have been removed. This is the complete list
...
* The `WebGLRenderer.currentActiveTexture` property has been removed.
* The `WebGLRenderer.startActiveTexture` property has been removed.
* The `WebGLRenderer.tempTextures` property has been removed.
* The `WebGLRenderer.textureZero` property has been removed.
* The `WebGLRenderer.normalTexture` property has been removed.
* The `WebGLRenderer.textueFlush` property has been removed.
* The `WebGLRenderer.isTextureClean` property has been removed.
* The `WebGLRenderer.setBlankTexture` method has been removed.
* The `WebGLRenderer.setTextureSource` method has been removed.
* The `WebGLRenderer.isNewNormalMap` method has been removed.
* The `WebGLRenderer.setTextureZero` method has been removed.
* The `WebGLRenderer.clearTextureZero` method has been removed.
* The `WebGLRenderer.setNormalMap` method has been removed.
* The `WebGLRenderer.clearNormalMap` method has been removed.
* The `WebGLRenderer.unbindTextures` method has been removed.
* The `WebGLRenderer.resetTextures` method has been removed.
* The `WebGLRenderer.setTexture2D` method has been removed.
* The `WebGLRenderer.pushFramebuffer` method has had the `resetTextures` argument removed.
* The `WebGLRenderer.setFramebuffer` method has had the `resetTextures` argument removed.
* The `WebGLRenderer.popFramebuffer` method has had the `resetTextures` argument removed.
* The `WebGLRenderer.deleteTexture` method has had the `reset` argument removed.
2022-10-07 16:08:39 +01:00
Richard Davey
5641bfe48c
Update index.js
2022-10-07 15:27:50 +01:00
Richard Davey
9d834efb0a
Update RenderTexture.js
2022-10-07 15:14:15 +01:00
Richard Davey
cbc0ac5a7a
Create a batch if empty
2022-10-07 12:47:04 +01:00
Richard Davey
9671e54e2b
Add Camera property
2022-10-07 12:46:54 +01:00
Richard Davey
f4a248e575
Debugging while testing texture batching
2022-10-07 01:37:37 +01:00
Richard Davey
e2187086ce
Merged batch code in
2022-10-07 01:37:17 +01:00
Richard Davey
e18c7fe6c9
New shaders
2022-10-07 01:36:58 +01:00
Richard Davey
5aa1584360
TextureManager.silentWarnings
is a new boolean property that, when set, will prevent the Texture Manager from emiting any warnings or errors to the console in the case of missing texture keys or invalid texture access. The default is to display these warnings, this flag toggles that.
2022-10-06 22:04:21 +01:00
Richard Davey
59166f5f3f
Fix #6239
2022-10-06 18:51:36 +01:00
Richard Davey
3f4ebf5dd7
Update WebGLRenderer.js
2022-10-06 18:35:04 +01:00
Richard Davey
f0d3588f7b
Use batch system to avoid bufferSubData spamming - massively improves performance!
2022-10-05 00:59:04 +01:00
Richard Davey
08ee414ad5
Inline array add to stop branching
2022-10-05 00:58:33 +01:00
Richard Davey
010db3f2a3
Updated jsdocs
2022-10-04 18:27:19 +01:00
Richard Davey
ba8d25909f
Update PipelineManager.js
2022-10-04 18:27:11 +01:00
Richard Davey
03f09e2c10
Added setDefaultPipeline method
2022-10-04 18:20:17 +01:00
Richard Davey
f5960bea30
Get the default pipeline from the Pipeline Manager
2022-10-04 18:04:41 +01:00
Richard Davey
3d3b675ae8
Pass over the config values
2022-10-04 18:04:26 +01:00
Richard Davey
64972f8456
Added default pipeline and mobile swap
2022-10-04 18:04:18 +01:00
Richard Davey
fea000cf94
Added defaultPipeline and autoMobilePipeline configs
2022-10-04 18:04:01 +01:00
Richard Davey
20485e1aa2
Added MobilePipeline
2022-10-04 17:08:48 +01:00
Richard Davey
083100163b
Updates stableSort and added autoMobilePipeline
2022-10-04 17:08:34 +01:00
Richard Davey
0fe75e9969
Use new features.stableSort
2022-10-04 17:08:18 +01:00
Richard Davey
9688698954
Added stableSort and fixed final canvas read warning in Chrome
2022-10-04 17:08:09 +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
554ef91353
Correct docs
2022-10-04 14:49:26 +01:00
Richard Davey
e774987897
Removed unused code
2022-10-04 14:49:19 +01:00
Richard Davey
6f68e075ba
Update DynamicTexture.js
2022-10-04 14:49:10 +01:00
Richard Davey
1316c09d1c
Merge branch 'master' of https://github.com/photonstorm/phaser
2022-10-04 13:17:44 +01:00
Richard Davey
d9a30e6c52
Remove unused shaders
2022-10-04 13:17:33 +01:00
arbassic
58cf547d47
fix: use webgl 1 pattern to always use best precision available
2022-10-04 01:11:10 +02:00
Richard Davey
4db20ffa9e
Allow a DynamicTexture to be used as a BitmapMask
2022-10-03 23:15:53 +01:00
Richard Davey
c2869d2eb6
Scale 1
2022-10-03 23:15:40 +01:00
Richard Davey
8bfc0b2eee
The BitmapMask now registers itself with the Game Object Factory. This means you can do this.add.bitmapMask()
from within a Scene, for easier creation.
2022-10-03 22:13:25 +01:00
Richard Davey
1a23b31947
Remove swap and rename method
2022-10-03 22:07:07 +01:00
Richard Davey
b52a730f9b
Rename function
2022-10-03 22:06:58 +01:00
Richard Davey
17f2d7e072
Update Mask.js
2022-10-03 22:06:16 +01:00
Richard Davey
0385f34e00
Create Image object directly
2022-10-03 22:06:12 +01:00
Richard Davey
416aa053da
Swap to using RenderTarget, much cleaner
2022-10-03 21:09:15 +01:00
Richard Davey
a563b49877
Put missing return back in
2022-10-03 20:23:24 +01:00
Richard Davey
eba9254e1a
The BitmapMaskPipeline
now hands over most control of the framebuffers to the WebGLRenderer.
2022-10-03 18:50:48 +01:00
Richard Davey
95cd4f294d
Camera is for textures only
2022-10-03 18:50:09 +01:00
Richard Davey
b327f39c5e
Bitmap Mask updates
...
* The `WebGLRenderer` has 4 new properties: `maskTargetFramebuffer`, `maskSourceFramebuffer`, `maskTargetTexture` and `maskSourceTexture`. These are the new global locations of the mask framebuffers.
* `WebGLRenderer.createBitmapMask` is a new method that internally creates the Bitmap Mask framebuffers.
* `WebGLRenderer.clearBitmapMask` is a new method that internally clears the existing Bitmap Mask framebuffers, called as part of a resize event.
* `WebGLRenderer.enableBitmapMask` is a new method that starts the process of using the mask target framebuffer for drawing. This is called by the `BitmapMaskPipeline`.
* `WebGLRenderer.drawBitmapMask` is a new method that completes the process of rendering using the mask target framebuffer. This is called by the `BitmapMaskPipeline`.
2022-10-03 18:49:55 +01:00
Richard Davey
fb88b6639d
Removed fbos and textures, all now managed by the WebGL Renderer.
2022-10-03 18:46:53 +01:00
Richard Davey
d9a2c052d8
No longer requires the Scene argument
2022-10-03 18:30:11 +01:00
Richard Davey
62769d78ce
Camera.isSceneCamera
is a new boolean that controls if the Camera belongs to a Scene (the default), or a Texture. You can set this via the Camera.setScene
method. Once set the Camera.updateSystem
method is skipped, preventing the WebGL Renderer from setting a scissor every frame.
2022-10-03 15:49:40 +01:00
Richard Davey
bf8ec50fe1
Remove use of 'len' for iOS test
2022-10-03 14:42:33 +01:00
Richard Davey
dcb1c8a9dd
Allowing custom resolution for mask shader
2022-09-29 23:35:06 +01:00
Richard Davey
3abea4286f
When rendering a Sprite with a Camera set to roundPixels
it will now run Math.floor
on the Matrix position, preventing you from noticing 'jitters' as much when Camera following sprites in heavily zoomed Camera systems.
2022-09-29 22:11:02 +01:00
Richard Davey
f136a796fa
* Camera.preRender
will now apply Math.floor
instead of Math.round
to the values, keeping it consistent with the Renderer when following a sprite.
2022-09-29 22:10:29 +01:00
Richard Davey
e2c9838896
Update StampConfig.js
2022-09-29 18:51:31 +01:00
Richard Davey
9ba74e9f8c
Added scale, blendMode and erase support
2022-09-29 18:51:27 +01:00
Richard Davey
18ec3db0ef
Update BlendMode.js
2022-09-29 18:51:16 +01:00
Richard Davey
f7196a07c2
Added stamp method docs and swap to using config object
2022-09-29 17:42:52 +01:00
Richard Davey
4b14d3d6c6
Create StampConfig.js
2022-09-29 17:42:40 +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
2e870a0a2c
Previously, the Multi Tint methods batchSprite
, batchTexture
, batchTextureFrame
and batchFillRect
would all make heavy use of the TransformMatrix.getXRound
and getYRound
methods, which in turn called getX
and getY
and applied optional rounding to them. This is all now handled by one single function (setQuad
) with no branching, meaning rendering one single sprite has cut down 16 function calls and 48 getters to just 1 function.
2022-09-29 17:17:24 +01:00
Richard Davey
519aed9f4a
Update Camera.js
2022-09-29 16:46:30 +01:00
Richard Davey
fba997d75e
If you create a repeating or looping TimerEvent
with a delay
of zero it will now throw a runtime error as it would lead to an infinite loop. Fix #6225
2022-09-29 15:02:02 +01:00
Richard Davey
e86c78dd1e
lint fix
2022-09-29 14:56:31 +01:00
Richard Davey
9aa1e0c2a9
Merge pull request #6216 from JernejHabjan/visible-children-performance
...
Improve visible children performance
2022-09-29 14:54:16 +01:00
Richard Davey
b2d47b11c1
Merge pull request #6214 from rexrainbow/getviewport-with-camera
...
Get viewport under a camera
2022-09-29 14:40:08 +01:00
Richard Davey
347413afb1
Merge pull request #6227 from EmilSV/tween-fixes
...
Tween fixes
2022-09-29 14:36:26 +01:00
Richard Davey
70da8df4a1
Merge pull request #6228 from EmilSV/tween-seek-fix
...
Tween seek use less then instead of less or equal
2022-09-29 14:35:50 +01:00
Richard Davey
3528354a4b
Added handy 'stamp' method
2022-09-28 22:43:29 +01:00
Richard Davey
064a1e0f4f
Added resetStamp
2022-09-28 22:43:20 +01:00
Richard Davey
0d951029b6
No need for 'this.frame'
2022-09-28 20:57:50 +01:00
Richard Davey
a60660a474
Create on READY
2022-09-28 20:57:42 +01:00
Richard Davey
e3503ef8b4
All of the following Texture Manager methods will now allow you to pass in a Phaser Texture as the source
parameter: addSpriteSheet
, addAtlas
, addAtlasJSONArray
, addAtlasJSONHash
, addAtlasXML
and addAtlasUnity
. This allows you to add sprite sheet or atlas data to existing textures, or textures that came from external sources, such as SVG files, canvas elements or Dynamic Textures.
2022-09-28 20:34:34 +01:00
Richard Davey
8bfe54287a
Updated documentation
2022-09-28 19:53:59 +01:00
Richard Davey
676f0db838
Added Stamp
2022-09-28 19:53:49 +01:00
Richard Davey
0e57db40d4
Improved docs
2022-09-28 19:09:35 +01:00
Richard Davey
f9ecb2461b
Update DynamicTexture.js
2022-09-28 17:51:09 +01:00
Richard Davey
d64878736f
Testing out the new DynamicTexture
2022-09-27 23:39:23 +01:00
Richard Davey
d3de5ef1e4
SceneManager.systemScene` is a new property that is set during the game boot and is a system Scene reference that plugins and managers can use, that lives outside of the Scene list.
2022-09-27 23:39:04 +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
62f3315b1c
Trying DynamicTexture (to replace RenderTexture)
2022-09-27 18:42:46 +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
e15f2414d6
Update TextureManager.js
2022-09-26 23:18:12 +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
9ca7513b14
Use Tween.callbackScope fix #6229
2022-09-26 21:42:24 +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
1283ca8198
The TextureManager.get
methof can now accept a Frame
instance as its parameter, which will return the frames parent Texture.
2022-09-26 17:18:04 +01:00
Richard Davey
ff4d7084d9
Update IsPlainObject.js
2022-09-26 17:15:45 +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
25ab9f329d
TextureManager.parseFrame
is a new method that will return a Texture Frame instance from the given argument, which can be a string, array, object or Texture instance.
2022-09-26 15:28:41 +01:00
Richard Davey
5320402a07
The endFrame
and startFrame
properties of the SpriteSheet
parser wouldn't correctly apply themselves, the Texture would still end up with all of the frames. It will now start at the given startFrame
so that is frame zero and end at endFrame
, regardless how many other frames are in the sheet.
2022-09-24 21:35:58 +01:00
Emil Schnedler Vad
340f9d29a1
made seek use less then instead of less or equal
2022-09-23 22:00:30 +02:00
Emil Schnedler Vad
f07042cbc4
BaseTween and TweenChain available from Phaser.Tweens
2022-09-23 20:53:51 +02:00
Emil Schnedler Vad
169faa6b96
made tweenManager# chain use TweenChainBuilderConfig
2022-09-23 13:07:16 +02:00
Richard Davey
ab04cb6c05
Lots of LightPipeline improvements
...
* The Light Pipeline no longer creates up to `maxLights` copies of the Light shader on boot. Previously it would then pick which shader to use, based on the number of visible lights in the Scene. Now, the number of lights is passed to the shader and branches accordingly. This means rather than compiling _n_ shaders on boot, it now only ever needs to create one.
* You can now have no lights in a Scene, but the Scene will still be impacted by the ambient light. Previously, you always needed at least 1 light to trigger ambient light (thanks jstnldrs)
* The `Light.frag` shader now uses a new `uLightCount` uniform to know when to stop iterating through the max lights.
* The `LightPipeline.LIGHT_COUNT` constant has been removed as it's not used internally.
* The `LightPipeline` previous created a global level temporary vec2 for calculations. This is now part of the class as the new `tempVec2` property.
2022-09-23 00:42:04 +01:00
Richard Davey
a135271f19
Use new uLightCount uniform
2022-09-23 00:41:47 +01:00
Richard Davey
b789742636
Update Utils.js
2022-09-22 14:55:29 +01:00
Richard Davey
9d43583a63
This shader is just better. More crappy iOS testing needed though.
2022-09-21 23:13:04 +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
Richard Davey
71703ff19c
GameConfig.stableSort
is a new optional property that will control if the internal depth sorting routine uses our own StableSort function, or the built-in browser Array.sort one. Only modern browsers have a _stable_ Array.sort implementation, which Phaser requires. Older ones need to use our function instead. Set to 1 to use the legacy version, 0 to use the ES2019 version or -1 to have Phaser try and detect which is best for the browser
...
Ref #6217
2022-09-21 17:52:57 +01:00