помогите найти ошибку.
....
|
...
|
....
|
нашел одну но только поевилась другая.
var loader = new THREE.TextureLoader(); loader.load( 'textures/land_ocean_ice_cloud_2048.jpg', function ( texture ) { var geometry = new THREE.CubeGeometry( 110, 300, 5 ); var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: true } ); cube3 = new THREE.Mesh( geometry, material ); //group.add( mesh ); } ); //var material = new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, opacity: 0.5, transparent: true }); //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)); почти с избражением выдает ошибку cannot read property ' rotation' of endefaned |
...
|
var geometry = new THREE.CubeGeometry( 200, 200, 200); var Texture = new THREE.ImageUtils.loadTexture( 'textures/land_ocean_ice_cloud_2048.jpg' ); var material = new THREE.MeshBasicMaterial( { map: Texture } ); cube3 = new THREE.Mesh( geometry, material ); //var material = new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, opacity: 0.5, transparent: true }); //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)); |
Ты умудрился удалить добавление камеры. Верни как раньше:
info.innerHTML = 'Drag to spin the cube'; container.appendChild( info ); camera = new THREE.PerspectiveCamera( 70, window.innerWidth / window.innerHeight, 1, 1000 ); camera.position.y = 150; camera.position.z = 500; var group = new THREE.Object3D(); scene = new THREE.Scene(); var menu = "Подарки"; |
...
|
показать то показал, а вот с этими исправлениями вообще нерабоатает.
я создал для этой проблеммы новыю тему и указал там что нерабоатет. вотhttp://javascript.ru/forum/dom-windo...iblioteki.html |
Ответил в этой теме
|
Часовой пояс GMT +3, время: 12:20. |