Anders and Briegel in Python
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

40 行
1.0KB

  1. var graph;
  2. function graph_model(){
  3. this.geometry = new THREE.Geometry();
  4. this.nodes = new THREE.Points(this.geometry, materials.qubit);
  5. this.nodes.geometry.dynamic = true;
  6. this.object = new THREE.Object3D();
  7. this.object.add(this.nodes);
  8. this.add_node = function(node){
  9. var vertex = new THREE.Vector3(0, 0, 0);
  10. this.nodes.geometry.vertices.push(vertex);
  11. this.nodes.geometry.verticesNeedUpdate = true;
  12. render();
  13. };
  14. }
  15. //function buildGraph(json) {
  16. // Add all the qubits
  17. //var geometry = new THREE.Geometry();
  18. //var vertex = new THREE.Vector3(0, 0, 0);
  19. //geometry.vertices.push(vertex);
  20. //var nodes = new THREE.Points(geometry, materials.node);
  21. // Add all the edges
  22. //var edges = new THREE.Object3D();
  23. //edges.add(makeEdge({
  24. //"start": [0, 0, 0],
  25. //"end": [1, 1, 1]
  26. //}));
  27. // Construct and return
  28. //var graph = new THREE.Object3D();
  29. //graph.add(nodes);
  30. //graph.add(edges);
  31. //return graph;
  32. //}