Skip to content

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Jul 7, 2021

Fixes: #22093

Description

Avoid instantiating new <canvas> elements every interacting frame 😬

@mrdoob mrdoob added this to the r131 milestone Jul 7, 2021
@mrdoob mrdoob merged commit 9f71941 into dev Jul 7, 2021
@mrdoob mrdoob deleted the htmlmesh branch July 7, 2021 14:26
@Degubi
Copy link
Contributor

Degubi commented Sep 16, 2022

Hi!
I was looking at HTMLMesh (for absolutely no specific reason)
I noticed that we read from the canvas cache, but we never set anything anywhere?

https://github.com/mrdoob/three.js/blob/dev/examples/jsm/interactive/HTMLMesh.js#L474

We read here, but we never set it in the else branch, I think this might be a mistake
I commented here because it was this PR that added the canvas cache
@mrdoob @Mugen87

@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 16, 2022

Good catch. Indeed, I can't spot a canvases.set( element, canvas ); statement.

Would you be willing to file a PR with the fix?

@Mugen87 Mugen87 restored the htmlmesh branch September 16, 2022 08:18
@Mugen87 Mugen87 deleted the htmlmesh branch September 16, 2022 08:18
@Mugen87 Mugen87 restored the htmlmesh branch September 16, 2022 08:18
@Degubi
Copy link
Contributor

Degubi commented Sep 16, 2022

Sure! #24650

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.

HTMLMesh is creating a lot of canvas objects.

4 participants