-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Fixes for server side usage #8357
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
Open
limzykenneth
wants to merge
8
commits into
processing:dev-2.0
Choose a base branch
from
limzykenneth:server-usage
base: dev-2.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d31f77c
Update dependency and package gifenc
limzykenneth f645136
Move some references from window to globalThis
limzykenneth ba3407d
Have core work in node.js
limzykenneth c4700f1
Guard against a few references to window
limzykenneth 130d67f
Use ES6 import in visual report script
limzykenneth b1dcca7
Update CI node version
limzykenneth b417ba9
Provide a node compatible export
limzykenneth 4dd62c3
Merge branch 'dev-2.0' into server-usage
limzykenneth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| // core | ||
| import p5 from './core/main'; | ||
|
|
||
| // shape | ||
| import shape from './shape'; | ||
| shape(p5); | ||
|
|
||
| //accessibility | ||
| import accessibility from './accessibility'; | ||
| accessibility(p5); | ||
|
|
||
| // color | ||
| import color from './color'; | ||
| color(p5); | ||
|
|
||
| // core | ||
| // currently, it only contains the test for parameter validation | ||
| // import friendlyErrors from './core/friendly_errors'; | ||
| // friendlyErrors(p5); | ||
|
|
||
| // data | ||
| import data from './data'; | ||
| data(p5); | ||
|
|
||
| // DOM | ||
| import dom from './dom'; | ||
| dom(p5); | ||
|
|
||
| // image | ||
| import image from './image'; | ||
| image(p5); | ||
|
|
||
| // io | ||
| import io from './io'; | ||
| io(p5); | ||
|
|
||
| // math | ||
| import math from './math'; | ||
| math(p5); | ||
|
|
||
| // utilities | ||
| import utilities from './utilities'; | ||
| utilities(p5); | ||
|
|
||
| // webgl | ||
| import webgl from './webgl'; | ||
| webgl(p5); | ||
|
|
||
| // typography | ||
| import type from './type'; | ||
| type(p5); | ||
|
|
||
| // Shaders + filters | ||
| import shader from './webgl/p5.Shader'; | ||
| p5.registerAddon(shader); | ||
| import strands from './strands/p5.strands'; | ||
| p5.registerAddon(strands); | ||
|
|
||
| export default p5; | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any implications to using
document.documentElement.clientWidthrather thanwindow.innerWidth?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
window.innerWidthincludes scrollbar whiledocument.documentElement.clientWidthdoes not, which means the former will include areas that will be covered up by the scrollbar while the later will only be the visible area.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is kind of a different behavior although the previous behavior feels a bit undefined because it fallback on these different definition, at the same time I think
document.documentElement.clientWidthis more likely to be the desired value. Can change it back though if there are edge cases that will be messed up by this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that makes sense then, we can just make sure we test this a bit when it's in an RC to see if there are any edge cases it breaks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I can think of is that if the sketch is created when the page does not have scroll bars but later on in the page lifetime it gained a scroll bar, that may be a bit unexpected since the value of
document.documentElement.clientWidthchanged in this case whilewindow.innerWidthwould stay the same. Not sure if it would be a problem though.