-
- function nodeSort(a, b) {
- return a - b;
- }
-
- Map.prototype.updateColor = function(arch) {
- var nodes = this.scene.children;
- for (var i = 0; i < nodes.length; ++i) {
- if (nodes[i].arch == arch && nodes[i].boot_state != "Suspected") {
- var id = parseInt(nodes[i].id);
- var array = this.nodes[arch];
- nodes[i].boot_state = $.inArray(id, array) == -1 ? "Alive" : "Selected";
- setColor(nodes[i]);
- }
- }
- this.update();
- }
-
- Map.prototype.updatePosition = function() {
- this.camera.position.x = this.distance * Math.sin(this.theta * Math.PI / 360) * Math.cos(this.phi * Math.PI / 360);
- this.camera.position.y = this.distance * Math.sin(this.phi * Math.PI / 360);
- this.camera.position.z = this.distance * Math.cos(this.theta * Math.PI / 360) * Math.cos(this.phi * Math.PI / 360);
- this.camera.lookAt(this.scene.position);
- this.camera.updateMatrix();
- };
-
- Map.prototype.update = function() {
- this.renderer.render(this.scene, this.camera);
+
+ function circle(context) {
+ context.beginPath();
+ context.arc(0, 0, 1, 0, Math.PI * 2, true);
+ context.closePath();
+ context.fill();