You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The examples for shaders that extend the Phaser.Renderer.WebGL.Pipelines.PostFXPipeline class, include a property called uniforms, that is passed to to the parent class. When you use the same code with TypeScript, there is a warning about this property not existing on the WebGLPipelineConfig type.
To reproduce, in a TypeScript project, create a class that extends the Phaser.Renderer.WebGL.Pipelines.PostFXPipeline class, and in the super call, add in uniforms. You should see a TypeScript warning of uniforms not existing on the WebGLPipelineConfig type.
Additional Information
Not sure if relevant, but when I don't provide the uniforms property to the configuration that is provide to the parent class, the code still works.
Hi Scott - This property is no longer required. A shader will automatically extract the uniforms via a WebGL call, so you don't need to list them anymore. However, it appears the examples have not been updated to reflect this. If you remove them from the example code, the example will still work just fine.
Version
Description
The examples for shaders that extend the
Phaser.Renderer.WebGL.Pipelines.PostFXPipeline
class, include a property calleduniforms
, that is passed to to the parent class. When you use the same code with TypeScript, there is a warning about this property not existing on theWebGLPipelineConfig
type.Reference:
https://labs.phaser.io/edit.html?src=src/renderer/color%20post%20fx%20pipeline.js&v=3.80.1 and https://labs.phaser.io/assets/pipelines/BendPostFX.js
Example Test Code
Example code can be found here: https://github.com/scottwestover/template-vite-ts-bug-example.
The main file is https://github.com/scottwestover/template-vite-ts-bug-example/blob/main/src/BendPostFX.ts, which is a slightly modified version of https://labs.phaser.io/assets/pipelines/BendPostFX.js.
To reproduce, in a TypeScript project, create a class that extends the
Phaser.Renderer.WebGL.Pipelines.PostFXPipeline
class, and in thesuper
call, add inuniforms
. You should see a TypeScript warning of uniforms not existing on theWebGLPipelineConfig
type.Additional Information
Not sure if relevant, but when I don't provide the
uniforms
property to the configuration that is provide to the parent class, the code still works.This might be related to #6737.
The text was updated successfully, but these errors were encountered: