{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/6691","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/6691/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/6691/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/6691/events","html_url":"https://github.com/mrdoob/three.js/issues/6691","id":88133770,"number":6691,"title":"Custom geometry not casting shadows","user":{"login":"YemSalat","id":2361381,"avatar_url":"https://avatars.githubusercontent.com/u/2361381?v=3","gravatar_id":"","url":"https://api.github.com/users/YemSalat","html_url":"https://github.com/YemSalat","followers_url":"https://api.github.com/users/YemSalat/followers","following_url":"https://api.github.com/users/YemSalat/following{/other_user}","gists_url":"https://api.github.com/users/YemSalat/gists{/gist_id}","starred_url":"https://api.github.com/users/YemSalat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YemSalat/subscriptions","organizations_url":"https://api.github.com/users/YemSalat/orgs","repos_url":"https://api.github.com/users/YemSalat/repos","events_url":"https://api.github.com/users/YemSalat/events{/privacy}","received_events_url":"https://api.github.com/users/YemSalat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-14T06:42:39Z","updated_at":"2015-06-14T07:25:41Z","closed_at":null,"body":"I am trying to get my custom geometry to cast a shadow, it works fine with predefined geometries like cylinder or sphere, but does not work for custom geometries.\r\n\r\nFor example (creates a diamond):\r\n\r\n```javascript\r\ncreateDiamond: function (params) {\r\n            var material = new THREE.MeshLambertMaterial({color: col, side:THREE.DoubleSide});\r\n            var geometry = new THREE.Geometry();\r\n            // vertices\r\n            geometry.vertices.push(new THREE.Vector3(0, d, h));\r\n            geometry.vertices.push(new THREE.Vector3(0, -d, h));\r\n            geometry.vertices.push(new THREE.Vector3(-w, 0, h));\r\n            geometry.vertices.push(new THREE.Vector3(0, 0, 0));\r\n            geometry.vertices.push(new THREE.Vector3(w, 0, h));\r\n            geometry.vertices.push(new THREE.Vector3(0, 0, h*2));\r\n            // faces\r\n            geometry.faces.push(new THREE.Face3(0, 4, 5));\r\n            geometry.faces.push(new THREE.Face3(0, 3, 4));\r\n            geometry.faces.push(new THREE.Face3(0, 2, 5));\r\n            geometry.faces.push(new THREE.Face3(0, 2, 3));\r\n            geometry.faces.push(new THREE.Face3(1, 4, 5));\r\n            geometry.faces.push(new THREE.Face3(1, 3, 4));\r\n            geometry.faces.push(new THREE.Face3(1, 2, 5));\r\n            geometry.faces.push(new THREE.Face3(1, 2, 3));\r\n            // normals\r\n            geometry.computeFaceNormals();\r\n            geometry.computeVertexNormals();\r\n\r\n            var $shape = new THREE.Mesh(geometry, material);\r\n\r\n            // CAST SHADOWS\r\n            $shape.castShadow = true;\r\n\r\n            return $shape;\r\n        }\r\n```\r\n\r\n![three.js custom geometry diamond not casting shadows][1]\r\n\r\nYou can download the source here: [3d-crabs.zip][2] (the file is *js/api.js*, it will work locally if you just open index.html in the browser)\r\n\r\n\r\n  [1]: http://i.stack.imgur.com/8oEWS.png\r\n  [2]: http://webcloudtools.com/uploads/3d-crabs.zip"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/111795048","html_url":"https://github.com/mrdoob/three.js/issues/6691#issuecomment-111795048","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/6691","id":111795048,"user":{"login":"YemSalat","id":2361381,"avatar_url":"https://avatars.githubusercontent.com/u/2361381?v=3","gravatar_id":"","url":"https://api.github.com/users/YemSalat","html_url":"https://github.com/YemSalat","followers_url":"https://api.github.com/users/YemSalat/followers","following_url":"https://api.github.com/users/YemSalat/following{/other_user}","gists_url":"https://api.github.com/users/YemSalat/gists{/gist_id}","starred_url":"https://api.github.com/users/YemSalat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YemSalat/subscriptions","organizations_url":"https://api.github.com/users/YemSalat/orgs","repos_url":"https://api.github.com/users/YemSalat/repos","events_url":"https://api.github.com/users/YemSalat/events{/privacy}","received_events_url":"https://api.github.com/users/YemSalat/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T07:25:41Z","updated_at":"2015-06-14T07:25:41Z","body":"Sorry, I had a problem elsewhere in my code, please close."}}