-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
base: dev-2.0
Are you sure you want to change the base?
Fix: Preserve canvas position when calling noSmooth() in WEBGL #7553
Conversation
…dd-thrly docs: add thrly as a contributor for doc, and code
…dd-lirenjie95 docs: add lirenjie95 as a contributor for doc, and code
…dd-philyawj docs: add philyawj as a contributor for doc
…dd-akkarn1689 docs: add akkarn1689 as a contributor for code
…dd-xinemata docs: add xinemata as a contributor for eventOrganizing, tutorial, and 3 more
…dd-Vaivaswat2244 docs: add Vaivaswat2244 as a contributor for code
…dd-dkessner docs: add dkessner as a contributor for example
…dd-AnimeshSinha1309 docs: add AnimeshSinha1309 as a contributor for example
…dd-gabrielsroka docs: add gabrielsroka as a contributor for example
…dd-kcconch docs: add kcconch as a contributor for example
…dd-davidblitz docs: add davidblitz as a contributor for example
…dd-crh82 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
…dd-seyko1 docs: add seyko1 as a contributor for code
…dd-thekinardist 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 |
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