Skip to content

Conversation

davepagurek
Copy link
Contributor

Resolves #8173

Changes:

  • Replaces direct accesses fn and the global p5 in the MediaElement class with internal methods that return undefined
  • In the addon function that adds MediaElement, patches those internal methods to have fn and p5 usage

This is a workaround to a problem that we only have because Documentation.js does not parse classes correctly when they're defined inside of an addon function. If we could do that, then we could just reference p5 and fn from the addon function parameters. However, because of our constraints, just patching in the relevant methods is maybe the best we can do.

Live: https://editor.p5js.org/davepagurek/sketches/PN2B_ebLG

PR Checklist

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

Successfully merging this pull request may close these issues.

1 participant