Commit graph

1341 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
92eca8d3d2 Use the new Camera post pipeline feature 2020-11-06 15:35:29 +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
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
883402da8a Added forceZero method and used it 2020-11-05 10:50:40 +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
Richard Davey
f94e7b4f75 Set dimensions before resizing. Validate gl objects before deleting them. 2020-11-04 18:01:39 +00:00
Richard Davey
d6496c86cf Added JSDocs 2020-11-04 18:01:20 +00:00
Richard Davey
305106bebe Correct sampler ID 2020-11-04 18:01:11 +00:00
Richard Davey
34f3ae9755 Removed stack and lock support 2020-11-04 18:01:01 +00:00
Richard Davey
4747d204ca Added unbind method and handling for post-fx 2020-11-03 18:05:10 +00:00
Richard Davey
e72a3b27e4 Call new unbind method 2020-11-03 18:04:57 +00:00
Richard Davey
ebe5ba1a0a New attributes, removed un-used properties, fixed JSDocs 2020-11-03 11:32:05 +00:00
Richard Davey
93948f5b29 JSDocs fixes 2020-11-03 11:31:52 +00:00
Richard Davey
f4b95ab2c3 New simplified Graphics shaders 2020-11-03 11:31:32 +00:00
Richard Davey
10673da96b Graphics is as Graphics does 2020-11-02 22:39:30 +00:00
Richard Davey
9e1b8c4b2f Don't look-up properties from uniforms that aren't cached 2020-11-02 22:39:20 +00:00
Richard Davey
d05afa988f Added batchVert method to help make customization easier 2020-11-02 22:39:08 +00:00
Richard Davey
3caa51a938 Update GraphicsPipeline.js 2020-11-02 16:20:16 +00:00
Richard Davey
a5ae67e1a6 Added Camera Pipeline 2020-10-30 17:55:56 +00:00
Richard Davey
4c3a5223fe Added onFlush and onPostFlush 2020-10-30 17:55:36 +00:00
Richard Davey
ca4168e5d0 New Camera Pipeline, better boot handling, tidied up docs 2020-10-30 17:50:58 +00:00
Richard Davey
52d8140b4f New onResize callback and better matrix handling 2020-10-30 17:50:38 +00:00
Richard Davey
5dbec83a8b Using new Camera Pipeline (renderTexture todo) 2020-10-30 17:50:19 +00:00
Richard Davey
b73067a7a7 Implemented full uniform caching and setting handling. So much faster! 2020-10-30 17:50:06 +00:00
Richard Davey
4e7e5629d2 You can forceZero via the config now 2020-10-30 17:49:39 +00:00
Richard Davey
0a006e4c20 Tidied up parameters 2020-10-29 17:22:57 +00:00
Richard Davey
ebf7b19062 Removed unused code 2020-10-29 17:22:47 +00:00
Richard Davey
d39968e0a1 Parameter not needed 2020-10-29 17:22:39 +00:00
Richard Davey
6353496751 Added the ability for a pipeline to be locked or unlocked 2020-10-29 17:22:29 +00:00
Richard Davey
c9d56f5f1d Removed unused matrices and method 2020-10-29 14:41:22 +00:00
Richard Davey
9a0f33d24c Cause a full bind on first set 2020-10-29 14:41:04 +00:00
Richard Davey
4b48baea79 Removed all of the uniform code 2020-10-29 14:40:49 +00:00
Richard Davey
4badd54160 Added resetProgram and changed return values 2020-10-29 14:40:33 +00:00
Richard Davey
024f13f2ba No longer use uViewMatrix or uModelMatrix 2020-10-29 14:37:52 +00:00
Richard Davey
b74351a87d Update WebGLPipeline.js 2020-10-29 08:22:38 +00:00
Richard Davey
9e4141e18b Pass the Game Object 2020-10-28 18:13:34 +00:00
Richard Davey
b1b44cd7f0 onBoot and setShader methods 2020-10-28 18:13:27 +00:00
Richard Davey
e1452b9ce7 Update WebGLShader.js 2020-10-28 17:40:21 +00:00
Richard Davey
48c0ba26c2 Better flush handling 2020-10-28 17:40:06 +00:00
Richard Davey
c5b538afcd Added the new Graphics Pipeline 2020-10-28 17:39:54 +00:00
Richard Davey
d6ecea8d4d Use the new attributes format 2020-10-28 17:39:31 +00:00
Richard Davey
92c365a881 Removed all Graphics methods and related properties. 2020-10-28 16:53:31 +00:00
Richard Davey
8c6e67ecfc Added attributes and other shader specific properties and methods 2020-10-28 16:15:56 +00:00
Richard Davey
e52def85be All vertex values now set during boot, after shaders are created. Added batchQuad/Tri methods. 2020-10-28 16:15:35 +00:00
Richard Davey
389b480777 Using new easier attribute config + moved some methods to WebGLPipeline 2020-10-28 16:15:09 +00:00
Richard Davey
15d8eabf17 Single pipeline updated so it can easily extend Multi now 2020-10-28 16:14:42 +00:00
Richard Davey
93b1775aaa Added new WebGL consts for easier shader configs 2020-10-28 16:14:05 +00:00
Richard Davey
9aeb765696 Updated type defs 2020-10-28 16:13:46 +00:00
Richard Davey
120f2c87cb The WebGL.Utils.getComponentCount function has been removed as this is no longer required internally. 2020-10-28 16:13:29 +00:00
Richard Davey
88d2ecd760 Pipeline passes attributes off to Shader. Also fixed multi-shader setup. 2020-10-27 18:06:45 +00:00
Richard Davey
39c77f431f Flush here, rather than in renderer 2020-10-27 18:06:28 +00:00
Richard Davey
a5d6016e64 Move sequence so the renderer is clean 2020-10-27 18:06:13 +00:00
Richard Davey
f42f0ce0d6 Shader needs attributes 2020-10-27 18:06:00 +00:00
Richard Davey
7b5d6076b2 Added max size value 2020-10-27 14:41:43 +00:00
Richard Davey
f50560eba8 The WebGLRenderer.getMaxTextures method has been removed. This is no longer needed as you can use the WebGLRenderer.maxTextures property instead. 2020-10-27 14:36:43 +00:00
Richard Davey
93b569c5ca Look-up based on string or instance 2020-10-27 14:05:48 +00:00
Richard Davey
59a215d643 * Types.Core.PipelineConfig is a new configuration object that you can set in the Game Config under the pipeline property. It allows you to define custom WebGL pipelines as part of the Game Config, so they're automatically installed and ready for use by all Scenes in your game. You can either set the pipeline object, or set it under the render sub-config. 2020-10-27 13:44:58 +00:00
Richard Davey
98b4319436 Bind needs to return this 2020-10-27 12:26:01 +00:00
Richard Davey
4ebdc637a9 Tidied up method flow 2020-10-27 12:25:53 +00:00
Richard Davey
d2c025e38a Added target fbo and all of the shader setters back in 2020-10-27 12:25:42 +00:00
Richard Davey
2b3863272e Removed 'nativeTextures' and added new reset parameter
* The `WebGLRenderer.nativeTextures` array has been removed and any WebGLTextures created by the renderer are no longer stored within it. All WebGLTexture instances are stored in the `TextureSource` objects anyway, or by local classes such as RenderTexture, so there was no need to have another array taking up memroy.
* The `WebGLRenderer.deleteTexture` method has a new optional boolean parameter `reset` which allows you to control if the `WebGLRenderer.resetTextures` method is called, or not, after the texture is deleted.
2020-10-27 11:38:21 +00:00
Richard Davey
efbc256a1f Added target fbo 2020-10-26 17:13:24 +00:00
Richard Davey
3c7062ca6a Common strings. 2020-10-26 17:00:23 +00:00
Richard Davey
bc34d01535 Update WebGLPipeline.js 2020-10-26 15:19:21 +00:00
Richard Davey
1e80f53f1d Better docs 2020-10-26 15:00:25 +00:00
Richard Davey
7c929e52bc Finished method docs and added clone 2020-10-26 15:00:17 +00:00
Richard Davey
ec4751ddc6 Finished all method docs 2020-10-26 15:00:07 +00:00
Richard Davey
55cbda85b8 Removed debug code 2020-10-26 14:24:15 +00:00
Richard Davey
f87bd7d384 Removed all of the shader setters. This should be done via the WebGLShader class now. 2020-10-26 14:24:06 +00:00
Richard Davey
fba97afcb6 Update dirty uniforms 2020-10-26 14:05:49 +00:00
Richard Davey
f32b4c7ecd Fixed config setter and added mvp matrices 2020-10-26 14:05:39 +00:00
Richard Davey
1e8b1cc583 Removed ProjectOrtho and optimized setters 2020-10-26 14:05:26 +00:00
Richard Davey
7ad02d6c0d Removed mvp component 2020-10-26 14:05:07 +00:00
Richard Davey
14e90c60d8 Don't resize to zero dimensions and run proper compare 2020-10-26 14:04:45 +00:00
Richard Davey
291f588110 Removed the mvp component. Pipelines no longer need this. 2020-10-26 14:04:01 +00:00
Richard Davey
8c85887479 Removed all of the mvp functions as they're no longer needed 2020-10-26 14:03:18 +00:00
Richard Davey
0b3011add3 Update PointLight-frag.js 2020-10-21 18:15:34 +01:00
Richard Davey
272727459f Use new shader property 2020-10-21 18:15:28 +01:00
Richard Davey
9531124903 Typo fix 2020-10-21 18:15:19 +01:00
Richard Davey
da47c776fa New shader class to allow one pipeline to set multiple shaders 2020-10-21 18:15:13 +01:00
Richard Davey
180b29be98 The pipeline can now handle multiple shaders all sharing the same attributes 2020-10-21 18:15:02 +01:00
Richard Davey
c730272ba7 Updated the configs to handle multiple shaders 2020-10-21 18:12:40 +01:00
Richard Davey
4b1c5c1a0b Improved docs 2020-10-21 11:30:49 +01:00
Richard Davey
7ffa615831 The WebGLPipeline.flushLocked property has been removed. A pipeline can never flush in the middle of a flush anyway, so it was just wasting CPU cycles being set. 2020-10-21 11:19:12 +01:00
Richard Davey
75f857b645 Update WebGLRenderer.js 2020-10-16 14:11:21 +01:00
Richard Davey
e50339b144 Updated to use new filtered children list 2020-10-16 14:11:15 +01:00
Richard Davey
d35ff331b2 Now takes a pre-filtered list of children to render 2020-10-16 11:36:00 +01:00
Richard Davey
675eec8103 Better attenuation 2020-10-14 15:16:35 +01:00
Richard Davey
cc167e158f Much better effect from the light shader 2020-10-14 11:57:58 +01:00
Richard Davey
d3d0c71fe4 Fixed shader for clip-space 2020-10-13 22:34:26 +01:00
Richard Davey
b1a5ce7f55 Testing new batched lights 2020-10-13 18:17:30 +01:00
Richard Davey
8708255948 Removed Layer3D Game Object and old MeshPipeline 2020-10-13 10:56:21 +01:00
Richard Davey
dda4431366 Merged the Layer3D Game Object and pipeline back in for now 2020-10-07 17:44:36 +01:00
Richard Davey
706d02873a Fixed issue with camera flash/fade not working 2020-10-05 13:44:29 +01:00
Richard Davey
468b1ba255 Added 2nd conditional back 2020-10-05 13:43:54 +01:00
Richard Davey
c3c35322c4
Merge pull request #4992 from svipal/master
Preliminary PR for isometric support
2020-10-02 09:42:47 +01:00
Richard Davey
6bc858e332 Moved out OBJFile and updated PipelineManager 2020-10-01 18:00:02 +01:00
Richard Davey
3baecb19d4 Moved old mesh pipeline and code into own folder 2020-10-01 17:56:49 +01:00
Richard Davey
2d43561e1a WebGLRenderer.vaoExtension is a new property that holds a reference to the Vertex Array Object WebGL Extension, if supported by the browser. 2020-10-01 13:48:27 +01:00
Richard Davey
d8992ccf9d WebGLRenderer.instancedArraysExtension is a new property that holds the WebGL Extension for instanced array drawing, if supported by the browser. 2020-10-01 10:57:13 +01:00
Richard Davey
8119ce7da1 Fixed use of old camera private properties 2020-09-29 16:44:11 +01:00
Richard Davey
aa3544310c When taking a snapshot in WebGL it would often have an extra line of empty pixels at the top of the resulting image, due to a rounding error in the WebGLSnapshot function. Fix #4956 2020-09-24 10:32:47 +01:00
Richard Davey
4748c7c7fc WebGLRenderer.defaultScissor is a new property that holds the default scissor dimensions for the renderer. This is modified during resize and avoids continuous array generation in the preRender loop. 2020-09-24 09:26:41 +01:00
Richard Davey
e004fa47fc Creating a Bitmap Mask from a texture atlas that was then used to mask another Game Object also using that same texture atlas would throw the error GL_INVALID_OPERATION : glDrawArrays: Source and destination textures of the draw are the same.. It now renders as expected. Fix #4675 2020-09-23 18:10:12 +01:00
Richard Davey
232f8e0ebc Updated to use new uniforms and fixed renderWebGL parameters 2020-09-23 17:55:03 +01:00
Richard Davey
e2d775e083 Remove duplicate code 2020-09-23 12:06:22 +01:00
Richard Davey
b350ebddcc Removed duplicate code. 2020-09-23 11:42:14 +01:00
Richard Davey
183e68580f Fixed dirty flag reset 2020-09-22 11:45:49 +01:00
Richard Davey
bd25dbc355 Added per-model cull mode 2020-09-22 11:39:26 +01:00
Richard Davey
0410c9f5aa Updated JSDocs 2020-09-22 11:33:40 +01:00
Richard Davey
afe765a2cf Fix component properties 2020-09-21 18:24:12 +01:00
Richard Davey
d86cde525a Remove console.log 2020-09-21 18:23:48 +01:00
Richard Davey
d33c69b65c Updated the shaders 2020-09-21 18:23:41 +01:00
Richard Davey
893453f840 New uniforms handler, new cache and dirty checks 2020-09-21 15:57:38 +01:00
Richard Davey
4549fb4320 Updated type defs 2020-09-21 14:05:51 +01:00
Richard Davey
f2f3aea79a Shorter errors 2020-09-21 14:05:38 +01:00
Richard Davey
9bb510be0c Now caches uniform locations and added all of the new set1f etc uniform methods 2020-09-21 14:05:30 +01:00
Richard Davey
56caeb126f Renders whole buffer in a single draw with no vertex iteration 2020-09-21 00:17:14 +01:00
Richard Davey
1d2a8bc58f Added fog to shader 2020-09-21 00:16:43 +01:00
svipal
030a9489cd
Merge pull request #9 from photonstorm/master
Final master pull hopefully
2020-09-19 11:01:04 +02:00
Svipal
299f83c13d fixed conflicts 2020-09-19 10:56:05 +02:00
Richard Davey
307cbe130f New Mesh Shader 2020-09-18 17:51:23 +01:00
Richard Davey
9a1b252a11 Use shouldFlush 2020-09-18 17:50:57 +01:00
Richard Davey
0013db3747 Created new Mesh Pipeline 2020-09-18 17:50:20 +01:00
Richard Davey
74f35acad1 Better docs 2020-09-18 16:38:26 +01:00
svipal
79fe9abc6e finished updating culling system 2020-09-18 17:16:52 +02:00
Richard Davey
5e5b8c0938 The WebGLPipeline.shouldFlush method now accepts an optional parameter amount. If given, it will return true if when the amount is added to the vertex count it will exceed the vertex capacity. The Multi Pipeline has been updated to now use this method instead of performing the comparison multiple times itself. 2020-09-15 11:54:12 +01:00
Richard Davey
6a966e3f3b Removed interpolationPercentage parameter from all render methods, as it has never been used. 2020-09-14 15:33:58 +01:00
Richard Davey
3fa0070e50 Now uses white texture and tintEffect mode 1 2020-09-14 15:03:04 +01:00
Richard Davey
81800e0ce2 WebGLRenderer.whiteTexture is a new property that is a reference to a pure white 4x4 texture that is created during Boot by the Texture Manager. The Multi Pipeline uses this internally for all Graphic, Shape and fill rendering. 2020-09-14 14:44:29 +01:00
Richard Davey
4ade25fc79 No longer read private values for tint
The `Multi Pipeline`, `Bitmap Text`, `Render Texture`, `Text`, `TileSprite` and `Camera` now all read the tint values from the public properties instead of the private `_tintTL` etc ones. They also now set the `tintEffect` value directly from the `tintFill` property, removing another conditional check.
2020-09-14 11:05:09 +01:00
Richard Davey
75c5f11aee Updated shader source RGB to BGR and removed if-else block
* The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they now read the color value as `outTint.bgr` instead of `outTint.rgb`. This allows the colors to remain in RGB order within the Tint component.
* The `Single.frag`, `Light.frag` and `Multi.frag` shaders have all been updated so they no longer have a 3-way check on the `outTintEffect` value.
2020-09-14 11:02:02 +01:00
Richard Davey
ea0abc4f69 Tidy up the formatting 2020-09-14 09:44:17 +01:00
Richard Davey
e4b1093e72 The WebGLRenderer.resize and onResize methods no longer receives or uses the resolution parameter. 2020-09-12 11:58:08 +01:00
Richard Davey
67e49b515c The PipelineManager.resize method along with WebGLPipeline.resize and anything else that extends them no longer receives or uses the resolution parameter. 2020-09-12 11:57:16 +01:00
Richard Davey
37a9261ac4 The CanvasRenderer no longer reads or uses the Game Config resolution property. 2020-09-12 11:56:11 +01:00
Emil Schnedler Vad
e1106a0112 Says webglRender but it is in PipelineManager 2020-09-11 18:44:11 +02:00
Richard Davey
205552d69c Fix namespaces. Fix #5289 2020-09-10 17:04:56 +01:00
Richard Davey
296dafebf5 No need for gl ref 2020-09-09 13:33:25 +01:00
Richard Davey
da4c387d86 Reference fixes 2020-09-09 13:21:38 +01:00
Richard Davey
6734932a32 Update PipelineManager.js 2020-09-09 13:09:25 +01:00
Richard Davey
7e840b2670 Removed all of the pipeline methods and added the Pipeline Manager instance 2020-09-09 13:05:18 +01:00
Richard Davey
52c2312455 Update PipelineManager.js 2020-09-09 13:05:18 +01:00
Richard Davey
7765016caa Pipeline constants so we can avoid using strings elsewhere 2020-09-09 13:05:17 +01:00
Richard Davey
d3e82f2d76 The new Pipeline Manager class 2020-09-09 13:05:17 +01:00
Richard Davey
dc99fd03aa Don't create if vertices already provided. Fix #5280 2020-09-07 16:03:36 +01:00
Richard Davey
5224985e7f Update BitmapMaskPipeline.js 2020-09-07 16:03:18 +01:00
Richard Davey
d92195a8b8 Default rotation as well 2020-09-02 22:55:51 +01:00
Richard Davey
1562525a51 When using Camera.setRenderToTexture its zoom value would be applied twice. Fix #4221 2020-09-02 22:50:27 +01:00
Richard Davey
6aef37572d WebGLRenderer.previousPipeline is a new property that is set during a call to clearPipeline and used during calls to rebindPipeline, allowing the renderer to rebind any previous pipeline, not just the Multi Pipeline.
The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well.
2020-09-01 13:05:31 +01:00
Richard Davey
809b8a41d9 The WebGLRenderer.updateCanvasTexture method will now set gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 2020-08-26 00:19:19 +01:00
Richard Davey
791704febe WebGLRenderer.finalType is a new boolean property that signifies if the current Game Object being rendered is the final one in the list. 2020-08-25 18:24:42 +01:00
Richard Davey
de0133e3cc Spine Game Objects can now be rendered to Render Textures. Fix #5184 2020-08-25 14:11:37 +01:00
Richard Davey
ca99c4564f Added reset property to Bind to get new vertex attrib locations 2020-08-25 13:24:56 +01:00
Richard Davey
7d1ad38b4a Updated shader names 2020-08-25 13:23:59 +01:00
Richard Davey
0cd4d0fc54 Update WebGLRenderer.js 2020-08-21 16:23:04 +01:00
Richard Davey
9a1dc640f8 Fix gl access 2020-08-21 16:17:29 +01:00
Richard Davey
0dd07333af Updated to use MultiPipeline 2020-08-21 16:14:59 +01:00
Richard Davey
5c39254f36 Testing new config approach 2020-08-21 16:04:26 +01:00
Richard Davey
209b39b38c New pipeline names and single texture flag 2020-08-21 16:03:29 +01:00
Richard Davey
468c03dfe5 Much better docs and handling of config values 2020-08-21 16:03:07 +01:00
Richard Davey
4b4af50ca9 Quicker return 2020-08-21 16:02:43 +01:00
Richard Davey
37fdde7911 New typedefs for pipeline configs 2020-08-21 16:02:30 +01:00
Richard Davey
600385ac29 A brand new pipeline for single-texture custom pipelines 2020-08-21 16:01:53 +01:00
Richard Davey
57040554ef Renamed the pipelines to make them less ambiguous and sorted out lots of config properties 2020-08-21 16:01:39 +01:00
Richard Davey
8f5ee5391f Removed redundant consts 2020-08-21 15:59:41 +01:00
Richard Davey
6435772646 Shaders renamed to match new pipeline names 2020-08-21 15:41:12 +01:00
Richard Davey
14ad202adc Use new Utils function 2020-08-21 09:44:52 +01:00
Richard Davey
8edbbb2e2d Renderer.WebGL.Utils.parseFragmentShaderMaxTextures is a new function that will take fragment shader source and search it for %count% and %forloop% declarations, replacing them with the required GLSL for multi-texture support, returning the modified source. 2020-08-21 09:44:43 +01:00
Richard Davey
84ef02743b The WebGL Renderer will now add the pipelines during the boot method, instead of init. 2020-08-20 10:48:30 +01:00
Richard Davey
e3142f313f WebGLPipeline.hasBooted is a new boolean property that tracks if the pipeline has been booted or not, which is now far more important in 3.5 than in previous versions. This is checked in the WebGLRenderer.addPipeline method, and if not set, the pipeline is booted. Fix #5251 #5255 2020-08-20 10:47:21 +01:00
Richard Davey
75da5b2f22 Reset all textures on rebind, which is what Externs need when finishing 2020-08-06 17:06:26 +01:00
Richard Davey
4baa0522b9 Bumping to 3.50 2020-07-31 13:41:29 +01:00
Richard Davey
bf4c475e85 Floor drawFillRect values 2020-07-30 18:10:23 +01:00
Richard Davey
86f35ef9cf Updated docs 2020-07-23 17:35:47 +01:00
Richard Davey
c31a9ad4e5 WebGLRenderer.unbindTextures is a new method that will activate and then null bind all WebGL textures. 2020-07-23 16:24:44 +01:00
Richard Davey
27426dd0b6 Testing RenderTextures (currently broken, will fix next week) 2020-07-17 18:08:39 +01:00
Richard Davey
8210700124 Enable the pipelines again 2020-07-17 17:04:49 +01:00
Richard Davey
491ca62373 The TextureTintStripPipeline now extends TextureTintPipeline and just changes the topolgy, vastly reducing the filesize. 2020-07-17 17:04:40 +01:00
Richard Davey
8d976d6ed5 WebGLRenderer.textureFlush is a new property that keeps track of the total texture flushes per frame. 2020-07-17 16:36:18 +01:00
Richard Davey
8bb49332a9 Always set rotation 2020-07-17 13:55:50 +01:00
Richard Davey
d11a16deaa Added forceZero and setAttribPointers
`WebGLPipeline.forceZero` is a new property that informs Game Objects if the pipeline requires a zero bound texture unit.
* `WebGLPipeline.setAttribPointers` is a new method that will set the vertex attribute pointers for the pipeline.
2020-07-17 13:55:39 +01:00
Richard Davey
fea1ade5b7 Update WebGLRenderer.js 2020-07-16 16:59:45 +01:00
Richard Davey
12fc51e2e2 If normal map set, advance the current active texture 2020-07-16 16:17:16 +01:00
Richard Davey
3dd6d8a1a4 Remove forceZero and added textureUnit 2020-07-16 16:16:57 +01:00
Richard Davey
5e8c28d468 Removed batchTexture as it's no longer needed 2020-07-16 16:16:42 +01:00
Richard Davey
76de5c246a Update ForwardDiffuseLightPipeline.js 2020-07-16 15:51:12 +01:00
Richard Davey
e7957b9380 Added getNormalMap and setGameObject 2020-07-16 15:18:02 +01:00
Richard Davey
f7e6847027 Added setGameObject method and currentUnit property 2020-07-16 15:16:17 +01:00
Richard Davey
5986f8f080 Tidying 2020-07-16 15:16:01 +01:00
Richard Davey
0c411e9e7e Removed currentUnit and batchSprite forceZero 2020-07-16 15:13:47 +01:00
Richard Davey
85f63c4a19 WebGLRenderer.isNewNormalMap is a new method that returns a boolean if the given parameters are not currently used. 2020-07-16 15:11:43 +01:00
Richard Davey
38e7495b61 Fixed default normal map so all Game Objects will now render
* The pipeline now works with Game Objects that do not have a normal map. They will be rendered using the new default normal map, which allows for a flat light effect to pass over them and merge with their diffuse map colors.
2020-07-16 11:04:10 +01:00
Richard Davey
93d0378143 Added missing jsdocs 2020-07-16 11:03:49 +01:00
Richard Davey
84968f502f Update ForwardDiffuseLightPipeline.js
* The pipeline will no longer look-up and set all of the light uniforms unless the `Light` is dirty.
* The pipeline will no longer reset all of the lights unless the quantity of lights has changed.
2020-07-16 03:24:19 +01:00
Richard Davey
3b9d115d0c Reset just units 0 and 1 2020-07-16 03:13:47 +01:00
Richard Davey
d7cf9da819 Added location cache 2020-07-16 03:13:10 +01:00
Richard Davey
5059045c76 Cache attribute location
* `WebGLPipeline.boot` will now check all of the attributes and store the pointer location within the attribute entry.
* `WebGLPipeline.bind` no longer looks-up and enables every attribute, every frame. Instead it uses the cached pointer location stored in the attribute entry, cutting down on redundant WebGL operations.
2020-07-16 03:12:53 +01:00
Richard Davey
4ab9604102 Lots of updates to this pipeline
* The `ForwardDiffuseLightPipeline.defaultNormalMap` property has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.boot` method has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.onBind` method has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.setNormalMap` method has been removed as it's no longer required.
* The `ForwardDiffuseLightPipeline.bind` is a new method that handles setting-up the shader uniforms.
* The `ForwardDiffuseLightPipeline.batchTexture` method has been rewritten to use the Texture Tint Pipeline function instead.
* The `ForwardDiffuseLightPipeline.batchSprite` method has been rewritten to use the Texture Tint Pipeline function instead.
2020-07-16 02:15:53 +01:00
Richard Davey
1f3b79cf11 Normal map additions
* `WebGLRenderer.normalTexture` is a new property that holds the currently bound normal map (texture unit one).
* `WebGLRenderer.setNormalMap` is a new method that sets the current normal map texture.
* `WebGLRenderer.clearNormalMap` is a new method that clears the current normal map texture.
* `WebGLRenderer.resetTextures` is a new method that flushes the pipeline, resets all textures back to the temporary ones and resets the active texture counter.
2020-07-16 02:15:01 +01:00
Richard Davey
c6ffa0620e TextureTintPipeline.batchSprite and batchTexture has new parameters forceZero which forces use of texture unit zero. 2020-07-16 02:13:08 +01:00
Richard Davey
0b3f125ee0 Removed the Deferred Diffuse fragment and vertex shaders from the project, as they're not used. 2020-07-16 00:21:44 +01:00
Richard Davey
94d333ee1e Use new texture unit 2020-07-16 00:00:49 +01:00
Richard Davey
9e9e45261f Added setTextureZero and clearTextureZero
* `WebGLRenderer.setTextureZero` is a new method that activates texture zero and binds the given texture to it. Useful for fbo backed game objects.
* `WebGLRenderer.clearTextureZero` is a new method that clears the texture tha was bound to unit zero.
* `WebGLRenderer.textureZero` is a new property that holds the currently bound unit zero texture.
2020-07-15 18:03:03 +01:00
Richard Davey
216d7cb1fa Updated WebGLRenderer to support new texture assignment
* The property `WebGLRenderer.currentActiveTextureUnit` has been renamed to `currentActiveTexture`.
* `WebGLRenderer.startActiveTexture` is a new read-only property contains the current starting active texture unit.
* `WebGLRenderer.maxTextures` is a new read-only property that contains the maximum number of texture units WebGL can use.
* `WebGLRenderer.textureIndexes` is a new read-only array that contains all of the available WebGL texture units.
* `WebGLRenderer.tempTextures` is a new read-only array that contains temporary WebGL textures.
* The `WebGLRenderer.currentTextures` property has been removed, as it's no longer used.
* `WebGLRenderer.currentTextures` has been removed, as it's no longer used internally.
* `WebGLRenderer.setBlankTexture` no longer has a `force` parameter, as it's set by default.
* `WebGLRenderer.setTextureSource` is a new method, used by pipelines and Game Objects, that will assign a texture unit to the given Texture Source.
* The `WebGLRenderer.setTexture2D` method has been updated to use the new texture unit assignment. It no longer takes the `textureUnit` or `flush` parameters and these have been removed from its method signature.
2020-07-15 17:11:01 +01:00
Richard Davey
9c76ec0389 Large TextureTintPipeline refactor
* The Texture Tint vertex and fragment shaders have been updated to support the `inTexId` float attribute and dynamic generation.
* The Texture Tint Pipeline has a new attribute, `inTexId` which is a `gl.FLOAT`.
* `TextureTintPipeline.bind` is a new method that sets the `uMainSampler` uniform.
* The `TextureTintPipeline.requireTextureBatch` method has been removed, as it's no longer required.
* The `TextureTintPipeline.pushBatch` method has been removed, as it's no longer required.
* The `TextureTintPipeline.maxQuads` property has been removed, as it's no longer required.
* The `TextureTintPipeline.batches` property has been removed, as it's no longer required.
* `TextureTintPipeline.flush` has been rewritten to support multi-textures.
* `TextureTintPipeline.flush` no longer creates a sub-array if the batch is full, but instead uses `bufferData` for speed.
* `TextureTintPipeline.currentUnit` is a new property that holds the most recently assigned texture unit. Treat as read-only.
2020-07-15 17:05:55 +01:00
Richard Davey
3ede28230b Update WebGLPipeline.js 2020-07-15 16:54:18 +01:00
Richard Davey
c0504e4fc1 WebGL.Utils.checkShaderMax is a new function, used internally by the renderer, to determine the maximum number of texture units the GPU + browser supports. 2020-07-15 16:52:26 +01:00
Richard Davey
7c742f95d2 Generate multi-texture shader source 2020-07-14 17:44:26 +01:00
Richard Davey
9a45517efd Pass max textures to pipeline (disable other pipelines for now) 2020-07-14 17:44:17 +01:00
Richard Davey
587c23ec3c Added maxGPUTextures property 2020-07-14 17:43:56 +01:00
Richard Davey
76689942c0 Add texture ID to shaders 2020-07-14 17:43:29 +01:00
Richard Davey
43beca7bab Create CheckShaderMax.js 2020-07-14 17:43:05 +01:00
Richard Davey
0003d278fd Updated to use new external MVP functions 2020-07-14 16:49:30 +01:00
Richard Davey
06c1336f41 Removed all functions from MVP except init and update and made them all external 2020-07-14 16:49:16 +01:00
Richard Davey
a8faef6692 Created new Model View Projection functions 2020-07-14 16:48:01 +01:00
Richard Davey
6374da052f Fixed lint errors with PR #5193 2020-07-13 12:55:49 +01:00
Richard Davey
259b702df8
Merge pull request #5193 from scott20145/master
Fix nested mask behaviour for Phaser.CANVAS mode
2020-07-13 12:54:14 +01:00
scott.liu
2f98f463d2 format 2020-06-17 11:01:50 +08:00
scott.liu
7f4bbf9192 format 2020-06-17 10:59:25 +08:00
scott.liu
104a3b9e35 format 2020-06-17 10:56:17 +08:00
scott.liu
f607f1f521 #3673 fix nested mask behaviour for Phaser.CANVAS mode 2020-06-17 10:53:38 +08:00
Volodymyr Linyvyi
8d217d53fa Set TextureTintPipeline on each 'postRenderCamera' call 2020-04-19 18:44:03 +03:00
Richard Davey
03ee36f9ba Finished JSDocs 2020-02-04 17:30:27 +00:00
Richard Davey
0eaf0c47b5 Respect Camera.renderToGame property 2020-01-27 23:35:52 +00:00
Richard Davey
18120cb0d5 New Strip pipeline 2020-01-17 17:58:41 +00:00
Richard Davey
0af1303ba2 Added TextureTintStrip pipeline 2020-01-17 17:38:24 +00:00
Richard Davey
ff65e69cd1 Changed copyright date to 2020 2020-01-15 12:07:09 +00:00
Richard Davey
7d53dc3447 Added support for mipmap texture generation and filter levels 2019-11-19 13:00:54 +00:00
Josh Soref
94e96b3fd2 spelling: renderered 2019-10-29 02:33:23 -04:00
Kolja Kutschera
c893ca6186 fix light2d using tileset from dynamictilemaplayer (#4167,#4079) 2019-10-26 00:56:43 +02:00
Richard Davey
585a8a93ee
Merge pull request #4787 from firefalcom/fix/normalMapRotation
Fix incorrect lighting when batching several sprites
2019-10-11 13:21:39 +01:00
Richard Davey
61f5fadddf Split up canvas and video texture creation and updating. 2019-10-10 12:26:39 +01:00
Gauthier Billot
7ffeb4785e Added currentNormalMapRotation and updated setNormalMapRotation 2019-10-06 20:31:29 +02:00
Richard Davey
5de4641e49 Added jsdocs 2019-10-04 11:13:05 +01:00
Richard Davey
49012d6237 Added createTexture2D.forceSize parameter, videoToTexture method and strengthened empty texture creation 2019-10-03 17:49:58 +01:00
Richard Davey
b3ea5bddd2 SetTransform will now set the imageSmoothingEnabled context value based on the renderer and texture source scale mode. 2019-10-01 16:10:05 +01:00
Richard Davey
8d5c097720 Removed un-used import 2019-10-01 16:05:18 +01:00
Richard Davey
1cc5b1a66e CanvasRenderer.antialias is a new property, populated by the game config property of the same name (or via the pixelArt property) that will tell the canvas renderer what to set image interpolation to during rendering of Sprites. 2019-10-01 14:54:40 +01:00
Nicolas Ferrero
a76e3c7cb6 update vertexComponentCount in WebGLPipeline 2019-09-10 18:55:30 +03:00
Richard Davey
e3039ffb64 Added antialiasGL option 2019-08-29 11:46:58 +01:00
Richard Davey
f4002471d7 Updated context lost / restored handlers 2019-07-17 16:38:00 +01:00
Richard Davey
630382e88d Added Game Object type look ahead and state for custom batching. 2019-07-16 17:41:08 +01:00
Richard Davey
2df5335991 Added snapshotCanvas method 2019-07-15 17:02:46 +01:00
Richard Davey
58865f2c34 The WebGL Lost and Restored Context callbacks were never removed, which could cause them to hold onto stale references. Fix #3610 2019-07-15 15:28:46 +01:00
Richard Davey
dfba4ae817 Extract pixel from correct location for a framebuffer 2019-07-14 16:00:35 +01:00
Richard Davey
15d7b9c6ef Fixed jsdoc typos and added single pixel support 2019-07-14 13:56:44 +01:00
Richard Davey
99483f476c Added new properties 2019-07-13 15:23:07 +01:00
Richard Davey
285babaf8c Added the new snapshotFramebuffer method 2019-07-13 15:20:57 +01:00
Richard Davey
d4b1a04beb WebGLSnapshot can now grab from a framebuffer 2019-07-13 15:20:42 +01:00
Richard Davey
5106b2c935 Animations with custom pivots, like those created in Texture Packer with the pivot option enabled, would be mis-aligned if flipped. They now render in the correct position, regardless of scale or flip on either axis. Fix #4155 2019-07-03 14:01:48 +01:00
Richard Davey
47b1d755a7 Fixed a bug in the WebGL and Canvas Renderers where a Sprite with a flipX or flipY value set would render the offset frames slightly out of place, causing the animation to appear jittery. Also, the sprite would be out of place by its origin. Fix #4636 #3813 2019-07-03 11:11:25 +01:00
Richard Davey
79b2048ae0 Fixed addBlendMode type. Fix #4625 2019-06-28 14:53:12 +01:00
Richard Davey
c0d58ee69e Better flip handling 2019-06-26 00:35:22 +01:00
Richard Davey
3bf3057da0 WebGLRenderer.setScissor will default the drawingBufferHeight if no argument is provided, stopping NaN scissor heights. 2019-06-25 23:03:57 +01:00
Richard Davey
f323097714 Sprites need to flip the UV if the source is a GLTexture 2019-06-23 22:12:14 +01:00
Richard Davey
254eef9787 Use the event constant instead of a string 2019-06-06 15:56:45 +01:00
Richard Davey
12bcda98a6 Added support for a desynchronized context and alpha support in 2D 2019-06-04 19:13:49 +01:00
Richard Davey
c91ed91ce3 License link update 2019-05-10 16:15:04 +01:00
Richard Davey
725e1d7ef7 JSDoc changes to help TypeScript not get its knickers in a twist 2019-05-09 17:13:25 +01:00
Richard Davey
a6341a97a8 Fixed Types references 2019-05-09 15:32:53 +01:00
Richard Davey
11d6f2e802 Renderer Types 2019-05-09 12:36:36 +01:00
Richard Davey
3d40a95a00 Added glFuncMap 2019-05-01 12:29:45 +01:00
Richard Davey
2f48d68735 A shader can now be used as a bitmap mask 2019-05-01 11:12:31 +01:00
Richard Davey
08f4a0ccf4 Tidying up 2019-05-01 02:10:38 +01:00
Richard Davey
84e898fd90 Fixed nested bitmap mask issue 2019-04-29 14:45:54 +01:00
Richard Davey
80a0bf3f1a Re-apply stencil after a bitmap mask 2019-04-29 14:29:13 +01:00
Richard Davey
3efcd1ca49 New cam mask object 2019-04-29 14:28:58 +01:00
Richard Davey
70b5b01db2 Restore previous framebuffer 2019-04-26 19:13:32 +01:00
Richard Davey
cf878ca553 Better stencil mask checking 2019-04-26 19:13:24 +01:00
Richard Davey
183ce1b96c BMP fix 2019-04-26 02:30:24 +01:00
Richard Davey
6e70f0e19c Shaders now work with camera masks and can have their own geometry masks 2019-04-26 01:53:34 +01:00
Richard Davey
9356744399 argument caps 2019-04-25 12:14:04 +01:00
Richard Davey
2ff76eb4b5 Removed un-needed Quad Pipeline and shaders 2019-04-25 12:13:09 +01:00
Richard Davey
72af4a21d1 Default shader 2019-04-25 03:16:46 +01:00
Richard Davey
9b4309b38c Added QuadShader Pipeline to the renderer 2019-04-25 03:16:39 +01:00
Richard Davey
2727408e7c Don't disable the vertex attribute if the location is invalid 2019-04-25 03:16:25 +01:00
Richard Davey
e0c22c5534 Added QuadShader Pipeline 2019-04-25 03:16:03 +01:00
Richard Davey
f64d0a935b Geometry Masks are now batched. Previously, using the same mask on multiple Game Objects would create brand new stencil operations for every single Game Object, causing performance to tank. Now, the mask is only set if it's different from the previously masked object in the display list, allowing you to mask thousands of Game Objects and retain batching through-out. 2019-04-24 16:45:31 +01:00
Richard Davey
12b6041d20 inverseAlpha support added back in and tidied up renderer 2019-04-24 14:51:39 +01:00
Richard Davey
1fc9b15ff1 Fixed Geometry Mask nesting issue. 2019-04-15 16:46:19 +01:00
Richard Davey
974ceb5654 Restore bitmap mask framebuffer 2019-04-12 18:36:47 +01:00
Richard Davey
f69cec7975 Improving support for child masking 2019-04-12 17:47:28 +01:00
Richard Davey
186970bd69 Render the Camera masks 2019-04-11 17:10:03 +01:00
Richard Davey
c188dfde12 Testing mask component on Camera 2019-04-10 18:10:03 +01:00
Richard Davey
42cb39749f Matter and Snapshot typedefs 2019-02-13 15:22:29 +00:00
Richard Davey
b50e1c78b5 Lots more jsdoc tweaks and improvements 2019-02-12 15:01:54 +00:00
Richard Davey
dc73993fe2 Added jsdoc version numbers 2019-02-12 12:22:25 +00:00
Richard Davey
c85497b6c5 Fixing jsdocs 2019-02-12 11:59:31 +00:00
Richard Davey
cfe6452924 Don't set if game is being destroyed 2019-02-04 23:29:22 +00:00
Richard Davey
60542a25cc Numerous jsdoc and TS related fixes 2019-02-04 17:16:08 +00:00
Richard Davey
4f6f6ee72f Lots of jsdoc and type fixes 2019-01-31 12:19:01 +00:00
Richard Davey
3b52b8387e Fixed jsdoc type 2019-01-31 11:11:05 +00:00
Richard Davey
f5106de6c5 Callback is now invoked in Image.onload to avoid race conditions. 2019-01-25 17:29:31 +00:00
Richard Davey
7c03028534 Updated jsdocs 2019-01-25 17:29:10 +00:00
Richard Davey
3206a585d1 Now takes a snapshot configuration object and changes path based on the type of grab being taken. 2019-01-25 17:29:03 +00:00
Richard Davey
f59f51ffd0 Added snapshotState, removed the old properties and added the new snapshotArea and snapshotPixel methods. 2019-01-25 17:28:39 +00:00
Richard Davey
8f016ef983 Updating snapshot feature 2019-01-25 10:01:53 +00:00
Richard Davey
9142260307 Texture filter mode is now based on game anti-alias setting. 2019-01-24 14:23:24 +00:00
Richard Davey
f8f81a06f0
Merge pull request #4286 from gomachan7/fixup/apply_transparent_bg_on_webgl_renderer
Fix WebGLRenderer to apply transparent bg in config
2019-01-23 22:22:08 +00:00
Richard Davey
1eccff1e3b Fixed jsdoc links and markdown bullet lists 2019-01-18 15:20:56 +00:00
Richard Davey
bc962c25dc All listeners use the new Events 2019-01-18 13:41:43 +00:00
Richard Davey
e6b74304b5 Added Camera pre and post render events. 2019-01-17 12:02:14 +00:00
Richard Davey
aa341854c7 Happy New Year 2019-01-15 16:20:22 +00:00
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
82267ce14c Removed duplicate JSDoc typedef. 2019-01-10 13:42:53 +00:00
Richard Davey
175af00c60 Stores the new resolution, should it change (unlikely, but ...) 2019-01-10 13:42:11 +00:00
Richard Davey
e79404256f Removed autoResize. Dimensions now taken from Scale Manager. 2019-01-10 13:41:49 +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
fafc597b4c Added fillRect back in for non-transparent canvas 2018-11-28 15:49:24 +00:00
Richard Davey
b0df6892b5 The Canvas SetTransform method would save the context state, but it wasn't restored at the end in the following Game Objects: Dynamic Bitmap Text, Graphics, Arc, Curve, Ellipse, Grid, IsoBox, IsoTriangle, Line, Polygon, Rectangle, Star and Triangle. These now all restore the context, meaning if you're using non-canvas sized cameras in Canvas mode, it will now render beyond just the first custom camera. 2018-11-27 13:54:59 +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
5147fb281a Added new Blend Modes. 2018-11-13 15:10:25 +00:00
Richard Davey
48686881dc Removed clearColor. CSS now handles this. Context always transparent. 2018-11-13 15:10:10 +00:00
Richard Davey
1b51ef1130 Remove fillRect. CSS now handles the background color. 2018-11-13 15:09:42 +00:00
Richard Davey
76918e76b0 ERASE tests 2018-11-13 10:32:24 +00:00
Richard Davey
a1273e42b8 Added ERASE blend mode 2018-11-13 10:31:56 +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
217e273896 Added context save to stop fillRect bug (issue #4056) 2018-10-24 12:39:48 +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
Richard Davey
aa4c1ce51d
Merge pull request #4019 from Mattykins/master
Add support for setting float array uniforms in the WebGLPipeline / WebGLRenderer
2018-09-12 15:16:26 +01:00
Richard Davey
9aeba9e73e Fixed jsdoc 2018-09-10 23:30:42 +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
faeed47b5e eslint fixes 2018-08-06 15:32:08 +01:00
Richard Davey
e3f5590fc3 Use var to cut down on bytes 2018-08-06 15:29:36 +01:00
Richard Davey
26cc84522d The CanvasRenderer.BlitImage function has been removed, as has the associated blitImage property from the Canvas Renderer as they're no longer used. 2018-08-06 15:29:27 +01:00
Richard Davey
fbb67ac201 The CanvasRenderer.DrawImage function has been removed, as has the associated drawImage property from the Canvas Renderer as they're no longer used. 2018-08-06 15:24:51 +01:00
Richard Davey
708a857a26 SetTransform is a new Canvas Renderer function that consolidates the process of preparing a Game Object for rendering, without actually rendering it. This is used internally by the Graphics and Bitmap Text classes. 2018-08-03 19:02:43 +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
ca68904953 The Canvas Renderer has a new batchSprite method that consolidates the process of drawing a texture-based Game Object to the canvas. It processes the alpha, blend mode and matrix calculations in a single function and now is used by nearly all Game Object canvas renderers. 2018-08-03 18:53:50 +01:00
Richard Davey
fc0dc13930 Removed use of currentBlendMode and currentAlpha 2018-08-03 01:53:51 +01:00
Richard Davey
9f44896a3f The Blend Mode is now set directly in all Canvas Renderers without comparing it to what's stored in the Canvas Renderer. This fixes problems where the blend mode would be lost between two different Game Objects because they restored the context, but didn't update the renderer flag. Game Objects in Canvas can now mix and match blend modes across the display list. 2018-08-03 01:29:18 +01:00
Richard Davey
286f36cd1e Added ability for the Canvas Renderer to change context. 2018-08-02 14:57:37 +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
a4db967b19 Added 4 temp matrices to the Canvas renderer. 2018-07-31 23:23:04 +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
b6a1033dbd Fixed Camera FX for scaled camera sizes 2018-07-18 15:03:06 +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
fdd4a8f8f3 Tidied up DrawImage to re-use vars and cut down code 2018-07-06 15:55:20 +01:00
Richard Davey
e620f3e308 Updated to use matrix and support crop 2018-07-06 15:34:25 +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
9bd8fb34a4 Changed canvasData to remove duplicate properties. 2018-07-04 17:01:29 +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