-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Area:CoreArea:WebGLInternationalizationRelates to 'src/core/internationalization.js'Relates to 'src/core/internationalization.js'p5.js 2.0
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
2.2.2.
Web browser and version
Safari 26.3
Operating system
MacOSX
Steps to reproduce this
Problem
Even though they are definetly usable, in instance mode the methods and properties of filterColor don't show up on autocomplete and typescript says they don't exist on type object (ts(2339)).
Snippet:
import p5 from "p5";
let sketch = (p5: p5) => {
let filterShader: p5.Shader;
function testShader({ p5 }: { p5: p5 }) {
p5.filterColor.begin();
let coord = p5.vec2(p5.filterColor.texCoord);
p5.filterColor.set([coord, 0, 1]);
p5.filterColor.end();
}
p5.setup = () => {
p5.createCanvas(800, 800, p5.WEBGL);
p5.fill(255);
filterShader = p5.buildFilterShader(testShader, { p5 });
};
p5.draw = () => {
p5.background(0);
p5.filter(filterShader);
};
};
new p5(sketch);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area:CoreArea:WebGLInternationalizationRelates to 'src/core/internationalization.js'Relates to 'src/core/internationalization.js'p5.js 2.0