Commit graph

10350 commits

Author SHA1 Message Date
Richard Davey
951b284c6e Fixed RenderTexture.fill 2020-11-20 10:05:19 +00:00
Richard Davey
e2f7ca40b2 Fixed camera zoom and origin. draw and drawFrame work now. 2020-11-19 23:04:25 +00:00
Richard Davey
87b96f60e8 Resize to match texture fbo 2020-11-19 23:04:10 +00:00
Richard Davey
c33a5598ab Trying to align drawFrame 2020-11-19 18:16:18 +00:00
Richard Davey
500d33f6b9 Set camera zoom 2020-11-19 18:07:33 +00:00
Richard Davey
a7e980f816 Adjust viewport 2020-11-19 18:07:26 +00:00
Richard Davey
9b1ac7036d Added ability for camera to zoomX and zoomY 2020-11-19 18:07:17 +00:00
Richard Davey
e80ed9464a Removed copy params 2020-11-19 16:40:42 +00:00
Richard Davey
91924be2ee Update RenderTextureWebGLRenderer.js 2020-11-19 16:40:35 +00:00
Richard Davey
7562683cfb Lots of tiny fixes and updates 2020-11-19 16:40:31 +00:00
Richard Davey
775134ed3b Added viewport and flush helpers 2020-11-19 16:40:19 +00:00
Richard Davey
6f6fbadfdd Don't adjust viewport unless needed 2020-11-19 16:40:07 +00:00
Richard Davey
216f74bb58 Use Single Pipeline and force texture refresh 2020-11-19 11:43:55 +00:00
Richard Davey
d848a5e2ba Now using new Render Target. Removed lots of out-dated properties and tidied up methods. 2020-11-19 11:38:09 +00:00
Richard Davey
7ad580dd29 Using new Render Target 2020-11-19 11:37:49 +00:00
Richard Davey
82ca007d1a Added cropWidth and cropHeight parameters to batchTextureFrame method 2020-11-19 11:37:38 +00:00
Richard Davey
782cb94e56 Updated Render Target constructor 2020-11-19 11:37:14 +00:00
Richard Davey
a03393a4de Added auto resize, clear and default parameters 2020-11-19 11:36:58 +00:00
Richard Davey
916bfa78b2 Missing flush 2020-11-18 10:26:44 +00:00
Hexus
ef022cd3df Implemented reading WebGL texture dimensions automatically when adding them to the TextureManager 2020-11-18 00:49:19 +00:00
Richard Davey
c4c849cff4 Reset Textures 2020-11-17 19:58:35 +00:00
Richard Davey
4903241ac9 No longer use setPost. 2020-11-17 17:30:25 +00:00
Richard Davey
0ea9f24cd0 Update SceneFile.js 2020-11-17 17:15:40 +00:00
Richard Davey
8f688cd9a5 Update SceneFileConfig.js 2020-11-17 17:15:36 +00:00
Richard Davey
11e4fe6e14 Update PipelineManager.js 2020-11-17 17:15:32 +00:00
Richard Davey
e36a086e5d Updated data types 2020-11-17 16:50:36 +00:00
Richard Davey
00c7b1d79e Destroy on reset! 2020-11-17 16:34:52 +00:00
Richard Davey
96be7f6e6d Destroy Render Targets too 2020-11-17 16:19:48 +00:00
Richard Davey
782a841eeb Added getPostPipeline method 2020-11-17 16:19:40 +00:00
Richard Davey
0658820b79 Clear post pipelines 2020-11-17 16:19:30 +00:00
Richard Davey
26a1d0185a Update RenderTexture.js 2020-11-17 16:19:18 +00:00
Richard Davey
842b984b46 Update CanvasRenderer.js 2020-11-17 16:19:14 +00:00
Richard Davey
60c7d8a2e9 New classes property, new event handling system and removed un-used methods 2020-11-17 14:10:06 +00:00
Richard Davey
2c88b8935b Auto-boot and set isPostFX 2020-11-17 14:09:47 +00:00
Richard Davey
599213d211 New isPostFX property, listen to events and don't create projection matrix unless needed 2020-11-17 14:09:27 +00:00
Richard Davey
629eefb7d5 Now extends event emitter, new events and new isBooted property 2020-11-17 14:09:02 +00:00
Richard Davey
477cde3548 New WebGL Renderer events 2020-11-17 14:08:23 +00:00
Richard Davey
080677f28c Set on creation, not in the component 2020-11-17 14:08:09 +00:00
Richard Davey
9cf67722ec Don't forget to reset the viewport 2020-11-16 17:52:11 +00:00
Richard Davey
2008d3b880 Added popFBO parameters and setViewport parameter 2020-11-16 17:43:04 +00:00
Richard Davey
f5f20db048 Don't batch if no pipeline 2020-11-16 17:08:50 +00:00
Richard Davey
dbe57303ed Defs update 2020-11-16 15:46:40 +00:00
Richard Davey
8c996b4697 Added setPost, isCurrentPost, removed setCameraPipeline 2020-11-16 15:46:34 +00:00
Richard Davey
c12b4cff3f Swizzle RGB 2020-11-16 15:45:45 +00:00
Richard Davey
52acf60125 Multiply now optional for lots of combination effects 2020-11-16 11:32:34 +00:00
Richard Davey
9cfa8f5039 Added option to clear bind target 2020-11-15 17:49:29 +00:00
Richard Davey
5062c97784 Added copyToGame method to finalise fbo to renderer 2020-11-15 17:32:37 +00:00
Richard Davey
ce0b9d94c5 Added option to clear frame before copy 2020-11-15 12:53:33 +00:00
Richard Davey
b82ae856b6 Update Single.vert 2020-11-14 17:58:09 +00:00
Richard Davey
314a0bbf4e Added ability to bind and draw to a target. 2020-11-14 17:58:00 +00:00
Richard Davey
d87cf4e915 Always pop and reset! 2020-11-13 18:03:03 +00:00
Richard Davey
d07b2fc811 Lots more documentation added 2020-11-13 17:46:05 +00:00
Richard Davey
bbbb49f4b5 Handy references 2020-11-13 17:31:27 +00:00
Richard Davey
701ad1fa15 ColorMatrix alpha support and viewport setting 2020-11-13 17:31:17 +00:00
Richard Davey
7458031140 Updated shaders 2020-11-13 17:31:00 +00:00
Richard Davey
94836b1c88 Handle pre-mult alpha properly 2020-11-13 17:30:21 +00:00
Richard Davey
471e64d989 Swapped to 5x4 array and added in some new color effects 2020-11-13 17:30:06 +00:00
Richard Davey
691b680e36 Added JSDocs and fixed boot sequence 2020-11-13 15:54:49 +00:00
Richard Davey
cf275b44d6 Added all JSDocs 2020-11-13 15:54:36 +00:00
Richard Davey
6a97fe6889 Lots of handy methods added and fixed vertices 2020-11-13 14:20:26 +00:00
Richard Davey
2d3248025a Lots of tidying up, added blend methods 2020-11-13 14:20:07 +00:00
Richard Davey
cfce8062e6 Call the new camera methods 2020-11-13 14:19:55 +00:00
Richard Davey
985b614c65 Return the freshly bound fbo 2020-11-13 14:19:42 +00:00
Richard Davey
dbdac4f102 Better method names 2020-11-13 14:19:30 +00:00
Richard Davey
d7a0bddfcb Handled in batchQuad method 2020-11-13 14:19:12 +00:00
Richard Davey
bddfd707fc Added preBatchCamera and postBatchCamera and the rest of the Utility methods 2020-11-13 14:18:57 +00:00
Richard Davey
b019c6f889 Added onDraw 2020-11-12 18:10:07 +00:00
Richard Davey
53180cc748 Updated shaders 2020-11-12 18:09:54 +00:00
Richard Davey
724310f147 Removed draw method 2020-11-12 18:09:44 +00:00
Richard Davey
6dc07dad3e Added ColorMatrix class and proper verts 2020-11-12 18:09:37 +00:00
Richard Davey
d50afad9e5 Testing new util methods 2020-11-12 18:09:21 +00:00
Richard Davey
9405ad3c16 Non-gc matrix reset 2020-11-12 13:04:22 +00:00
Richard Davey
ce7f921c59 Expose ColorMatrix 2020-11-12 12:56:46 +00:00
Richard Davey
118f8e1324 Phaser.Display.ColorMatrix is a new class that allows you to create and manipulate a 5x5 color matrix, which can be used by shaders or graphics operations. 2020-11-12 12:56:37 +00:00
samme
6219d27dbc Add TimerEvent methods
- getRemaining()
- getRemainingSeconds()
- getOverallRemaining()
- getOverallRemainingSeconds()
2020-11-11 12:05:14 -08:00
Richard Davey
a6ba0539de Update PostFXPipeline.js 2020-11-11 17:47:24 +00:00
Richard Davey
c60b4f580c Fixed draw mode, shader binding and testing new draw 2020-11-11 17:47:20 +00:00
Richard Davey
8ef9f36370 Fixed missing property 2020-11-11 17:46:58 +00:00
Richard Davey
9235b7a695 Add Utility Pipeline and copyFrames method 2020-11-11 17:46:44 +00:00
Richard Davey
1ff6b0dce5 Expose Utility Pipeline 2020-11-11 17:46:28 +00:00
Richard Davey
b9cc4bfb5b Create UtilityPipeline.js 2020-11-11 17:46:03 +00:00
Richard Davey
752fccbf16 Added w/h, comment out draw for now 2020-11-11 17:45:58 +00:00
Richard Davey
741f5f4e27 Added outFragCoord 2020-11-11 17:45:43 +00:00
Richard Davey
c07283ceab Tidy up shader code 2020-11-11 09:39:33 +00:00
Richard Davey
d677b57ee4 Added new utility shaders 2020-11-11 09:35:02 +00:00
Richard Davey
8e7171ca79 Use fbo stack and free-up callback hooks 2020-11-10 17:26:56 +00:00
Richard Davey
6d56ee01af Update BitmapMask.frag 2020-11-10 17:26:33 +00:00
Richard Davey
f085eb8536 The BitmapMask.prevFramebuffer property has been removed as it's no longer required, due to the fbo stack in the renderer. 2020-11-10 17:26:24 +00:00
Richard Davey
dfabaac634 Allow Rope to have post-pipeline 2020-11-10 16:27:12 +00:00
Richard Davey
cccf9bb163 Fixed Rope 2020-11-10 16:17:28 +00:00
Richard Davey
7ba1b132ab Added rebind function, to reset the shader attributes. 2020-11-10 15:50:51 +00:00
Richard Davey
6e115e4e04 Call rebind function 2020-11-10 15:50:30 +00:00
Richard Davey
47009779fb Hard-code the topology 2020-11-10 15:50:17 +00:00
Richard Davey
84f6849ad6 Fixed Bitmap Mask 2020-11-10 14:33:28 +00:00
Richard Davey
7a5165c87b Limit batch size to 1 2020-11-10 12:35:01 +00:00
Richard Davey
eda0ca8a75 Use GLenum value and limit batch size to 256 2020-11-10 12:34:53 +00:00
Richard Davey
fad0d331d7 Change to batchSize property 2020-11-10 12:34:35 +00:00
Richard Davey
86d1009e7b Use batchSize and fixed shouldFlush so we take advantage of bufferData 2020-11-10 12:34:25 +00:00
Richard Davey
40123f1a08 Updated docs 2020-11-10 12:01:25 +00:00
Richard Davey
e7319907c7 PostFX Pipeline only needs a single quad 2020-11-10 11:59:28 +00:00
Richard Davey
ca52436340 Removed Camera Pipeline 2020-11-10 11:59:12 +00:00
Richard Davey
94d2889783 Moved setTexture2D to pipeline class 2020-11-10 11:58:53 +00:00
Richard Davey
4cefe70ff0 Since iOS 13, iPads now identify as MacOS devices. A new maxTouchPoint check is now part of the Device.OS tests, stopping iPads from being flagged as desktop devices. Fix #5389 2020-11-09 17:15:43 +00:00
Richard Davey
d397551b3d
Merge pull request #5391 from samme/fix/overlapR
Set Arcade.Body#overlapR in separateCircle()
2020-11-09 17:10:18 +00:00
Richard Davey
ca8f201e8a
Merge pull request #5388 from samme/feature/scale-damping
Scale damping by the physics step delta
2020-11-09 17:07:30 +00:00
Richard Davey
6c69cf3627
Merge pull request #5387 from samme/docs/static-body
Docs: StaticBody#touching etc.
2020-11-09 17:06:57 +00:00
Richard Davey
bbb397c860
Merge pull request #5350 from samme/feature/worldstep-event-delta
Add delta argument to WORLD_STEP event
2020-11-09 17:05:37 +00:00
Richard Davey
f02325fff0
Merge pull request #5386 from PhaserEditor2D/patch-1
Updates geom, width and height of the Ellipse GO
2020-11-09 17:03:56 +00:00
Richard Davey
1b434d7a40 Preparing for Beta 11 2020-11-09 16:29:57 +00:00
Richard Davey
eee3feb667 Pass Game Object to batchQuad 2020-11-09 13:19:31 +00:00
Richard Davey
c5656fbd08 Make FLOAT the default type 2020-11-09 13:19:14 +00:00
Richard Davey
cb7a998ea0 Added onBatch support 2020-11-09 12:17:45 +00:00
Richard Davey
39b381d6cc Clearer responsibility via method parameters 2020-11-09 11:50:41 +00:00
samme
956f880fa4 Set overlapR in separateCircle() 2020-11-08 09:19:53 -08:00
samme
4185e661d7 Docs: banish StaticBody touching properties
Fixes #5381
2020-11-07 10:04:28 -08:00
Phaser Editor 2D
60541e861b
Updates geom, width and height of the Ellipse GO
Updates the `width`, `height`, and geometric position of the Ellipse in the `setSize()` method.

This code shows the wrong positioning of the Ellipse: https://codepen.io/phasereditor2d/pen/jOrvexM

To fix it, uncomment lines `21`, `24`, and `25`.
2020-11-07 11:25:30 -05:00
Richard Davey
0d23aea281 Allow TilemapLayers to set post pipelines 2020-11-06 17:22:32 +00:00
Richard Davey
88809647a6 Expose outFragCoord 2020-11-06 17:22:17 +00:00
Richard Davey
abe97b18fd Remove drawFillRect and no batchTexture post fx 2020-11-06 17:22:05 +00:00
Richard Davey
c29d7b18ed Removed everything to do with Camera's rendering to textures or managing their own framebuffers.
Now uses pipeline component instead.
2020-11-06 15:35:56 +00:00
Richard Davey
92eca8d3d2 Use the new Camera post pipeline feature 2020-11-06 15:35:29 +00:00
Richard Davey
06c90137c8 Empty parameter means reset pipeline 2020-11-06 15:35:18 +00:00
Richard Davey
167f50f28f Added new PostFX Pipeline to extend from 2020-11-06 15:35:05 +00:00
Richard Davey
4c7d81731b Added minFilter support 2020-11-06 12:25:03 +00:00
Richard Davey
3dbbc9caee Update RenderTargetConfig.js 2020-11-06 12:24:52 +00:00
Richard Davey
a62577ee77 Added minFilter support and better docs 2020-11-06 12:24:46 +00:00
Richard Davey
554e9214e0 Smaller error 2020-11-06 11:46:06 +00:00
Richard Davey
11b92b83e7 Supports new RenderTarget instances 2020-11-06 11:42:52 +00:00
Richard Davey
f914a073f3 New RenderTarget class to handle multiple targets per pipeline 2020-11-06 11:42:39 +00:00
Richard Davey
6e90d8ed59 Corrected docs and resetTextures 2020-11-06 11:42:25 +00:00
Richard Davey
18f32331fb Expose Render Target and WebGLShader 2020-11-06 10:59:57 +00:00
Richard Davey
a06edadba2 Update WebGLPipelineConfig.js 2020-11-06 10:59:47 +00:00
Richard Davey
a8b02cfb28 Create RenderTargetConfig.js 2020-11-06 10:59:41 +00:00
Richard Davey
ff23ca57cb Use new fbo stack 2020-11-06 10:19:34 +00:00
Richard Davey
02bde43772 Added fboStack, pushFramebuffer, popFramebuffer and resetTextures parameter 2020-11-06 10:19:26 +00:00
Richard Davey
d3c70002ea Removed use of _tempMatrix from all renderers 2020-11-06 09:44:29 +00:00
Richard Davey
19f3ae5a81 Testing RT mini refactor 2020-11-05 18:06:33 +00:00
Richard Davey
2b92e95735 Testing new RT draw 2020-11-05 18:06:23 +00:00
Richard Davey
701b899511 Update MultiPipeline.js 2020-11-05 18:05:58 +00:00
Richard Davey
18d2de8f1c Update SinglePipeline.js 2020-11-05 18:05:49 +00:00
Richard Davey
1a3a7d1151 Update WebGLPipeline.js 2020-11-05 18:05:19 +00:00
Richard Davey
fc84b19d3d Update MeshWebGLRenderer.js 2020-11-05 13:03:36 +00:00
Richard Davey
c65e516e94 Fixed shaders 2020-11-05 12:58:00 +00:00
Richard Davey
883402da8a Added forceZero method and used it 2020-11-05 10:50:40 +00:00
Richard Davey
e29fc62a98 Handle pre and post pipelines 2020-11-05 10:19:15 +00:00
Richard Davey
fb47d2f9e8 Added Pipeline component 2020-11-05 10:18:53 +00:00
Richard Davey
3696f73674 Guard against missing shaders. 2020-11-05 10:08:41 +00:00
Richard Davey
60e6eff81c Don't .replace non-strings. 2020-11-05 10:08:21 +00:00
Richard Davey
e9efc5e8f2 Invokes pre and post batch functions. 2020-11-04 18:02:22 +00:00
Richard Davey
4287181b2b Added manager, target auto clear, clearTarget and lots of new hooks for handlers, plus post bind and post flush support. 2020-11-04 18:02:11 +00:00