未验证 提交 876bcfa9 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15146 from WestLangley/dev-texture_rotation_example

Texture rotation example: clean up
......@@ -64,8 +64,6 @@
};
init();
render();
function init() {
......@@ -88,11 +86,12 @@
var geometry = new THREE.BoxBufferGeometry( 10, 10, 10 );
var loader = new THREE.TextureLoader();
var texture = loader.load( 'textures/UV_Grid_Sm.jpg', render );
new THREE.TextureLoader().load( 'textures/UV_Grid_Sm.jpg', function ( texture ) {
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
texture.anisotropy = renderer.capabilities.getMaxAnisotropy();
texture.matrixAutoUpdate = false; // set this to false to update texture.matrix manually
//texture.matrixAutoUpdate = false; // default true; set to false to update texture.matrix manually
var material = new THREE.MeshBasicMaterial( { map: texture } );
......@@ -103,6 +102,10 @@
initGui();
render();
} );
window.addEventListener( 'resize', onWindowResize, false );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册