Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createFramebuffer should return p5.Framebuffer type instead of void #124

Open
andrew-goldie opened this issue Apr 28, 2024 · 1 comment
Open

Comments

@andrew-goldie
Copy link

andrew-goldie commented Apr 28, 2024

(See rendering.d.ts, global.d.ts, p5.Graphics.d.ts)

The function

createFramebuffer(options?: object): void;

should be defined as

createFramebuffer(options?: object): p5.Framebuffer;

See here for p5.js documentation: https://p5js.org/reference/#/p5.Graphics and https://p5js.org/reference/#/p5.Graphics/createFramebuffer

@asukaminato0721
Copy link
Contributor

currently it's recommended to generate type by self

In p5js 2.0, upstream will release the type file, so I am not maintaining this repo now.

grep "createFramebuffer" -r . --exclude "*.json"
./types/p5/global.d.ts:     *   Note: createFramebuffer() can only be used in
./types/p5/global.d.ts:    function createFramebuffer(options?: object): p5.Framebuffer;
./types/p5/src/webgl/p5.Shader.d.ts:         *   createFramebuffer(). Both objects have the same
./types/p5/src/webgl/p5.Framebuffer.d.ts:         *   Note: createFramebuffer() is the recommended way
./types/p5/src/core/p5.Graphics.d.ts:        createFramebuffer(options?: object): Framebuffer;
./types/p5/src/core/rendering.d.ts:         *   Note: createFramebuffer() can only be used in
./types/p5/src/core/rendering.d.ts:        createFramebuffer(options?: object): Framebuffer;
./node_modules/typescript/lib/lib.dom.d.ts:    createFramebuffer(): WebGLFramebuffer | null;
./node_modules/typescript/lib/lib.webworker.d.ts:    createFramebuffer(): WebGLFramebuffer | null;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants