3DGameEngine in ECMAScript6