Skip to content

shortcut rendering for single instance - #985

Closed
elalish wants to merge 8 commits into
masterfrom
singleInstance
Closed

elalish wants to merge 8 commits into
masterfrom
singleInstance

Conversation

@elalish

@elalish elalish commented Feb 4, 2020

Copy link
Copy Markdown
Contributor

Fixes #845

My method here involves placing the renderer's canvas element into the shadow root when there is only one registered scene, thus bypassing the slow drawImage call. For multiple scenes on a page, it falls back to the old behavior. Unfortunately this also meant removing OffscreenCanvas, but this is currently doing nothing for us as it hasn't been hooked up to an ImageBitmapRenderingContext yet. I'm hoping this approach can be extended to support OffscreenCanvas in the future, but it's hard to tell from the limited API documentation so far.

@elalish
elalish requested a review from cdata February 4, 2020 00:31
@elalish elalish self-assigned this Feb 4, 2020
@elalish

elalish commented Feb 4, 2020

Copy link
Copy Markdown
Contributor Author

Hmm, on second thought, just moving the controls up to the container node has some a11y implications (and probably more). I think instead I'll make a canvas container that the two canvases can live in and put all the DOM stuff on it instead.

@elalish elalish mentioned this pull request Feb 6, 2020
@elalish

elalish commented Feb 6, 2020

Copy link
Copy Markdown
Contributor Author

I think we can close this in favor of #995.

@elalish elalish closed this Feb 10, 2020
@elalish
elalish deleted the singleInstance branch September 15, 2020 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model view is very slow on Firefox in demo

1 participant