Richard Davey
8cd45a72b2
ESLint fixes
2018-11-20 11:02:19 +00:00
Richard Davey
eb5da1f26d
Docs update
2018-11-16 10:56:43 +00:00
Richard Davey
41343e3102
Removed copy paste error
2018-11-16 10:46:22 +00:00
Richard Davey
48686881dc
Removed clearColor. CSS now handles this. Context always transparent.
2018-11-13 15:10:10 +00:00
Richard Davey
76918e76b0
ERASE tests
2018-11-13 10:32:24 +00:00
Richard Davey
06688eedd8
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-11-10 04:22:51 +00:00
Richard Davey
7d1f990ad3
Added ERASE blend mode.
2018-11-10 04:22:13 +00:00
Richard Davey
8ea2bffb9c
Render Textures created larger than the size of the default canvas would be automatically clipped when drawn to in WebGL. They now reset the gl scissor and drawing height property in order to draw to their full size, regardless of the canvas size. Fix #4139
2018-11-07 16:01:21 +00:00
Richard Davey
789713b4b1
Updated the clear and rebind pipeline methods
2018-10-29 23:07:10 +00:00
Richard Davey
bed1141d9a
Added clearPipeline and rebindPipeline and force argument.
2018-10-25 14:13:40 +01:00
Richard Davey
b73d0dd80c
Added jsdocs
2018-10-22 13:47:46 +01:00
Richard Davey
557955e057
Merging Scale Manager and Spine Plugin back into master
2018-10-18 14:59:27 +01:00
Richard Davey
ae9c3b6f56
Tidying up for 3.15 release
2018-10-16 15:10:49 +01:00
Richard Davey
9dc53d1e5a
The WebGLRenderer method canvasToTexture
has a new optional argument noRepeat
which will stop it from using gl.REPEAT
entirely. This is now used by the Text object to avoid it potentially switching between a REPEAT and CLAMP texture, causing texture black-outs
2018-10-12 15:08:53 +01:00
Richard Davey
240914ee03
Fixed some types and removed resize calls
2018-10-11 17:02:14 +01:00
Richard Davey
4b1c762296
Updated @memberOf to @memberof
2018-10-10 10:49:13 +01:00
Richard Davey
a9063604dc
Replace @readOnly with @readonly
2018-10-09 13:40:00 +01:00
Richard Davey
143957d24a
You can now set the maxLights
value in the Game Config, which controls the total number of lights the Light2D shader can render in a single pass. The default is 10. Be careful about pushing this too far. More lights = less performance. Close #4081
2018-10-02 11:09:58 +01:00
Richard Davey
5bdf9aa21b
WebGLRenderer.deleteTexture
will check to see if the texture it is being asked to delete is the currently bound texture or not. If it is, it'll set the blank texture to be bound after deletion. This should stop RENDER WARNING: there is no texture bound to the unit 0
errors if you destroy a Game Object, such as Text or TileSprite, from an async or timed process
2018-10-01 16:32:42 +01:00
Richard Davey
b3f3f6a9b5
If a Game instance is destroyed without using the removeCanvas
argument, it would throw exceptions in the MouseManager
after the destroy process has run, as the event listeners were not unbound. They're not unbound, regardless of if the parent canvas is removed or not. Fix #4015
2018-10-01 12:55:54 +01:00
Richard Davey
e297b3272e
Added hundreds of new jsdoc descriptions
2018-10-01 11:35:01 +01:00
Richard Davey
ec6715ba8b
Fixed a bug where the gl scissor wasn't being reset during a renderer resize, causing it to appear as if the canvas didn't resize properly when autoResize
was set to true
in the game config. Fix #4066
2018-10-01 10:38:39 +01:00
Richard Davey
c237209bb8
Added new jsdocs
2018-09-28 12:19:21 +01:00
Richard Davey
d8fcde46c3
When using CanvasTexture.refresh
or Graphics.generateTexture
it would throw WebGL warnings like 'bindTexture: Attempt to bind a deleted texture'. This was due to the Frames losing sync with the glTexture reference used by their TextureSource. Fix #4050
2018-09-27 14:16:22 +01:00
Richard Davey
5ec26fa62d
Cameras now emit prerender
and postrender
events if they are set to render to textures.
2018-09-14 15:53:06 +01:00
Richard Davey
ef62313bbb
The WebGL Renderer now always enables the SCISSOR_TEST
, this allows Game Objects that use the scissor (such as custom objects, or Bitmap Text) to render properly again.
2018-09-14 12:33:09 +01:00
aaron
b9454eaf7b
Wrong filling rectangle for camera with no transparent background after last scissor changes
2018-09-14 10:53:50 +02:00
Richard Davey
7b0d823415
Resizing canvas backed textures like this is a really bad idea, so remove it.
2018-09-13 13:22:27 +01:00
Matthew Roelle
700509275d
Changed setFloatXv methods to accept a Float32Array rather than instantiate its own
2018-09-12 20:25:15 -07:00
Richard Davey
a418995c15
Fixed jsdoc versions and updated them for #4019
2018-09-12 15:34:48 +01:00
Matthew Roelle
7465717d92
Fixed doccomment for float array uniforms
2018-09-09 18:19:09 -07:00
Matthew Roelle
aeeefb3cf6
Added support for setting float array uniforms in the WebGLRenderer and WebGLPipeline
2018-09-09 18:05:29 -07:00
Richard Davey
55003641d2
Clamp scissor
2018-08-31 18:19:31 +01:00
Richard Davey
0b95ed0478
Fixed scissors when using a small cam with render texture
2018-08-31 16:25:04 +01:00
Richard Davey
79b4f07530
Fixed mask flush and sped-up the render loop slightly (removed 1 duplicate conditional)
2018-08-31 14:40:12 +01:00
James Simpson
1ac7c969ea
Don't set gl.clearColor when no clearBeforeRender
...
Unless I'm missing something, the `gl.clearColor` command is unnecessary when you have `this.config.clearBeforeRender` set to `false`. This simply moves that into the config check to eliminate an unused command in those situations.
2018-08-17 14:03:17 -05:00
Richard Davey
66afe973af
Trying mixins
2018-08-08 01:33:55 +01:00
Richard Davey
3a4bfa679b
Added experimental Camera to Render Texture
2018-08-07 16:27:21 +01:00
Richard Davey
f9e498353d
Fixed lack of TempMatrix for Graphics generateTexture
2018-08-06 16:19:30 +01:00
Richard Davey
8ed749bcb1
Removed old scissor code
2018-08-03 18:57:03 +01:00
Richard Davey
7ebf5766e8
Added docs for blankTexture and setBlankTexture.
2018-08-01 13:23:03 +01:00
Richard Davey
73524df816
The Game boot event flow has changed slightly. The Game will now listen for a texturesready
event, which is dispatched by the Texture Manager when the default textures have finished processing. Upon receiving this, the Game will emit the ready
event, which all the other systems listen for and respond to. The difference is that the Renderer uses the texturesready
event to ensure that it is the first thing to be activated, before any other system.
2018-08-01 13:18:28 +01:00
Richard Davey
a3fc263360
Binding a framebuffer sets the viewport size
2018-07-31 17:09:47 +01:00
Richard Davey
a09c2a4958
Now uses customViewports counter to avoid scissor setting and skips box check
2018-07-26 23:05:25 +01:00
Richard Davey
1777e16227
Sorting out the scissor stack
2018-07-26 17:50:07 +01:00
Richard Davey
90219d46b3
Removed all references to the FlatTintPipeline.
2018-07-26 16:33:29 +01:00
Richard Davey
d3e07b519a
Added setBlankTexture method
2018-07-26 15:04:46 +01:00
Richard Davey
0516fd47f7
The Flat Tint Pipeline is now using the same shader as the Texture Tint
...
Time to make sure no texture swaps happen and we can finally have Graphics mixed with Sprites in the display list with no swapping cost (and soon, no flush cost either when we unify the pipelines)
2018-07-24 17:07:26 +01:00
Richard Davey
521138e9d8
setBlendMode now returns a boolean
2018-07-23 01:39:32 +01:00
Richard Davey
ec5bd1912e
GameObject.willRender
now takes a Camera as its only argument and uses it within the check. This has allowed me to remove 23 duplicate checks spread across the various Game Objects, all of which did the same thing, saving both KB and CPU time as the flags were being checked twice in most cases.
2018-07-19 13:19:02 +01:00