Говорю тебе в 3 раз
Цитата:
сube1.rotation.z = 120 * Math.PI/180; первую букву c сделать русской |
извеняюсь
|
ошибку то я нашел, а вот только помоему кубы крутяться вокруг своей оси.
|
кто-нибудь меня слышит
|
Цитата:
var geometry = new THREE.CubeGeometry( 100, 300, 5 ); var material = new THREE.MeshBasicMaterial( { color: 0xff0000 }); cube1 = new THREE.Mesh( geometry, material ); cube1.rotation.y = 120 * Math.PI/180; cube1.position.set(-50* Math.cos(cube1.rotation.y), 0, 50* Math.sin(cube1.rotation.y)); var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 }); cube2 = new THREE.Mesh( geometry,material ); cube2.rotation.y = 240 * Math.PI/180; cube2.position.set(-50* Math.cos(cube2.rotation.y), 0, 50* Math.sin(cube2.rotation.y)); var material = new THREE.MeshBasicMaterial( { color: 0x0000ff }); cube3 = new THREE.Mesh( geometry,material ); cube3.rotation.y = 360 * Math.PI/180; cube3.position.set(-50* Math.cos(cube3.rotation.y), 0, 50* Math.sin(cube3.rotation.y)); scene.add( cube1 ); scene.add( cube2 ); scene.add( cube3 ); И замени renderer = new THREE.CanvasRenderer(); на renderer=new THREE.WebGLRenderer; |
А эту хренотень
var geometry = new THREE.CubeGeometry( 100, 300, 5 ); for ( var i = 0; i < geometry.faces.length; i += 2 ) { var hex = Math.random() * 0xffffff; geometry.faces[ i ].color.setHex( hex ); geometry.faces[ i + 1 ].color.setHex( hex ); } var geometry1 = new THREE.CubeGeometry( 100, 300, 5 ); for ( var i = 0; i < geometry.faces.length; i += 2 ) { var hex = Math.random() * 0xffffff; geometry.faces[ i ].color.setHex( hex ); geometry.faces[ i + 1 ].color.setHex( hex ); } var geometry2 = new THREE.CubeGeometry( 100, 300, 5 ); for ( var i = 0; i < geometry.faces.length; i += 2 ) { var hex = Math.random() * 0xffffff; geometry2.faces[ i ].color.setHex( hex ); geometry2.faces[ i + 1 ].color.setHex( hex ); } удали |
БОльшое спасибо. Я бы хрен догодался.
|
Цитата:
|
Хромает математика не того что не знают а от неумения применять.
|
Часовой пояс GMT +3, время: 23:04. |