Skip to content

Conversation

hxrshxz
Copy link

@hxrshxz hxrshxz commented Oct 8, 2025

Resolves #7648

Changes:

Added documentation for P5.instance and updated copyToContext() examples to use p5.instance instead of window

Screenshots of the change:

NA

PR Checklist

@Copilot Copilot AI review requested due to automatic review settings October 8, 2025 15:59
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the documentation for shader context copying to reference p5.instance instead of window for better clarity and correctness. The change addresses issue #7648 by providing proper documentation for the p5.instance variable and updating code examples.

  • Added comprehensive documentation for the p5.instance property
  • Updated copyToContext() method examples to use p5.instance instead of window

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/webgl/p5.Shader.js Updated documentation examples to use p5.instance instead of window for copying shaders to main canvas
src/core/main.js Added complete JSDoc documentation for the p5.instance property explaining its purpose and usage

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this has already been fixed in the dev-2.0 branch and doesn't need to have p5.Instance in the main branch instead of window, since we had change in functionality only for 2.x versions.

@hxrshxz hxrshxz deleted the p5.instance-reference branch October 9, 2025 18:22
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.

this._renderer / window._renderer is undefined in dev-2.0

2 participants