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