]> git.r.bdr.sh - rbdr/lissajous/blobdiff - lib/factories/global.js
Add a few comments
[rbdr/lissajous] / lib / factories / global.js
index c601bdbfdd2c1f399980df2b241b3616fe535709..4f36a8e3bc96619926ecab859360a7c7ddf547fb 100644 (file)
@@ -6,6 +6,15 @@ import Radius from '../components/radius';
 import Up from '../components/up';
 import Configuration from '../components/configuration';
 
+/**
+  * This file is a factory for global objects. It doesn't enforce it, but
+  * there should be only one of these entities in the engine at a given
+  * time.
+  */
+
+/**
+  * Creates a data entity that holds the configuration.
+  */
 export function configuration() {
 
   const entity = new Entity();
@@ -14,6 +23,9 @@ export function configuration() {
   return entity;
 }
 
+/**
+  * Creates a camera, used to modify the 3D view.
+  */
 export function camera() {
 
   const entity = new Entity();
@@ -21,7 +33,7 @@ export function camera() {
   entity.addComponent(new EulerAngle());
   entity.addComponent(new Velocity({
     x: 0,
-    y: Math.PI / 180,
+    y: Math.PI / 30,
     z: 0,
   }));
   entity.addComponent(new Radius({