Changeset 143 for js/viewer-f0/js/main.js
- Timestamp:
- 02/26/14 11:19:05 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
js/viewer-f0/js/main.js
r134 r143 14 14 neurons: [], 15 15 neuroConns: [], 16 neuroClasses: [], 16 17 modelOne: undefined, 17 18 _graphicsEngine: new GraphicsEngine(), 19 _neuronDrawer: new NeuronDrawer(), 18 20 downloadXML: function () { 19 21 var local = this; 20 22 $.ajax({ 21 url: "http:// localhost:63342/FramestickFavi/f0def.xml",23 url: "http://www.framsticks.com/files/dev/files/f0def.xml", 22 24 dataType: "xml", 23 25 async: false, … … 31 33 } 32 34 }) 33 34 35 }, 35 36 parseGeneXml: function () { 36 var nodes = $(this.xml.find("CLASS")); 37 this._parseClass($(this.xml.find("CLASS"))); 38 this._parseNeuroClass($(this.xml.find("NEUROCLASS"))) 39 }, 40 _parseClass: function(nodes){ 37 41 var local = this; 38 42 … … 56 60 57 61 }); 62 }, 63 _parseNeuroClass: function(data){ 64 65 for(var i = 0; i < data.length; i++) 66 { 67 var neuroClass = new NeuroClass(); 68 neuroClass.setModel(data); 69 this.neuroClasses.push(neuroClass); 70 } 58 71 }, 59 72 analyseLine: function (line) { … … 108 121 downloadCreature: function () { 109 122 var lines; 110 /*$.ajax({111 url: "http://localhost:6334 2/FramestickFavi/creatures/" + this.debugCreatureName + ".txt",123 $.ajax({ 124 url: "http://localhost:63343/FramestickFavi/creatures/" + this.debugCreatureName + ".txt", 112 125 async: false, 113 126 dataType: "text", … … 120 133 } 121 134 122 }); */135 }); 123 136 124 lines = $("#geno").val();125 lines = lines.split("\n");137 //lines = $("#geno").val(); 138 //lines = lines.split("\n"); 126 139 127 140 return lines; … … 153 166 //this._graphicsEngine.debugTest(); 154 167 this._graphicsEngine.renderScene(); 168 169 this._neuronDrawer.initializeScene(); 170 new SmartLayout(this.neurons, this.neuroConns); 171 this._neuronDrawer.drawNetwork(this.neurons, this.neuroConns, einfos); 172 this._neuronDrawer.renderScene(); 173 155 174 } 156 175 … … 162 181 geneWindow.parseCreature(); 163 182 geneWindow.mainLoop(); 164 //geneWindow.context = window.open("window.html", "Window", "width=200,height=100");165 183 166 184 }
Note: See TracChangeset
for help on using the changeset viewer.