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