-
Notifications
You must be signed in to change notification settings - Fork 49
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
Move 3d rendering to a background web worker #2152
Conversation
not needed
this.cbLoadProgress(percentage) | ||
} | ||
|
||
onLoad (model): void { |
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.
Function onLoad
has 67 lines of code (exceeds 25 allowed). Consider refactoring.
this.cbLoadProgress(percentage) | ||
} | ||
|
||
onLoad (model): void { |
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.
Function onLoad
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
|
||
const handler: Comlink.TransferHandler<Event, UnifiedEvent> = { | ||
canHandle: (obj): obj is Event => (obj instanceof Event), | ||
serialize: (ev: Event) => { |
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.
Function serialize
has 36 lines of code (exceeds 25 allowed). Consider refactoring.
this.scene.add(light2) | ||
} | ||
|
||
load (cbLoadComplete, cbLoadProgress, cbLoadError): void { |
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.
Function load
has 26 lines of code (exceeds 25 allowed). Consider refactoring.
this.container.clientWidth / this.container.clientHeight, | ||
0.1, | ||
1000 | ||
async run (): Promise<void> { |
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.
Function run
has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Touch controls still need testing, but the easiest way for me to test that is by deploying this to my own instance, so I'll check it after the merge. |
Code Climate has analyzed commit 7a37d25 and detected 5 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 87.1% (0.0% change). View more on Code Climate. |
To improve performance, we are movign all the rendering into a web worker, as well as the loading.
This is pretty complicated and quite a big change...
Outstanding things todo:
Resolves #2071