Estoy tratando de hacer un sitio web con tres.js, el problema es que no sé cómo alinear y responder la malla al mismo tiempo, alineo la malla de esta manera.
cube.position.x = -20Pero cuando cambio el tamaño de la ventana, no se mueve. ¿Cómo puedo hacer que responda y alinearlo a la izquierda?
aquí está mi código
const geometry = new THREE.BoxGeometry( 29, 20, 3 ) const material = new THREE.MeshBasicMaterial( { map: cubetexture } ); const cube = new THREE.Mesh( geometry, material ); cube.position.x = -20 scene.add(cube) var clock = new THREE.Clock(); function animate() { requestAnimationFrame( animate ); const time = clock.getElapsedTime(); cube.position.y = Math.cos( time ) * 2; cube.rotateY(Math.cos( time ) * 0.002) renderer.render( scene, camera ); } animate()gracias de antemano:)