Skip to content

The examples on the createCapture reference don't display well #1204

@davepagurek

Description

@davepagurek

Most appropriate sections of the p5.js website?

Reference

What is your operating system?

Mac OS

Web browser and version

Firefox

Actual Behavior

If you go to https://beta.p5js.org/reference/p5/createcapture/, you will see:

  • The first example just shows the top corner of the video:
    Image

  • The third and fourth examples show nothing (especially if, unlike me, you use the Mac default behaviour and scrollbars auto hide) until you scroll
    Image

Expected Behavior

Ideally you can see the full webcam feed immediately.

So this is happening because we auto size examples based on the canvas, but many of these don't use any canvas, or have a canvas but don't use it so it's just sitting there empty taking up space. While we probably need to update the examples a bit in the p5.js repo, we likely also would need something on the website repo to be able to work too. Maybe we add a new custom tag to an example jsdoc so that we can manually specify a width/height when we know auto detection will fail?

Steps to reproduce

Go to https://beta.p5js.org/reference/p5/createcapture/

Would you like to work on the issue?

Feel free for someone else to take this on!

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions