This commit is contained in:
@@ -16,11 +16,15 @@ renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
|
||||
// Cube geometry stuff.
|
||||
const geometry = new THREE.BoxGeometry(5, 1, 1);
|
||||
const material = new THREE.MeshBasicMaterial(
|
||||
{ color: 0x962FFE }
|
||||
);
|
||||
const material = new THREE.MeshBasicMaterial({ color: 0x962FFE });
|
||||
const material2 = new THREE.MeshBasicMaterial({ color: 0x00FF00 });
|
||||
const cube = new THREE.Mesh(geometry, material);
|
||||
const cube2 = new THREE.Mesh(geometry, material2);
|
||||
cube2.position.x = 4;
|
||||
cube2.position.z = 7;
|
||||
cube2.rotateX = 35;
|
||||
scene.add(cube);
|
||||
scene.add(cube2);
|
||||
|
||||
// Light stuff
|
||||
const light = new THREE.DirectionalLight(0xFFFFFF, 0.5);
|
||||
@@ -31,7 +35,8 @@ scene.add(light);
|
||||
let clock = new THREE.Clock();
|
||||
let controls = new FirstPersonControls(camera, renderer.domElement);
|
||||
controls.movementSpeed = 5;
|
||||
controls.lookSpeed = 0.8;
|
||||
controls.lookSpeed = 0.1;
|
||||
controls.lookVertical = false;
|
||||
|
||||
function animate() {
|
||||
controls.update(clock.getDelta());
|
||||
|
||||
Reference in New Issue
Block a user