Disable THREE.BufferGeometry warnings in my console

Hi!

I have a web app built in react-three-fibre and react which is in production that’s working as it should!

However… :grimacing: my problem is that I can’t seem to permanently disable some THREE.BufferGeometry and THREE.WebGLRenderer console warnings from the three.module.js file. I have 1000s of them and they are unfortunately affecting the performance.

I have tried deleting them from the node_modules which does remove them when in development, however in production they are reintroduced when I build and when the node_modules are created again. Here are some of the warnings I’m seeing:

THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute().
THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4().
THREE.WebGLRenderer: highp not supported, using lowp instead.

Is there a way I can have these warnings removed in production as well?

Thank you in advance for any assistance that you can provide.

// Dom

At least the first two warnings tell you that you are using outdated APIs. It’s best if you actually perform the respective migration tasks (e.g. renaming methods) if they are generated in your own code base.

If these warnings are generated in third-party libs, consider to use older versions. In this context, you should directly file issues at the respective GitHub repositories so the authors can update their code base.

In any event, it is not possible to disable three.js logs unless you overwrite console.warn.

1 Like