Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove "Texture has been resized" console logs in three.js

Tags:

three.js

I see warnings like the following in the console for my threejs project.

THREE.WebGLRenderer: Texture has been resized from (613x345) to (512x256).

Researching around, it looks like its not something to be concerned about. But I would like to remove these logs to keep the console clean. How can we achieve that?

like image 338
Avi Avatar asked Mar 15 '19 04:03

Avi


1 Answers

Setting

texture.minFilter = THREE.LinearFilter;

will turn off mipmapping and the need for resizing to a power-of-two.

Or, manually resize your textures to a power-of-two before you use them.

three.js r.102

like image 107
WestLangley Avatar answered Nov 03 '22 01:11

WestLangley