-
Notifications
You must be signed in to change notification settings - Fork 16
Add three.js benchmark #75
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for webkit-jetstream-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
const canvas = {} | ||
canvas.addEventListener = function() { } | ||
canvas.style = {} | ||
canvas.getContext = function(kind) { |
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.
nit: I'd probably define the mock-canvas as object literal:
const canvas = {
addEventListener() {},
...
}
for(let i = 0; i < NUM_PARTICLES; i++) { | ||
const size = 10 + Math.random() * 80; | ||
const particle = | ||
createGeometryParticle(size); |
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.
nit: superfluous newline
|
||
// Initialize particles | ||
const particles = []; | ||
for(let i = 0; i < NUM_PARTICLES; i++) { |
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.
Could we put this in the init() method?
This might be nice in the future for getting some extra coverage if we add timers.
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 also wouldn't be opposed to having this be part of the first iteration since this seems like the setup a real three.js app would do.
Generally LGTM. Would it make sense to bump to the latest threejs version as well? |
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.
Overall looks good to me too but it needs to have a tag that runs by default. Maybe we should add a "Frameworks" tag? I'm ok with doing that in a follow up but I assume wasn't what you intended.
|
||
// Initialize particles | ||
const particles = []; | ||
for(let i = 0; i < NUM_PARTICLES; i++) { |
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 also wouldn't be opposed to having this be part of the first iteration since this seems like the setup a real three.js app would do.
No description provided.