|
From: <ma...@us...> - 2011-12-18 21:37:46
|
Revision: 598
http://openautomation.svn.sourceforge.net/openautomation/?rev=598&view=rev
Author: mayerch
Date: 2011-12-18 21:37:40 +0000 (Sun, 18 Dec 2011)
Log Message:
-----------
Sorting that private variables are at the top
Modified Paths:
--------------
JSFloorPlan/trunk/src/jsfloorplan.js
Modified: JSFloorPlan/trunk/src/jsfloorplan.js
===================================================================
--- JSFloorPlan/trunk/src/jsfloorplan.js 2011-12-18 21:09:00 UTC (rev 597)
+++ JSFloorPlan/trunk/src/jsfloorplan.js 2011-12-18 21:37:40 UTC (rev 598)
@@ -26,7 +26,7 @@
* JSFloorPlan 3D library.
* @module JSFloorPlan3D
* @title JS Floor Plan 3D
- * @reqires jQuery
+ * @reqires jQuery, Three.js
*/
if (typeof JSFLOORPLAN3D == 'undefined' || !JSFLOORPLAN3D)
{
@@ -43,9 +43,52 @@
* @constructor FOO
*/
JSFLOORPLAN3D= function () {
+ ////////////////////////////////////////////////////////////////////////////
+ // Definition of the private variables
+
var JSFloorPlan3D = this;
+ var floor;
+ // this array will contain all vertices to show in the svg
+ var vertices = Array();
+ // infos about the building
+ JSFloorPlan3D.buildingProperties = { floor: [], Object3D: new THREE.Object3D() };
+ var imageCenter = new Object;
+ var noFloorplan = true;
+
/**
+ * Store all nodes. This is an hash of points.
+ * @property floorNodes
+ * @type Hash
+ * @private
+ */
+ var floorNodes = new Object();
+
+ /**
+ * Store all walls. This is an arry of <code>wall</code> objects.
+ * @property floorWalls
+ * @type Array
+ * @private
+ */
+ var floorWalls = new Array();
+
+ /**
+ * Store all rooms. This is an array of arrays of Objects.
+ * @property rooms
+ * @type Array
+ * @private
+ */
+ var rooms = new Array;
+
+ /**
+ * Status if the 3D setup was done.
+ * @property noSetup
+ * @type Bool
+ * @private
+ */
+ var noSetup = true;
+
+ /**
* Constant representing the ID of an ELEMENT_NODE
* @property ELEMENT_NODE
* @private
@@ -55,6 +98,9 @@
*/
var ELEMENT_NODE = 1;
+ ////////////////////////////////////////////////////////////////////////////
+ // Definition of the private methods
+
/**
* Calculate the distance between two cartesian 2D points.
* @method calcLength2D
@@ -137,16 +183,6 @@
return pseudoangle_a - pseudoangle_b;
}
- var floor;
-
- // this array will contain all vertices to show in the svg
- var vertices = Array();
- // infos about the building
- JSFloorPlan3D.buildingProperties = { floor: [], Object3D: new THREE.Object3D() };
- var imageCenter = new Object;
-
- var noFloorplan = true;
-
/**
* Parse and create internal structure for the floor plan.
* @method parseXMLFloorPlan
@@ -544,13 +580,6 @@
};
/**
- * Store all nodes. This is an hash of points.
- * @property floorNodes
- * @type Hash
- * @private
- */
- var floorNodes = new Object();
- /**
* Fill the <code>floorNodes</code> structure with the nodes from the
* config file.
* @method parseFloorNodes
@@ -595,14 +624,6 @@
}
/**
- * Store all walls. This is an arry of <code>wall</code> objects.
- * @property floorWalls
- * @type Array
- * @private
- */
- var floorWalls = new Array();
-
- /**
* Fill the <code>floorWalls</code> structure with the wall elements from the
* config file.
* @method parseFloorWalls
@@ -688,13 +709,6 @@
}
/**
- * Store all rooms. This is an array of arrays of Objects.
- * @property rooms
- * @type Array
- * @private
- */
- var rooms = new Array;
- /**
* Fill the <code>rooms</code> array with the room elements from the
* config file.
* @method parseFloorRooms
@@ -754,7 +768,6 @@
}
}
- var noSetup = true;
/**
* Setup the whole scene
* @method setup3D
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|