Commit Graph

  • d1a38d55c0 Remove renderer from RenderNode parameters. It's easy to access via the manager parameter. Ben Richards 2024-05-28 19:36:03 +12:00
  • 7e16caeed7 Make render nodes customizable. Game objects can now change their render node, in place of a pipeline. Render nodes can be created with custom values, to change their behavior or relationships. Several nodes are renamed. Program Wrapper now supports defining layouts with strings instead of GLenums, to facilitate render node customization. Ben Richards 2024-05-27 18:32:34 +12:00
  • 9940554eba Optimize Program Wrapper. Ben Richards 2024-05-21 14:49:24 +12:00
  • fedf494a4c Fix FillRect. It wasn't updated to the latest batch paradigm. This fixes camera fill, flash, and fade. Ben Richards 2024-05-20 17:03:41 +12:00
  • 261399642e Increase batch size to 16384. This is the natural limit of 16-bit unsigned integer vertex indexes. Ben Richards 2024-05-17 17:17:49 +12:00
  • 6bbfde50da Use transformed elements instead of instanced rendering. There is simply no good way to control instanced rendering with batches, and there is no efficient way to use hardware transform when using vertices to render. Ben Richards 2024-05-17 16:34:04 +12:00
  • f3dd9523e2 Merge branch 'phaserjs:master' into master Jack Le Hamster 2024-05-16 15:48:32 -07:00
  • 6b9b296c0f Update CHANGELOG-v3.85.md Robert Kowalski 2024-05-16 16:20:01 -04:00
  • ce6324837e Transfer texture unit index array to WebGLRenderer. This makes it universally accessible to any shader. Ben Richards 2024-05-16 12:08:20 +12:00
  • b06483ecc6 Update CHANGELOG-v3.85.md Richard Davey 2024-05-15 18:46:23 +01:00
  • 078c3662ef Moving to v3.85 Richard Davey 2024-05-15 15:37:36 +01:00
  • 9b49655e9c The method TextureManager.checkKey will now return false if the key is not a string, which fixes issues where a texture could be created if a key was given that was already in use Richard Davey 2024-05-15 15:37:19 +01:00
  • 0bcc71d469 Fixing DomElement position when camera zoom != 1 David Négrier 2024-05-15 16:25:28 +02:00
  • 946e82b058 Removed .js from require paths (not needed) Richard Davey 2024-05-15 15:02:31 +01:00
  • 5d1d379991 Updated version to 3.85.0 Richard Davey 2024-05-15 15:02:04 +01:00
  • 4a064214ba Set gameSize equal to baseSize Rex 2024-05-15 21:21:22 +08:00
  • 8c5abcd060 Fix parallel texture unit check. It was swapping mobile with desktop preferences, whoops. Ben Richards 2024-05-15 16:41:29 +12:00
  • fc873c0e6d Remove .js from require path Richard Davey 2024-05-15 00:40:35 +01:00
  • cc1329e85d Revert "Fix bug in all JS files." Jack Le Hamster 2024-05-14 14:17:03 -07:00
  • 54f6756977 Revert "Build dist" Jack Le Hamster 2024-05-14 14:16:54 -07:00
  • f87cffd68c Build dist Jack Le Hamster 2024-05-14 00:55:43 -07:00
  • 0ffec094a1 Fix bug in all JS files. Jack Le Hamster 2024-05-14 00:55:03 -07:00
  • cde45d8766 Fix null pointer exception: Uncaught TypeError: Cannot set properties of undefined (setting 'controller') Jack Le Hamster 2024-05-14 00:24:41 -07:00
  • c43a45d985 Allow RenderNodeManager to change parallel texture unit count. The BatchTexturedTintedRawQuads node listens to this, and will recompile its shader to the indicated performance strategy. Ben Richards 2024-05-14 17:03:00 +12:00
  • d120e0a4b5 Fix invalid create and destroy code in Program Wrapper. There is no deleteUniformLocation command. (Thanks, AI hallucinations!) Ben Richards 2024-05-14 16:14:56 +12:00
  • e57ed463b2 Reduce accessor use in VAO wrapper. Ben Richards 2024-05-13 15:25:50 +12:00
  • c8c170672d Use sub-batches to handle many textures in batches. This is the way 3.80 handles things, and is useful for performance on mobile devices where we might only use 1 texture unit per sub-batch. Ben Richards 2024-05-13 15:23:01 +12:00
  • 22b444abee removed type from d.ts lgtome 2024-05-10 01:08:48 +03:00
  • 370cfbb52c Fix jsdoc and type for parent property lgtome 2024-05-09 23:31:10 +03:00
  • b90fc23236 Fix jsdoc in setWordWrapWidth from Text and TextStyle Albert Montagut Casero 2024-05-07 10:36:46 +02:00
  • f01e2764c9 Add BaseSoundManager#isPlaying samme 2021-09-17 09:32:03 -07:00
  • 2c1ad33e1a Update const.js Richard Davey 2024-05-02 14:41:51 +01:00
  • 717bd96879 Fix the last missing data from DrawingContext clones. I hope. Ben Richards 2024-05-02 18:42:42 +12:00
  • e7f1269c12 Fix DrawingContext missing critical data. Ben Richards 2024-05-02 18:36:55 +12:00
  • f3d1da68a9 Fix and tidy code. Fix camera background color not working (a call signature changed). Fix render graph only recording the last camera (by adding a synthetic root node to the graph). Ben Richards 2024-05-02 16:47:28 +12:00
  • 65e69a8369 Unify flipped crop handling. Ben Richards 2024-05-02 14:41:01 +12:00
  • ee8ebbdd1c Render Video using the new system. Ben Richards 2024-05-01 18:36:29 +12:00
  • f86a353a2d Render Text using the new system. It may be more correct than ever, now that we've standardised it. Ben Richards 2024-05-01 17:34:23 +12:00
  • 3140edf0c3 Fix Text UV updates. Previously, Text didn't update the TextureSource dimensions, so its UVs were identical to resolution. They should have been normalized to the 0-1 range. It used MultiPipeline.batchTexture to render, which accommodated these UVs. These changes update the dimensions when Text changes its canvas size, and this makes normalized UVs available. Ben Richards 2024-05-01 15:58:45 +12:00
  • 48d1164c16 Swap order of src and drawingContext parameters. This makes the standard renderWebGL parameters more similar to their original state: we're just replacing camera with drawingContext. Ben Richards 2024-04-30 18:09:25 +12:00
  • 45e89e4574 Make camera part of DrawingContext, and simplify RenderNode calls. Ben Richards 2024-04-30 16:58:45 +12:00
  • 9bf0276af9 Improve renderer event handling. Hook batch rendering into resize events. Fix context restore: - Restore VAOs - Fix Program uniform restore. Ben Richards 2024-04-30 12:14:10 +12:00
  • 061fd21e5f Disable PipelineManager in WebGLRenderer. This eliminates a lot of unused resources. Some will be recreated later, but for now it keeps development simple. I'm not actually removing it, because I want to reference where it is used for the moment. Ben Richards 2024-04-30 11:45:04 +12:00
  • d8a64110f9 Add camera flash and fade effects. Ben Richards 2024-04-29 17:48:27 +12:00
  • a7cc7472a6 Add FillRect render node, and camera background fill. Also use a TextureWrapper instead of a Frame for quad batching, which makes this possible. Ben Richards 2024-04-29 17:06:21 +12:00
  • d43e45d2a4 Handle blend mode in DrawingContext and use it in ListCompositor. Ben Richards 2024-04-29 15:06:43 +12:00
  • ef4731c8b1 Avoid Camera generating unchanged DrawingContext. Ben Richards 2024-04-29 10:21:43 +12:00
  • 252cb41517 Add Phaser.Loader.LoaderPlugin#removePack() samme 2024-04-12 10:01:41 -07:00
  • 45a73c1d2d Complete canvas clear logic. Ben Richards 2024-04-26 20:34:36 +12:00
  • af2e4449a0 Add scissor handling and simplify clearing on DrawingContext. Clearing was just too complex. It was optimized for edge cases, and made it hard to create DrawingContexts for multiple cameras drawing to the same framebuffer. Ben Richards 2024-04-26 18:26:44 +12:00
  • a007adf05b Document and add textures to main draw method. Ben Richards 2024-04-26 12:14:38 +12:00
  • 2c2d856b14 Improve batch texture performance. Ben Richards 2024-04-26 11:20:38 +12:00
  • 287c1e86af Add Phaser.Time.Timeline#timeScale samme 2024-04-25 10:58:44 -07:00
  • 840ff020f8 getPipelineName() is null if pipeline is null samme 2024-04-25 09:10:47 -07:00
  • dd2bc50628 Fix batch flushing at texture limit instead of over limit. Ben Richards 2024-04-24 17:05:26 +12:00
  • ecda5880da Add WebGLVertexBufferLayoutWrapper to standardise buffer handling. Ben Richards 2024-04-24 16:03:10 +12:00
  • 3b4956cc16 Simplify vertex buffer length. Ben Richards 2024-04-24 11:16:23 +12:00
  • b00a6fdc04 Fix massive memory usage and non-managed program. Ben Richards 2024-04-24 11:05:15 +12:00
  • a26972d77e Do matrix transforms in vertex shader. Ben Richards 2024-04-23 21:07:34 +12:00
  • cc78cf9480 Fix old framebuffer invocation. Ben Richards 2024-04-23 16:32:16 +12:00
  • 8d790b6ac4 Add basic RenderNode system. This currently only handles basic multi-textured images/sprites through a basic camera. It forms the basis of a major overhaul. Ben Richards 2024-04-23 16:29:08 +12:00
  • 9b5a21f20f Integrate Program Wrapper changes to WebGLRenderer. Also define some return types. Ben Richards 2024-04-23 16:21:26 +12:00
  • c95c8c527a Add DrawingContext for tracking current drawing settings. This is not at all complete yet, but it's doing some useful stuff. Ben Richards 2024-04-23 16:18:38 +12:00
  • 4f367741b7 Add renderbuffer handling to WebGLFramebufferWrapper. Ben Richards 2024-04-23 16:13:01 +12:00
  • d33845eb3b Add Vertex Array Object (VAO) wrapper. Add VAO to global state. Define a way to clearly denote attribute buffer layout. Integrate buffer layout into Program Wrapper for auto-completion. Ben Richards 2024-04-23 16:09:09 +12:00
  • e337b6e4d1 The default for inputActivePointers works for this condition now Robert Kowalski 2024-04-22 09:30:00 -04:00
  • ec98b33757 Consistently check length for each pointer event Fix #6783 Robert Kowalski 2024-04-21 23:57:18 -04:00
  • c1c1a0ffa4 If GetURL returns false File.load will now throw a helpful error instead of crashing Richard Davey 2024-04-21 18:41:17 +01:00
  • fbc7f57c28 Docs: note velocity units samme 2024-04-17 06:54:31 -07:00
  • 73ff013d95 Throw an error for invalid BitmapText key samme 2024-04-08 08:56:37 -07:00
  • f9cf19f479 displayList might be null Rex 2024-04-08 00:36:59 +08:00
  • 266c1f411d Fix bug Rex 2024-04-06 16:24:08 +08:00
  • a2702fd795 Add some helper methods for changing rendering order Rex 2024-04-06 09:24:04 +08:00
  • f7e029ca2d Improve the audio warnings samme 2024-04-04 08:40:06 -07:00
  • fbcc3580a5 Add padding support to WebGLProgramWrapper.setVertexBuffer layout. Ben Richards 2024-03-28 15:20:21 +13:00
  • 30eef85537 Upgrade WebGLProgramWrapper to set uniforms and attributes. This necessitated expanding the map of WebGL constants/functions, resulting in WebGLShaderSetterWrapper. Ben Richards 2024-03-25 17:55:19 +13:00
  • de3fc50979 Upgrade WebGLProgramWrapper to generate uniforms and attributes. It assumes that programs do not change after creation, so these values are static, and much can be inferred about their behaviour. Uniform-setting code is implemented and has been tested on Shader. Attribute binding has not been finished. - Change gl parameter to renderer. Ben Richards 2024-03-22 17:09:59 +13:00
  • 8272cf1a26 Fix reference to old resources on context restore. Ben Richards 2024-03-22 11:22:08 +13:00
  • 419d846498 Update WebGLBufferWrapper to use WebGLGlobalWrapper. - Add WebGLBufferWrapper.bind to simplify attachment. - Change WebGLBufferWrapper parameter gl to renderer. Ben Richards 2024-03-20 17:12:19 +13:00
  • 7cdd59eaf0 Make WebGLTextureUnitsWrapper.bind parameter units mandatory. Allowing it to search for textures caused anomalies in video textures. Ben Richards 2024-03-20 16:16:07 +13:00
  • 4de15331dd Deprecate WebGLPipeline.bindTexture. Ben Richards 2024-03-20 15:53:50 +13:00
  • 13ed52f478 Use TextureUnits binding throughout the codebase. - Remove WebGLPipeline.activeTextures, which is now covered by the more universal TextureUnit system. - Change TextureUnitsWrapper to only bind activeTexture if the texture is not bound to that unit already. - Remove gl.isContextLost check from WebGLTextureWrapper. The process should run without effect if context is lost, and we skip fetching data if it is not. Ben Richards 2024-03-19 22:08:59 +13:00
  • d02c1f4a70 Fix WebGL background color. Ben Richards 2024-03-19 16:45:01 +13:00
  • 741fb897bd Implement WebGLRenderer.clearFramebuffer and use it. Ben Richards 2024-03-19 16:37:22 +13:00
  • 32bdb8ef0e Implement WebGLTextureUnitsWrapper and manage core texture ops with it. Also tweak several related areas: - Use glWrapper in PipelineManager.rebind, making WebGL state redeclaration more succinct. - Add WebGLRenderer.glTextureUnits property. - Deprecate WebGLRenderer.textureindexes property. - Simplify WebGL context restoration with glWrapper. - Remove WebGLRenderer.createTemporaryTextures. - Remove texture units and binding from WebGLGlobalParameters. - Change WebGLTextureWrapper to take renderer instead of gl as its first parameter. This allows us to use glWrapper code internally. - WebGLTextureWrapper currently doesn't unbind textures after use, which might cause issues with framebuffers etc. We'll ensure that state management makes this a non-issue. Ben Richards 2024-03-19 14:52:49 +13:00
  • e988861f5d Docs: correct TilemapJSONFile superclass samme 2024-03-17 18:06:12 -07:00
  • 46c9c95c02 Implement WebGLGlobalWrapper and manage blend modes with it. The Wrapper won't do its job until everything uses wrappers, but this is a start. API changes: - WebGLRenderer.blendModes type is now WebGLBlendParameters[] instead of untyped array. - WebGLRenderer.updateBlendMode parameters now specify how to use separate parameters. The function no longer treats the equation parameter as optional. Ben Richards 2024-03-17 19:26:35 +13:00
  • 5b0af2f34c Correct transpose parameter for gl.uniformMatrixNfv(). The transpose property is never defined. Ben Richards 2024-03-08 18:28:24 +13:00
  • 9898a6aaae Update documentation on using compressed textures. Correct the multiAtlas example. Remove link to Mali, which has been discontinued. Expand guidance on making valid compressed textures. Ben Richards 2024-03-07 18:06:51 +13:00
  • f17e1df7f4 declared type for onCollideWith Lukas Dachtler 2024-03-07 00:27:18 +01:00
  • 929267011a included reference for phaser types Lukas Dachtler 2024-03-06 22:57:05 +01:00
  • e1d23b98c0 Spelling fixes Robert Kowalski 2024-03-05 22:21:42 -05:00
  • 0a2bede95e Limit textures probed by TextureManager.getPixel and getPixelAlpha. Ben Richards 2024-03-05 15:42:04 +13:00
  • 3c7bee4e08 Fix WebGL parameters on context restore. Ben Richards 2024-03-05 11:17:40 +13:00
  • b851e591c7 Reduce synchronous calls to getShaderParameter. This should reduce round-trip calls to the GPU. We also delete the shaders after they're used. Spector debug uses the shaders, so we hold onto them if debug is on. Ben Richards 2024-03-04 12:08:24 +13:00
  • cd2beb06da Remove flipY parameter from Shader.setRenderToTexture. Ben Richards 2024-02-28 17:18:36 +13:00
  • 928ce1a1e7 Fix LightPipeline failing to render two objects in a batch. Ben Richards 2024-02-28 16:48:58 +13:00
  • 1ba01834ff Updated readme and change log for 3.80.1 v3.80.1 Richard Davey 2024-02-27 15:56:03 +00:00
  • 4f7445f8d7 v3.80.1 Richard Davey 2024-02-27 15:53:24 +00:00
  • 8acc797b64 Updated documentation and removed Transform component Richard Davey 2024-02-27 15:48:31 +00:00