问题
I've created a sample to show what I'm seeing: https://haddons.net/threejs/chrome_firefox.html
I have a basic model that's loading a texture onto a plane and also pulling in some heightmap data. If I load it in chrome the texture is oriented in one direction and if I load it in firefox it's rotated 180 degrees.
Am I doing something wrong or is this a firefox, chrome or three.js bug?
回答1:
Unfortunately, this is a bug in the current version of three.js
(R102
). It will be fixed with the next release by this PR.
The problem was that textures were flipped if a resize was necessary. This always happens if you try to use mipmapping with a NPOT texture. A workaround is to configure your texture like the following, to use POT textures or WebGL 2:
texture.minFilter = THREE.LinearFilter;
来源:https://stackoverflow.com/questions/55180153/different-orientation-for-planebuffergeometry-in-chrome-vs-firefox