-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fix: Preserve canvas position when calling noSmooth() in WEBGL #7553
Fix: Preserve canvas position when calling noSmooth() in WEBGL #7553
Conversation
docs: add thrly as a contributor for doc, and code
docs: add lirenjie95 as a contributor for doc, and code
docs: add philyawj as a contributor for doc
docs: add akkarn1689 as a contributor for code
docs: add xinemata as a contributor for eventOrganizing, tutorial, and 3 more
…at2244 docs: add Vaivaswat2244 as a contributor for code
docs: add dkessner as a contributor for example
…Sinha1309 docs: add AnimeshSinha1309 as a contributor for example
docs: add kcconch as a contributor for example
docs: add davidblitz as a contributor for example
docs: add crh82 as a contributor for example
docs: add Aaron Welles as a contributor for example
docs: add example emoji to all example contributors using emoji key
docs: add seyko1 as a contributor for code
…rdist docs: add thekinardist as a contributor for example, and design
Thanks for making a PR! Two things to help make this more reviewable:
|
Hi @davepagurek, thanks for your patience! I tried rebasing my branch onto Would it be better if I reset my branch and recreated the PR with only the necessary changes? That way, the PR will be clean and contain only the actual fix for noSmooth() in p5.RendererGL.js and the documentation update. Let me know the best way to proceed! Thanks. |
Agreed, I think it's probably easiest to just manually re-apply the changes on top of dev-2.0. We've added a lot of changes between dev-2.0 and main so rebasing is unfortunately pretty difficult. |
I have created a new clean PR based on |
This issues has been resolved #7568 |
Resolves #7548
Changes:
_resetContext()
inp5.RendererGL.js
to check ifantialias
is alreadyfalse
, avoiding redundant resets.position
,top
, andleft
attributes, then restore them after recreation.src/core/shape/attributes.js
thatnoSmooth()
may recreate the canvas when called indraw()
.Before (Bug Occurs)
noSmooth()
indraw()
caused the canvas to reset to (0,0) instead of staying in its assigned position.After Fix
noSmooth()
is called.(Attach is the screenshot of test file running correctly: The sphere should be rendered inside a blue canvas at position

(150,50)
.)✅ PR Checklist
npm run lint
passes