{"issue":{"user":{"id":396450,"login":"florianf","url":"https://api.github.com/users/florianf","gravatar_id":"9f520ce9d9a64713133fd3bba4129ae8","avatar_url":"https://secure.gravatar.com/avatar/9f520ce9d9a64713133fd3bba4129ae8?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"milestone":null,"title":"Multiple Textures per Plane","created_at":"2011-09-13T12:32:44Z","updated_at":"2011-12-23T01:24:17Z","labels":[{"name":"Question","url":"https://api.github.com/repos/mrdoob/three.js/labels/Question","color":"dad9ff"}],"state":"closed","id":1632688,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/mrdoob/three.js/issues/533","closed_at":"2011-09-14T10:58:11Z","number":533,"body":"It's probably a stupid question, but I couldn't find an answer in the intertubes.\r\n\r\nI got a nice PlaneGeometry with 32 segments in each direction (width & height). Now i want to place 4 different textures on this plane, one in the lower left, lower right, upper left, upper right. My textures are all 256px large.\r\n\r\nFollowing this tutorial I was able to repeat the texture:\r\nhttp://catchvar.com/threejs-game-overview-and-isometric-grid\r\n\r\nFor an extra tip how i could dynamically change the number of textures on an object, I would be extra grateful ;-) \r\nBackground: I want to load higher resolution textures when the user zooms to an object. \r\n\r\nThx in a advance.\r\n\r\n","url":"https://api.github.com/repos/mrdoob/three.js/issues/533","comments":7,"assignee":null},"comment":{"user":{"id":759958,"login":"erulabs","url":"https://api.github.com/users/erulabs","gravatar_id":"69f9ba3e47a6d7e1cee9ff1ab805d3da","avatar_url":"https://secure.gravatar.com/avatar/69f9ba3e47a6d7e1cee9ff1ab805d3da?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-12-23T01:24:17Z","updated_at":"2011-12-23T01:24:17Z","id":3257133,"body":"I wonder if someone could post a hint about using multiple materials with a merged geometry...\r\n\r\n```javascript\r\ngeo = new THREE.PlaneGeometry(10, 10, 1, 1)\r\ngeo.faces[0].materials = [ new THREE.MeshBasicMaterial({ color: 0xffffff }), new THREE.MeshBasicMaterial({ color: 0x00ff00 }) ]\r\nmergingGeo = new Geometry()\r\nfor i in [0..10]\r\n  mesh.position.x = i\r\n  THREE.GeometryUtils.merge(mergingGeo, mesh)\r\nfinalMesh = new THREE.Mesh(mergingGeo, new THREE.MeshFaceMaterial())\r\n```\r\n\r\nExcuse the coffescript, but hopefully you can see the problem? The \"final mesh\" you create out of the merged geometry requires its own material... If you use my array geo.faces[0].materials it says DEPRECIATED using first index. Ack! How do I get the merged mesh to use the materials of the... merged meshes?\r\n\r\nSorry for the lack of 3d knowledge, I am new to graphics programming but very comfortable with js. Thanks so much in advance and thanks for threejs!\r\n","url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/3257133"},"action":"created"}