Passive events connected to canvas

chrome seems to complain that i have events that are not passive, Im doing

canvas.addEventListener("pointermove", onPointerMove, false);
canvas.addEventListener("pointerdown", onPointerDown, false);
canvas.addEventListener("pointerup", onPointerUp, false);

what would be the way to transform them into passive events?
would it be like this?

canvas.addEventListener(“pointerdown”, onPointerDown, { passive: true });
canvas.addEventListener(“pointerup”, onPointerUp, { passive: true });

any other tips to make events be as light as possible?

thank you :slight_smile:

this should be fine. Up to you then to reduce the code load in this events

1 Like



I got the same issue in version 4.2 so the last stable. I asked about it and you do not know when you will release v5 stable and this is an issue for my app at the moment. Can you not add this to version 4.2? as a bug fix? I think you will have some more things to add as well to release v 4.2.1


Why not using the latest preview in this case ? There are way too many changes to back port and we could do more harm than fix here.

Also adding @PirateJC and @thomlucc to see if we need another version in between but please note it would simply be a removing alpha fromthe version name :slight_smile:

@sebavan Hi

There are other changes that I found. For instance, during ES6 modules bundling Standard Material is added with SolidParticlesSystem. We removed all instances of StandardMaterial to NodeMaterial just so we do not need to import that package and now cause we started using SolidParticleSystem that package is back in our bundle. But it’s not added in for just a Mesh import anymore.

Some things are super annoying and now we got an audit about the product and those things coming up but we do not want to move to version 3 cause it’s in alpha and it’s not stable.

Some Bug fixes should be added to 4.2 IMO.

Can you just bundle up some fixes and release 4.2.1?


Even if we publish an intermediate version, events are a huge change in 5.0 and would require way to much unsafe backport.

Let s rather fix what you found in 5.0.

Is it just this import ??? cause it might be a quick fix.