/**
 * CG Space Invaders
 * CG45179 16'17
 *
 * @author: Rui Ventura ( ist181045 )
 * @author: Diogo Freitas ( ist181586 )
 * @author: Sara Azinhal ( ist181700 )
 */

import { Object3D, Vector3 } from '../lib/Three.js';

class Entity extends Object3D {

	constructor ( x, y, z ) {

		super();

		this.type = 'Entity';

		this.MAX_VELOCITY = 10;

		this.velocity     = new Vector3();
		this.trajectory   = new Vector3();

		this.acceleration = 10;

		this.position.set( x, y, z );

	}

	move ( dt ) {

		let vlim = this.MAX_VELOCITY;

		if ( this.velocity.lengthSq() < vlim * vlim ) {

			this.velocity.addScaledVector( this.trajectory, this.acceleration * dt );

		} else if ( this.velocity.length() === vlim ) {

			this.velocity.setLength( vlim );

		}

		this.position.addScaledVector( this.velocity, dt );

	}

}

export { Entity };

@@ -166,18 +166,16 @@
 %0A%0Aimport
- %7B
  Object3
@@ -175,17 +175,47 @@
 Object3D
-,
+ from '../lib/Three.js';%0Aimport
  Vector3
@@ -215,17 +215,16 @@
 Vector3 
-%7D
  from '.

Split imports