Richard Davey
d7e7feed19
Dimensions are now set in the onResize handlers.
2019-01-11 16:44:08 +00:00
Richard Davey
44f69ea7fa
Removed autoResize, tidied up the resize method and init.
2019-01-10 13:43:09 +00:00
Richard Davey
175af00c60
Stores the new resolution, should it change (unlikely, but ...)
2019-01-10 13:42:11 +00:00
Richard Davey
04ea2798e9
Use gameSize
2019-01-10 00:15:20 +00:00
gomachan_7
be562abd83
Fix WebGLRenderer to apply transparent bg in config
2019-01-10 02:17:53 +09:00
Richard Davey
b3aeee0bd1
Use the new size properties
2019-01-09 17:13:22 +00:00
Richard Davey
41286b5170
Make sure we bind the framebuffer and pipeline in the boot step
2018-12-18 14:58:42 +00:00
Richard Davey
8eebe518ad
Added optional drawingBufferHeight argument to scissor methods.
2018-12-18 13:36:05 +00:00
Richard Davey
4b1ea8db9b
WebGLRenderer.preRender
now calls gl.clearColor
in order to restore the background clear color in case something, like a Render Texture, has changed it.
2018-12-18 13:04:26 +00:00
Richard Davey
8f873c87af
Clears the framebuffer at the start of every render.
2018-12-18 11:32:36 +00:00
Richard Davey
7e732452eb
Fixed an issue in WebGLRenderer.setScissor
where it was possible to try and compare the scissor size to a non-current scissor, if called outside of the render loop (i.e. from RenderTexture.fill
)
2018-12-18 10:22:59 +00:00
Richard Davey
83f3f9cdeb
Changed scissor order.
2018-12-13 14:24:49 +00:00
Richard Davey
cc164b5399
Fixed camera background in WebGL.
2018-12-13 10:25:53 +00:00
Richard Davey
bbe95d96d9
Added jsdocs for #4137
2018-12-12 11:58:58 +00:00
Richard Davey
d823c66597
Merge pull request #4137 from sercant/master
...
Fix rotating normal map bug (issue #3870 )
2018-12-12 11:52:27 +00:00
Richard Davey
05ffb5312f
Updated docs
2018-12-12 11:09:00 +00:00
Richard Davey
4b27b37a0c
Added texture and unit arguments to batchQuad
and batchTri
, fixing the y2k bug.
2018-12-12 11:08:52 +00:00
Richard Davey
bacff65177
Refactoring texture batch creation
2018-12-11 15:00:12 +00:00
Richard Davey
5683713253
Added flush argument
2018-12-11 14:59:50 +00:00
Richard Davey
8e495da71d
Fixed currentScissor assignment order of operation
2018-12-08 11:37:26 +00:00
Richard Davey
2780babe10
Final Doc Jam merge
2018-12-03 15:16:23 +00:00
Richard Davey
6f8759c186
Whenever Camera.roundPixels
was enabled it would use a bitwise operation to truncate the float (x |= 0
) - this has been replaced across all files that used it, with a call to Math.round
instead. This gives far better results when zooming cameras both in and out of a Scene, stopping thin gaps appearing between closely packed Game Objects.
2018-11-30 10:27:25 +00:00
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
Sercan Turkmen
03ffe7842f
Fix rotating normal map bug (issue #3870 )
2018-10-31 02:17:11 +02:00
Richard Davey
789713b4b1
Updated the clear and rebind pipeline methods
2018-10-29 23:07:10 +00:00
Richard Davey
32a22140a6
Use the predefined variable
2018-10-29 23:06:51 +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
956a0913b8
Added new jsdocs
2018-10-22 12:12:31 +01:00
Richard Davey
4c4421c47f
Docjam merge
2018-10-19 12:32:43 +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
4beffe842a
Texture batching during the batch flush has been implemented in the TextureTintPipeline which resolves the issues of very low frame rates, especially on iOS devices, when using non-batched textures such as those used by Text or TileSprites.
2018-10-12 15:06:10 +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
3944e580cc
Fixed an error in the batchSprite
methods in the Canvas and WebGL Renderers that would incorrectly set the frame dimensions on Sprites with the crop component. This was particularly noticeable on Sprites with trimmed animation frames
2018-09-27 16:49:52 +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
945a2eb0fb
TextureTintPipeline.batchTexture
has a new optional argument skipFlip
which allows you to control the internal render texture flip Y check.
2018-09-26 16:32:41 +01:00
Richard Davey
c704dc450a
Fixed jsdoc definitions
2018-09-25 11:36:36 +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
8bc4d06831
Added IsoTriangle and project setting
2018-09-07 14:23:25 +01:00
Richard Davey
5e126b80fa
Parent matrix and now optional and it won't draw a line cap unless the first point has been set
2018-09-06 15:07:36 +01: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
Richard Davey
5270b463d0
Removed visible check as it's no longer needed
2018-08-31 14:39:38 +01:00
Richard Davey
ecae9d0503
The setTintFill
method would ignore the alpha
value of the Game Object in the shader. The alpha value is now blended with the tint fill, allowing you to properly alpha out tint-filled Game Objects. Fix #3992
2018-08-31 13:27:24 +01:00
Richard Davey
cb0eeb3d63
Added default blank frame for custom pipelines #3978
2018-08-24 23:58:27 +01:00
Richard Davey
1d4b2ed01a
Removed un-needed methods and fixed TileSprite and Tilemap Lights. Fix #3949
2018-08-23 17:30:27 +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
65d81ec426
Formatting
2018-08-07 16:26:22 +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
22bc6d2a86
The batchTexture
method in the Texture Tint Pipeline now supports cropped Game Objects and will adjust the drawn texture frame accordingly.
2018-08-03 18:54:48 +01:00
Richard Davey
2220faba49
Removed un-used method
2018-08-01 15:20:10 +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
be379fd3a1
Added batchTextureFrame method
2018-07-31 17:10:02 +01:00
Richard Davey
a3fc263360
Binding a framebuffer sets the viewport size
2018-07-31 17:09:47 +01:00
Richard Davey
6749417ef3
lint fix
2018-07-27 11:19:19 +01:00
Richard Davey
9331c15c48
Updated to use tint object.
2018-07-27 02:14:08 +01:00
Richard Davey
4481795d32
Swapped to using getX / getY
2018-07-27 00:53:00 +01:00
Richard Davey
6877582531
Removed un-used pipeline and shaders
2018-07-26 23:43:49 +01:00
Richard Davey
4bdecf488b
jsdocs tweaks
2018-07-26 23:41:52 +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
d093f35e5c
Merged all of the required FTP methods into TTP.
2018-07-26 16:34:04 +01:00
Richard Davey
e0c0db5f8e
Final bit of tidying up before merging this with the TTP.
2018-07-26 16:33:43 +01:00
Richard Davey
90219d46b3
Removed all references to the FlatTintPipeline.
2018-07-26 16:33:29 +01:00
Richard Davey
947d301f42
Removed the unit batch from TTP and put it into FDLP
2018-07-26 15:31:44 +01:00
Richard Davey
bda9159cb0
Textures now use the frame UV values.
2018-07-26 15:05:10 +01:00
Richard Davey
d3e07b519a
Added setBlankTexture method
2018-07-26 15:04:46 +01:00
Richard Davey
7acbbcf58a
Fixed linejoin, added arc and triangle, tidying up code
2018-07-26 13:49:05 +01:00
Richard Davey
39a6622623
Working on joints
2018-07-26 09:58:33 +01:00
Richard Davey
3a2fcd0951
Updated path drawing, sorting out line-cap differences with Canvas
2018-07-25 17:04:44 +01:00
Richard Davey
9d11b93b05
Updated shader
2018-07-25 13:06:22 +01:00
Richard Davey
4c25d12b44
Recoding the FTP. Rects and Tris working again.
2018-07-25 01:27:03 +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
ac108db9cc
Moving towards tidying up the FTP
2018-07-24 16:40:29 +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
Richard Davey
0db16889e6
Use new Camera viewport values
2018-07-18 14:32:06 +01:00
Richard Davey
1c473afa84
Cameras draw their backgrounds correctly at higher resolutions
2018-07-17 23:26:30 +01:00
Richard Davey
42c3fc5f6b
Better normal map handling
2018-07-13 11:14:22 +01:00
Richard Davey
4843d7eefe
Pipelines have a boot handler now.
2018-07-13 11:13:46 +01:00
Richard Davey
2924874236
Added docs
2018-07-12 01:13:47 +01:00
Richard Davey
072cc0e21b
Added dirty Camera support and updated internal properties to set the flag
2018-07-12 01:13:34 +01:00
Richard Davey
a0bf5b6ad2
Removed all the batch functions and consolidated into a single function and callback
2018-07-11 16:55:18 +01:00
Richard Davey
efb5eb09c5
Starting refactor
2018-07-11 16:24:58 +01:00
Richard Davey
05985417b3
Allow config setting values. Gets custom pipelines working again.
2018-07-11 16:24:45 +01:00
Richard Davey
5a5bea1ce5
Allow GO to be passed to onBind
2018-07-11 16:24:20 +01:00
Richard Davey
82b15c8695
Removed drawEmitterManager
and moved to emitter render function
2018-07-11 14:40:36 +01:00
Richard Davey
853281fe56
Double flusher
2018-07-11 13:22:07 +01:00
Richard Davey
373d01c602
Fixed emitter batch. Now to optimize it.
2018-07-11 13:20:02 +01:00
Richard Davey
e2efa469ae
Removed drawTexture and added drawTextureFrame - fixed Render Texture flip Y issue
2018-07-11 12:34:53 +01:00
Richard Davey
5b3a5e115b
Started consolidating drawTexture method
2018-07-10 17:18:00 +01:00
Richard Davey
340c53875c
Added new temp matrix, fixed typo, removed old function
2018-07-10 16:32:44 +01:00
Richard Davey
5128eecbeb
Cached the drawing buffer height
2018-07-10 16:32:28 +01:00
Richard Davey
434c8d1413
Fixed issue with sprite matrix and camera scaling
2018-07-10 13:59:49 +01:00
Richard Davey
85a32d54be
Typo
2018-07-09 17:06:27 +01:00
Richard Davey
5c554f3f69
Started moving dynamic bitmap text renderer to its own function
2018-07-07 12:34:24 +01:00
Richard Davey
dd0490dd57
Removed batchBitmapText, tidied up and moved to its own renderer
2018-07-07 12:22:45 +01:00
Richard Davey
8b13631107
Removed batchMesh
and moved to the Mesh WebGL Renderer. Another one bites the dust.
2018-07-06 19:35:46 +01:00
Richard Davey
c1bc928a73
Removed un-used vars
2018-07-06 17:29:49 +01:00
Richard Davey
a6ff0d54bb
Removed angle calculations from renderer as we only need do it when the arc is first defined
2018-07-06 17:16:09 +01:00
Richard Davey
325fb4681e
Tidying up
2018-07-05 23:55:00 +01:00
Richard Davey
5063fe30e5
Fixed cropping when texture frame is flipped
2018-07-05 23:01:26 +01:00
Richard Davey
341ecf42cd
Testing flip + atlas frame + trim cropping
2018-07-04 17:01:45 +01:00
Richard Davey
43fc988034
Moved crop UV handler to the Frame method. Cleaner and easier.
2018-07-04 15:18:08 +01:00
Richard Davey
ee8c1b403a
Fixed cropping with flipped images
2018-07-04 14:50:26 +01:00
Richard Davey
d44c54e5ed
batchSprite supports cropping (flipXY todo)
2018-07-03 16:48:14 +01:00
Richard Davey
d328f14be0
Fixed vertex calculation
2018-07-03 12:38:45 +01:00
Richard Davey
187328ea1a
UVs are passed directly now
2018-07-03 00:14:23 +01:00
Richard Davey
265852fc75
Removed test code
2018-07-02 17:09:21 +01:00
Richard Davey
35686657ce
Tidied up the batchVertices method and removed old stuff
2018-07-02 17:06:49 +01:00
Richard Davey
c1020c6dbb
Refactoring TTP to remove so much redundant stuff
2018-07-02 16:44:24 +01:00
Richard Davey
fe61cfe2d1
You can now set the WebGL batch size in the Game Config via the property batchSize
. The default is 2000 before the batch will flush, which is a happy average between desktop and mobile. If targeting desktop specifically, you may wish to increase this value to reduce draw calls.
2018-07-02 12:33:46 +01:00
Richard Davey
1941d8a494
Removed drawStaticTilemapLayer
method and updated layer vertex code
2018-07-02 12:07:39 +01:00
Richard Davey
fdead2af16
Added the tint effect attribute and merged with all the various batches
2018-06-30 11:33:52 +01:00
Richard Davey
11ef2c824b
Updated shader to support tint effect attribute
2018-06-30 11:33:28 +01:00
Richard Davey
e22b1a7b9c
Removed stubs from pipelines
2018-06-29 12:33:44 +01:00
Richard Davey
39c3866179
lint fix
2018-06-28 13:07:59 +01:00
Richard Davey
217779604c
Added tileScaleX and tileScaleY support for Tile Sprites
2018-06-28 12:59:27 +01:00
Richard Davey
8c312090da
Solidified use of pixelArt mode
2018-06-27 15:27:16 +01:00
Richard Davey
7a23378015
Unified use of roundPixels, antialias and pixelArt modes
2018-06-27 15:15:00 +01:00
Richard Davey
7aa46657c2
Tidying up jsdocs and changing float to number
2018-06-26 23:19:14 +01:00
Richard Davey
bb7b99a4db
Updated log and formatting
2018-06-25 22:53:42 +01:00
Richard Davey
c6c9b25fdc
Camera.alpha
(and its related method Camera.setAlpha
) allows you to get an alpha level for the entire camera. This impacts everything it is rendering, even if those objects also have their own alpha values too. You can tween the property to make the camera contents fade in / out, or you can set it as needed in your game.
2018-06-25 17:35:36 +01:00
Richard Davey
98b1cc2dbc
Although the Blitter object had the Alpha component, setting it made no difference. Setting Blitter alpha now impacts the rendering of all children, in both Canvas and WebGL, and you can also specify an alpha per Bob as well.
2018-06-25 16:06:22 +01:00
Richard Davey
f45ab89f8d
The ForwardDiffuseLightPipeline, used by the Lights system, now sets a flag if the Scene doesn't contain any lights. All of the Game Objects now check this flag and don't even bother adding themselves to the batch if there are no lights in the Scene, as they'd never render anyway. This also avoids the ghost-image problem if you swap Scenes to a new Scene with the Light Manager enabled, but no actual lights defined. Fix #3707
2018-05-31 16:57:30 +01:00
Richard Davey
9429a28574
The Particle tint value was incorrectly calculated, causing the color channels to be inversed. Fix #3643
2018-05-18 13:16:17 +01:00
Richard Davey
7a4b29872e
Allow for custom canvas and context game config options. Game.context now set in WebGL mode. Allows WebGL2 contexts to be passed in. Fix #3653
2018-05-10 12:25:33 +01:00
Richard Davey
835bc37e32
Optimized TextureTintPipeline.drawBlitter so it skips bobs that have alpha of zero and only calls setTexture2D
if the bob sourceIndex has changed, previously it called it for every single bob.
2018-05-09 15:13:06 +01:00
Richard Davey
7df0488100
Fixed dupe config set
2018-05-09 14:32:32 +01:00
Richard Davey
6ec1a580eb
typo fix
2018-05-09 14:30:31 +01:00
Richard Davey
056e74d6dc
Added compression object for future texture compression support.
2018-05-09 13:46:19 +01:00
Richard Davey
89329a2315
Added getMaxTextures and getMaxTextureSize methods
2018-05-09 12:12:16 +01:00
Richard Davey
57918bb50f
Removed the need for raw-loader
in webpack. Shaders now build to standard JS files. Removed fs requirement.
2018-05-08 23:04:57 +01:00
Richard Davey
97dd683ea1
The Forward Diffuse Light Pipeline was hard coded to assume the normal map would be stored in the source index zero. It now correctly obtains the normal map from the frame source index, which means all Game Objects that used frames from multi-atlas textures will now work with lights properly.
2018-05-04 14:31:19 +01:00
Felipe Alfonso
cf8e2cfd60
added jsdoc comments to WebGLRenderer
2018-04-25 20:30:41 -03:00
Felipe Alfonso
0c90f068fc
Added jsdoc comments to WebGLPipeline
2018-04-25 19:52:20 -03:00
Felipe Alfonso
e85c66a2fd
Added jsdocs comments to WebGL utils
2018-04-25 13:17:33 -03:00
Felipe Alfonso
d2da10c1a9
Added jsdoc comments to TextureTintPipeline
2018-04-25 13:06:19 -03:00
Felipe Alfonso
f64b4b9b20
added jsdoc comments to ForwardDiffuseLightPipeline
2018-04-24 16:52:57 -03:00
Felipe Alfonso
7e90dab82f
FlatTintPipeline jsdoc comments
2018-04-24 16:30:00 -03:00
Felipe Alfonso
e385d018c5
added comments to ModelViewProjection pipeline component
2018-04-24 16:00:35 -03:00
Felipe Alfonso
426bc4ffd4
BitmapMaskPipeline jsdoc descriptions
2018-04-24 13:53:10 -03:00
Richard Davey
ef24982301
Pending dos
2018-04-24 15:34:55 +01:00
Richard Davey
741d1f5793
Doc pending tags
2018-04-24 15:32:08 +01:00
Richard Davey
54a5bb41c7
Tidying up
2018-04-23 19:11:16 +01:00
Richard Davey
649378ed0a
Tidied up canvas creation and texture deletion
2018-04-23 17:30:09 +01:00
Richard Davey
176b085402
jsdoc fix
2018-04-19 13:28:10 +01:00
Felipe Alfonso
504ba9e133
Fixed eslint errors on TextureTintPipeline.js
2018-04-18 18:54:06 -03:00
Felipe Alfonso
aef538d61b
Added parent transform matrix to Light2D pipieline to allow support for containers
2018-04-18 18:40:27 -03:00
Felipe Alfonso
47bee69b3b
Fixed transformation matrix order for batchGraphics
2018-04-18 18:35:18 -03:00
Felipe Alfonso
18e178a72f
Fixed matrix transformation order for batchTexture
2018-04-18 18:30:54 -03:00
Felipe Alfonso
f3e0ae8d44
Fixed order of transformation for dynamic bitmap text
2018-04-18 18:28:08 -03:00
Felipe Alfonso
dbafd9a70c
Fixed order of matrix transformation on:
...
-emitter
-blitter
-sprite
-mesh
-bitmap text
2018-04-18 18:15:43 -03:00
Richard Davey
55965c748f
jsdoc fixes
2018-04-18 12:13:49 +01:00
Felipe Alfonso
eceb43584b
Fixed issue on particle emitter rendering not writing directly to the vertex count property
2018-04-17 13:20:08 -03:00
Felipe Alfonso
5cc2ebd6be
Fixed issue when destroying WebGLRenderer
2018-04-16 15:16:23 -03:00
Felipe Alfonso
9961636722
Fixed overflowing of vertex count on particle emitter batcher
2018-04-16 12:38:02 -03:00
Richard Davey
e37b183038
Completed all jsdocs for the Camera class
2018-04-15 05:05:03 +01:00
Richard Davey
380d4afb92
Swapping to new camera effects system
2018-04-14 17:38:48 +01:00
Richard Davey
57c5ca657b
Small refactoring
2018-04-05 11:01:24 +01:00
Richard Davey
4f6239dadb
jsdoc and eslint fixes
2018-04-05 09:02:36 +01:00
Felipe Alfonso
bea7ca36ad
Merge branch 'master' into containers
...
# Conflicts:
# src/renderer/webgl/pipelines/TextureTintPipeline.js
2018-04-04 12:07:41 -03:00
Richard Davey
af12eaac77
Merge branch 'master' into FR3472
2018-04-04 11:28:58 +01:00
Felipe Alfonso
3158d688ad
TileSprite batcher modulates tilePosition by the texture size to avoid scrolling uv coordinates to large values.
...
issue ref: https://github.com/photonstorm/phaser/issues/3402
2018-04-03 14:21:24 -03:00
Travis O'Neal
2ec70cac48
Added a letterSpacing property to BitmapText
2018-04-02 09:42:24 -04:00
Travis O'Neal
d6265a59dd
Initial Commit
2018-03-30 13:46:44 -04:00
Felipe Alfonso
4f8ddd73bb
Merge branch 'master' into containers
2018-03-29 12:35:40 -03:00
Richard Davey
f5373b2dee
jsdoc fixes
2018-03-29 13:23:44 +01:00
Felipe Alfonso
3741b9ea6d
Added nested support to graphics rendering
2018-03-27 16:57:49 -03:00
Felipe Alfonso
161f258f60
Parent transform applied to all texture tint pipeline object rendering functions
2018-03-26 21:16:36 -03:00
Felipe Alfonso
48b8e7c704
parentTransformMatrix mulitplication
2018-03-26 19:55:38 -03:00
Felipe Alfonso
eac2b8338e
parentTransformMatrix argument added to texture pipeline
2018-03-26 17:23:18 -03:00
Felipe Alfonso
5bcd12fcb7
Base container rendering + sprite batching with parent matrix
2018-03-23 14:15:52 -03:00
Richard Davey
0ef92e1172
Merge branch 'pr/3439'
2018-03-21 16:06:56 +00:00
orblazer
dcd80375c0
Fix "object" types on Renderer and Scene
2018-03-21 14:41:17 +01:00
José Maria
f9e978a2bd
(WebGL) updating currentScissor on game.resize
...
with the array being update it solves the issue with the global background not being fully draw after resizing the game.
2018-03-20 23:38:00 -03:00
Richard Davey
64fdbc3040
Graphics.alpha was being ignored in the WebGL renderer and is now applied properly to strokes and fills. Fix #3426
2018-03-20 00:27:39 +00:00
orblazer
8fdedabaeb
Add callbacks on Renderer
2018-03-19 21:41:24 +01:00
Richard Davey
620bcc6ae5
jsdoc fixes and additions
2018-03-19 13:45:00 +00:00
Richard Davey
9832befeea
Fixed camera y
2018-03-16 15:47:14 +00:00
Richard Davey
fbec8f978c
You can now specify all of the renderer config options within a render
object in the config. If no render
object is found, it will scan the config object directly for the properties.
2018-03-16 13:22:52 +00:00
Richard Davey
dd4e00007f
Added antialias config value
2018-03-16 00:52:21 +00:00
Richard Davey
0c1c16deba
Used new config values, fixed eslint formatting and floored dimensions
2018-03-15 21:15:39 +00:00
Richard Davey
edf1aa7cc1
The onContextRestored
callback won't be defined any more unless the WebGL Renderer is in use in the following objects: BitmapMask, Static Tilemap, TileSprite and Text. This should allow those objects to now work in HEADLESS mode. Fix #3368
2018-03-12 13:37:13 +00:00
Richard Davey
063d30602e
The ForwardDiffuseLightPipeline now uses sys.lights
instead of the Scene variable to avoid errors due to injection removal.
2018-03-12 12:55:09 +00:00
samme
d7780aff64
Fix error when no Light Manager exists
2018-03-11 19:22:42 -07:00
Richard Davey
c2f25b3742
Merge pull request #3240 from Twilrom/arc-fix
...
Update WebGL Graphics.arc to work more like on Canvas
2018-03-05 21:54:46 +00:00
Richard Davey
bfabe35cdf
eslint fixes
2018-03-05 21:49:08 +00:00
Felipe Alfonso
ddc85cfdc7
Added support for tint and alpha to RenderTexture
2018-03-05 16:57:41 -03:00
Felipe Alfonso
c1d482b593
Added jsdoc comments to new methods and properties on WebGLPipeline and WebGLRenderer
2018-03-05 12:28:59 -03:00
Felipe Alfonso
38dc3bbd82
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-03-05 11:29:56 -03:00
Felipe Alfonso
98893e1bba
Modified WebGLPipeline and it's child classes to make them easier to generate custom Pipelines. Added functions to WebGLPipeline to modify uniforms. Exposed Renderer namespace for usage outside the engine
2018-03-05 11:29:48 -03:00
Richard Davey
4d16b0c00a
eslint fixes
2018-03-05 01:45:28 +00:00
Richard Davey
ae1c91cf6a
eslint fixes
2018-03-05 01:40:11 +00:00
Felipe Alfonso
14399d6910
TileSprite can now set frame of the pattern texture
2018-02-28 17:04:57 -03:00
Felipe Alfonso
6a114fc07a
Added roundPixels to the texture pipeline
2018-02-28 15:08:08 -03:00
Felipe Alfonso
9dbb4db4c6
Added inverted alpha to bitmap mask
2018-02-23 14:09:27 -03:00
Felipe Alfonso
ef8e92dc01
RenderTexture base webgl implementation
2018-02-23 00:44:22 -03:00
Felipe Alfonso
57333ea492
Fixed issue with null texture on particle emitter batch generation
2018-02-22 20:36:25 -03:00
Felipe Alfonso
a218cd5f4a
Fixed issue with vertex buffer creation on Static Tilemap Layer
2018-02-22 01:07:43 -03:00
Richard Davey
73da8608e0
Fixed lint errors
2018-02-19 23:14:57 +00:00
Felipe Alfonso
4b9b4c91a3
Dynamic BitmapText's origin is used on rendering the text
2018-02-19 18:20:30 -03:00
Felipe Alfonso
41bcaba43a
Dynamic BitmapText now uses origin component to render the text.
2018-02-19 18:16:57 -03:00
Felipe Alfonso
abfe7536e9
Removed the read of constant values from the WebGLRenderingContext object. Now they are read from an instance of webgl context.
2018-02-19 17:49:17 -03:00
Felipe Alfonso
50c79c14af
Removed double rounding to pixel on rendering routines.
...
Fixed rounding pixel issue when camera is shaking
2018-02-19 17:38:40 -03:00
Felipe Alfonso
cdc4359fd7
Fixed issue with tint being set on the incorrect vertex
2018-02-19 17:06:08 -03:00
Richard Davey
3c65121cb3
eslint fixes
2018-02-16 19:17:49 +00:00
Richard Davey
d23688c3e4
Added eslint fixes and overrides
2018-02-16 18:44:07 +00:00
Richard Davey
86f00eeb52
eslint fixes
2018-02-16 18:17:51 +00:00
Richard Davey
e1554c34d6
eslint fixes
2018-02-16 18:07:49 +00:00
Twilrom
d443ff380e
Make WebGL Graphics closePath work the same as in Canvas.
2018-02-16 16:28:35 +01:00
Twilrom
859cc27e2e
Fix beginPath in WebGL Graphics
2018-02-16 15:38:21 +01:00
Twilrom
0c0b272ccc
Update WebGL Graphics.arc to work more like on Canvas
2018-02-16 15:38:21 +01:00
Richard Davey
4e6df03512
Updated semver
2018-02-15 14:31:15 +00:00
Felipe Alfonso
e2bebd3ddd
jsdoc property and method updates
2018-02-14 16:52:37 -03:00
Felipe Alfonso
74abb96211
Added alpha and tint to static tilemap layer. Fixed BitmapMask binding resources issue.
2018-02-14 16:45:22 -03:00
Felipe Alfonso
92182bed90
Fixed issue with Blitter renderer where it overwrote previous vertex data
2018-02-14 13:43:35 -03:00
Felipe Alfonso
edf15986ff
BitmapMask si working properly with the vertex update batching.
2018-02-14 13:20:56 -03:00
Felipe Alfonso
844e72a7e1
Buffer resource update batching implemented into TextureTintPipeline
2018-02-13 23:46:34 -03:00
Yat Hin Wong
3af1d57a95
Changed let to var
2018-02-13 17:03:28 +01:00
Richard Davey
8f4a1012fd
Updated jsdocs.
2018-02-13 01:39:22 +00:00
Felipe Alfonso
2aa94c28eb
WebGL types added to jsdoc
2018-02-12 21:12:17 -03:00
Richard Davey
14c5aad929
Added jsdocs
2018-02-12 22:16:18 +00:00
Felipe Alfonso
9b2741387b
Resolution affecting camera display
2018-02-12 16:03:13 -03:00
Richard Davey
d1f5f8a82b
Added jsdocs
2018-02-12 16:01:21 +00:00
Felipe Alfonso
17d00eea4a
Removed model and view scale from pipeline
2018-02-09 17:03:18 -03:00
Richard Davey
97bb52faec
Added jsdocs
2018-02-09 19:19:21 +00:00
Felipe Alfonso
8529cb9ad1
Resolution fix work in progress
2018-02-09 15:45:22 -03:00
Felipe Alfonso
feabcdadb9
Fixed issue with scaled tilemaps
2018-02-07 16:30:18 -03:00
Felipe Alfonso
3821ba5ede
WebGL tile flipping and rotation
2018-02-07 13:14:52 -03:00
Felipe Alfonso
cff54d8511
Added tile rotation and fixed undefined resolution on webgl renderer config
2018-02-06 18:47:42 -03:00
Felipe Alfonso
da8c7c0b3e
WebGL config data is now stored on WebGLRenderer
2018-02-06 17:37:13 -03:00
Felipe Alfonso
cffc40b834
Fixed flip on blitter game object. Added camera scrollFactor to blitter canvas renderer
2018-02-06 17:19:11 -03:00
Felipe Alfonso
96834fd7f0
Fixed tilesprite issue of not repeating on webgl
2018-02-06 12:46:05 -03:00
Felipe Alfonso
7b1ad0b307
transparent, clearBeforeRender and roundPixels now affect the rendering result
2018-02-05 19:06:02 -03:00
Felipe Alfonso
4d03853935
Added cleanup routine for all webgl content on WebGLRenderer destroy function
2018-01-31 14:36:00 -03:00
Richard Davey
2a86400a28
Added in jsdocs
2018-01-31 13:54:44 +00:00
Richard Davey
f73d66a246
Merge branch 'master' of https://github.com/photonstorm/phaser
2018-01-31 03:38:13 +00:00
Richard Davey
a802914243
Added in destroy methods for all managers and invoked them from Game
2018-01-31 03:38:10 +00:00
Felipe Alfonso
0648161ca5
Added simple light culling
2018-01-30 22:11:51 -03:00
Felipe Alfonso
d9b04ef2e9
Light2D Plugin added to scene
2018-01-30 19:46:43 -03:00
Felipe Alfonso
de4b308fbd
Light2D update
2018-01-30 00:38:31 -03:00
Felipe Alfonso
71a6360a7b
Pipeline components added
2018-01-29 18:46:48 -03:00
Felipe Alfonso
00c6c4a6df
Light2D Pipeline
2018-01-26 20:17:11 -03:00
Felipe Alfonso
4a63326f39
Forced nearest filtering for canvas textures
2018-01-26 12:21:05 -03:00
Felipe Alfonso
9173ed88d9
Fixed tint issue
2018-01-26 00:55:05 -03:00
Felipe Alfonso
83b7d11f14
Fixed issue with scrolling on static tilemaps and not clearing path array on Flat Pipeline
2018-01-26 00:47:41 -03:00
Felipe Alfonso
065235a9f4
Fixed issue with static bitmap text rendering
2018-01-25 21:34:35 -03:00
Felipe Alfonso
3af73b6162
culling non visible chars
2018-01-25 21:05:38 -03:00
Felipe Alfonso
cb7bbea020
removed old code
2018-01-25 19:32:51 -03:00
Felipe Alfonso
7c4c439aa4
Diffuse lighting shaders. Also made light layer rendering pass through
2018-01-25 19:20:36 -03:00
Felipe Alfonso
ba280c7517
BitmapMask and GeometryMask are rendering correctly
2018-01-25 15:43:19 -03:00
Felipe Alfonso
bd8e9b2003
Static Tilemap Layer rendering
2018-01-25 02:26:14 -03:00
Felipe Alfonso
80d9ef42b3
ParticleEmitterManager webgl rendering added
2018-01-24 22:10:30 -03:00
Felipe Alfonso
42482ecb26
TileSprite webgl rendering
2018-01-24 21:15:51 -03:00
Felipe Alfonso
195a59d3ba
Dynamic Tilemap rendering
2018-01-24 19:29:57 -03:00
Felipe Alfonso
06fa0afcc8
Dynamic Bitmap Text webgl rendering
2018-01-24 15:55:23 -03:00
Felipe Alfonso
326bdd5204
Fixed camera effects
2018-01-24 00:57:33 -03:00
Felipe Alfonso
12a1ef34f4
Fixed pipeline binding
2018-01-24 00:08:14 -03:00
Felipe Alfonso
5170784338
Graphics WebGL Rendering
2018-01-24 00:03:43 -03:00
Felipe Alfonso
99d850346f
Text rendering added
2018-01-23 21:40:20 -03:00
Felipe Alfonso
502ce8ddea
Static BitmapText rendering. Added rect culling to TextureTintPipeline
2018-01-23 20:36:49 -03:00
Felipe Alfonso
dd9cef61cf
Image WebGL rendering
2018-01-23 17:32:20 -03:00
Felipe Alfonso
070d946dca
Mesh and Sprite rendering
2018-01-23 16:29:47 -03:00
Felipe Alfonso
822fc052ee
Sprite batching
2018-01-23 13:38:58 -03:00
Felipe Alfonso
6153a34103
Moved shader source to text files
2018-01-22 20:01:00 -03:00
Felipe Alfonso
0f0b422fd7
FlatTint Pipeline progress
2018-01-22 19:51:15 -03:00
Felipe Alfonso
a171968558
WebGLRenderer render function update
2018-01-22 18:37:47 -03:00
Felipe Alfonso
961f00ac11
BlitterPipeline added
2018-01-22 18:21:47 -03:00
Felipe Alfonso
a4e79875d4
Merge branch 'master' into rendering-cleanup
...
# Conflicts:
# src/gameobjects/blitter/BlitterWebGLRenderer.js
2018-01-21 11:14:27 -03:00
Felipe Alfonso
31be6fa51d
WebGLRenderer cleanup
2018-01-20 01:05:56 -03:00
Felipe Alfonso
1da31fb2a5
WebGLRenderer resource creation
2018-01-19 21:37:52 -03:00
Felipe Alfonso
cfe07706e6
Cleaning up WebGLRenderer
2018-01-17 18:25:43 -03:00
Felipe Alfonso
fd4f441146
DynamicBitmapText WebGL renderer updated
2018-01-16 16:32:27 -03:00
Felipe Alfonso
8bb9b1309f
SpriteBatch pipeline re-implementation
2018-01-12 21:13:41 -03:00
Felipe Alfonso
5ca2805dbc
Fixed issue with blitter batch incorrect instruction order and forced unsigned int result for color tint operation
2018-01-12 13:46:46 -03:00
Felipe Alfonso
54274b782a
BlitterBatch pipeline working
2018-01-10 17:03:01 -03:00
Felipe Alfonso
15c45bda0e
BlitterBatch2 base rendering. Still missing Texture binding
2018-01-09 19:51:22 -03:00
Richard Davey
d8f1ba03e9
Moved repository location
2018-01-09 21:43:56 +00:00
Richard Davey
0d90f75b5f
Splitting the dev branch up into versions.
2016-11-22 01:36:56 +00:00
Richard Davey
7a155f66fe
Added Tilemap back in and tested with Blitter object, and it works really fast.
2016-11-15 03:11:21 +00:00
photonstorm
aac31f6858
FBOs are bound to parents.
2016-11-10 17:05:04 +00:00
photonstorm
49c57089b3
Quick test.
2016-11-10 17:04:37 +00:00
Richard Davey
48f90fec34
Implemented a State based MainLoop system, with fully split logic / render cycles and frame rate. Each State can now set its own frame rate. Added in more Camera commands, moved the Tween Manager into the State Systems, and started work on the new heavily reduced Game object.
2016-11-08 01:50:57 +00:00
Richard Davey
efebd79e30
Added State.pause.
2016-11-06 16:50:45 +00:00
Richard Davey
f2cb384da0
State indexing added.
2016-11-06 13:59:48 +00:00
Richard Davey
d568d2bede
Moved _sys to a StateSystems class to keep things much cleaner, and avoid setter inheritance mess.
2016-11-06 12:18:08 +00:00
Richard Davey
c60eae4ee1
Fixed vert dimensions, texture still needs to be based on renderer size.
2016-11-04 04:11:47 +00:00
Richard Davey
893d35ea89
Multiple States now rendering together, with their own systems and managers :)
2016-11-04 03:09:48 +00:00
Richard Davey
2326b331f1
States now have their own FBO (under WebGL) which the renderer uses.
2016-11-04 02:24:49 +00:00
Richard Davey
a366ef8f3c
New State Manager up and running.
2016-11-04 02:08:17 +00:00
Richard Davey
89ece19c78
Disabled twirl.
2016-11-03 22:25:55 +00:00
Richard Davey
16e687cb2a
Fixed issue with FBO leaving no bound texture on unit zero.
2016-11-03 21:50:14 +00:00
Richard Davey
181e08a1f9
Testing fix.
2016-11-03 21:32:06 +00:00
Richard Davey
8971d8eaf4
Updated comments
2016-11-03 21:13:48 +00:00
Richard Davey
b65a9bec42
Tidying up.
2016-11-03 21:10:53 +00:00
Richard Davey
e0c6a0c470
Using createEmptyTexture again.
2016-11-03 21:06:14 +00:00
photonstorm
57e12415cc
Removing test code.
2016-11-03 17:25:14 +00:00
photonstorm
a86b02d55a
Finally! Fixed the multi texture + FBO pipeline.
2016-11-03 17:19:16 +00:00
photonstorm
a3d9cf9b6d
Tiny Batch!
2016-11-03 13:47:37 +00:00
Richard Davey
def3a93b5f
Trying to debug fbo + multi-texture 'cannot draw to same texture' issue.
2016-11-03 05:10:50 +00:00
Richard Davey
106a55e642
Lots of tidying up. Renamed properties, removed loads of stuff no longer needed in the main class.
2016-11-03 04:22:07 +00:00
Richard Davey
8439cf0c15
Added QuadFBO class, which encapsulates the whole frame buffer + quad + shader flow. Exposed quad dimensions and position via setters, allowing you to place the FBO anywhere when it renders.
2016-11-03 04:04:34 +00:00
Richard Davey
6e70669e28
Added getVerticesFromRect so the fbo is calculated from pixel values.
2016-11-03 02:50:52 +00:00
Richard Davey
8603374316
More docs.
2016-11-03 02:07:15 +00:00
Richard Davey
0b070822d3
Updated the FBO quad to use a vec2 for position instead, cutting down on vert data a little. Also removed array length look-ups and hard coded values in.
2016-11-03 01:51:31 +00:00
Richard Davey
9600ed038d
Updated destroy method.
2016-11-03 01:49:55 +00:00
Richard Davey
e2b7e54c5f
Testing twirl shader :)
2016-11-02 01:47:59 +00:00
Richard Davey
b5faa8843d
Finally, FBO for main renderer working!
2016-11-02 01:22:27 +00:00
Richard Davey
4b0c028200
Adding FBO support.
2016-11-02 01:00:56 +00:00
Richard Davey
03b651f79f
Loads of tweaks re: Transform inheritance.
2016-11-01 00:31:45 +00:00
Richard Davey
c681abbea8
Removed duplicate flush methods from the batch processors.
2016-10-31 21:46:31 +00:00
Richard Davey
19d9241dc7
Removed un-needed shaders.
...
Added batch processor switching and tested it.
2016-10-31 21:42:23 +00:00
Richard Davey
7477599005
Refactored ImageBatch into the more accurately named SingleTextureBatch.
2016-10-31 19:44:46 +00:00
photonstorm
5ef7fd3377
Moved flush to BaseBatch.
2016-10-31 17:15:36 +00:00
Richard Davey
c27b2f9fca
Changed batch limits. Currently running 20,000 pixels in 1 draw call.
2016-10-30 23:59:47 +00:00
Richard Davey
c4a79bfadc
Pixel Batch rendering working, and passing through properly.
2016-10-30 23:40:18 +00:00
Richard Davey
bd80999b33
Refined the Image and WebGL Renderers.
2016-10-30 22:58:14 +00:00
Richard Davey
a55df3f143
Added in the Pixel Field batch processor and start of the Game Object.
2016-10-30 22:57:50 +00:00
Richard Davey
3c248d1cb4
Added in the FX Batch processor.
2016-10-30 22:57:29 +00:00
Richard Davey
5ec168a741
Added the multi texture batch processor, and tested it working.
2016-10-30 22:57:19 +00:00